You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8f765a0
Browse filesBrowse the repository at this point in the historyBrowse files
Third-pass review across independent reviewers. Most reported items were
already fixed on this branch; these are the residual confirmed ones.
- `processor.ts`: the compaction summarizer runs through the same processor
under the session's own id, so it shared the working agent's per-session
starvation tracker — its single mutation-free step advanced
`turnsWithoutMutation` for the real agent (spurious would-fire telemetry in
the default annotate mode, a premature directive in armed mode). Directive
delivery was already exempted for summary messages; starvation accounting
now is too, via the same `sbExempt` gate.
- `starvation.ts`: two raw NUL bytes were embedded directly in source as
string-literal separators, which made the file classify as binary — `grep`,
`file`, and review tooling skipped it entirely. Replaced with the equivalent
unicode escapes; the runtime strings are byte-identical.
- `config.ts` / `starvation.ts`: `max_turns_without_mutation` is counted per
generation step, not per user message; the schema description and the
threshold rationale said "assistant turns", which misleads operators tuning
it (one user message routinely spans several read-only steps).
- Tests: pin the summarizer exemption in the gate suite, and add two idle-done
cases that drive the detector in production event order (step-finish part,
then the step's snapshot patch part) — the existing fixtures emit the patch
first, which would mask an ordering regression in the mutation-versus-verify
comparison.
- `harness-review-followups.md`: record the four items deliberately deferred
from this pass (historical tool-stub omission on the summarizer path,
repeat-signature accumulation on successful calls, the run record's
stop-reason fallback, and converging the remaining test fixtures on
production ordering).
Gates: `bun test test/session/ test/cli/` (only the 2 known prompt.test.ts
timeout flakes fail), `bun run typecheck` clean, marker guard clean.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017KXpxBn4zteNfXTwv8cf93
Copy file name to clipboardExpand all lines: .github/meta/harness-review-followups.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,3 +41,14 @@ were deliberately deferred (no behavior change on this branch):
41
41
[LOW] packages/opencode/src/session/{termination,nudge,tool-result-cap}.ts, packages/opencode/src/cli/cmd/{run-accounting,idle-done}.ts — these 5 new modules use `export namespace` for organization, which the repo's module-shape convention (`packages/opencode/AGENTS.md`) asks new code to avoid in favor of flat exports + a bottom-of-file self-reexport. ~69 pre-existing files in the package already use the same pattern, so this is consistent with existing debt rather than a regression; fold into a holistic namespace-to-flat-exports cleanup across the package rather than converting these 5 files in isolation.
42
42
43
43
[LOW] packages/opencode/test/session/starvation.test.ts — the run-mode "armed" gate test re-implements the gate expression as a local helper instead of importing the real predicate from processor.ts, so a future change to the actual gate (added condition, reordered precedence, renamed exemption) would not be caught by this test — extract the gate into a shared, directly-testable predicate.
44
+
45
+
The following items came from a further multi-reviewer pass over this branch and
46
+
were deliberately deferred (no behavior change on this branch):
47
+
48
+
[MED] packages/opencode/src/session/llm.ts (addHistoricalToolStubs) — the stub-injection skip was narrowed to `toolChoice === "none" && no tools`, which closes the normal-turn regression, but the compaction summarizer still takes that path with a head that references historical tool calls. The skip rests on the claim that omitting both `tools` and `tool_choice` is universally accepted; the issue the stubs exist to fix concerned validation of referenced historical tool calls, which is orthogonal. Verify against the provider that originally needed the stubs before changing anything — reintroducing stubs here would advertise callable tools on a text-only call, so this is a provider-compatibility question, not a code cleanup.
49
+
50
+
[MED] packages/opencode/src/session/starvation.ts (repeatSignature / consecutive-signature counter) — the repeat signature folds the failure message in but the counter accumulates for successful calls too, so three identical SUCCESSFUL calls (re-running the same verification command, polling a status probe) reach the threshold and produce a directive asserting that repeating the call cannot change the result, which is untrue for a polling or verification call. Restricting accumulation to calls that carry a failure message narrows the detector's semantics and its overlap with the identical-args doom-loop ladder; make that change with validation data rather than in review, and note the directive text is prompt-visible.
51
+
52
+
[LOW] packages/opencode/src/cli/cmd/run-accounting.ts (termination) — `why_model_stopped` falls back to "stop" when no step-finish reason was ever recorded (an aborted run that never completed a step), so the run record attributes an ordinary stop to a session that never reported one. Distinguishing it needs a new value in the published record's enum, which is an output-contract change for downstream consumers — batch it with the next deliberate revision of the run record schema.
53
+
54
+
[LOW] packages/opencode/src/session/prompt.ts (post-compaction pin reminder) and packages/opencode/test/cli/idle-done.test.ts — the idle-done unit tests now pin production event ordering (step-finish part before the step's snapshot patch part) in two dedicated cases, but the shared fixtures still emit the patch first; converge the remaining fixtures on production ordering when the file is next touched.
"Consecutive assistant turns with zero corroborated file mutation before the write-starvation breaker fires (default: 12; see session/starvation.ts).",
318
+
"Consecutive assistant generation steps with zero corroborated file mutation before the write-starvation breaker fires (default: 12). Counted per model step, not per user message — one user turn routinely spans several read-only steps, so tune this against step counts (see session/starvation.ts).",
0 commit comments