feat(continuation): swap diagnostic :reach/:skip for :noop debug breadcrumbs (#580 cleanup)#173
Merged
karmafeast merged 3 commits intoflesh_beast_figs/20260414-claudefrom Apr 19, 2026
Conversation
…paths in checkContextPressure (#580) Adds log.debug emission at each of the three silent null-returns in checkContextPressure() so future diagnostics can disambiguate from a journal grep without source-reading: - reason=window-zero (contextWindow <= 0 guard) - reason=below-threshold (ratio < threshold guard) - reason=band-dedup (band === previous, dedup suppression) Pairs with PR #172 (sentinel fix for dedup-band-zero collision): - #172 fixes the *behavioral* bug (band=0 now fires once on first crossing) - this PR fixes the *observability* bug (the three silent paths now leave a trace in the journal so future cascades like #580 are one-grep visible) Different file regions from #172, no merge conflict. No behavior change; debug-level logging only. Fleet-confirmed need: 75 :reach / 0 :skip / 0 :fire window on ronan + 1 :reach / 0 :skip / 0 :fire on cael with no breadcrumb explaining which null path was taken.
…agent-runner (#580 cleanup) PR #171 added info-level :reach + debug-level :skip breadcrumbs to the context-pressure outer guard to investigate the silent-fire-failure of #580. Investigation complete (root cause: dedup-band-zero collision, fixed by PR #172). Per figs's request: remove the diagnostic scaffolding so it doesn't ship long-term. Removed: - :reach info-level log at agent-runner.ts:1194 (entire reach-breadcrumb block + comment) - :skip debug-level log at agent-runner.ts:1225 (entire else-branch + skipReason resolution + duplicate logger import) Kept: - :fire info-level emit inside checkContextPressure (operational, not diagnostic) - :noop debug-level breadcrumbs at the three null-return paths (operational future-cascade visibility, this PR's earlier commit) Net: 22 lines removed, 9 lines added across both commits in this PR. Pairs cleanly with PR #172 (sentinel fix). 10/10 context-pressure tests pass.
There was a problem hiding this comment.
Pull request overview
This PR updates continuation context-pressure observability by removing the outer :reach/:skip diagnostics and instead emitting log.debug breadcrumbs at each of the three internal return null (“noop”) paths in checkContextPressure(), so operators can identify which suppression path occurred via journal grep.
Changes:
- Removed
:reachinfo log and:skipdebug log from the context-pressure pre-run injection block inrunReplyAgent. - Added
[context-pressure:noop]debug breadcrumbs forcontextWindow<=0,ratio<threshold, and band dedup suppression paths insidecheckContextPressure().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/auto-reply/reply/agent-runner.ts | Removes outer guard reach/skip logging around context-pressure injection. |
| src/auto-reply/continuation/context-pressure.ts | Adds debug breadcrumbs to disambiguate which internal noop return path was taken. |
Three Copilot suggestions applied to checkContextPressure:
1. Guard log.debug calls with log.isEnabled("debug") at all three
noop sites (window-zero, below-threshold, band-dedup) to avoid
eager string interpolation when debug logging is off — these are
per-turn hot-path emissions.
2. Below-threshold breadcrumb now logs raw ratio/threshold (4dp)
alongside the rounded percent, so the line stays unambiguous when
rounded values would coincide (e.g. ratio=0.0599, threshold=0.06
would both round to 6%).
3. (window-zero and band-dedup paths only needed the isEnabled
guard; their values are already disambiguating.)
Tests: 10/10 pass. Behavior unchanged when debug is enabled; perf
improved when debug is disabled.
Co-authored-by: Copilot <copilot@github.com>
e0ba8f8
into
flesh_beast_figs/20260414-claude
2 of 9 checks passed
ronan-dandelion-cult
pushed a commit
that referenced
this pull request
Apr 19, 2026
…le + status 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 🌊 <karmafeast@gmail.com>
ronan-dandelion-cult
pushed a commit
that referenced
this pull request
Apr 19, 2026
… not unrelated Cael's PR #194 review nit: the breadcrumb work and the dedup-sentinel-collision fix are causally linked — the noop breadcrumbs (#164, #173) are what made the silent dedup-suppression visible, which is what enabled #171/#172. Calling it 'unrelated' obscures that chain. Reword: 'Follow-on work then identified and fixed a second suppression cause that the new breadcrumbs made visible.'
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.
What
Adds
log.debugbreadcrumbs at each of the three silentreturn nullpaths insidecheckContextPressure()so future diagnostics can disambiguate from a journal grep without source-reading.Why
#580(:reach/:skip/:fireobservability) confirmed the outer guard is reachable every turn (75:reachon ronan, 1+ on cael in 36-min windows) but:firewas 0. Cael's investigation found the actual mechanism: dedup-band-zero collision (?? 0collides withband===0so first sub-25% crossing dedups silently). PR #172 fixes that behavior with the sentinel?? -1.This PR is the complementary observability fix: even after #172 lands, the three null-return paths are still silent except for
:reach/:skipat the outer boundary. If a future cascade lands us in the:noopregion, we currently have no journal trace explaining which of the three paths swallowed the call. This PR makes each path leave a one-line breadcrumb:reason=window-zero—contextWindow <= 0guard (line 64)reason=below-threshold—ratio < thresholdguard (line 87)reason=band-dedup—band === previousdedup suppression (line 98)After both PRs land + redeploy, a grep on
[context-pressure:noop]will surface exactly which suppression path hit each turn, and the field selectors (band=,previous=,ratio=,threshold=) make it filterable.Coverage
Existing 10/10 tests in
context-pressure.test.tscontinue to pass — no behavior change, only added debug-level emission.Conflict with #172
None. #172 changes line 99 (
?? 0→?? -1) insidelastFiredBand.get(). This PR adds 9 lines around the three null-returns. Verified clean three-way merge:Either order of merge is fine.
Lane
?? -1sentinel — band=0 fires once)Trigger
Same upstream issue: bootstrap#580 / openclaw#172. Lane split agreed in channel 17:15 PDT 2026-04-18.