Skip to content

Document comment-backed ledger storage - #78139

Merged
pelikhan merged 6 commits into
mainfrom
copilot/awf-feature-surfacing-surface-comment-backed-ledge
Nov 15, 2026
Merged

pelikhan merged 6 commits into
mainfrom
copilot/awf-feature-surfacing-surface-comment-backed-ledge

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

The authoring guide presented Git branches as universal, omitting the supported comment-memory backend and its distinct limits.

  • Backend guidance: Add a valid comment-backed configuration, deferred persistence details, and backend-specific limits and tradeoffs.
  • Migration: Explain that changing storage does not move existing history; link the specification for publisher trust, queue, and capacity requirements.
  • Regression check: Compile the documented example and reject unqualified claims that every ledger uses a Git branch.
tools:
  comment-memory:
    target: 42
  ledger:
    audit-history:
      storage: comment-memory
      type: log

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@pelikhan pelikhan changed the title [WIP] Update agent authoring guide to include comment-backed ledger storage Document comment-backed ledger storage Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Great work! This PR looks ready for review. You've:

  • Updated documentation — .github/aw/ledger.md now clearly surfaces storage: comment-memory as an alternative backend with concrete examples, addressing the gap where only Git-backed ledgers were described.
  • Added verification tests — pkg/workflow/ledger_test.go includes TestLedgerAuthoringGuideCommentBackedExampleCompiles, which validates that the documented example compiles correctly and catches claims about universal Git branching.
  • Explained tradeoffs — The guide now distinguishes between Git and comment storage backends with clear pros/cons for each.

The PR is focused, well-described, and includes appropriate test coverage for the documentation changes. Reviewers should have everything needed to merge this improvement to the authoring guide.

Generated by ✅ Contribution Check · copilot · routed: haiku55 xhigh · ~16 AIC · ⌖ ~2 AIC · ⊞ 5.4K · ◷

@pelikhan
pelikhan marked this pull request as ready for review November 15, 2026 21:09
Copilot AI adaptive review requested due to automatic review settings November 15, 2026 21:09
@github-actions

github-actions Bot commented Nov 15, 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 by Ponytail Reviewer for #78139 · codex · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 15, 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 · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

github-actions Bot commented Nov 15, 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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

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 by PR Specification Reviewer for #78139 · copilot · gpt56 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 15, 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.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 8.6K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-5e941677-2c0f-4419-9b87-3fe1ccd0378c","parents":[],"payload":{"id":"ldg-d85ca57f-dfb5-45db-ab14-ff8d88a88b58","operation":"append","value":{"finding_count":0,"head_sha":"6d19755168d749d4c1d5d90ddddc33c8779e2dd6","outcome":"aligned"}},"sha":"sha256:149b4693ef0fc3871d28a6a37270b817c3d7dd6e88fd04a2595b47c670ea6c45","timestamp":"2026-11-15T21:15:40.054Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-15T21:15:00Z
review_event: COMMENT
top_themes:
  - Regression test does not assert the documented example remains comment-backed
files_reviewed:
  - .github/aw/ledger.md
  - pkg/workflow/ledger_test.go
comment_count: 1
History

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 · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.5K · ◷
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.

Review

One test-coverage issue found: the new guide regression test compiles the example but does not verify that it remains comment-backed, so a backend regression could pass unnoticed. No blocking correctness issues were identified in the documentation changes.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.5K
Comment /review to run again

Comment thread pkg/workflow/ledger_test.go Outdated
source := "---\non: workflow_dispatch\nengine: copilot\n" + exampleSection[:fenceEnd] + "---\nRecord audit outcomes.\n"
filename := filepath.Join(t.TempDir(), "comment-ledger-guide.md")
require.NoError(t, os.WriteFile(filename, []byte(source), 0o600))
require.NoError(t, NewCompiler().CompileWorkflow(filename))

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.

The regression test only checks that the extracted example compiles, so it would still pass if storage: comment-memory were removed or changed back to Git storage; assert the parsed ledger configuration or compiled workflow actually uses the comment-backed backend to prevent this test from giving false confidence.

💡 Verify the backend explicitly

