GeezerVison is showing github.com — pkgs/id build: test_clear_spanning_more_authors_than_the_cap_clears_exactly_its_claims fails (left 41, right 1) — blocks amd switch · Issue #5736 · developing-today/code
pkgs/id build: test_clear_spanning_more_authors_than_the_cap_clears_exactly_its_claims fails (left 41, right 1) — blocks amd switch #5736Descriptionpkgs/id: one lib test fails in the Nix build — blocks the amd system switch (2026-11-04)
The 2026-11-04 18:37 CST fleet switch (nixos-rebuild switch --flake ~/code#amd, log ~/switch-20261104-183723.log on the laptop) failed at the build stage — nothing was activated; the running generation is untouched.
Failing derivation: /nix/store/xfjjr7bsvdjgkjfpv2fm308bys5iizsh-id-0.1.0.drv (cascade: id-0.1.0 → unit-id-primary.service → system-units → etc → nixos-system-amd toplevel; SWITCH_EXIT=1).
Cause — a single test failure in the package's own suite (the build runs the tests):
test result: FAILED. 2765 passed; 1 failed; 6 ignored; finished in 22.05s
error: test failed, to rerun pass `-p id --lib`
---- local_events::tests::test_clear_spanning_more_authors_than_the_cap_clears_exactly_its_claims stdout ----
thread 'local_events::tests::test_clear_spanning_more_authors_than_the_cap_clears_exactly_its_claims' panicked at src/local_events.rs:923:9:
assertion `left == right` failed
left: 41
right: 1
The test name states the invariant: a clear spanning more authors than the cap should clear exactly its claims — it observed 41 where 1 was expected (or vice versa; left is the computed value in this harness). Everything else in the suite passes.
Context: this is the same failure class the darwin-nix build coordinator is chasing on the mcpx/other-packages front (Drew, 2026-11-04 18:28 CST) — build failures are that workstream's; this issue is the precise record for the id package leg. The switch's other gates were green at attempt time (see opencode#1146 switch record, 2026-11-04): #5610's route-proxy gate resolved on live config evidence, façade migration already 62/62 in the server DB, OpenClaw stand-in already retired. When this test is fixed, the switch can be re-run as-is. Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 Fixed and merged: PR #5923 (merge commit 2c2219b).
Root cause — stale test, correct implementation
test_clear_spanning_more_authors_than_the_cap_clears_exactly_its_claims is the #1736 frontier-cap regression test: 40 foreign authors set "topic" on one subject; the local node (key 0) clears it; the test asserted only the unrelated "other" claim remains in tags_on. Its cleared == 40 assertion passed; the view assertion failed (left 41, right 1), reproduced identically in a worktree before the fix.
The expectation predates the role-aware default view. PR #5657 ("id: make tag.clear role-aware in the default view", closes #2090, implementing the owner decision on #185) made EventStore::tag_claims — which tags_on reads — hide a claim only when the clear's poster is the claim's author or an admin of the group owning the subject. Key 0 is neither, and the subject has no owning group, so its markers hide nothing in that view. #5657's own evidence ran the integration tests it touched (tag_clear_authority, tag_claims, search) but not the lib suite, so this lib test's stale expectation survived until the switch's nix build ran the full suite. The #1736 mechanism itself is intact: the clear still splits by author across the MAX_AFTER cap, records markers naming exactly the 40 claims, and every named claim sits in its marker's causal past (the fold's removal condition).
Fix (test + docs only, pkgs/id/src/local_events.rs)
Evidence
- Full crate suite (
cargo test -p id, all targets + doctests): 0 failed, 2,736 passed.
- Package nix build in the switch's own composition from the fix branch:
nix build .#id-web at the repo root succeeds; checkPhase shows the fixed test ok, no failures. Output /nix/store/8xybdsabfpj5v0sdld5mflabf8p27cgv-id-0.1.0.
Separate observation from the same session: the standalone pkgs/id flake build fails a different, unrelated test (world_compile version probe) that the root composition passes — filed as #5926.
The switch re-run is unblocked from this side; it is dispatched separately.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|