Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/gh-aw-review-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,11 @@ describe('gh-aw enforcing Squad reviewer', () => {
});

it('enforces attribution priority and refuses malformed or unattributed automatic provenance', () => {
expect(REVIEWER).toContain('Build its exact regular expression by concatenating');
expect(REVIEWER).toContain(
'^<!-- squad:implement issue=([1-9][0-9]*) run=([1-9][0-9]*) -->$',
'`^<`, then\n`!-- squad:implement issue=([1-9][0-9]*) run=([1-9][0-9]*) --`, then `>$`',
);
expect(REVIEWER).not.toContain('^<!-- squad:implement');
expect(REVIEWER).toContain('require exactly one marker-like occurrence');
expect(REVIEWER).toContain('^squad/implement-{captured-issue}-');
assertReviewerContract(REVIEWER);
Expand Down Expand Up @@ -496,6 +498,11 @@ describe('gh-aw enforcing Squad reviewer', () => {
it('strict-compiles to read-only agent permissions and an always-running final gate', () => {
const { lock, safeOutputs } = compileReviewer();
assertCompiledGate(lock);
expect(lock).toContain('Build its exact regular expression by concatenating');
expect(lock).toContain(
'`^<`, then\\n`!-- squad:implement issue=([1-9][0-9]*) run=([1-9][0-9]*) --`, then `>$`',
);
expect(lock).not.toContain('body line matching\\n`^$`');
const agentJob = lock.match(/^ agent:\n([\s\S]*?)(?=^ [\w-]+:\n)/m)?.[1] ?? '';
const permissionBlock = yamlBlock(agentJob, 'permissions');
const workflow = parse(lock);
Expand Down
5 changes: 3 additions & 2 deletions workflows/package/squad-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ priority evidence.
| 4 | None of the above | Unattributed |

The durable marker schema from the implement worker is exactly one standalone
body line matching
`^<!-- squad:implement issue=([1-9][0-9]*) run=([1-9][0-9]*) -->$`.
body line. Build its exact regular expression by concatenating these three
fragments with no added whitespace: `^<`, then
`!-- squad:implement issue=([1-9][0-9]*) run=([1-9][0-9]*) --`, then `>$`.
Normalize CRLF to LF before testing lines. Marker-like text means any occurrence
of `squad:implement` anywhere in the body.

Expand Down
5 changes: 3 additions & 2 deletions workflows/squad-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ priority evidence.
| 4 | None of the above | Unattributed |

The durable marker schema from the implement worker is exactly one standalone
body line matching
`^<!-- squad:implement issue=([1-9][0-9]*) run=([1-9][0-9]*) -->$`.
body line. Build its exact regular expression by concatenating these three
fragments with no added whitespace: `^<`, then
`!-- squad:implement issue=([1-9][0-9]*) run=([1-9][0-9]*) --`, then `>$`.
Normalize CRLF to LF before testing lines. Marker-like text means any occurrence
of `squad:implement` anywhere in the body.

Expand Down
6 changes: 3 additions & 3 deletions workflows/squad-workflows.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"source": "workflows/package/squad-review.md",
"destination": ".github/workflows/squad-review.md",
"lock": ".github/workflows/squad-review.lock.yml",
"source_sha256": "545ba959d0e4cfc0ba4cc507c2ed2c0d4b2044ca3b9e20a746c8b39cdc100bef",
"lock_sha256": "e8cd10cbef0db95cfe05d963eeb683b31a126eb129f1c5be512dd90ad16ca54f",
"package_lock_sha256": "928590c67e5636bf08374b62a05797a575990e71c5efd7745da6b73098297130"
"source_sha256": "a596d69081c6026f358f88352fb94b91bfc40335a68e94f7d73b7d20ce5e898f",
"lock_sha256": "d1d3ac5004188940f27015e696460294c370521bf34555783ebee9216cc5f907",
"package_lock_sha256": "a9d47ef3743e21083f7f63a3404d6dbb93003c6cc6c546613c1ff897dc38f44e"
},
{
"name": "squad-deps-worker",
Expand Down
Loading