Repository navigation
Conversation
Bind credit verification to the current repository, run and attempt. Distinguish absent structured AWF rejection events from collected usage and diagnostic-only Codex errors while preserving fail-closed proof requirements. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ 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.
|
|
✅ 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ 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.
|
There was a problem hiding this comment.
🟡 Changes recommended
The verifier requires aw_info.json, but the verification job downloads only an artifact that does not contain it.
1 open finding
What changed in this PR
Improves fail-closed diagnostics when structured AI-credit rejection evidence is absent.
Changes:
- Binds evidence to repository, run, and attempt.
- Reports usage and Codex 403 diagnostics separately.
- Adds regression coverage and a normalized run fixture.
The linked run audit corroborates the 1.021966-credit diagnostic. No security regression was found, but artifact wiring is incomplete.
| File | Description |
|---|---|
.github/workflows/daily-max-ai-credits-test.md |
Documents verification behavior. |
.github/workflows/daily-max-ai-credits-test.lock.yml |
Updates generated body metadata. |
.github/scripts/fixtures/max-ai-credits-rejection-38556022048.json |
Adds normalized diagnostic evidence. |
.github/scripts/check-max-ai-credits.test.cjs |
Expands verifier regressions. |
.github/scripts/check-max-ai-credits.cjs |
Adds identity checks and diagnostics. |
🧠 Review effort: Balanced
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Request changes
This diagnostic hardening also makes optional sidecar files part of the proof path, so a real structured rejection can now be reported as a failed run for unrelated artifact-corruption reasons.
Blocking themes
token-tracker-audit.jsonlis now treated as a mandatory, fail-fast input even though it is only useful for failure diagnostics.token-usage.jsonlis parsed before we know whether we need diagnostics, so a truncated usage sidecar can override a valid pass.aw_info.jsonis now required before any firewall evidence is considered, which adds another artifact-packaging dependency ahead of the actual rejection proof.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 34.2 AIC · ⌖ 6.1 AIC · ⊞ 21.3K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs (root-cause diagnostics) and /tdd (regression coverage). Solid change — approving with one minor, non-blocking note.
📋 Key Themes & Highlights
Key Themes
- Root cause correctly scoped: the PR explicitly frames this as improving diagnostics, not "fixing" enforcement — it doesn't overclaim, and the fail-closed contract (only an exact structured
ai_credits_limit_exceededevent at cap 1 passes) is preserved throughout the new code paths. - Regression coverage is thorough: 45 tests cover identity-mismatch rejection (wrong run/attempt/repo), malformed JSON in tracker/usage files, non-authoritative agent-stdio text (quoted logs,
report_incomplete, tool output, wrong-cap 403s), and private-payload redaction in diagnostics. This is a textbook/tddregression suite for a diagnostics change — ran locally, all 45 pass. - Captured fixture is well-documented:
fixtures/max-ai-credits-rejection-38556022048.jsonhas an explicitprovenancefield describing what was redacted/normalized from the real run, which is good practice for reproducing real incidents without leaking private artifact logs. - Minor: left one inline note on
check-max-ai-credits.cjs:83— a redundant re-check ofentry?.event === "ai_credits_limit_exceeded"that's already guaranteed by the loop'scontinuefilter a few lines above. Purely cosmetic, doesn't affect behavior.
Positive Highlights
- ✅ Identity binding (
repository/run_id/run_attempt) correctly sources real fields thatgenerate_aw_info.cjspopulates — verified against the actualaw_info.jsonproducer. - ✅ Diagnostics (file/record counts, usage totals, Codex terminal error text) are additive-only and never substitute for the structured rejection event — the fail-closed invariant holds.
- ✅ Tests explicitly assert that private payload strings never leak into thrown diagnostic messages.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 152.3 AIC · ⌖ 14.6 AIC · ⊞ 10.4K
Comment /matt to run again
Download the separate current-run identity artifact and keep tracker and usage sidecars off the positive proof path. Cover source/lock packaging, malformed optional diagnostics and strict authoritative rejection evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Great work on the AI credit rejection evidence diagnostics! Solid tests and a clear description — this looks ready for review.
|

Why
Daily Max AI Credits Test run 38556022048 recorded AWF usage of 1.021966 credits and a genuine Codex credit-limit HTTP 403, but its artifact contained no qualifying structured
ai_credits_limit_exceededevent. The verifier's generic failure obscured this runtime-evidence mismatch and could be misread as an enforcement failure.Approach
This improves diagnostics rather than claiming to repair or prove enforcement. Accounting, pricing, caps, retry budgets, permissions and sandbox controls are unchanged. The missing boundary remains AWF structured stdout rejection evidence versus the persisted artifact; the producer/collection cause and secondary cache-miss classification are not fixed here.
Validation
make recompile: 344/344 workflows compiled; normal lock changes only body-hash metadata.make agent-report-progresspassed formatting, build, schema freshness and workflow drift. The impacted Go selector skipped tests because no Go files changed.Remaining gaps
The installed older compiler's initial dry-run emitted no lock due to schema incompatibility. The current repository compiler emitted a diagnostic dry-run lock and passed source/model checks and shellcheck, but the dry-run gate failed on the existing
gh-aw-detectionexperimental notice. No experimental opt-in was granted; optional scanners were not run. No workflow was dispatched or rerun, and hosted behavior for this change remains unverified.