Skip to content
Myr

Merge protocol/next-commands into main, dropping the never-rebase clause now that an answer is judged from the newest landing it contains

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by oscabriel · committed by oscabriel · parents 2eaa076, ff184b6 · Browse files · 19 files+152 added−99 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

19 files+152 added−99 removed

  • tests:+75 added−69 removed
  • other:+77 added−30 removed

19 files+152 added−99 removed

modified:apps/cli/test/output.test.ts+4 added-1 removed
modified:apps/web/test/ask-markdown.test.ts+2 added
339 unmodified lines
340 "```text",341 ...explain(refusals),342 "```",343 "",344 `Next: \`${Brand.cli} projects\``,345 "",346 `Next: \`${Brand.cli} asks\``,347 "",348 ].join("\n")349 );
31 unmodified lines
modified:packages/agent-kit/src/docs/answer-an-ask.ts+1 added-1 removed
modified:packages/agent-kit/src/full-llms.ts+2 added-1 removed
1import { Brand } from "@repo/brand";2import type { ProjectListing } from "@repo/protocol/domain/front-page";3import { Option } from "effect";45import type { CommandDoc } from "./command-doc.ts";
14 unmodified lines
20 "## Guides",21 "",22 "### Recover from `StaleBase`",23 "",23 `\`main\` moved under your answer, and the answer did not merge onto it. Rebase onto the new \`main\`, resolve what the rebase stops on, and push again: ${code(`git pull --rebase ${platformUrl}/<owner>/<name>.git main`)}, then ${pushAnswer()}.`,24 `\`main\` moved under your answer. With no \`conflicts\`, push again: ${pushAnswer()}; the platform merges the answer onto the moved \`main\` itself. With \`conflicts\`, merge the project's \`main\` into your answer, resolve what the merge stops on, and push again: ${code(`git fetch ${platformUrl}/<owner>/<name>.git main && git merge FETCH_HEAD`)}, then ${pushAnswer()}. Never rebase: the claim's base stays where it was granted, so a rebased answer carries every sibling's file as its own and is refused as \`OutOfScope\`. In a clone of the claim's fork, the \`${Brand.slug}\` remote is the fork, whose \`main\` is the base, not the project's.`,25 "",26 `When the merge conflicted, \`conflicts\` names the paths, and \`movedBy\` names, for each one the platform landed, the landing that last changed it: its commit (\`landing\`), the person accountable for it (\`author\`) and the ask it answered or opened (\`ask\`).${withCommand(27 typed(commands, "ask", {}, ["project"]),28 (each) =>
48 unmodified lines
modified:packages/agent-kit/src/refusals.ts+9 added-9 removed
55 unmodified lines
56 Denounced: {57 todo: "The project's vouch file denounces you: it takes no claims or proposals from you.",58 },59 DirectPush: {60 todo: "Main moves only by a landing: push your answer to your claim's fork.",60 todo: "Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`.",61 },62 Flake: {63 todo: "Nothing: the check failed and then passed on the same tree, and the platform runs it again.",64 },
18 unmodified lines
83 todo: "Import the other module only through its public files.",84 },85 RepoBusy: { todo: "Push again." },86 StaleBase: {87 todo: "Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve.",87 todo: "Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve.",88 },89 StaleLayer: { todo: "Nothing: the answer is checked again." },90 TouchedJudge: {91 todo: "Undo your changes to the paths it names: they decide what the checks do.",
13 unmodified lines
105 DraftInProgress: {106 next: cli("proposal", "<proposal>"),107 todo: "Wait: the platform is drafting this proposal's ask already, and `next` shows when it settles.",108 },109 ImportFailed: { todo: "Read `reason`, then import again." },109 ImportFailed: { todo: "Read `reason`, then import again with `next`." },110 IncompleteBrief: {111 todo: "Fill in the fields `missing` names: the ask's kind requires them.",111 todo: "Fill in the fields `missing` names: the ask's kind requires them. Then open the ask again with `next`.",112 },113 LayerContentInPublicTree: {114 todo: "Take the paths it names out: their files stay private and never enter a public tree.",115 },116 NotDecider: {117 todo: "Only one of the project's maintainers may do this: ask one of them.",118 },119 NotRedFirst: {120 todo: "Make the ask's check fail on main by an assertion, the same way twice, then open the ask again.",120 todo: "Make the ask's check fail on main twice the same way, with a failing assertion, not a load or syntax error: run the lane's command on it yourself, then open the ask again with `next`. The local check cannot judge an ask that has not opened.",121 },122 NotSensitive: {123 todo: "Only an `@sensitive` item holds a write-only value: `next` shows which items are.",124 },
13 unmodified lines
138 UnknownAsk: {139 todo: "Check the ask's name: `next` lists the project's open asks.",140 },141 UnknownCommit: {142 todo: "Fetch the project, then name a commit it holds.",142 todo: "Name a commit the project holds: `next`, the MCP tool, lists its log.",143 },144 UnknownDecision: {145 todo: "Check the decision's id: `next` lists the decisions waiting on you.",146 },147 UnknownEnvItem: {148 todo: "Name a key the project's env shape has: `next` lists them.",149 },150 UnknownPath: {151 todo: "Name a path the commit holds: `next` lists its files.",151 todo: "Name a path the commit holds: `next`, the MCP tool, lists a folder's entries; give it `at` the commit.",152 },153 UnknownProject: {154 todo: "Check the project's name: every project is listed in the index.",154 todo: "Check the project's name: `next` lists every project.",155 },156 UnknownProposal: {157 todo: "Check the proposal's id: `next` lists the proposals waiting on you.",158 },159 UnknownRevision: {160 todo: "Name `main`, a commit the project holds or one of its tags: `next` lists its refs.",160 todo: "Name `main`, a commit the project holds or one of its tags: `next`, the MCP tool, lists its refs.",161 },162 UnstatedRequirement: {163 todo: "State in public what the area's held-back check holds, or take the check out of the suite.",164 },
126 unmodified lines
modified:packages/agent-kit/test/golden/agent-plugins-stdio.txt+5 added-5 removed
52 unmodified lines
53| `_tag` | Retryable | Exit code | `next` | What to do |54| --- | --- | --- | --- | --- |55| `NotClaimed` | yes | 75 | `__CLI__ claim <ask>` | Claim the ask, then push again. |56| `ClaimLapsed` | yes | 75 | `__CLI__ claim <ask>` | Your claim lapsed after a spell without a push: claim the ask again if it is still open. |57| `NotVouched` | no | 77 | `__CLI__ status` | Ask a member of the project to vouch for you. |57| `NotVouched` | no | 77 | `__CLI__ policy --project <owner>/<name>` | Ask a member of the project to vouch for you. |58| `CapReached` | yes | 75 | `__CLI__ status` | Read `limit`: for claims, release or land a claim you hold; for proposals, wait for an open one to be decided; for drafts, the proposal has had every draft round it takes; with `retryAfter`, wait that many seconds and try again. |59| `AskFull` | yes | 75 | `__CLI__ asks` | Someone else holds the claim: pick another ask. |60| `NoAsk` | no | 66 | `__CLI__ asks` | Push to the fork your claim gave you, which names its ask. |61| `RepoBusy` | yes | 75 | `git push` | Push again. |62| `DirectPush` | no | 77 | `__CLI__ asks` | Main moves only by a landing: push your answer to your claim's fork. |62| `DirectPush` | no | 77 | `__CLI__ fork --project <owner>/<name>` | Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`. |63| `AskBlocked` | yes | 75 | `__CLI__ asks` | Wait for the asks it names to land, or answer one of them first. |64| `Denounced` | no | 77 | `__CLI__ status` | The project's vouch file denounces you: it takes no claims or proposals from you. |64| `Denounced` | no | 77 | `__CLI__ policy --project <owner>/<name>` | The project's vouch file denounces you: it takes no claims or proposals from you. |65| `OutOfScope` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they are outside the ask's territory. |66| `TouchedJudge` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they decide what the checks do. |67| `Weakened` | no | 65 | `__CLI__ check` | Take the marker out; a marker without a reason may get one after ` -- ` for a maintainer to weigh, but one a maintainer declined stays out; never raise a ratchet. |68| `PrivatePathInPublicTree` | no | 65 | `__CLI__ check` | Take the held-back paths it names out of your answer. |69| `ReachedInternals` | no | 65 | `__CLI__ check` | Import the other module only through its public files. |70| `StaleBase` | yes | 75 | `git pull --rebase` | Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |70| `StaleBase` | yes | 75 | `git push __SLUG__ HEAD:main` | Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |71| `StaleLayer` | yes | 75 | `__CLI__ status` | Nothing: the answer is checked again. |72| `ChecksFailed` | no | 65 | the command that reproduces the failure | Run `next` to see the failure, fix it, and push again. |73| `HeldBackFailed` | no | 65 | `__CLI__ status` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |73| `HeldBackFailed` | no | 65 | `__CLI__ verdict <ask> --project <owner>/<name>` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |74| `AttemptsExhausted` | yes | 75 | `__CLI__ status` | Wait until `resetsAt`: you used every attempt on that area's held-back checks for now. |75| `Flake` | yes | 75 | `__CLI__ status` | Nothing: the check failed and then passed on the same tree, and the platform runs it again. |76| `VerifierBlocked` | yes | 75 | `__CLI__ status` | Nothing: the platform could not run the checks, and runs them again. |77
20 unmodified lines
modified:packages/agent-kit/test/golden/agent-plugins.txt+5 added-5 removed
53 unmodified lines
54| `_tag` | Retryable | Exit code | `next` | What to do |55| --- | --- | --- | --- | --- |56| `NotClaimed` | yes | 75 | `__CLI__ claim <ask>` | Claim the ask, then push again. |57| `ClaimLapsed` | yes | 75 | `__CLI__ claim <ask>` | Your claim lapsed after a spell without a push: claim the ask again if it is still open. |58| `NotVouched` | no | 77 | `__CLI__ status` | Ask a member of the project to vouch for you. |58| `NotVouched` | no | 77 | `__CLI__ policy --project <owner>/<name>` | Ask a member of the project to vouch for you. |59| `CapReached` | yes | 75 | `__CLI__ status` | Read `limit`: for claims, release or land a claim you hold; for proposals, wait for an open one to be decided; for drafts, the proposal has had every draft round it takes; with `retryAfter`, wait that many seconds and try again. |60| `AskFull` | yes | 75 | `__CLI__ asks` | Someone else holds the claim: pick another ask. |61| `NoAsk` | no | 66 | `__CLI__ asks` | Push to the fork your claim gave you, which names its ask. |62| `RepoBusy` | yes | 75 | `git push` | Push again. |63| `DirectPush` | no | 77 | `__CLI__ asks` | Main moves only by a landing: push your answer to your claim's fork. |63| `DirectPush` | no | 77 | `__CLI__ fork --project <owner>/<name>` | Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`. |64| `AskBlocked` | yes | 75 | `__CLI__ asks` | Wait for the asks it names to land, or answer one of them first. |65| `Denounced` | no | 77 | `__CLI__ status` | The project's vouch file denounces you: it takes no claims or proposals from you. |65| `Denounced` | no | 77 | `__CLI__ policy --project <owner>/<name>` | The project's vouch file denounces you: it takes no claims or proposals from you. |66| `OutOfScope` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they are outside the ask's territory. |67| `TouchedJudge` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they decide what the checks do. |68| `Weakened` | no | 65 | `__CLI__ check` | Take the marker out; a marker without a reason may get one after ` -- ` for a maintainer to weigh, but one a maintainer declined stays out; never raise a ratchet. |69| `PrivatePathInPublicTree` | no | 65 | `__CLI__ check` | Take the held-back paths it names out of your answer. |70| `ReachedInternals` | no | 65 | `__CLI__ check` | Import the other module only through its public files. |71| `StaleBase` | yes | 75 | `git pull --rebase` | Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |71| `StaleBase` | yes | 75 | `git push __SLUG__ HEAD:main` | Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |72| `StaleLayer` | yes | 75 | `__CLI__ status` | Nothing: the answer is checked again. |73| `ChecksFailed` | no | 65 | the command that reproduces the failure | Run `next` to see the failure, fix it, and push again. |74| `HeldBackFailed` | no | 65 | `__CLI__ status` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |74| `HeldBackFailed` | no | 65 | `__CLI__ verdict <ask> --project <owner>/<name>` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |75| `AttemptsExhausted` | yes | 75 | `__CLI__ status` | Wait until `resetsAt`: you used every attempt on that area's held-back checks for now. |76| `Flake` | yes | 75 | `__CLI__ status` | Nothing: the check failed and then passed on the same tree, and the platform runs it again. |77| `VerifierBlocked` | yes | 75 | `__CLI__ status` | Nothing: the platform could not run the checks, and runs them again. |78
17 unmodified lines
modified:packages/agent-kit/test/golden/claude-plugin-stdio.txt+5 added-5 removed
51 unmodified lines
52| `_tag` | Retryable | Exit code | `next` | What to do |53| --- | --- | --- | --- | --- |54| `NotClaimed` | yes | 75 | `__CLI__ claim <ask>` | Claim the ask, then push again. |55| `ClaimLapsed` | yes | 75 | `__CLI__ claim <ask>` | Your claim lapsed after a spell without a push: claim the ask again if it is still open. |56| `NotVouched` | no | 77 | `__CLI__ status` | Ask a member of the project to vouch for you. |56| `NotVouched` | no | 77 | `__CLI__ policy --project <owner>/<name>` | Ask a member of the project to vouch for you. |57| `CapReached` | yes | 75 | `__CLI__ status` | Read `limit`: for claims, release or land a claim you hold; for proposals, wait for an open one to be decided; for drafts, the proposal has had every draft round it takes; with `retryAfter`, wait that many seconds and try again. |58| `AskFull` | yes | 75 | `__CLI__ asks` | Someone else holds the claim: pick another ask. |59| `NoAsk` | no | 66 | `__CLI__ asks` | Push to the fork your claim gave you, which names its ask. |60| `RepoBusy` | yes | 75 | `git push` | Push again. |61| `DirectPush` | no | 77 | `__CLI__ asks` | Main moves only by a landing: push your answer to your claim's fork. |61| `DirectPush` | no | 77 | `__CLI__ fork --project <owner>/<name>` | Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`. |62| `AskBlocked` | yes | 75 | `__CLI__ asks` | Wait for the asks it names to land, or answer one of them first. |63| `Denounced` | no | 77 | `__CLI__ status` | The project's vouch file denounces you: it takes no claims or proposals from you. |63| `Denounced` | no | 77 | `__CLI__ policy --project <owner>/<name>` | The project's vouch file denounces you: it takes no claims or proposals from you. |64| `OutOfScope` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they are outside the ask's territory. |65| `TouchedJudge` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they decide what the checks do. |66| `Weakened` | no | 65 | `__CLI__ check` | Take the marker out; a marker without a reason may get one after ` -- ` for a maintainer to weigh, but one a maintainer declined stays out; never raise a ratchet. |67| `PrivatePathInPublicTree` | no | 65 | `__CLI__ check` | Take the held-back paths it names out of your answer. |68| `ReachedInternals` | no | 65 | `__CLI__ check` | Import the other module only through its public files. |69| `StaleBase` | yes | 75 | `git pull --rebase` | Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |69| `StaleBase` | yes | 75 | `git push __SLUG__ HEAD:main` | Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |70| `StaleLayer` | yes | 75 | `__CLI__ status` | Nothing: the answer is checked again. |71| `ChecksFailed` | no | 65 | the command that reproduces the failure | Run `next` to see the failure, fix it, and push again. |72| `HeldBackFailed` | no | 65 | `__CLI__ status` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |72| `HeldBackFailed` | no | 65 | `__CLI__ verdict <ask> --project <owner>/<name>` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |73| `AttemptsExhausted` | yes | 75 | `__CLI__ status` | Wait until `resetsAt`: you used every attempt on that area's held-back checks for now. |74| `Flake` | yes | 75 | `__CLI__ status` | Nothing: the check failed and then passed on the same tree, and the platform runs it again. |75| `VerifierBlocked` | yes | 75 | `__CLI__ status` | Nothing: the platform could not run the checks, and runs them again. |76
55 unmodified lines
modified:packages/agent-kit/test/golden/claude-plugin.txt+5 added-5 removed
52 unmodified lines
53| `_tag` | Retryable | Exit code | `next` | What to do |54| --- | --- | --- | --- | --- |55| `NotClaimed` | yes | 75 | `__CLI__ claim <ask>` | Claim the ask, then push again. |56| `ClaimLapsed` | yes | 75 | `__CLI__ claim <ask>` | Your claim lapsed after a spell without a push: claim the ask again if it is still open. |57| `NotVouched` | no | 77 | `__CLI__ status` | Ask a member of the project to vouch for you. |57| `NotVouched` | no | 77 | `__CLI__ policy --project <owner>/<name>` | Ask a member of the project to vouch for you. |58| `CapReached` | yes | 75 | `__CLI__ status` | Read `limit`: for claims, release or land a claim you hold; for proposals, wait for an open one to be decided; for drafts, the proposal has had every draft round it takes; with `retryAfter`, wait that many seconds and try again. |59| `AskFull` | yes | 75 | `__CLI__ asks` | Someone else holds the claim: pick another ask. |60| `NoAsk` | no | 66 | `__CLI__ asks` | Push to the fork your claim gave you, which names its ask. |61| `RepoBusy` | yes | 75 | `git push` | Push again. |62| `DirectPush` | no | 77 | `__CLI__ asks` | Main moves only by a landing: push your answer to your claim's fork. |62| `DirectPush` | no | 77 | `__CLI__ fork --project <owner>/<name>` | Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`. |63| `AskBlocked` | yes | 75 | `__CLI__ asks` | Wait for the asks it names to land, or answer one of them first. |64| `Denounced` | no | 77 | `__CLI__ status` | The project's vouch file denounces you: it takes no claims or proposals from you. |64| `Denounced` | no | 77 | `__CLI__ policy --project <owner>/<name>` | The project's vouch file denounces you: it takes no claims or proposals from you. |65| `OutOfScope` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they are outside the ask's territory. |66| `TouchedJudge` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they decide what the checks do. |67| `Weakened` | no | 65 | `__CLI__ check` | Take the marker out; a marker without a reason may get one after ` -- ` for a maintainer to weigh, but one a maintainer declined stays out; never raise a ratchet. |68| `PrivatePathInPublicTree` | no | 65 | `__CLI__ check` | Take the held-back paths it names out of your answer. |69| `ReachedInternals` | no | 65 | `__CLI__ check` | Import the other module only through its public files. |70| `StaleBase` | yes | 75 | `git pull --rebase` | Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |70| `StaleBase` | yes | 75 | `git push __SLUG__ HEAD:main` | Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |71| `StaleLayer` | yes | 75 | `__CLI__ status` | Nothing: the answer is checked again. |72| `ChecksFailed` | no | 65 | the command that reproduces the failure | Run `next` to see the failure, fix it, and push again. |73| `HeldBackFailed` | no | 65 | `__CLI__ status` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |73| `HeldBackFailed` | no | 65 | `__CLI__ verdict <ask> --project <owner>/<name>` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |74| `AttemptsExhausted` | yes | 75 | `__CLI__ status` | Wait until `resetsAt`: you used every attempt on that area's held-back checks for now. |75| `Flake` | yes | 75 | `__CLI__ status` | Nothing: the check failed and then passed on the same tree, and the platform runs it again. |76| `VerifierBlocked` | yes | 75 | `__CLI__ status` | Nothing: the platform could not run the checks, and runs them again. |77
53 unmodified lines
modified:packages/agent-kit/test/golden/full-llms.txt+15 added-15 removed
56 unmodified lines
57| `_tag` | Group | Retryable | Exit code | `next` | What to do |58| --- | --- | --- | --- | --- | --- |59| `NotClaimed` | Push and claim | yes | 75 | `__CLI__ claim <ask>` | Claim the ask, then push again. |60| `ClaimLapsed` | Push and claim | yes | 75 | `__CLI__ claim <ask>` | Your claim lapsed after a spell without a push: claim the ask again if it is still open. |61| `NotVouched` | Push and claim | no | 77 | `__CLI__ status` | Ask a member of the project to vouch for you. |61| `NotVouched` | Push and claim | no | 77 | `__CLI__ policy --project <owner>/<name>` | Ask a member of the project to vouch for you. |62| `CapReached` | Push and claim | yes | 75 | `__CLI__ status` | Read `limit`: for claims, release or land a claim you hold; for proposals, wait for an open one to be decided; for drafts, the proposal has had every draft round it takes; with `retryAfter`, wait that many seconds and try again. |63| `AskFull` | Push and claim | yes | 75 | `__CLI__ asks` | Someone else holds the claim: pick another ask. |64| `NoAsk` | Push and claim | no | 66 | `__CLI__ asks` | Push to the fork your claim gave you, which names its ask. |65| `RepoBusy` | Push and claim | yes | 75 | `git push` | Push again. |66| `DirectPush` | Push and claim | no | 77 | `__CLI__ asks` | Main moves only by a landing: push your answer to your claim's fork. |66| `DirectPush` | Push and claim | no | 77 | `__CLI__ fork --project <owner>/<name>` | Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`. |67| `AskBlocked` | Push and claim | yes | 75 | `__CLI__ asks` | Wait for the asks it names to land, or answer one of them first. |68| `Denounced` | Push and claim | no | 77 | `__CLI__ status` | The project's vouch file denounces you: it takes no claims or proposals from you. |68| `Denounced` | Push and claim | no | 77 | `__CLI__ policy --project <owner>/<name>` | The project's vouch file denounces you: it takes no claims or proposals from you. |69| `OutOfScope` | Shape | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they are outside the ask's territory. |70| `TouchedJudge` | Shape | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they decide what the checks do. |71| `Weakened` | Shape | no | 65 | `__CLI__ check` | Take the marker out; a marker without a reason may get one after ` -- ` for a maintainer to weigh, but one a maintainer declined stays out; never raise a ratchet. |72| `PrivatePathInPublicTree` | Shape | no | 65 | `__CLI__ check` | Take the held-back paths it names out of your answer. |73| `ReachedInternals` | Shape | no | 65 | `__CLI__ check` | Import the other module only through its public files. |74| `StaleBase` | Merge | yes | 75 | `git pull --rebase` | Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |74| `StaleBase` | Merge | yes | 75 | `git push __SLUG__ HEAD:main` | Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |75| `StaleLayer` | Merge | yes | 75 | `__CLI__ status` | Nothing: the answer is checked again. |76| `ChecksFailed` | Checks | no | 65 | the command that reproduces the failure | Run `next` to see the failure, fix it, and push again. |77| `HeldBackFailed` | Checks | no | 65 | `__CLI__ status` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |77| `HeldBackFailed` | Checks | no | 65 | `__CLI__ verdict <ask> --project <owner>/<name>` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |78| `AttemptsExhausted` | Checks | yes | 75 | `__CLI__ status` | Wait until `resetsAt`: you used every attempt on that area's held-back checks for now. |79| `Flake` | Never counted against the answerer | yes | 75 | `__CLI__ status` | Nothing: the check failed and then passed on the same tree, and the platform runs it again. |80| `VerifierBlocked` | Never counted against the answerer | yes | 75 | `__CLI__ status` | Nothing: the platform could not run the checks, and runs them again. |81| `NotRedFirst` | At ask open | no | 65 | `__CLI__ check` | Make the ask's check fail on main by an assertion, the same way twice, then open the ask again. |81| `NotRedFirst` | At ask open | no | 65 | `__CLI__ ask open <ask> --project <owner>/<name>` | Make the ask's check fail on main twice the same way, with a failing assertion, not a load or syntax error: run the lane's command on it yourself, then open the ask again with `next`. The local check cannot judge an ask that has not opened. |82| `WeakCheck` | At ask open | no | 65 | `__CLI__ check` | Strengthen the check: as it stands, the trivial answer `weakness` names would pass it. |83| `IncompleteBrief` | At ask open | no | 65 | `__CLI__ check` | Fill in the fields `missing` names: the ask's kind requires them. |83| `IncompleteBrief` | At ask open | no | 65 | `__CLI__ ask open <ask> --project <owner>/<name>` | Fill in the fields `missing` names: the ask's kind requires them. Then open the ask again with `next`. |84| `LayerContentInPublicTree` | Maintainers only | no | 65 | `__CLI__ check` | Take the paths it names out: their files stay private and never enter a public tree. |85| `SecretInOutput` | Maintainers only | no | 65 | `__CLI__ check` | Take the write-only value of `item` out of the output or the tree (`where`), then check again. |86| `UnstatedRequirement` | Maintainers only | no | 65 | `__CLI__ check` | State in public what the area's held-back check holds, or take the check out of the suite. |87| `PostureChange` | Decision | no | 65 | `__CLI__ today` | A maintainer declined the posture change it names (`from`, `to`): take out what changes the posture; `next` lists the decisions. |88| `NotDecider` | Decision | no | 77 | `__CLI__ status` | Only one of the project's maintainers may do this: ask one of them. |88| `NotDecider` | Decision | no | 77 | `__CLI__ policy --project <owner>/<name>` | Only one of the project's maintainers may do this: ask one of them. |89| `DecisionClosed` | Decision | no | 66 | `__CLI__ today` | Nothing to decide: it was taken already, or expired to its default. |90| `ProposalClosed` | Decision | no | 66 | `__CLI__ today` | Nothing more is drafted for it: the proposal was accepted, declined or expired. |91| `DraftInProgress` | Decision | yes | 75 | `__CLI__ proposal <proposal>` | Wait: the platform is drafting this proposal's ask already, and `next` shows when it settles. |92| `UnknownProject` | Lookup | no | 66 | `__CLI__ asks` | Check the project's name: every project is listed in the index. |92| `UnknownProject` | Lookup | no | 66 | `__CLI__ projects` | Check the project's name: `next` lists every project. |93| `UnknownAsk` | Lookup | no | 66 | `__CLI__ asks` | Check the ask's name: `next` lists the project's open asks. |94| `UnknownCommit` | Lookup | no | 66 | `git fetch` | Fetch the project, then name a commit it holds. |94| `UnknownCommit` | Lookup | no | 66 | `log {"project":"<owner>/<name>"}` | Name a commit the project holds: `next`, the MCP tool, lists its log. |95| `UnknownDecision` | Lookup | no | 66 | `__CLI__ today` | Check the decision's id: `next` lists the decisions waiting on you. |96| `UnknownPath` | Lookup | no | 66 | `git ls-tree` | Name a path the commit holds: `next` lists its files. |97| `UnknownRevision` | Lookup | no | 66 | `git ls-remote` | Name `main`, a commit the project holds or one of its tags: `next` lists its refs. |96| `UnknownPath` | Lookup | no | 66 | `readTree {"at":"main","project":"<owner>/<name>"}` | Name a path the commit holds: `next`, the MCP tool, lists a folder's entries; give it `at` the commit. |97| `UnknownRevision` | Lookup | no | 66 | `listRefs {"project":"<owner>/<name>"}` | Name `main`, a commit the project holds or one of its tags: `next`, the MCP tool, lists its refs. |98| `UnknownProposal` | Lookup | no | 66 | `__CLI__ today` | Check the proposal's id: `next` lists the proposals waiting on you. |99| `ProjectExists` | Setup | no | 65 | `__CLI__ asks` | Pick another name: that one is taken. |99| `ProjectExists` | Setup | no | 65 | `__CLI__ projects` | Pick another name: that one is taken. |100| `NotYourNamespace` | Setup | no | 77 | | Make the project in your own namespace: `next` names it with your handle. |101| `ImportFailed` | Setup | yes | 75 | `__CLI__ init` | Read `reason`, then import again. |101| `ImportFailed` | Setup | yes | 75 | `__CLI__ init --project <owner>/<name> --import <url>` | Read `reason`, then import again with `next`. |102| `UnknownEnvItem` | Env | no | 66 | `__CLI__ env shape` | Name a key the project's env shape has: `next` lists them. |103| `NotSensitive` | Env | no | 65 | `__CLI__ env shape` | Only an `@sensitive` item holds a write-only value: `next` shows which items are. |104| `ValueTooShort` | Env | no | 65 | `__CLI__ env set <key>`, with `--acknowledge-short` when the value is above the floor | Give a longer value, or acknowledge a short one where the floor allows it. |105
70 unmodified lines
176## Guides177178### Recover from `StaleBase`179180`main` moved under your answer, and the answer did not merge onto it. Rebase onto the new `main`, resolve what the rebase stops on, and push again: `git pull --rebase https://platform-test.example.workers.dev/<owner>/<name>.git main`, then `git push __SLUG__ HEAD:main`.180`main` moved under your answer. With no `conflicts`, push again: `git push __SLUG__ HEAD:main`; the platform merges the answer onto the moved `main` itself. With `conflicts`, merge the project's `main` into your answer, resolve what the merge stops on, and push again: `git fetch https://platform-test.example.workers.dev/<owner>/<name>.git main && git merge FETCH_HEAD`, then `git push __SLUG__ HEAD:main`. Never rebase: the claim's base stays where it was granted, so a rebased answer carries every sibling's file as its own and is refused as `OutOfScope`. In a clone of the claim's fork, the `__SLUG__` remote is the fork, whose `main` is the base, not the project's.181182When the merge conflicted, `conflicts` names the paths, and `movedBy` names, for each one the platform landed, the landing that last changed it: its commit (`landing`), the person accountable for it (`author`) and the ask it answered or opened (`ask`). Read that ask (`__CLI__ ask <ask> --project <owner>/<name>`) before you resolve, so your answer keeps its change.183184### Follow an answer until it lands
13 unmodified lines
modified:packages/agent-kit/test/golden/platform-skill.txt+5 added-5 removed
45 unmodified lines
46| `_tag` | Retryable | Exit code | `next` | What to do |47| --- | --- | --- | --- | --- |48| `NotClaimed` | yes | 75 | `__CLI__ claim <ask>` | Claim the ask, then push again. |49| `ClaimLapsed` | yes | 75 | `__CLI__ claim <ask>` | Your claim lapsed after a spell without a push: claim the ask again if it is still open. |50| `NotVouched` | no | 77 | `__CLI__ status` | Ask a member of the project to vouch for you. |50| `NotVouched` | no | 77 | `__CLI__ policy --project <owner>/<name>` | Ask a member of the project to vouch for you. |51| `CapReached` | yes | 75 | `__CLI__ status` | Read `limit`: for claims, release or land a claim you hold; for proposals, wait for an open one to be decided; for drafts, the proposal has had every draft round it takes; with `retryAfter`, wait that many seconds and try again. |52| `AskFull` | yes | 75 | `__CLI__ asks` | Someone else holds the claim: pick another ask. |53| `NoAsk` | no | 66 | `__CLI__ asks` | Push to the fork your claim gave you, which names its ask. |54| `RepoBusy` | yes | 75 | `git push` | Push again. |55| `DirectPush` | no | 77 | `__CLI__ asks` | Main moves only by a landing: push your answer to your claim's fork. |55| `DirectPush` | no | 77 | `__CLI__ fork --project <owner>/<name>` | Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`. |56| `AskBlocked` | yes | 75 | `__CLI__ asks` | Wait for the asks it names to land, or answer one of them first. |57| `Denounced` | no | 77 | `__CLI__ status` | The project's vouch file denounces you: it takes no claims or proposals from you. |57| `Denounced` | no | 77 | `__CLI__ policy --project <owner>/<name>` | The project's vouch file denounces you: it takes no claims or proposals from you. |58| `OutOfScope` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they are outside the ask's territory. |59| `TouchedJudge` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they decide what the checks do. |60| `Weakened` | no | 65 | `__CLI__ check` | Take the marker out; a marker without a reason may get one after ` -- ` for a maintainer to weigh, but one a maintainer declined stays out; never raise a ratchet. |61| `PrivatePathInPublicTree` | no | 65 | `__CLI__ check` | Take the held-back paths it names out of your answer. |62| `ReachedInternals` | no | 65 | `__CLI__ check` | Import the other module only through its public files. |63| `StaleBase` | yes | 75 | `git pull --rebase` | Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |63| `StaleBase` | yes | 75 | `git push __SLUG__ HEAD:main` | Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |64| `StaleLayer` | yes | 75 | `__CLI__ status` | Nothing: the answer is checked again. |65| `ChecksFailed` | no | 65 | the command that reproduces the failure | Run `next` to see the failure, fix it, and push again. |66| `HeldBackFailed` | no | 65 | `__CLI__ status` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |66| `HeldBackFailed` | no | 65 | `__CLI__ verdict <ask> --project <owner>/<name>` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |67| `AttemptsExhausted` | yes | 75 | `__CLI__ status` | Wait until `resetsAt`: you used every attempt on that area's held-back checks for now. |68| `Flake` | yes | 75 | `__CLI__ status` | Nothing: the check failed and then passed on the same tree, and the platform runs it again. |69| `VerifierBlocked` | yes | 75 | `__CLI__ status` | Nothing: the platform could not run the checks, and runs them again. |70
6 unmodified lines
modified:packages/agent-kit/test/golden/project-skill.txt+10 added-10 removed
79 unmodified lines
80| `_tag` | Retryable | Exit code | `next` | What to do |81| --- | --- | --- | --- | --- |82| `NotClaimed` | yes | 75 | `__CLI__ claim <ask>` | Claim the ask, then push again. |83| `ClaimLapsed` | yes | 75 | `__CLI__ claim <ask>` | Your claim lapsed after a spell without a push: claim the ask again if it is still open. |84| `NotVouched` | no | 77 | `__CLI__ status` | Ask a member of the project to vouch for you. |84| `NotVouched` | no | 77 | `__CLI__ policy --project <owner>/<name>` | Ask a member of the project to vouch for you. |85| `CapReached` | yes | 75 | `__CLI__ status` | Read `limit`: for claims, release or land a claim you hold; for proposals, wait for an open one to be decided; for drafts, the proposal has had every draft round it takes; with `retryAfter`, wait that many seconds and try again. |86| `AskFull` | yes | 75 | `__CLI__ asks` | Someone else holds the claim: pick another ask. |87| `NoAsk` | no | 66 | `__CLI__ asks` | Push to the fork your claim gave you, which names its ask. |88| `RepoBusy` | yes | 75 | `git push` | Push again. |89| `DirectPush` | no | 77 | `__CLI__ asks` | Main moves only by a landing: push your answer to your claim's fork. |89| `DirectPush` | no | 77 | `__CLI__ fork --project <owner>/<name>` | Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`. |90| `AskBlocked` | yes | 75 | `__CLI__ asks` | Wait for the asks it names to land, or answer one of them first. |91| `Denounced` | no | 77 | `__CLI__ status` | The project's vouch file denounces you: it takes no claims or proposals from you. |91| `Denounced` | no | 77 | `__CLI__ policy --project <owner>/<name>` | The project's vouch file denounces you: it takes no claims or proposals from you. |92| `OutOfScope` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they are outside the ask's territory. |93| `TouchedJudge` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they decide what the checks do. |94| `Weakened` | no | 65 | `__CLI__ check` | Take the marker out; a marker without a reason may get one after ` -- ` for a maintainer to weigh, but one a maintainer declined stays out; never raise a ratchet. |95| `PrivatePathInPublicTree` | no | 65 | `__CLI__ check` | Take the held-back paths it names out of your answer. |96| `ReachedInternals` | no | 65 | `__CLI__ check` | Import the other module only through its public files. |97| `StaleBase` | yes | 75 | `git pull --rebase` | Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |97| `StaleBase` | yes | 75 | `git push __SLUG__ HEAD:main` | Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |98| `StaleLayer` | yes | 75 | `__CLI__ status` | Nothing: the answer is checked again. |99| `ChecksFailed` | no | 65 | the command that reproduces the failure | Run `next` to see the failure, fix it, and push again. |100| `HeldBackFailed` | no | 65 | `__CLI__ status` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |100| `HeldBackFailed` | no | 65 | `__CLI__ verdict <ask> --project <owner>/<name>` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |101| `AttemptsExhausted` | yes | 75 | `__CLI__ status` | Wait until `resetsAt`: you used every attempt on that area's held-back checks for now. |102| `Flake` | yes | 75 | `__CLI__ status` | Nothing: the check failed and then passed on the same tree, and the platform runs it again. |103| `VerifierBlocked` | yes | 75 | `__CLI__ status` | Nothing: the platform could not run the checks, and runs them again. |104
86 unmodified lines
191| `_tag` | Retryable | Exit code | `next` | What to do |192| --- | --- | --- | --- | --- |193| `NotClaimed` | yes | 75 | `__CLI__ claim <ask>` | Claim the ask, then push again. |194| `ClaimLapsed` | yes | 75 | `__CLI__ claim <ask>` | Your claim lapsed after a spell without a push: claim the ask again if it is still open. |195| `NotVouched` | no | 77 | `__CLI__ status` | Ask a member of the project to vouch for you. |195| `NotVouched` | no | 77 | `__CLI__ policy --project <owner>/<name>` | Ask a member of the project to vouch for you. |196| `CapReached` | yes | 75 | `__CLI__ status` | Read `limit`: for claims, release or land a claim you hold; for proposals, wait for an open one to be decided; for drafts, the proposal has had every draft round it takes; with `retryAfter`, wait that many seconds and try again. |197| `AskFull` | yes | 75 | `__CLI__ asks` | Someone else holds the claim: pick another ask. |198| `NoAsk` | no | 66 | `__CLI__ asks` | Push to the fork your claim gave you, which names its ask. |199| `RepoBusy` | yes | 75 | `git push` | Push again. |200| `DirectPush` | no | 77 | `__CLI__ asks` | Main moves only by a landing: push your answer to your claim's fork. |200| `DirectPush` | no | 77 | `__CLI__ fork --project <owner>/<name>` | Main moves only by a landing. A contributor pushes the answer to the claim's fork; a maintainer makes a working fork with `next` and lands it with `land`. |201| `AskBlocked` | yes | 75 | `__CLI__ asks` | Wait for the asks it names to land, or answer one of them first. |202| `Denounced` | no | 77 | `__CLI__ status` | The project's vouch file denounces you: it takes no claims or proposals from you. |202| `Denounced` | no | 77 | `__CLI__ policy --project <owner>/<name>` | The project's vouch file denounces you: it takes no claims or proposals from you. |203| `OutOfScope` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they are outside the ask's territory. |204| `TouchedJudge` | no | 65 | `__CLI__ check` | Undo your changes to the paths it names: they decide what the checks do. |205| `Weakened` | no | 65 | `__CLI__ check` | Take the marker out; a marker without a reason may get one after ` -- ` for a maintainer to weigh, but one a maintainer declined stays out; never raise a ratchet. |206| `PrivatePathInPublicTree` | no | 65 | `__CLI__ check` | Take the held-back paths it names out of your answer. |207| `ReachedInternals` | no | 65 | `__CLI__ check` | Import the other module only through its public files. |208| `StaleBase` | yes | 75 | `git pull --rebase` | Main moved: rebase onto it, resolve the conflicts it names, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |208| `StaleBase` | yes | 75 | `git push __SLUG__ HEAD:main` | Main moved under the answer. With no `conflicts`, push again: the platform merges onto the moved main itself. With `conflicts`, merge the project's main into your answer, resolve, and push again. `movedBy` names the landing that last changed each conflicting path, with its `author` and `ask`: keep that change as you resolve. |209| `StaleLayer` | yes | 75 | `__CLI__ status` | Nothing: the answer is checked again. |210| `ChecksFailed` | no | 65 | the command that reproduces the failure | Run `next` to see the failure, fix it, and push again. |211| `HeldBackFailed` | no | 65 | `__CLI__ status` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |211| `HeldBackFailed` | no | 65 | `__CLI__ verdict <ask> --project <owner>/<name>` | A held-back check failed; you see only its area and suite. Fix the behaviour and push again. |212| `AttemptsExhausted` | yes | 75 | `__CLI__ status` | Wait until `resetsAt`: you used every attempt on that area's held-back checks for now. |213| `Flake` | yes | 75 | `__CLI__ status` | Nothing: the check failed and then passed on the same tree, and the platform runs it again. |214| `VerifierBlocked` | yes | 75 | `__CLI__ status` | Nothing: the platform could not run the checks, and runs them again. |215
6 unmodified lines
modified:packages/drafting/test/prompt.test.ts+1 added-1 removed
98 unmodified lines
99100 const prompt = userPrompt(input(2, feedback));101102 expect(prompt).toContain(103 "NotRedFirst: the ask's check must fail on main twice in the same way, by an assertion"103 "NotRedFirst: the ask's check must fail on main twice the same way, with a failing assertion, not a load or syntax error, on two runs"104 );105 expect(prompt).toContain("diagnosis: Passed");106107 const tail = feedback.slice(feedback.indexOf("output (its end):\n") + 18);
15 unmodified lines
modified:packages/git/test/gateway.test.ts+5 added-4 removed
1import { NodeServices } from "@effect/platform-node";2import { describe, expect, it } from "@effect/vitest";3import { Brand } from "@repo/brand";4import { CommitSha, RepoPath } from "@repo/protocol/ids";5import { OutOfScope, StaleBase, TouchedJudge } from "@repo/protocol/refusal";6import type { Refusal } from "@repo/protocol/refusal";7import { git, gitOk } from "@repo/testkit/git";
143 unmodified lines
151 const pushed = yield* git(clone, "push", "origin", "HEAD:main");152153 expect(pushed.exitCode).toBe(1);154 expect(remoteLines(pushed.stderr)).toStrictEqual([154 "remote: StaleBase: main moved to 2222222, past your base 1111111",155 "remote: next: git pull --rebase",155 "remote: StaleBase: main moved to 2222222, past your base 1111111, while this answer was checked; push again and the platform merges it onto the moved main",156 `remote: next: git push ${Brand.slug} HEAD:main`,157 "remote: retryable: yes",158 ]);159 expect(pushed.stderr).toContain(160 " ! [remote rejected] HEAD -> main (StaleBase)"
122 unmodified lines
283 const tip = Option.getOrThrow(yield* Ref.get(moved));284285 expect(pushed.exitCode).toBe(1);286 expect(remoteLines(pushed.stderr).slice(-3)).toStrictEqual([286 `remote: StaleBase: main moved to ${tip.slice(0, 7)}, past your base ${base.slice(0, 7)}`,287 "remote: next: git pull --rebase",287 `remote: StaleBase: main moved to ${tip.slice(0, 7)}, past your base ${base.slice(0, 7)}, while this answer was checked; push again and the platform merges it onto the moved main`,288 `remote: next: git push ${Brand.slug} HEAD:main`,289 "remote: retryable: yes",290 ]);291 expect(pushed.stderr).toContain(292 " ! [remote rejected] HEAD -> main (StaleBase)"
98 unmodified lines
modified:packages/project/test/draft-settle.test.ts+2 added-2 removed
357 unmodified lines
358 { label: "territory", value: "packages/parser" },359 {360 label: "draft failed",361 value:362 "NotRedFirst: the ask's check must fail on main twice in the same way, by an assertion",362 "NotRedFirst: the ask's check must fail on main twice the same way, with a failing assertion, not a load or syntax error, on two runs; run the lane's command on it yourself, then open the ask again",363 },364 ],365 ]);366 expect([shown.files, shown.proposal.draft]).toStrictEqual([
77 unmodified lines
444 },445 {446 label: "draft failed",447 value:448 "NotRedFirst: the ask's check must fail on main twice in the same way, by an assertion",448 "NotRedFirst: the ask's check must fail on main twice the same way, with a failing assertion, not a load or syntax error, on two runs; run the lane's command on it yourself, then open the ask again",449 },450 ],451 id: firstDecision,452 },
242 unmodified lines
modified:packages/protocol/src/refusal.ts+54 added-14 removed
18 unmodified lines
19export { At } from "./domain/common.ts";2021const cli = (...args: readonly string[]) => [Brand.cli, ...args].join(" ");2223// A `next` fixed per tag names what the tag does not carry as a placeholder,24// spelled as the docs spell it.25const PROJECT = "<owner>/<name>";2627const ASK = "<ask>";2829// A code read is an MCP tool with no command: its `next` is the tool call30// that would answer, as an agent with no shell makes it.31const tool = (name: string, payload: Record<string, string>) =>32 `${name} ${JSON.stringify(payload)}`;3334// A push to the claim's fork; the platform merges onto the moved main itself.35const pushAnswer = `git push ${Brand.slug} HEAD:main`;3637const Label = Schema.NonEmptyString;3839const Paths = Schema.NonEmptyArray(RepoPath);40
34 unmodified lines
75}7677export class NotVouched extends Schema.TaggedError<NotVouched>()("NotVouched", {78 ...Final,65 ...nextIs(cli("status")),79 ...nextIs(cli("policy", "--project", PROJECT)),80}) {}8182export class CapReached extends Schema.TaggedError<CapReached>()("CapReached", {83 ...Retryable,
24 unmodified lines
108}) {}109110export class DirectPush extends Schema.TaggedError<DirectPush>()("DirectPush", {111 ...Final,98 ...nextIs(cli("asks")),112 ...nextIs(cli("fork", "--project", PROJECT)),113 ref: Label,114}) {}115116export class AskBlocked extends Schema.TaggedError<AskBlocked>()("AskBlocked", {
9 unmodified lines
126}127128export class Denounced extends Schema.TaggedError<Denounced>()("Denounced", {129 ...Final,116 ...nextIs(cli("status")),130 ...nextIs(cli("policy", "--project", PROJECT)),131}) {}132133export class OutOfScope extends Schema.TaggedError<OutOfScope>()("OutOfScope", {134 ...Final,
42 unmodified lines
177});178179export type MovedBy = typeof MovedBy.Type;180181// Never a rebase: the claim's base stays where it was granted, and a rebased182// answer earns `OutOfScope` for every sibling's file.183export class StaleBase extends Schema.TaggedError<StaleBase>()("StaleBase", {184 ...Retryable,169 ...nextIs("git pull --rebase"),185 ...nextIs(pushAnswer),186 base: CommitSha,187 conflicts: Schema.Array(RepoPath),188 main: CommitSha,189 movedBy: Schema.optionalKey(Schema.NonEmptyArray(MovedBy)),
25 unmodified lines
215216/** A held-back check failed; only its area and suite are disclosed. */217export class HeldBackFailed extends Schema.TaggedError<HeldBackFailed>()(218 "HeldBackFailed",203 { ...Final, ...nextIs(cli("status")), area: Label, suite: Label }219 {220 ...Final,221 ...nextIs(cli("verdict", ASK, "--project", PROJECT)),222 area: Label,223 suite: Label,224 }225) {}226227export class AttemptsExhausted extends Schema.TaggedError<AttemptsExhausted>()(228 "AttemptsExhausted",
15 unmodified lines
244 "VerifierBlocked",245 { ...Retryable, ...nextIs(cli("status")) }246) {}247248// An ask's file lands by opening it, so the local check, which reads the asks249// on a landed base, cannot judge one yet: the ask is opened again.250export class NotRedFirst extends Schema.TaggedError<NotRedFirst>()(251 "NotRedFirst",252 {253 ...Final,231 ...nextIs(cli("check")),254 ...nextIs(cli("ask", "open", ASK, "--project", PROJECT)),255 }256) {}257258export class WeakCheck extends Schema.TaggedError<WeakCheck>()("WeakCheck", {
3 unmodified lines
262}) {}263264export class IncompleteBrief extends Schema.TaggedError<IncompleteBrief>()(265 "IncompleteBrief",243 { ...Final, ...nextIs(cli("check")), missing: Schema.NonEmptyArray(Label) }266 {267 ...Final,268 ...nextIs(cli("ask", "open", ASK, "--project", PROJECT)),269 missing: Schema.NonEmptyArray(Label),270 }271) {}272273export class LayerContentInPublicTree extends Schema.TaggedError<LayerContentInPublicTree>()(274 "LayerContentInPublicTree",
21 unmodified lines
296) {}297298export class NotDecider extends Schema.TaggedError<NotDecider>()("NotDecider", {299 ...Final,273 ...nextIs(cli("status")),300 ...nextIs(cli("policy", "--project", PROJECT)),301}) {}302303export class DecisionClosed extends Schema.TaggedError<DecisionClosed>()(304 "DecisionClosed",
14 unmodified lines
319}320321export class UnknownProject extends Schema.TaggedError<UnknownProject>()(322 "UnknownProject",296 { ...Final, ...nextIs(cli("asks")), project: ProjectName }323 { ...Final, ...nextIs(cli("projects")), project: ProjectName }324) {}325326export class UnknownAsk extends Schema.TaggedError<UnknownAsk>()("UnknownAsk", {327 ...Final,
2 unmodified lines
330}) {}331332export class UnknownCommit extends Schema.TaggedError<UnknownCommit>()(333 "UnknownCommit",307 { ...Final, ...nextIs("git fetch"), sha: CommitSha }334 { ...Final, ...nextIs(tool("log", { project: PROJECT })), sha: CommitSha }335) {}336337export class UnknownDecision extends Schema.TaggedError<UnknownDecision>()(338 "UnknownDecision",
1 unmodified line
340) {}341342export class UnknownPath extends Schema.TaggedError<UnknownPath>()(343 "UnknownPath",317 { ...Final, ...nextIs("git ls-tree"), commit: CommitSha, path: RepoPath }344 {345 ...Final,346 ...nextIs(tool("readTree", { at: "main", project: PROJECT })),347 commit: CommitSha,348 path: RepoPath,349 }350) {}351352export class UnknownRevision extends Schema.TaggedError<UnknownRevision>()(353 "UnknownRevision",322 { ...Final, ...nextIs("git ls-remote"), rev: Schema.String }354 {355 ...Final,356 ...nextIs(tool("listRefs", { project: PROJECT })),357 rev: Schema.String,358 }359) {}360361export class UnknownProposal extends Schema.TaggedError<UnknownProposal>()(362 "UnknownProposal",
1 unmodified line
364) {}365366export class ProjectExists extends Schema.TaggedError<ProjectExists>()(367 "ProjectExists",332 { ...Final, ...nextIs(cli("asks")), project: ProjectName }368 { ...Final, ...nextIs(cli("projects")), project: ProjectName }369) {}370371export class NotYourNamespace extends Schema.TaggedError<NotYourNamespace>()(372 "NotYourNamespace",
12 unmodified lines
385}386387export class ImportFailed extends Schema.TaggedError<ImportFailed>()(388 "ImportFailed",353 { ...Retryable, ...nextIs(cli("init")), reason: Label }389 {390 ...Retryable,391 ...nextIs(cli("init", "--project", PROJECT, "--import", "<url>")),392 reason: Label,393 }394) {}395396export class UnknownEnvItem extends Schema.TaggedError<UnknownEnvItem>()(397 "UnknownEnvItem",
112 unmodified lines
modified:packages/protocol/src/render.ts+11 added-5 removed
77 unmodified lines
78 // `evidence` lets in the answerer and the project's maintainers alone; the79 // local check keeps no log for it to read.80 return ChecksFailed.isLocal(logRef)81 ? `the ${lane} checks failed on this commit; run ${next} to see the failure`82 : `the ${lane} checks failed on the answer; run ${next} in a clone of the fork to see the failure; the log is kept as ${logRef}, which the answerer and the project's maintainers read with ${Brand.cli} evidence`;82 : `the ${lane} checks failed on the answer; run ${next} in a clone of the fork to see the failure; the log is kept as ${logRef}, which the answerer and the project's maintainers read with ${Brand.cli} evidence ${logRef} --project <owner>/<name>`;83 },84 ClaimLapsed: ({ ask }) => `your claim on ${ask} lapsed`,85 DecisionClosed: ({ decision }) =>86 `${decision} was already decided, or expired to its default`,87 Denounced: () =>88 "this project's vouch file denounces you, so it takes no claims or proposals from you",89 DirectPush: ({ ref }) =>90 ref.startsWith(BRANCH)91 ? `main moves only by a landing, so ${ref} takes no direct push; push your answer to your claim's fork`91 ? `main moves only by a landing, so ${ref} takes no direct push; a contributor pushes the answer to the claim's fork, and a maintainer makes a working fork with ${Brand.cli} fork and lands it with ${Brand.cli} land`92 : `${ref} is written by the platform, not pushed; a fork takes branches only, so push your answer with git push ${Brand.slug} HEAD:main`,93 DraftInProgress: ({ proposal }) =>94 `the platform is already drafting ${proposal}'s ask`,95 Flake: ({ lane }) =>
8 unmodified lines
104 NotClaimed: ({ ask }) => `you hold no claim on ${ask}`,105 // `today` across every project raises it too, so it names no project.106 NotDecider: () =>107 "you are not a maintainer here: only the maintainers a project's config names may do this",108 // The ask is not on main until it opens, so the local check cannot judge it:109 // the lane's own command, run on main, shows what it does.110 NotRedFirst: () =>109 "the ask's check must fail on main twice in the same way, by an assertion",111 "the ask's check must fail on main twice the same way, with a failing assertion, not a load or syntax error, on two runs; run the lane's command on it yourself, then open the ask again",112 NotSensitive: ({ key }) =>113 `${key} is not @sensitive, so it holds no write-only value`,114 NotVouched: () => "no member of this project has vouched for you",115 NotYourNamespace: ({ handle, project }) =>
11 unmodified lines
127 `${from} reaches into ${to}, which its module does not export; import it through that module's public exports instead`,128 RepoBusy: () => "the repo was busy with another push",129 SecretInOutput: ({ item, where }) =>130 `the write-only value ${item} appeared in the ${where}`,131 // With no conflict, main only kept moving while the answer was merged onto132 // it, and the platform merges again on the next push. A conflict is merged133 // by hand: the answer is judged from the newest landing it contains, so a134 // rebased answer carries every sibling's file as its own.135 StaleBase: ({ base, conflicts, main, movedBy = [] }) =>136 conflicts.length === 0131 ? `main moved to ${short(main)}, past your base ${short(base)}`132 : `main moved to ${short(main)}, past your base ${short(base)}; conflicts in ${list(conflicts.map((path) => conflictIn(path, movedBy)))}`,137 ? `main moved to ${short(main)}, past your base ${short(base)}, while this answer was checked; push again and the platform merges it onto the moved main`138 : `main moved to ${short(main)}, past your base ${short(base)}, at ${list(conflicts.map((path) => conflictIn(path, movedBy)))}; merge main into your answer: git fetch <platform>/<owner>/<name>.git main && git merge FETCH_HEAD, then push again`,139 StaleLayer: ({ layer }) =>140 `the ${layer} layer moved since this answer was checked; it will be checked again`,141 TouchedJudge: ({ paths }) =>142 `changes files that decide what the checks do: ${list(paths)}; the checks are fixed for this ask, so put them back, or flag the ask if a check is wrong`,
73 unmodified lines
modified:packages/protocol/test/refusal.test.ts+2 added-2 removed
24 unmodified lines
25 _tag: refusal._tag,26 base,27 conflicts: ["src/a.ts"],28 main,29 next: "git pull --rebase",29 next: `git push ${Brand.slug} HEAD:main`,30 retryable: true,31 });32 });33
21 unmodified lines
55 main,56 movedBy: [57 { ask: "fix-parser", author: "alice", landing, path: "src/a.ts" },58 ],59 next: "git pull --rebase",59 next: `git push ${Brand.slug} HEAD:main`,60 retryable: true,61 });62 expect(63 Schema.decodeUnknownSync(Refusal)(JSON.parse(overTheWire(moved)))
189 unmodified lines
modified:packages/protocol/test/render.test.ts+9 added-9 removed
57 unmodified lines
58 it("gives the reason, then next, then whether retrying can help", () => {59 expect(60 explain([new StaleBase({ base, conflicts: [path], main })])61 ).toStrictEqual([62 "StaleBase: main moved to 2222222, past your base 1111111; conflicts in src/a.ts",63 " next: git pull --rebase",62 "StaleBase: main moved to 2222222, past your base 1111111, at src/a.ts; merge main into your answer: git fetch <platform>/<owner>/<name>.git main && git merge FETCH_HEAD, then push again",63 ` next: git push ${Brand.slug} HEAD:main`,64 " retryable: yes",65 ]);66 });67
13 unmodified lines
81 ],82 }),83 ])[0]84 ).toBe(85 "StaleBase: main moved to 2222222, past your base 1111111; conflicts in src/a.ts (last changed by alice in 3333333, for fix-parser), src/b.ts (last changed by dora in 3333333), src/c.ts"85 "StaleBase: main moved to 2222222, past your base 1111111, at src/a.ts (last changed by alice in 3333333, for fix-parser), src/b.ts (last changed by dora in 3333333), src/c.ts; merge main into your answer: git fetch <platform>/<owner>/<name>.git main && git merge FETCH_HEAD, then push again"86 );87 });8889 it("points at the line when the refusal has one", () => {
158 unmodified lines
248249 it("tells a direct push to main where answers go instead", () => {250 expect(explain([new DirectPush({ ref: "refs/heads/main" })])).toStrictEqual(251 [252 "DirectPush: main moves only by a landing, so refs/heads/main takes no direct push; push your answer to your claim's fork",253 ` next: ${Brand.cli} asks`,252 `DirectPush: main moves only by a landing, so refs/heads/main takes no direct push; a contributor pushes the answer to the claim's fork, and a maintainer makes a working fork with ${Brand.cli} fork and lands it with ${Brand.cli} land`,253 ` next: ${Brand.cli} fork --project <owner>/<name>`,254 " retryable: no",255 ]256 );257 });
2 unmodified lines
260 expect(261 explain([new DirectPush({ ref: `refs/notes/${Brand.slug}` })])262 ).toStrictEqual([263 `DirectPush: refs/notes/${Brand.slug} is written by the platform, not pushed; a fork takes branches only, so push your answer with git push ${Brand.slug} HEAD:main`,264 ` next: ${Brand.cli} asks`,264 ` next: ${Brand.cli} fork --project <owner>/<name>`,265 " retryable: no",266 ]);267 });268
62 unmodified lines
331 it.each([332 {333 lines: [334 "UnknownPath: 2222222 has no file or folder at src/a.ts",335 " next: git ls-tree",335 ' next: readTree {"at":"main","project":"<owner>/<name>"}',336 " retryable: no",337 ],338 refusal: new UnknownPath({ commit: main, path }),339 },340 {341 lines: [342 "UnknownRevision: v9 is neither main, a commit this project holds, nor one of its tags",343 " next: git ls-remote",343 ' next: listRefs {"project":"<owner>/<name>"}',344 " retryable: no",345 ],346 refusal: new UnknownRevision({ rev: "v9" }),347 },
69 unmodified lines
417418 expect(419 explain([new ChecksFailed({ lane: "unit", logRef, next: "bun test" })])420 ).toStrictEqual([421 `ChecksFailed: the unit checks failed on the answer; run bun test in a clone of the fork to see the failure; the log is kept as ${logRef}, which the answerer and the project's maintainers read with ${Brand.cli} evidence`,421 `ChecksFailed: the unit checks failed on the answer; run bun test in a clone of the fork to see the failure; the log is kept as ${logRef}, which the answerer and the project's maintainers read with ${Brand.cli} evidence ${logRef} --project <owner>/<name>`,422 " next: bun test",423 " retryable: no",424 ]);425 });
84 unmodified lines