Repository navigation
Remediate Codex budget and workflow failure boundaries - #75491
Conversation
Stop futile retries after fresh AWF evidence confirms the shared invocation cap. Bound PureLock to one writer, inherit verified main models for advisor/enforcer helpers, and retire Storify's redundant fleet refetch prospectively. Co-authored-by: Copilot App <[email protected]>
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ 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.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: 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.
Found one correctness issue: the new shared-budget detection misses stderr-only terminal 429s, allowing futile retries that consume the remaining AWF invocation budget.
Review details
actions/setup/js/codex_harness.cjs:1241: native rate-limit detection is derived only from captured stdout terminal events, not stderr/process output; please add stderr-only coverage and classify that path.- The grumpy-coder specialist pass was unavailable because its file-read attempt was rejected; this review therefore relies on the independent second pass.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd. The Codex budget fix is sound and well covered by tests, with one minor gap in terminal error capture.
📋 Key Themes & Highlights
Key Themes
- Terminal error capture: the oversized-line prefix path skips
terminalErrors, so the budget check can be missed for those lines. It fails safe to retry, so this is non-blocking. - Validation scope: local vitest runs were blocked by a sandbox TLS error during
npm ci, so this review is static analysis plus direct checks of the budget predicate. Please run thecodex_harnesssuite in CI.
Positive Highlights
- ✅
exhaustedInvocationBudgetrejects every malformed shape I tried (NaN, Infinity, string-typed fields, unsafe integers, arrays) and accepts only a confirmed exhausted cap. - ✅ The budget stop requires a fresh reflection confirmation, so a stale or failed fetch does not stop a retry.
- ✅ Tests cover the under-cap, cap-reached, preserved-output, and quoted-429 cases with spec-style names.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~1 AIC · ⊞ 5.4K
Comment /matt to run again
There was a problem hiding this comment.
🟡 Changes recommended
The harness emits a retry failure class that drops retry metadata and can report an incomplete security review as successful when the retry budget is exhausted.
4 open issues
What changed in this PR
Improves gh-aw’s Codex failure handling and adjusts four scheduled workflows to address shared-budget exhaustion, helper-model validation failures, and redundant log collection.
Changes:
- Add fresh AWF budget checks for native terminal rate limits, with regression coverage, documentation, and a patch release note.
- Focus PureLock on one candidate and let Advisor and Enforcer helpers inherit their main models.
- Make Storify use cached evidence and bounded audits, retire its refetch experiment, and regenerate all four workflow locks.
| File | Description |
|---|---|
docs/src/content/docs/reference/cost-management.md |
Document shared invocation budgets and retry behavior. |
actions/setup/js/harness_retry_runner.cjs |
Extend attempt-result typing with native rate-limit metadata. |
actions/setup/js/engine_subagent_models.test.cjs |
Test model inheritance in authored workflow helpers. |
actions/setup/js/codex_harness.test.cjs |
Cover reflected exhaustion, retry fallback, and preserved outputs. |
actions/setup/js/codex_harness.cjs |
Detect exhausted shared budgets before retrying terminal rate limits. |
actions/setup/js/awf_reflect.cjs |
Type optional reflection budget counters. |
.github/workflows/spec-enforcer.md |
Remove three helper-model overrides. |
.github/workflows/spec-enforcer.lock.yml |
Refresh helper metadata and workflow hashes. |
.github/workflows/purelock.md |
Limit work to one candidate with prompt-level budget bounds. |
.github/workflows/purelock.lock.yml |
Synchronize the description and compiled hashes. |
.github/workflows/daily-storify.md |
Require cached fleet evidence and limit representative audits. |
.github/workflows/daily-storify.lock.yml |
Remove retired experiment wiring and refresh compiled metadata. |
.github/workflows/ab-testing-advisor.md |
Remove two helper-model overrides. |
.github/workflows/ab-testing-advisor.lock.yml |
Refresh helper metadata and workflow hashes. |
.changeset/codex-shared-invocation-cap.md |
Add a patch release note for budget-aware retries. |
Review effort: Max (auto)
|
Copilot assignment requested for the following outstanding work:
Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI. Sous-chef requested-head: de31237
|
Sous-chef requested-head: de31237 |
…ex-failure Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
Regenerate the four conflicted workflow locks from merged sources, preserving upstream routing/runtime pins and Codex remediation. Co-authored-by: Copilot App <[email protected]>
Preserve incomplete inline review findings at the shared invocation cap, emit the canonical retry class, and verify normalization. Align PureLock with one result and remove the obsolete Storify runtime note. Co-authored-by: Copilot App <[email protected]>
|
Reply to this comment: No code change is needed for this informational outcome. I am treating the Ponytail no-op as a reported result, not proof that the PR's required work or publication completed. |
|
Reply to this comment: No additional architecture change or ADR is requested by this status comment. The review fixes preserve the existing design, and the reported no-op is not being used as validation evidence. |
|
Reply to this comment: The associated skills review's oversized native-error capture feedback is addressed by the runtime fixes and regression coverage. This completion notice needs no separate code change. |
|
Reply to this comment: The associated code-quality review's stderr-only terminal 429 feedback is addressed without promoting quoted tool output into a native error. This completion notice needs no separate code change. |
|
Reply to this comment: No additional test change is requested by this status comment. The actionable review fixes include focused regression coverage; the sentinel's no-op is not being treated as proof of correctness. |
|
Reply to this comment: No specification change is requested by this informational outcome. The implementation retains the fresh-budget and native-error provenance requirements, and the reported no-op is not being used as verification. |
|
Reply to this comment: The latest main was merged and pushed in 2a90f05, with the four conflicted locks regenerated from merged sources. The stderr-only and oversized terminal-error feedback is addressed in this review batch; no CI or workflow dispatch was requested or triggered. |
I’m updating this branch from the latest Sous-chef requested-head: 3a5ca0a |
Co-authored-by: gh-aw-bot <[email protected]>
|
@copilot resolve the merge conflicts on this branch. |
There are no unresolved merge conflicts on this branch. The merge conflict was resolved in merge commit |
|
Copilot assignment requested for the following outstanding work:
Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI. Sous-chef requested-head: 07a595b
|
I’m checking this branch against the latest Sous-chef requested-head: 07a595b
Merged the latest |
…ex-failure # Conflicts: # .github/workflows/daily-storify.lock.yml Co-authored-by: gh-aw-bot <[email protected]>
|
@copilot resolve the merge conflicts on this branch. |
There are no unresolved merge conflicts on this branch: the working tree is clean, and |
|
@copilot resolve the merge conflicts on this branch. |
|
@copilot resolve the merge conflicts on this branch. |
…ex-failure # Conflicts: # .github/workflows/daily-storify.lock.yml Co-authored-by: pelikhan <[email protected]>
Resolved the conflict with the newly advanced |
I checked the branch again: there are no unresolved merge conflicts, the working tree is clean, and |
|
🎉 This pull request is included in a new release. Release: |


