Skip to content

v0.1 follow-ups: address swarm-review feedback + housekeeping#26

Merged
intendednull merged 6 commits into
mainfrom
claude/v01-followups
May 8, 2026
Merged

v0.1 follow-ups: address swarm-review feedback + housekeeping#26
intendednull merged 6 commits into
mainfrom
claude/v01-followups

Conversation

@intendednull
Copy link
Copy Markdown
Owner

Follows up on PR #25 (claude/v01-readiness-backlog). Addresses every material issue from the three-agent swarm review plus the lower-priority housekeeping items.

Commits

Commit What
651bbe1 test(buiy_core): cover same-tick despawn+respawn ordering
b77b6cf fix(buiy_core): derive Default on DrawData
f2767a9 test(buiy_verify): pin role_to_str variant coverage
2312707 ci: install cargo-deny via taiki-e/install-action
b11c544 docs: add LICENSE-MIT and LICENSE-APACHE files
6b0ea9d docs: seed CHANGELOG.md and fill CLAUDE.md Build & Test

Material review fixes

  • GC same-tick test gap — the cross-tick GC test in 0190691 didn't exercise the intra-tick despawn+respawn invariant the commit body claimed. New layout_tree_garbage_collects_within_a_single_tick pins it: a future regression that flips the chain to (sync, gc) would leave a ghost in LayoutTree; the test catches that.
  • DrawData doc/code mismatchExtractedDraws's comment advised external authors to update via ..Default::default() shims, but DrawData (which is what they construct) had no Default derive. Added the derive; every field already implements Default.
  • role_to_str snapshot promise — the lint comment said unknown roles would surface in snapshot goldens, but no test exercised the path. Hardcoded variant list + assertion that none stringify to "Unknown". Renaming a variant breaks the test at compile time.
  • cargo-deny install perf — was cargo install cargo-deny --locked --version 0.19.4 (rebuild from source, 2-4 min cold). Now taiki-e/install-action@v2 with tool: cargo-deny@0.19.4 (prebuilt binary, seconds).

Housekeeping

  • LICENSE-MIT + LICENSE-APACHE at repo root, matching the MIT OR Apache-2.0 declaration in Cargo.toml. Copyright line: "2026 Buiy contributors". The README's License section was flagged as TBD until these landed.
  • CHANGELOG.md seeded with Unreleased heading, Keep-a-Changelog 1.1.0 format, note that detailed tracking begins at the first tagged release.
  • CLAUDE.md ## Build & Test filled in (was a _TODO_). Lists the canonical "run all checks" command (mirrors CI), the cargo-deny supply-chain check, and two useful one-offs.

Verified

  • cargo test -p buiy_core --test layout — 3/3 pass (incl. the new same-tick test).
  • cargo test -p buiy_verify --lib — 1/1 pass (the new variant-coverage test).
  • cargo clippy --workspace --all-targets -- -D warnings — clean.
  • cargo check --workspace --all-targets — clean.

Reviewer suggestions intentionally not taken

  • gc_removed_nodes order-of-operations on tree.tree.remove error — flagged as acceptable under the warn-not-fail contract elsewhere in the file. Left alone.
  • BuiySet #[non_exhaustive] — original commit's skip rationale ("intentional churn every plugin reacts to anyway") still holds.
  • layout_runs_before_animate test redundancy — narrow guard against doc-only drift; deletion would lose that signal.

https://claude.ai/code/session_01W662m44p1p5Xy57oEXxKg1


Generated by Claude Code

claude added 6 commits May 8, 2026 07:28
The cross-tick GC test (added in 0190691) verifies that a despawned
entity drops out of `LayoutTree` between updates. The reviewer flagged
that the *intra-tick* invariant the commit body claimed — "a single
tick that despawns and respawns a node sees a clean Taffy tree before
we re-walk the Bevy hierarchy" — was un-tested.

Adds `layout_tree_garbage_collects_within_a_single_tick`: spawn first
entity, run update, then in a single window despawn it AND spawn a
fresh entity, run update once. Asserts `LayoutTree::len() == 1` (no
ghost from the despawned entity) and that the survivor is the new
entity (proves sync ran after gc, not before).