After parsing the extracted frontmatter, assert data.LedgerConfig.hasCommentStorage() (or inspect the generated persistence job for comment-memory behavior) before checking compilation. That makes the test fail when the documented example no longer exercises the feature it is intended to protect.

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.

Added assertions that the extracted example parses with comment-backed storage and that its compiled lock includes the gh-aw-comment-ledger marker. Commit: 5229c49.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-ac94d722-3023-4c1f-9652-ac7e2d3488ba","parents":[],"payload":{"id":"ldg-fe9aae8d-afbf-42c8-87d5-3e20100b0a3c","operation":"append","value":{"finding_count":1,"head_sha":"6d19755168d749d4c1d5d90ddddc33c8779e2dd6","outcome":"findings"}},"sha":"sha256:abb01bb1f41d7c292db5fd62aace99ac52b528023f004ec5eb5c22bca5d349bc","timestamp":"2026-11-15T21:16:57.396Z","type":"ledger_append","version":1}
History

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.

🟡 Changes recommended

An active nit finding remains in pkg/workflow/ledger_test.go because the regression check does not catch all unqualified claims about ledger branch storage, leaving the documented invariant vulnerable to reintroduction.

1 open issue
What changed in this PR

Updates the ledger authoring guide to document comment-backed storage alongside Git-backed storage, including configuration, persistence behavior, migration implications, limits, and tradeoffs. Adds a regression test that compiles the documented example and checks for unqualified claims that all ledgers use Git branches.

Changes:

  • Documents comment-memory configuration, deferred persistence, trust and queue requirements, capacity limits, and migration behavior.
  • Clarifies the differences between Git-backed and comment-backed ledger storage.
  • Adds regression coverage for the documented configuration and backend-specific wording.
File Description
pkg/​workflow/​ledger_test.go Adds a regression test that compiles the documented comment-backed example and guards against universal Git-branch claims.
.github/​aw/​ledger.md Documents Git and comment-backed ledger configuration, persistence behavior, limits, migration guidance, and storage tradeoffs.

Review effort: Lite (dynamic)

Comment thread pkg/workflow/ledger_test.go Outdated
Comment on lines +175 to +176
universalBranchClaim := regexp.MustCompile(`(?i)\b(?:all|every|each)\s+(?:standalone\s+)?ledgers?\b[^.\n]{0,100}\bbranch\b`)
require.NotRegexp(t, universalBranchClaim, guideText)

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.

Broadened the regression guard to cover subject-first ledger claims and singular/plural branch wording, while allowing explicitly backend-qualified clauses. Commit: 5229c49.

@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 /tdd to the new guide-regression test. The documentation changes match the code: the 16 KiB batch, 48 KiB ledger, and 50-page limits, the compaction rejection, and the target rules all check out. I verified the test at the PR head commit (6d19755) and it passes.

📋 Key Themes and Highlights

Key Themes

  • Guard coverage: the universal-branch regex misses plural branches and subject-first phrasing such as All ledgers are stored on branches.
  • Backend assertion: the example test only checks that compilation succeeds, so it would also pass if the example silently compiled to Git storage.

Positive Highlights

  • ✅ The guide accurately separates the two backends and states that changing storage does not migrate history.
  • ✅ Compaction rejection for comment storage is enforced and matches the guide.
  • ✅ The example compiles, and the comment-backed lock output contains the gh-aw-comment-ledger marker.

Notes

  • The two inline comments on pkg/workflow/ledger_test.go cover both gaps.
  • These are test-strength improvements, not correctness blockers.

@copilot please address the review comments above.

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

Comment thread pkg/workflow/ledger_test.go Outdated
require.NoError(t, err)
guideText := string(guide)

universalBranchClaim := regexp.MustCompile(`(?i)\b(?:all|every|each)\s+(?:standalone\s+)?ledgers?\b[^.\n]{0,100}\bbranch\b`)

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.

[/tdd] This guard is narrower than the PR claims. Plural branches and subject-first sentences slip past the word-boundary branch check, so the stated rule (reject unqualified Git-branch claims) can pass a regressed guide.

💡 Suggested test cases

Add table-driven cases that must be rejected, such as All ledgers are stored on branches., Ledgers always use a Git branch., and Every ledger uses Git branches.. Keep a positive case such as Each Git-backed ledger stores JSONL shards on a ledgers/<name> branch. that must still pass.