Why
Four scheduled workflows failed at
Execute Codex CLI, but the symptom cluster contained three distinct failure paths: PureLock exhausted its shared AWF invocation budget and retried a generic terminal 429; Advisor and Enforcer rejected unverifiable child-model endpoint metadata before spawning Codex; Storify terminated after a canceled fleet-log request left a stale MCP watchdog entry.Approach
smallhelper overrides in Advisor and Enforcer so helpers inherit their configured main model. Preserve fail-closed validation for different models and test the authored workflows through native role generation. Inheritance may cost more per helper call than a verified small model.Regenerate the four production locks and update shared-budget documentation and the patch release note. Credentials, network allowances, sandbox controls, admission, detection, and publication limits remain unchanged.
Validation
make fmt-cjsandmake lint-cjspassed, with existing lint warnings.npm --prefix actions/setup/js run test:js -- codex_harness.test.cjs awf_reflect.test.cjs engine_subagent_models.test.cjs harness_retry_runner.test.cjs: 473 tests passed.npm --prefix actions/setup/js run typecheckpassed.make recompile: 359/359 workflows compiled. One-shot compilation with the matching repository CLI and finalmake agent-report-progresspassed, including impacted tests and lock drift checks.Validation limitations: the installed gh-aw 1.0.1 compile-only dry-run failed before emitting locks because its schema does not support the current
protected_filesconfiguration. No protection was removed to bypass this. Installed actionlint is not clean because it lacks current GitHub syntax support: 43 baseline versus 34 current findings, with zero added finding identities or counts.No workflows were dispatched or rerun. Live recovery is unverified; this PR does not rewrite prior runs or results.
Investigation references
PureLock 42217846868, Advisor 42202615775, Enforcer 42209909525, and Storify 42183743344. Raw prompts and execution evidence remain private.