Skip to content

fix: skip ledger persistence when safe outputs do not succeed - #77480

Merged
pelikhan merged 6 commits into
mainfrom
pelikhan/ledger-issues
Nov 13, 2026
Merged

pelikhan merged 6 commits into
mainfrom
pelikhan/ledger-issues

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Summary

Run 43442754622 failed because push_ledger_changes ran even though activation, the agent, and safe outputs were skipped. The transaction artifact was never created, but the job ignored the download failure and attempted reconciliation anyway.

Require needs.safe_outputs.result == 'success' before ledger persistence and restore default step success guards so a failed artifact download stops reconciliation. Missing artifacts remain failures rather than silently becoming empty transactions. Permissions, credentials, detection dependencies, and transaction validation are unchanged.

Adds regression coverage for Git, comment-memory, and mixed ledgers, documents the fail-closed behavior, and regenerates all 11 affected workflow locks.

Validation

  • Focused ledger regression tests passed.
  • Build, Go lint, custom linters, schema freshness, and impacted unit tests passed.
  • Workflow drift check passed after regenerating affected locks.
  • No workflow was manually dispatched.

Source security review passed with no confirmed vulnerabilities. The reviewer could not resume for generated-lock follow-up; those diffs were checked directly and contain only the matching scheduling and step-guard changes.

Skip ledger persistence when safe outputs did not succeed and stop reconciliation after artifact download failure. Cover Git and comment-backed ledgers and regenerate affected workflows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 13, 2026 14:43
Copilot AI adaptive review requested due to automatic review settings November 13, 2026 14:43
@github-actions

github-actions Bot commented Nov 13, 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 · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 182 · ◷

Generated by Ponytail Reviewer for #77480

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ PR Code Quality Reviewer failed to deliver outputs during code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

Generated from PR Code Quality Reviewer · gpt56 · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

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

Matt Pocock Skills Reviewer

Outcome: reported_action

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.

Generated from Matt Pocock Skills Reviewer · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

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

@github-actions

github-actions Bot commented Nov 13, 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 🏗️ · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details.

PR Specification Reviewer

Outcome: reported_action

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.

Generated from PR Specification Reviewer · gpt56 · ~2 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.7K · ◷

Generated by PR Specification Reviewer for #77480

@github-actions

github-actions Bot commented Nov 13, 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 · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@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.

Reviewed the changed workflow compiler, specification, regression tests, and generated-lock implications. No actionable correctness, security, performance, or maintainability issues were found in the changed lines. The fail-closed persistence behavior is consistent with the documented requirement, and the added regression coverage validates the generated job guards.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review 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

No active review issues remain for the changes that gate ledger persistence on successful safe outputs and stop reconciliation after transaction-download failures.

No open issues 🎉

What changed in this PR

This PR makes ledger persistence in gh-aw fail closed: it runs only after safe outputs succeed, and transaction-download failures stop reconciliation. Permissions, credentials, detection dependencies, and transaction validation remain unchanged.

Changes:

  • Require successful safe outputs and restore default step success guards.
  • Add regression coverage for Git, comment-memory, and mixed ledgers, and document the failure behavior.
  • Regenerate 11 workflow locks with the updated guards.
File Description
pkg/​workflow/​ledger_test.go Tests job and step guards across three ledger configurations.
pkg/​workflow/​ledger_job.go Gates persistence and stops reconciliation after download failure.
docs/​src/​content/​docs/​specs/​repo-memory-ledger-specification.md Specifies fail-closed persistence behavior.
.github/​workflows/​weekly-git-simulator-dreaming.lock.yml Applies updated persistence guards.
.github/​workflows/​smoke-repo-memory-ledger.lock.yml Applies updated persistence guards.
.github/​workflows/​smoke-builtin-ledgers.lock.yml Applies updated persistence guards.
.github/​workflows/​pr-specification-reviewer.lock.yml Applies updated persistence guards.
.github/​workflows/​pr-code-quality-reviewer.lock.yml Applies updated persistence guards.
.github/​workflows/​daily-mcp-concurrency-analysis.lock.yml Applies updated persistence guards.
.github/​workflows/​daily-caveman-optimizer.lock.yml Applies updated persistence guards.
.github/​workflows/​daily-awf-spec-compiler-surfacing.lock.yml Applies updated persistence guards.
.github/​workflows/​daily-arxiv-researcher.lock.yml Applies updated persistence guards.
.github/​workflows/​copilot-centralization-optimizer.lock.yml Applies updated persistence guards.
.github/​workflows/​audit-workflows.lock.yml Applies updated persistence guards.

Review effort: Balanced (dynamic)

@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. The fix is correct and well guarded; no blocking issues found.

📋 Key Themes & Highlights

Verification

  • ✅ TestLedgerPersistenceRequiresSuccessfulSafeOutputs fails when the ledger_job.go hunk is reverse-applied (actual: "always()"), so it guards the regression.
  • ✅ Ledger-wide tests pass (go test ./pkg/workflow -run 'Ledger|ledger').
  • ✅ Recompiling the 11 workflows matches the committed locks except for scattered cron minutes, which depend on the repo-slug seed in schedule_preprocessing.go and are environmental.

Non-blocking Follow-ups

  • Missing-artifact path: no test asserts that the download step fails hard when the ledger-transactions artifact is absent. Consider asserting that continue-on-error is absent on the download step.
  • Operator visibility: a skipped push_ledger_changes job when safe outputs fail is not reported as a failure. Consider documenting this in the spec.

@copilot please address the non-blocking follow-ups if you agree.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check impacted-go-tests (FAILURE): Check run.
  3. Fix failing check safe_outputs (FAILURE): Check run.
  4. Fix failing check safe_outputs (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "a6575bf5c78fccb8afa30860910830c6b1066168",
  "kind": "requested",
  "schema_version": "1",
  "state": "92752b2577094bbd03bf0858ad9d385e993e54caef567547eca719fe98318b3d",
  "work": [
    "42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
    "c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

Copilot AI and others added 2 commits November 13, 2026 15:29
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged main in 68520d7 and fixed stale TLA pins plus clarified typed ledger payloads in b14a82f. Focused and impacted tests, Go lint, build, and lock freshness passed. Custom lint exceeded 10 minutes and CodeQL timed out; the reviewer workflows were not rerun, so their runtime outcome remains unverified.

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check impacted-go-tests (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "bffb232f808d7d354fae897cea9ce6c426ff1944",
  "kind": "requested",
  "schema_version": "1",
  "state": "a95cec338c1a8429cefe94d2152d064ab607b15e07965a7f189b5d7e0873cef2",
  "work": [
    "42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 high · ~2 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

pelikhan and others added 2 commits November 13, 2026 08:24
Preserve the successful-safe-outputs ledger gate, align the incoming assertion, and regenerate workflow lock conflicts with the merged compiler.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@pelikhan
pelikhan merged commit 46cd1cd into main Nov 13, 2026
50 of 51 checks passed
@pelikhan
pelikhan deleted the pelikhan/ledger-issues branch November 13, 2026 16:37
Copilot AI restored the pelikhan/ledger-issues branch November 13, 2026 16:43

Copilot AI commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Current main was already merged in 60f63c9; b015a46 fixes the missing fallback entry. The failing test, impacted tests, build, and Go lint pass locally. Custom lint exceeded 10 minutes; no CI was triggered.

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

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.

4 participants