test(continuation): add F-NOISE delegate-path mirror (#531)#170
Conversation
Adds one regression sentinel test on the delegate path in scheduler.test.ts mirroring the F-NOISE work-path test at lines 128–145. Issue #531 (B4.1) called out the gap: scheduleDelegateContinuation has no generation guard by construction, but no test pinned that invariant. A future refactor that introduced channel-noise cancellation on the delegate path would have shipped silently. Test verifies: with delayMs=10_000 and a fake-timer advance of 10_000ms (no other state change), onDelayedSpawn is invoked exactly once and onImmediateSpawn is not invoked. Closes karmaterminal/openclaw-bootstrap#531. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cael-dandelion-cult
left a comment
There was a problem hiding this comment.
🩸 ✅ approve. +32/-1 single-file test addition mirroring the existing F-NOISE work-path test on the delegate path. Asserts the #531 drift-guard invariant (delegate scheduler has no generation guard — timer fires regardless of inbound channel noise). Same shape and style as the existing test in the file. CI signal will tell us if vi.useFakeTimers setup is wired correctly. 🩸
elliott-dandelion-cult
left a comment
There was a problem hiding this comment.
🌻 LGTM. Clean regression sentinel — pins the no-generation-guard invariant on the delegate path. Test uses real delegate-side signature (onImmediateSpawn/onDelayedSpawn), timer advances correctly, assertion shape mirrors the existing F-NOISE work-path test. +32/-1 in one test file. Ready to merge.
723a75a
into
flesh_beast_figs/20260414-claude
…tus restoration Updates RFC docs/design/continue-work-signal-v2.md to reflect the totality of changes since 107ca2b (the prior RFC edit) plus the two ship-gate PRs about to land: - §4.3: document session provider/model threading through volitional compaction (openclaw#191 / bootstrap#639). Three coupled defects: root cause, caller-honesty (phantom-counter), visibility (`unknown_model` classifier + `isLegitSkipReason` helper + `log.warn` on resolve-with-fallback + scope-aware `authProfileId`). - §6.1: add `[context-pressure:noop]` log anchor with reason taxonomy (window-zero / below-threshold / band-dedup); document the bootstrap#580 investigation cycle (`:reach`/`:skip` instrumentation, root cause = sentinel collision on band 0, fix = -1 sentinel). - §6.3: clarify Discord/agent path through src/auto-reply/status.ts was reconnected at openclaw#187 + tested at #188 (the line had been silently dropped in an earlier refactor); note `volitional: N` is honest only after #191. - §6.4: replace 'instrumentation is not currently in place' note with status of distinguishing-instrumentation work (openclaw#164/171/172/173). - Appendix C.1: add 'Closed failure modes' table — phantom-counter, hedge-timer ref leak, band-0 dedup, precondition-skip blindness, Copilot summarization headers, dist-bundle satellite chunks, subagent-announce runtime path mismatch. - Appendix D.2: add evidence-location rows for the new file paths (volitional threading sites; armHedgeTimer; status renderer; request-compaction-tool tests; context-pressure noop sites; agent-runner runtime promotion; subagent-announce co-location; F-NOISE scheduler test). - Header: bump test count (~180 across 13 files, was '172 across 8') to reflect additions in #165, #170, #188, #193. Skip-list (no RFC mention): #174 sessions/config raw-key sweep (internal hygiene); #173 Copilot log-enabled nits (micro-hygiene); 86134af removal of investigation breadcrumbs (cycle is folded into §6.1 narrative). Refs: openclaw#191 head fc3f415 (in-flight, MERGEABLE/UNSTABLE, APPROVED) openclaw#193 head 14483a6 (in-flight, MERGEABLE/UNSTABLE, APPROVED x2) openclaw#187, #188 (merged d787890) openclaw#160, #162, #164, #165, #169, #170, #171, #172, #173, #174 🍆 in 🩲: this is a docs PR; if either #191 or #193 changes shape pre-merge the affected paragraph here will need a one-line touch-up. Co-Authored-By: dandelion cult - ronan 🌊 <[email protected]>
Summary
Closes karmaterminal/openclaw-bootstrap#531 (B4.1). Adds one regression sentinel test on the delegate path in
scheduler.test.tsthat mirrors the F-NOISE work-path test at lines 128–145.Why
scheduleDelegateContinuationhas no generation guard by construction. Today that's correct behavior. A future refactor that introduced channel-noise cancellation on the delegate path would have shipped silently because no test pinned the invariant. This is the regression sentinel.Test plan
pnpm exec vitest run src/auto-reply/continuation/scheduler.test.ts→ 9/9 pass (8 existing + 1 new).pnpm tsgoclean (pre-commit hook confirmed).Scope
scheduleDelegateContinuationalongside the existingscheduleWorkContinuationimport.describe("scheduleDelegateContinuation")block with one test using the actual delegate-side signature (onImmediateSpawn/onDelayedSpawn, not a singleonFire— the issue's skeleton was approximate).Refs
🤖 Generated with Claude Code