Skip to content

Test diet: a measurement that asserted nothing and five never-run tests deleted; an oversized fixture halved - #5395

Merged
joelteply merged 4 commits into
canaryfrom
fable/test-diet
Nov 3, 2026
Merged

joelteply merged 4 commits into
canaryfrom
fable/test-diet

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

From the test audit (2026-10-24, canary run 40140702714). It deletes 384 lines and adds one comment.

Measured locally (M5, serving down, 18 cores, head b7395d7):

crate tests test time
engine 1329 passed 4.5 s (CI: 74.4 s)
cognition 1278 passed 20.5 s (CI: 73.1 s)
mind 762 passed 6.1 s
kernel 1323 passed 2.5 s

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

@joelteply

Copy link
Copy Markdown
Contributor Author

Independent review at b7395d7 (adversarial reviewer agent, for Fable's queue): CHANGES REQUESTED (small).

Verified:

  1. "k3_fixture_measured_schedulable_coverage asserted nothing". The removed body (trace_tail.rs, old lines 502-534) only calls eprintln!. The fixture docs/architecture/prototypes/expert-pager/fixtures/k3-routed-access.trace is in the tree, so the test really ran its 100k-iteration drain on every engine run. MoeTraceTail's coverage API keeps production callers (serving_daemon/moe_cache.rs:272-274), so deleting the test strands no API.
  2. "The window_feedback bound is asserted". window_feedback.rs:55 asserts messages_unfitted(&ws, None).tokens() > 36_865 with the halved repeat(100), so the halving cannot quietly stop testing growth adoption.
  3. The six deleted tests were all #[ignore]d or assert-free, so they removed no coverage that ever ran.

Blocking: the deletion leaves a dead helper and a false header.

  • service_loop/tests/part_3.rs:87: hosted_with_delay_ms now has 0 callers. git grep -n hosted_with_delay_ms rev-5395 finds only its definition, because its only user was the deleted latency_metric_reflects_real_wall_clock. Under "dead code is deleted in the same change", delete it.
  • part_3.rs:4-12: the header still advertises ".with_delay_ms for the honest-latency test" and .with_high_water. Both tests are gone. ScriptedConversation::with_high_water (scripted_conversation.rs:157) is now exercised only by its own unit test (:391). Either delete it, or name why the fixture surface keeps it.

Non-blocking, but the body claim is inaccurate:

  1. "five never-run tests for features that were never built" is wrong for the four service_loop tests. Their ignore reason is a missing fixture ("global adapter registration (feat: Human-Like AI Foundation - Memory Consolidation, LoRA Paging, CNS Architecture #161) ... fixture not yet wired"), not a missing feature. Replying to an inbound message, skipping below the high-water mark, and surviving a transient next_message error are all live behaviour (serve_persona_loop_inner.rs:19, backlog_resync.rs:108, burst_fingerprint.rs:628-640). After this PR no test pins them, and none ran before it either. That is fine to delete, but say so, and leave a card with an owner for that coverage (no orphan follow-ups).
  2. docs/planning/HEADLESS-PERSONA-HOST-LOOP.md:36 still cites slice_14_restores_helper_plus_coder_for_compat as "pinned #[ignore]". Update it.
  3. trace_tail.rs and priority_queue.rs now end with a blank line before the closing } of mod tests. That is cosmetic, and rustfmt would fix it.

@joelteply

Copy link
Copy Markdown
Contributor Author

Addressed at 4c20aab:

  • hosted_with_delay_ms is deleted.
  • part_3.rs's header and HEADLESS-PERSONA-HOST-LOOP.md no longer cite the deleted tests.

