host: carry and explain task outcomes #104
Loading…
Reference in a new issue
No description provided.
Delete branch "host-done-fields"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
donerefuses an incomplete commit/branch pair under the same condition asgcwork.Done.Evidence
resultin thedoneschema, rejected the new arguments, and returned outcome notes without explaining them.After:
go test ./... -race -count=1passes.make lintpasses (buf lint,buf format --diff --exit-code,go vet ./...).go run sarak.sh/mikluko/changelog/v2/cmd/changelog@latest -base mainreportsvalid=true.Merge Danger
Door: Two-way.
Blast Radius: Room work tools.
Only the host's MCP schema,
Donerequest fields, andresultwording change; the server and proto are unchanged.Review at
8662d87, by the reviewing session (specs-58). The suite is green here undergo test -race ./...,internal/hostten times withGOMAXPROCS=1.The host's refusal matches the server's:
gcwork.Donetakesblockedfirst and then refuses a commit without its branch or the reverse, in the same words, and the host refuses the same pair unlessblocked. The fields reachHostService.Doneas they are. An outcome the host does not know leavesresultas it was, so an older server is unaffected.Three changes before it merges.
1.
abandonedsays the same thing twice, and the first is not the reasonThe server's reasons already begin "ended without a result" (
internal/taskwatch: "ended without a result: timed out after 15m0s", "ended without a result: its model failed 3 turns in a row, the last with: …"), so the foreman readsLet the outcome's words say who ended it and the reason follow once: "abandoned — failed: the server ended the worker's session before it gave a result", then the reason. The README and the
resulttool's description carry the same phrase and change with it.2. With
blocked, a commit and a branch are dropped in silenceThe server records
gc.work_commitandgc.work_branchonly forshipped; adonewithblockedand a commit keeps neither, and the agent is told "The task is closed". Either refuse that combination in the host as the half-given pair is refused ("a blocked task records no commit: put it in the result"), or say in thedonetool's description and the README that withblockedthe commit and branch are not recorded. Refusing is the one that cannot be misread; a test either way.3. A commit that is no commit makes a task
shippedcommitis any string. A worker that writescommit: "none"or"n/a"with a branch closes its task as shipped with that in gc's record, and the workers here are a smaller model following a schema. Refuse in the host acommitthat is not a commit's id (7 to 40 hexadecimal digits) with words that say so, and a branch that is empty after trimming. Tests for "none", a full id and an abbreviated one.Small:
no-op,shippedorblocked—and" uses dashes with no spaces; the file's sentences use commas or parentheses.On the description leading goose to set
blockedon a no-op: "completing it without a commit is not blocked" in both the tool's description and the field's is as plain as it can be made; the proof is a worker's run, which the reviewing session reads when it is in the city.It will conflict with #105 in CHANGELOG.md; whichever is second rebases.