Repository navigation
Unify engine harness policies and isolate per-attempt safe outputs - #79546
Conversation
…to attempts Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Matt Pocock Skills ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
What this change does: It shares retry and safe-output policies across the engine harnesses and scopes terminal output to each attempt.
Should fix
- Inline the late-exit decision in each engine; the shared observation helper already covers the common work.
Verdict: fix 1 first.
Lean: -25 lines possible.
Generated by ✂️ Ponytail Reviewer for #79546 · codex · routed: gpt61 medium · ~7 AIC · ⌖ ~1 AIC · ⊞ 185
Comment /ponytail to run again
There was a problem hiding this comment.
Reviewed the changed harness retry, safe-output scoping, and associated tests. I found no actionable correctness or regression issues in the changed lines. Review was static; tests were not run per review constraints.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Skills-Based Review
Applied /diagnosing-bugs, /tdd and /codebase-design to the attempt-isolation and retry refactor. No blocking issues. Four targeted follow-ups are posted inline.
Key themes and highlights
Key themes
- Retry-After on the last attempt:
resolveRetryAfterDecisionstill logs a retry and setsrate_limit_errorin the Copilot exhausted-retry branch, where no retry happens. - Silent offset behavior change: the Codex
safeOutputsByteOffsetguard was dropped without a test. - Hygiene: a lazy inline require in Codex, and a test temp directory created under
process.cwd().
Positive highlights
- Attempt-scoped safe-output observation is centralised in
harness_safe_outputs.cjsand shared across Claude, Codex and Copilot. - Runtime-guard exit normalisation moved into the shared runner, so every engine sees it.
- Strict offset handling for Claude is preserved and covered by a new test.
Open question (not inline)
The Copilot and Codex whole-run hasTerminalSafeOutput checks (copilot_harness.cjs around L2427 and L2440, codex_harness.cjs around L1335) are unchanged context. They still scan the whole file, so an earlier attempt output can suppress a verdict. If that is intended for budget and replay protection, a one-line comment would help future readers.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
There was a problem hiding this comment.
🟡 Changes recommended
Inspection-error handling can mistake stale terminal output for new activity, while retry logic can replay completed work after output has already been staged.
2 open issues
What changed in this PR
This refactor consolidates shared retry policies across the Claude, Codex, and Copilot harnesses while preserving engine-specific failure handling. It also isolates terminal safe-output observation by attempt so earlier output does not mask later failures.
Changes:
- Share safe-output helpers, invocation-budget evidence, and Retry-After enforcement.
- Scope Copilot watchdog and late-exit checks to each attempt; centralize runtime-guard exit normalization.
- Add regression coverage and document shared harness responsibilities.
| File | Description |
|---|---|
actions/setup/README.md |
Documents shared policies and attempt isolation. |
actions/setup/js/harness_safe_outputs.test.cjs |
Tests offsets, stale output, and inspection errors. |
actions/setup/js/harness_safe_outputs.cjs |
Adds shared attempt-scoped output helpers. |
actions/setup/js/harness_retry_runner.test.cjs |
Tests guard-exit normalization and cancellation precedence. |
actions/setup/js/harness_retry_runner.cjs |
Centralizes guard normalization and Retry-After decisions. |
actions/setup/js/harness_retry_guard.test.cjs |
Tests fresh budget evidence and wait limits. |
actions/setup/js/harness_retry_guard.cjs |
Adds shared budget-observation and wait-policy helpers. |
actions/setup/js/copilot_harness.test.cjs |
Covers per-attempt watchdog and late-exit behavior in both modes. |
actions/setup/js/copilot_harness.cjs |
Captures attempt offsets and adopts shared policies. |
actions/setup/js/codex_harness.cjs |
Uses shared helpers for output observation and budget checks. |
actions/setup/js/claude_runtime.cjs |
Delegates strict offset inspection to the shared helper. |
actions/setup/js/claude_harness.cjs |
Adopts shared output and budget helpers. |
Review effort: Max (adaptive)
|
@copilot run pr-finisher skill |
PR finisher checked the PR: it is open and mergeable, but seven review threads remain unresolved. The later CJS run passed all eight test shards at the current HEAD; I made no changes because the supplied instructions restrict action on earlier comments. Local validation was not run. |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "9449414f442c6877e05c792f791e85510341cf76",
"kind": "requested",
"schema_version": "1",
"state": "eafcafb52a25089324eaa8f9487afcdd914c7367ea026c49f8ee366753cd93bc",
"work": [
"0ed19534253f409160dae3b51bb1163ac89b3d30e7da8895373fe7c7228e930a",
"121f2c7a925fc9b5e8c981afeccde9568d837fda42b5aeee64b94799e19ff137",
"2a041bd068f96224d209666fbba57cb5649f3563372e7b7285286027cc5b52b8",
"55c494f7d699642446d046d36867ec738e292db53b295589c39e05c0fcf53007",
"6242b081708c4e35933107722704030be38dca7f40dedc5436227a0bfd0a71ff",
"6bdcf9c1b061541cf9bf74c12d57fe512b5d6c48f0ff2d3df26b8de303c05f35",
"b22c5607b88912405ae23a020496e6894e4599e4a8c0d01571306cab7d187fe7"
],
"workflow": "pr-sous-chef"
}
|
…s-harness Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged main in 32e173d and addressed the seven linked reviews in 0bc0f42. Targeted suites and the final validation gate passed; CodeQL timed out. The full workflow recompile was interrupted after stalling during registry validation; no generated workflow changes were retained. No CI was triggered. |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "0bc0f422fb0b4fbab75c0e156e6c20b93d6052f2",
"kind": "requested",
"schema_version": "1",
"state": "76ef8913c42e3687ff33beb0bca6e13732f43ca651a53367bc942083a23f7793",
"work": [
"7fdcb480e7a98cc7e0f466a49ad1c7f7e8c5cfc22f8fbcc711724ed335220761"
],
"workflow": "pr-sous-chef"
}
|

Claude, Codex, and Copilot duplicated operational policies around their shared retry loop. This refactor consolidates those policies and prevents stale Copilot output from arming a watchdog or masking a later failure.
Shared operational logic
Attempt isolation
Preserved engine boundaries