@copilot please address this.

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.

Added table-driven cases for plural branches, subject-first wording, a singular branch claim, and the qualified Git-backed positive case. Commit: 5229c49.

Comment thread pkg/workflow/ledger_test.go Outdated
require.NoError(t, os.WriteFile(filename, []byte(source), 0o600))
require.NoError(t, NewCompiler().CompileWorkflow(filename))

require.FileExists(t, filepath.Join(filepath.Dir(filename), "comment-ledger-guide.lock.yml"))

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.

[/tdd] This only proves the example compiles and writes a lock file. It would still pass if the example silently compiled to Git storage. I confirmed the comment-backed lock contains the gh-aw-comment-ledger marker and the Git-backed equivalent does not.

💡 Suggested assertion

Read the generated lock file and assert it contains gh-aw-comment-ledger, so the test checks backend selection, not just compilation.

@copilot please address this.

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.

The test now checks the parsed ledger backend and asserts the generated lock contains gh-aw-comment-ledger. Commit: 5229c49.

@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. Review (pkg/workflow/ledger_test.go:191): address unresolved feedback - Review comment
  3. Review (pkg/workflow/ledger_test.go:176): address unresolved feedback - Review comment
  4. Review (pkg/workflow/ledger_test.go:175): address unresolved feedback - Review comment
  5. Review (pkg/workflow/ledger_test.go:193): address unresolved feedback - Review comment
  6. 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": "96e6cf7139bcf1ff816f59ece8231b261f7d62c5",
  "kind": "requested",
  "schema_version": "1",
  "state": "641509efde23ab736f3a39ce1b5f51e0daf0d58e67dfb2d3c7e1dd043b1fbfa9",
  "work": [
    "42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
    "63d56c114d7b479b1fafd676f7dc65fe5b9505f4cae6ff31c06c5f87ea69a5d9",
    "8cf81c4e1e127b169f40adebb9cd3e6c28adc6fca4106b7b8e0ddc49ffe4173f",
    "d8274ee9ac16c2ed0524ee5ad95e6ab329c0dc10ae381e13588fbd6d3efc40a4",
    "eab6b95f1e477386e94c390492e04b019751cf678408aaeb12664d38948342b5"
  ],
  "workflow": "pr-sous-chef"
}

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

…urfacing-surface-comment-backed-ledge

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

@copilot

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

Merged the latest main (8d2efe8) and pushed the regression-test update (5229c49). make agent-report-progress passed, including build/lint, sampled impacted Go tests, and workflow-lock drift checks for all 368 workflows. The linked historical impacted-go-tests job ended after 596.9 seconds without naming a failing test, so its original failure was not independently reproduced.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: Completed task

Please address the remaining CI failures on this PR's existing branch. No merging or CI triggering.

Structured data
{
  "completed_task": 43765941898,
  "head": "5229c4910a6c01a31a7a1d4c117da6266daaa0a4",
  "kind": "ci-follow-up",
  "schema_version": "1",
  "state": "4d201c59df744175f301e4f1f744eaa1a3c5a6a1cad53e0f74b9295afc4b3b55",
  "work": [
    "42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
  ],
  "workflow": "pr-sous-chef"
}

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

…urfacing-surface-comment-backed-ledge

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@pelikhan
pelikhan merged commit 20accc0 into main Nov 15, 2026
48 of 49 checks passed
@pelikhan
pelikhan deleted the copilot/awf-feature-surfacing-surface-comment-backed-ledge branch November 15, 2026 23:45

Copilot AI commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

@copilot

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

Merged the latest main and fixed the linked impacted-Go-test failure by clarifying the workflow’s terminal safe-output instruction. The regression and ledger-focused tests pass; commit: bc2412b.

@copilot

🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: [Completed task](https://github.com/github/gh-aw/actions/runs/43...

Fixed the failing TestDailyGoTestParallelizerUsesCodexCompatibleModel assertion by updating the prompt and regenerating its lock. Focused regression tests pass; commit: bc2412b.

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

[awf-feature-surfacing] Surface comment-backed ledger storage in the agent authoring guide

4 participants