Repository navigation
fix(coordinator): wait for a human's sign-off instead of taking the request as it #2491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@bradygaster/squad-sdk": patch | ||
| "@bradygaster/squad-cli": patch | ||
| --- | ||
|
|
||
| Non-Copilot coordinators wait for a human's sign-off. When `team.md` or `routing.md` says a human must sign off on work, a request to do that work is no longer taken as the sign-off: the coordinator names the rule and the human, asks whether the user is that human or has their sign-off, goes ahead only on an explicit yes, and records it in the decisions inbox. In a non-interactive run it stops at the gate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /** | ||
| * Human sign-off gates in the shared coordinator digest. | ||
| * | ||
| * Seen live (#2487 scenarios): with a human release owner in team.md and "Sign-off required before | ||
| * any tag or publish" in routing.md, the Claude coordinator took "cut the 1.0.0 release" as the | ||
| * sign-off and bumped, tagged and ran npm publish itself. | ||
| */ | ||
| import { describe, it, expect } from 'vitest'; | ||
| import { CLIENT_IDS, buildCoordinatorInstructions } from '../packages/squad-sdk/src/client/adapters/index.js'; | ||
|
|
||
| const hosts = CLIENT_IDS.filter((id) => id !== 'copilot'); | ||
|
|
||
| describe('coordinator sign-off gates', () => { | ||
| it.each(hosts)('%s: a request for gated work is not the sign-off', (id) => { | ||
| const t = buildCoordinatorInstructions(id); | ||
| expect(t).toMatch(/Sign-off gates:/); | ||
| expect(t).toMatch(/the user's request to do that work is NOT the sign-off/); | ||
| // Ask who the user is, act only on an explicit yes, and record it. | ||
| expect(t).toMatch(/ask whether the user is that human or has their explicit sign-off; proceed only on an explicit yes/); | ||
| expect(t).toMatch(/record it in the decisions inbox/); | ||
| // Unattended runs stop at the gate instead of approving themselves. | ||
| expect(t).toMatch(/Never take silence, urgency, auto-approval or a non-interactive run as sign-off/); | ||
| expect(t).toMatch(/Neither you nor an AI member does a human's routed work in their place/); | ||
| }); | ||
|
|
||
| it('keeps the rule in the Claude coordinator itself, not in an on-demand skill', () => { | ||
| // A rule that must hold before the coordinator acts cannot wait for a skill to be loaded. | ||
| const claude = buildCoordinatorInstructions('claude'); | ||
| expect(claude).toMatch(/request to do that work is NOT the sign-off/); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.