mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-05 16:34:00 +01:00
feat(hooks): lane C fixed markers: agent_dispatch prefers its marker line, parenthesized notes are not specialist names (GST-1088 lane A)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
e3180606b0
commit
c19a685950
4 files changed
+19
-4
No files matched your search
@@ -44,7 +44,7 @@ description: Fixture copy for the contract tests. (gstack)
|
||||
triggers:
|
||||
- review this pr
|
||||
- check my diff
|
||||
contract: { version: 1, items: [ { id: specialists, kind: selected_specialists_dispatched, marker: "Dispatching N specialists:" }, { id: adversarial, kind: agent_dispatch, match: "Think like an attacker and a chaos engineer" }, { id: report, kind: report_labels, heading: Pre-Landing Review, labels: [Gate edits] } ] }
|
||||
contract: { version: 1, items: [ { id: specialists, kind: selected_specialists_dispatched, marker: "Dispatching N specialists:" }, { id: adversarial, kind: agent_dispatch, marker: "Dispatching adversarial pass: native", match: "Think like an attacker and a chaos engineer" }, { id: report, kind: report_labels, heading: Pre-Landing Review, labels: [Gate edits] } ] }
|
||||
---
|
||||
# /review (fixture)
|
||||
`,
|
||||
|
||||
@@ -110,9 +110,16 @@ describe('checkContract is a pure function of the transcript', () => {
|
||||
expect(r2.met).toBe(true);
|
||||
expect(check([slash('review'), say('Small diff (12 lines) — specialists skipped.'), ...red, report], 'review').met).toBe(true);
|
||||
expect(check([slash('review'), say('Dispatching 0 specialists: (small diff)'), ...red, report], 'review').met).toBe(true);
|
||||
const sm = say('Dispatching 1 specialists: State Machines (small diff)');
|
||||
expect(check([slash('review'), sm, ...red, report], 'review').items[0].detail).toBe('selected State Machines; no Agent dispatch for State Machines');
|
||||
expect(check([slash('review'), sm, ...agent('s', 'State Machines specialist'), ...red, report], 'review').met).toBe(true);
|
||||
expect(check([slash('review'), say('Dispatching 2\nspecialists: Testing, Security'), ...red, report], 'review').items[0].detail).toBe('selected Testing, Security; no Agent dispatch for Testing, Security');
|
||||
expect(DEFAULT_MATCHERS).toEqual({ specialistSelection: 'Dispatching N specialists:', specialistsSkipped: 'specialists skipped' });
|
||||
expect(check([slash('review'), ...red, report], 'review').items[0].detail).toBe('no specialist selection line found');
|
||||
const fixedLine = say('Dispatching adversarial pass: native');
|
||||
expect(check([slash('review'), fixedLine, ...agent('d', 'Adversarial pass', 'Find the ways this diff fails.')], 'review').items[1]).toMatchObject({ status: 'met', detail: 'printed "Dispatching adversarial pass: native", then an Agent dispatch' });
|
||||
expect(check([slash('review'), ...agent('d', 'Adversarial pass', 'Find the ways this diff fails.'), fixedLine], 'review').items[1].status).toBe('missing');
|
||||
expect(check([slash('review'), ...red], 'review').items[1].status).toBe('met');
|
||||
expect(check([slash('review'), sel, say('Pre-Landing Review: done')], 'review').items[2]).toMatchObject({ status: 'missing', detail: 'Pre-Landing Review lacks a real value for Gate edits' });
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user