Repository navigation
Correct table-ledger payloads behind recent workflow audit failures - #69355
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🧠 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.
|
|
✅ 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.
|
|
✅ 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 Code Quality Reviewer completed the code quality review.
|
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.
Verdict
The payload fix is correct, but the new regression coverage is still missing one part of the contract: the prompt-to-ledger table selection.
Why this still needs attention
The added test locks down the run_id/top-level key wording, which is good, but it never verifies that each prompt still targets the same ledger table declared in workflow.tools.ledger. That leaves a drift hole where the prose can point at the wrong table and CI still stays green. I left one inline comment on the test to tighten that assertion.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 20.2 AIC · ⌖ 5.54 AIC · ⊞ 21.7K
Comment /review to run again
| ])("%s keeps table upsert instructions aligned with the ledger protocol", (name, ledger) => { | ||
| const { workflow, prompt } = readWorkflow(name); | ||
| expect(workflow.tools.ledger[ledger]).toMatchObject({ type: "table", key: "run_id" }); | ||
| expect(prompt).toContain("current run ID as a string in `run_id`"); |
There was a problem hiding this comment.
This test never asserts that the prompt names the same ledger table configured in workflow.tools.ledger, so a future prompt drift back to the wrong table would still pass while the workflow breaks again.
💡 Assert the table selection too
Right now the regression only checks the run_id/key wording. The production failure here was caused by prompt/schema drift, and the table name is part of that contract as well. If someone later changes the prose to target a generic ledger_append or the wrong table, these assertions stay green even though the generated workflow instructions are wrong.
A small follow-up like expect(prompt).toContain(ledger_appendto${ledger}) or an equivalent exact phrase check would close that gap.
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd — this is a clean, well-targeted fix.
📋 Key Themes & Highlights
Root cause addressed, not just symptom
The prompt wording previously told the agent to send the run ID as a top-level key for a table upsert, which strict ledger validation (ledger_builtin.cjs) rejects: upsert only accepts a value field, and the primary key must live at value[config.key]. Both audit-workflows.md and copilot-centralization-optimizer.md are corrected consistently to say "the current run ID as a string in run_id" and explicitly "do not send a top-level key for upsert" — this matches the actual validator behavior, not just the failing symptom.
Regression coverage (/tdd)
The new it.each test in workflow_tool_policy_alignment.test.cjs asserts, for both workflows:
- the ledger table config has
type: table, key: run_id - the prompt contains the corrected guidance string
- the prompt does not regress to the old
run ID as keyphrasing
This closes the loop: if either prompt drifts from the schema again, CI will catch it before another health-report failure.
Scope discipline
The PR stays tightly scoped to the payload correction + test, as described. No changes to validation strictness, permissions, or queue recovery logic — consistent with the stated intent.
No actionable issues found. Nice targeted fix with a regression test that prevents recurrence.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 41.4 AIC · ⌖ 14.7 AIC · ⊞ 11.7K
Comment /matt to run again
There was a problem hiding this comment.
🟢 Approval recommended
The scoped corrections match the strict ledger contract, include regression assertions, and leave existing controls unchanged.
0 open findings
What changed in this PR
Corrects table-ledger instructions in two gh-aw workflows so audit records satisfy strict validation.
Changes:
- Places string run IDs in
value.run_idand explicitly forbids top-levelkeyfor upserts. - Adds regression assertions for both workflow prompts and ledger schemas.
- Refreshes generated metadata without changing validation, permissions, or queue recovery.
| File | Description |
|---|---|
actions/setup/js/workflow_tool_policy_alignment.test.cjs |
Adds table-upsert alignment assertions. |
.github/workflows/copilot-centralization-optimizer.md |
Corrects centralization ledger instructions. |
.github/workflows/copilot-centralization-optimizer.lock.yml |
Refreshes the workflow body hash. |
.github/workflows/audit-workflows.md |
Corrects audit-history ledger instructions. |
.github/workflows/audit-workflows.lock.yml |
Refreshes body hash and harness metadata. |
🧠 Review effort: Max
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Recent health-report failures exposed audit instructions that supplied a top-level
keyfor tableupsert, which strict ledger validation rejects. Other reported queue failures already have newer fixes; artifact-upload failures remain infrastructure-related.value.run_id, without a top-levelkey.