Skip to content

Correct table-ledger payloads behind recent workflow audit failures - #69355

Merged
pelikhan merged 1 commit into
mainfrom
copilot/review-health-report-fix-issues
Oct 16, 2026
Merged

pelikhan merged 1 commit into
mainfrom
copilot/review-health-report-fix-issues

Conversation

Copilot AI commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Recent health-report failures exposed audit instructions that supplied a top-level key for table upsert, which strict ledger validation rejects. Other reported queue failures already have newer fixes; artifact-upload failures remain infrastructure-related.

  • Payload correction: Update audit and centralization workflows to place the string run ID in value.run_id, without a top-level key.
  • Regression coverage: Add assertions aligning both prompts with their configured table schema; refresh generated workflow metadata.
  • Scope: Preserve strict validation, permissions, and queue recovery behavior.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Fix current ledger failures identified in the workflow health report Correct table-ledger payloads behind recent workflow audit failures Oct 16, 2026
Copilot AI requested a review from pelikhan October 16, 2026 12:56
@pelikhan
pelikhan marked this pull request as ready for review October 16, 2026 12:57
Copilot AI max review requested due to automatic review settings October 16, 2026 12:57
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · gpt56 · 6.21 AIC · ⌖ 5.31 AIC · ⊞ 14.6K · ◷

Generated by Ponytail Reviewer for #69355

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · opus50 · 15 AIC · ⌖ 40.8 AIC · ◇ 30.2 AIC · ⊞ 1.9K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · sonnet50 · 14.1 AIC · ⌖ 15 AIC · ◇ 6.63 AIC · ⊞ 12.6K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-10-16T13:01:10Z
review_event: COMMENT
top_themes:
  - regression coverage drift between prompt text and configured ledger table
files_reviewed:
  - .github/workflows/audit-workflows.md
  - .github/workflows/copilot-centralization-optimizer.md
  - actions/setup/js/workflow_tool_policy_alignment.test.cjs
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 20.2 AIC · ⌖ 5.54 AIC · ⊞ 21.7K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 key phrasing

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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_id and explicitly forbids top-level key for 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.

@pelikhan
pelikhan merged commit a05ee2c into main Oct 16, 2026
63 of 77 checks passed
@pelikhan
pelikhan deleted the copilot/review-health-report-fix-issues branch October 16, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants