v0.1 follow-ups: address swarm-review feedback + housekeeping#26
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
651bbe1b77b6cfDefaultonDrawDataf2767a9role_to_strvariant coverage2312707taiki-e/install-actionb11c544LICENSE-MITandLICENSE-APACHEfiles6b0ea9dCHANGELOG.mdand fillCLAUDE.mdBuild & TestMaterial review fixes
layout_tree_garbage_collects_within_a_single_tickpins it: a future regression that flips the chain to(sync, gc)would leave a ghost inLayoutTree; the test catches that.DrawDatadoc/code mismatch —ExtractedDraws's comment advised external authors to update via..Default::default()shims, butDrawData(which is what they construct) had noDefaultderive. Added the derive; every field already implementsDefault.role_to_strsnapshot 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 install cargo-deny --locked --version 0.19.4(rebuild from source, 2-4 min cold). Nowtaiki-e/install-action@v2withtool: cargo-deny@0.19.4(prebuilt binary, seconds).Housekeeping
LICENSE-MIT+LICENSE-APACHEat repo root, matching theMIT OR Apache-2.0declaration inCargo.toml. Copyright line: "2026 Buiy contributors". The README's License section was flagged as TBD until these landed.CHANGELOG.mdseeded withUnreleasedheading, Keep-a-Changelog 1.1.0 format, note that detailed tracking begins at the first tagged release.CLAUDE.md## Build & Testfilled 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_nodesorder-of-operations ontree.tree.removeerror — 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_animatetest redundancy — narrow guard against doc-only drift; deletion would lose that signal.https://claude.ai/code/session_01W662m44p1p5Xy57oEXxKg1
Generated by Claude Code