A future regression that flips the chain to `(sync, gc)` would leave
the ghost in `LayoutTree` until the *next* update; this test catches
that the moment it lands.

Verified: cargo test -p buiy_core --test layout — 3/3 pass.

https://claude.ai/code/session_01W662m44p1p5Xy57oEXxKg1
`ExtractedDraws`'s doc comment advises external authors to update
through `..Default::default()` shims, but `DrawData` (which is what
those authors construct) had no `Default` derive. Adding the derive
makes the advice actually work — every field (Vec2, Vec2, Color, f32)
already implements `Default`.

Surfaces correctly via `#[non_exhaustive]`: outside crates can write
`DrawData { position: ..., size: ..., ..Default::default() }` once
new fields land in v0.x without breaking on the addition.

Verified: cargo check --workspace --all-targets, cargo clippy
--workspace --all-targets -- -D warnings — both clean.

https://claude.ai/code/session_01W662m44p1p5Xy57oEXxKg1
The `role_to_str` lint comment promised that "the unknown
stringification below shows up in snapshot goldens" when new roles
land — but no test in the tree actually exercised that path, so a
PR adding a new `A11yRole` variant without a `role_to_str` arm would
silently emit `"Unknown"` until a snapshot golden was regenerated for
unrelated reasons.

Adds a unit test that hardcodes every Phase 0 `A11yRole` variant
(`Generic`, `Button`, `Link`, `Image`, `Text`, `Heading`, `Dialog`,
`AlertDialog`, `Tooltip`) and asserts none stringifies to `"Unknown"`.

Forcing function: renaming any variant breaks the test at compile
time. (The reverse direction — adding to A11yRole without updating
role_to_str — still surfaces via downstream snapshot diffs; that gate
was never the role of this test.)

Verified: cargo test -p buiy_verify --lib — 1/1 pass.

https://claude.ai/code/session_01W662m44p1p5Xy57oEXxKg1
`cargo install cargo-deny --locked --version 0.19.4` rebuilds the
binary from source on every CI run that misses the rust-cache (and
the deny job had no rust-cache step), wasting 2-4 minutes of cold-
runner time per run.

`taiki-e/install-action@v2` with `tool: cargo-deny@0.19.4` pulls a
prebuilt binary in seconds. Version pin is preserved.

Verified locally: `cargo deny check` exits 0, no behavior change.

https://claude.ai/code/session_01W662m44p1p5Xy57oEXxKg1
Workspace `Cargo.toml` declares `license = "MIT OR Apache-2.0"` for
every crate, but the matching `LICENSE-MIT` and `LICENSE-APACHE` files
were missing at the repo root. The README's License section flagged
the gap as TBD.

Adds the OSI-published verbatim text for both licenses with a
copyright line "2026 Buiy contributors". This makes the dual-licensing
declaration in `Cargo.toml` actually meaningful for downstream users
and crates.io publication.

https://claude.ai/code/session_01W662m44p1p5Xy57oEXxKg1
CHANGELOG.md: Keep-a-Changelog 1.1.0 format with an `Unreleased`
heading and a note that detailed change tracking begins at the first
tagged release. Pre-`0.1.0` is pre-alpha; APIs may break in any commit.

CLAUDE.md `## Build & Test`: previously a `_TODO_` placeholder. The
section now lists the actual "run all checks" command (mirroring CI):
`cargo fmt --all -- --check && cargo clippy --workspace --all-targets
-- -D warnings && RUSTDOCFLAGS="-D warnings" cargo doc --workspace
--no-deps && xvfb-run -a cargo test --workspace`. This was the
forcing-function call-out in CLAUDE.md's own dev guidelines:
"Mechanical rigor before commit. Run the project's check command...
Fill in the exact command under `## Build & Test` once it exists."

Also lists the cargo-deny supply-chain check and two useful one-offs
(`cargo test -p buiy_core` for fast loop, `cargo run --example
hello_button` for visual smoke).

https://claude.ai/code/session_01W662m44p1p5Xy57oEXxKg1
@intendednull intendednull merged commit 1dfe84e into main May 8, 2026
6 checks passed
@intendednull intendednull deleted the claude/v01-followups branch May 8, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants