Repository navigation
Document comment-backed ledger storage - #78139
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
✅ Great work! This PR looks ready for review. You've:
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.
|
|
✅ 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: 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.
|
|
✅ 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.
|
Comment MemoryPeek at saved memory (spec-review-history)History |
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.
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
| 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)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🟡 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)
| universalBranchClaim := regexp.MustCompile(`(?i)\b(?:all|every|each)\s+(?:standalone\s+)?ledgers?\b[^.\n]{0,100}\bbranch\b`) | ||
| require.NotRegexp(t, universalBranchClaim, guideText) |
There was a problem hiding this comment.
Broadened the regression guard to cover subject-first ledger claims and singular/plural branch wording, while allowing explicitly backend-qualified clauses. Commit: 5229c49.
There was a problem hiding this comment.
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
branchesand subject-first phrasing such asAll 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
storagedoes 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-ledgermarker.
Notes
- The two inline comments on
pkg/workflow/ledger_test.gocover 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
| 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`) |
There was a problem hiding this comment.
[/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.
There was a problem hiding this comment.
Added table-driven cases for plural branches, subject-first wording, a singular branch claim, and the qualified Git-backed positive case. Commit: 5229c49.
| 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")) |
There was a problem hiding this comment.
[/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.
There was a problem hiding this comment.
The test now checks the parsed ledger backend and asserts the generated lock contains gh-aw-comment-ledger. Commit: 5229c49.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
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"
}
|
…urfacing-surface-comment-backed-ledge Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged the latest |
|
🍳 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"
}
|
…urfacing-surface-comment-backed-ledge Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged the latest
Fixed the failing |
|
🎉 This pull request is included in a new release. Release: |

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