protocol, tests: check the minor ledger from the workspace tests member #199

Merged
natsukium merged 1 commit from workspace/out-of-crate-tests into main 2026-10-20 00:36:47 +09:00
Owner

Part of #160 (policy amendment: a test that reads a file outside its own crate moves to the tests/ member).

  • A sweep of crates/ finds only two such tests, both in felis-protocol, and both read docs/reference/ipc.md through CARGO_MANIFEST_DIR/../..: the_minor_ledger_has_a_row_per_minor and the_ledger_covers_every_executable_addition. They move unchanged to tests/protocol_ledger.rs.
  • The coverage test needs the generated ADDITIONS table. tools/proto/schema_meta.py now emits it as #[doc(hidden)] pub instead of #[cfg(test)] pub(crate), and felis_protocol::minor re-exports it.
  • tests/README.md and tests/Cargo.toml list the new test.

Verified:

  • Both moved tests fail when a ledger row is removed.
  • felis-protocol's own tests pass from its extracted package.
  • just lint, just publish-dry-run and fmt-check pass.
  • Review (pi, luna): PASS.

Not addressed here (accepted by the amendment): six crates (felis-pty, felis-client-core, felis-render-core, felis-render-wgpu, felis-daemon, felis-cli) do not compile their tests from the extracted package, because cargo package drops the path-only felis dev-dependencies and the test features on them (test-util, testing).

Part of #160 (policy amendment: a test that reads a file outside its own crate moves to the `tests/` member). - A sweep of `crates/` finds only two such tests, both in felis-protocol, and both read `docs/reference/ipc.md` through `CARGO_MANIFEST_DIR/../..`: `the_minor_ledger_has_a_row_per_minor` and `the_ledger_covers_every_executable_addition`. They move unchanged to `tests/protocol_ledger.rs`. - The coverage test needs the generated `ADDITIONS` table. `tools/proto/schema_meta.py` now emits it as `#[doc(hidden)] pub` instead of `#[cfg(test)] pub(crate)`, and `felis_protocol::minor` re-exports it. - `tests/README.md` and `tests/Cargo.toml` list the new test. Verified: - Both moved tests fail when a ledger row is removed. - felis-protocol's own tests pass from its extracted package. - `just lint`, `just publish-dry-run` and `fmt-check` pass. - Review (pi, luna): PASS. Not addressed here (accepted by the amendment): six crates (felis-pty, felis-client-core, felis-render-core, felis-render-wgpu, felis-daemon, felis-cli) do not compile their tests from the extracted package, because `cargo package` drops the path-only felis dev-dependencies and the test features on them (`test-util`, `testing`).
protocol, tests: check the minor ledger from the workspace tests member
Some checks failed
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
windows / detect relevant changes (pull_request) Successful in 8s
darwin / darwin docs-only no-op (pull_request) Has been skipped
windows / windows docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 2m36s
windows / cargo nextest (Windows) (pull_request) Successful in 3m27s
windows / frontend smoke (Windows) (pull_request) Successful in 51s
bench / instruction-count regression gate (pull_request) Successful in 1m6s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 51s
pr / nix flake check (pull_request) Successful in 1m27s
pr / wire schema is compatible with the base (pull_request) Successful in 3s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 44s
windows / cargo clippy (Windows cross) (pull_request) Successful in 15s
pr / cargo build / clippy / test / deny (pull_request) Has been cancelled
f1206c9a3a
felis-protocol's two ledger tests read docs/reference/ipc.md through
CARGO_MANIFEST_DIR/../.., which does not exist once the crate is
published, so `cargo test` on the crates.io package failed. They now
live in the tests/ member, which sits beside docs/ and is never
published; the crate's own suite passes from its extracted package.

The coverage check needs the schema's additions, so the generated
ADDITIONS table is compiled in and re-exported as a doc(hidden) item
of felis_protocol::minor instead of existing only under cfg(test).

Assisted-by: Claude Code
natsukium scheduled this pull request to auto merge when all checks succeed 2026-10-20 00:16:22 +09:00
natsukium force-pushed workspace/out-of-crate-tests from f1206c9a3a
Some checks failed
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
windows / detect relevant changes (pull_request) Successful in 8s
darwin / darwin docs-only no-op (pull_request) Has been skipped
windows / windows docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 2m36s
windows / cargo nextest (Windows) (pull_request) Successful in 3m27s
windows / frontend smoke (Windows) (pull_request) Successful in 51s
bench / instruction-count regression gate (pull_request) Successful in 1m6s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 51s
pr / nix flake check (pull_request) Successful in 1m27s
pr / wire schema is compatible with the base (pull_request) Successful in 3s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 44s
windows / cargo clippy (Windows cross) (pull_request) Successful in 15s
pr / cargo build / clippy / test / deny (pull_request) Has been cancelled
to c2b7cfeb4d
All checks were successful
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
windows / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
windows / windows docs-only no-op (pull_request) Has been skipped
bench / instruction-count regression gate (pull_request) Successful in 1m19s
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m12s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m34s
pr / nix flake check (pull_request) Successful in 30s
windows / cargo nextest (Windows) (pull_request) Successful in 3m40s
windows / frontend smoke (Windows) (pull_request) Successful in 1m15s
pr / cargo build / clippy / test / deny (pull_request) Successful in 5m28s
pr / wire schema is compatible with the base (pull_request) Successful in 3s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 1m14s
windows / cargo clippy (Windows cross) (pull_request) Successful in 40s
2026-10-20 00:25:50 +09:00
Compare
natsukium deleted branch workspace/out-of-crate-tests 2026-10-20 00:36:47 +09:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis!199
No description provided.