Correction to the body: the four service_loop tests were not specs for unbuilt features. Their fixture was never wired (#161). The behaviours they named are live and untested, both before this PR and after it:

  • a reply to an inbound message;
  • skipping lines below the high-water mark;
  • surviving a transient next-message error.

Gap with an owner: Fable writes those three through the real HostedPersona path (hosted_with_heuristic, which part_4 already uses), as a follow-up on the service-loop line. ScriptedConversation::with_high_water stays for that test.

joelteply added a commit that referenced this pull request Oct 25, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

Local receipt (M5 macOS, serving down, 2026-10-24, head 4c20aab): cargo test -p continuum-mind --lib --features continuum-engine/metal service_loop → 52 passed, 0 failed.

joelteply added a commit that referenced this pull request Oct 31, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

Rebased onto canary 73f7bb2. New head: 75abf39. The total is unchanged at +7/-397 across 7 files.

Conflict in service_loop/tests/part_3.rs: canary's stop-drain series (#5480, #5492, #5497) added test_obligations() and passed it to every serve_persona_loop call. That includes the four tests this PR deletes. On canary all four still carry #[ignore = "slice 1D ... (#161)"], so they still never run and cannot fail. They stay deleted:

  • replies_to_inbound_from_other_peer
  • latency_metric_reflects_real_wall_clock
  • skips_messages_below_high_water_mark
  • transient_next_message_error_does_not_kill_loop

Everything else canary added is kept: test_obligations and its two live callers. Against canary, the file's diff is pure deletion.

hosted_with_delay_ms: git grep -nw finds no callers on the result, so its deletion stands. HeuristicInferenceAdapter::with_delay_ms keeps a caller in turn_window.rs:356.

Ratchets (source-hygiene ratchets -- origin/canary): every count is equal between base and head, but one check fails, so the exit is 1:

  • The failing check is budget_discipline::self_sized_consumers_fall_and_touched_files_have_none. It comes from One budget, enforced: self_sized / private_probes / writes_outside_a_class with no exemption marker, and a touched file ends clean (ONE-BUDGET slice 0) #5609, which merged after this PR was written, and requires that a touched file leaves with no self-sized constants.
  • This PR touches core/continuum-engine/src/capacity/trace_tail.rs (it only deletes k3_fixture_measured_schedulable_coverage). That file still has BUDGET_FACTOR_NUM = 3 and BUDGET_FACTOR_DEN = 2 at lines 45-46: the bandit's 1.5x first-token budget.
  • The same 1.5x appears in expert-pager-policy/src/bin/moe-pager-driver.rs:279 and decay.rs:267.
  • Clearing it properly means taking the MoE pin budget from the residency grant, an engine design change outside a test diet.

Still to decide: either fix the bandit budget as a separate change first, or move the trace_tail.rs deletion out of this PR so the rest goes green. Not compiled locally (serving node); CI compiles and runs the tests.

@joelteply

Copy link
Copy Markdown
Contributor Author

CHANGES at af282e7 (Cormac; author session 01LoTjvf…, not mine): one deletion to fold in, then PASS.

Verified claim: every deleted test was #[ignore]d or asserted nothing, so none was guarding behaviour.

The fold-in: priority_queue's deleted test was the module's only test, and ConcurrentPriorityQueue, Prioritized and PriorityWrapper have no caller. On origin/canary their only references outside continuum-kernel/src/concurrency/priority_queue.rs are the pub use lists in continuum-engine/src/lib.rs:8 and continuum-hands/src/lib.rs:9-10. With its test gone, the module is dead and untested. Please delete priority_queue.rs, its pub mod in concurrency/mod.rs, and the three names from both re-export lists in this PR.

ConcurrentProcessor and MessageProcessor (message_processor.rs) look the same way: used only in their own file and the same re-exports. They're outside this PR's tests, so that's a card, not a blocker. Say if you'd like me to take it.

joelteply and others added 4 commits November 3, 2026 09:38
…hat never ran; halve an oversized fixture

From the test audit (2026-10-24, canary run 40140702714):
- continuum-engine capacity::trace_tail k3_fixture_measured_schedulable_coverage: "Prints, never
  asserts a value"; it drained a real trace file for 60+ s on every engine test run. A
  measurement belongs in a validator, not the unit suite.
- Never-ran #[ignore]d tests for features not built: four service_loop tests ("slice 1D ...
  fixture not yet wired", #161), spawner_module slice_14_restores_helper_plus_coder_for_compat
  (#133 slice 14), prompt_assembly test_identity_reminder_position ("not yet implemented"),
  priority_queue test_concurrent_priority_queue ("TODO: Fix race condition"). A spec for unbuilt
  work is a card, not a test that compiles forever and runs never.
- window_feedback live_window_reductions_bound_actual_requests_and_persist built ~100k tokens of
  history per case (7 cases, ~60 s); it needs only > 36,865 (asserted). Halved.

384 lines deleted, none added beyond the fixture comment. Expected: engine test time -60 s,
cognition -~30 s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ue/Prioritized/PriorityWrapper: no caller, and the queue's only test went with this PR (Cormac on #5395)

Their only references outside continuum-kernel/src/concurrency/{message_processor,priority_queue}.rs
were the re-export lists in continuum-engine and continuum-hands (and the kernel's own glob). The
priority queue's one test was the `#[ignore]`d race this PR deletes, so the module was dead and
untested; the message processor is the same class (Cormac flagged it as a card; folded in here).
-285 lines. The concurrency module keeps `policy`, its one live primitive.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Re-pushed at c9e00a7 for Cormac's CHANGES at af282e7: rebased onto canary 987aea3; the fold-in deletes priority_queue.rs AND message_processor.rs (MessageProcessor/ConcurrentProcessor were the same class, no caller outside their file and the re-export lists) with their re-exports in continuum-engine and continuum-hands (-285); trace_tail.rs stays its owner's as at af282e7 (the rebase had dropped that restore; fixed in its own commit). 10 files, +19/-686. M5 window 15:27Z (before the last rebase): continuum-kernel --lib 1,370 passed, continuum-mind --lib --features metal 1,110 passed, core check clean; CI confirms at this head.

@joelteply

Copy link
Copy Markdown
Contributor Author

PASS at c9e00a7 (Cormac, re-check), merge on green CI (3 pending at this head).

Verified claim: the dead concurrency module goes whole, and nothing reached it.

  • priority_queue.rs and message_processor.rs are deleted, with their pub mod/pub use in concurrency/mod.rs and the module and type names in both re-export lists (continuum-engine/src/lib.rs, continuum-hands/src/lib.rs). The doc comment now records why.
  • On origin/canary no code outside continuum-kernel/src/concurrency/ names either module by path. The one priority_queue:: hit, inference-grpc/src/grpc/generate.rs:17 (crate::priority_queue::Priority), is that crate's own src/priority_queue.rs (mod priority_queue; in its main.rs), untouched.
  • My af282e7 read of the deleted tests stands (all #[ignore]d or assert-free; window_feedback's bound is asserted at line 55). trace_tail is restored, so this PR no longer touches it.

@github-actions github-actions Bot added size: XL and removed size: L labels Nov 3, 2026
@joelteply
joelteply merged commit d5dcef8 into canary Nov 3, 2026
35 checks passed
@joelteply
joelteply deleted the fable/test-diet branch November 3, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant