session: a worker can stop its own job, and a run's checker is told the work is in its copy - #1515
Merged
Merged
Conversation
…ries The bash belt composes `jobs`, `read_document` and `manual` onto the wire (the design's Decision 6), and the worker's page sends the worker to the first two, but the one-action envelope refused every call not named bash. A worker whose `find /` had become job 1 called `jobs` to stop it, was told `jobs` was not on this belt, and the walk ran on for the rest of the task. The envelope now keeps the one-call rule and refuses only a name the belt does not carry, read off the same belt the request was built from. The page says a job is read and stopped through `jobs` (output, kill), never the shell's builtin. A test proves a run worker's job still running when its task ends is stopped with it (it already was, through Close). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Nothing in a check's opening said where the work was. The only path in it was the footer's working directory, the run's copy, whose project folder name spells the person's checkout. A checker decoded it, began with `cd /tmp/fxfresh/repo`, read an unrelated diff there, and moved home only when a write was refused; a check that only reads is never refused. The check section now says the work is in its working directory, every check and probe runs there, and the person's checkout is not the work. The manual gains the section a person asks when they saw a check read their checkout, and a probe for asking how a task stops its own job. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These two bugs showed up in a default
/taskrun during the fresh-install check of dev1194d4b8f.1. A worker could not stop its own job. The bash belt puts
jobs,read_documentandmanualon the wire (Decision 6 of the bash-task-loop design), and the worker's page sends the worker tojobsandread_document. But the one-action envelope refused every call not namedbash. A worker'sfind /had become job 1. The worker calledjobskill and was toldjobswas not on this belt, so the walk ran on for the rest of the task.Now the envelope still allows exactly one call per response, and it refuses only a name the belt does not carry. The page says a job is read and stopped with the
jobstool. A job still running when its task ends was already stopped by the worker seat's close, and a test now proves it.2. The checker began in the person's checkout. Nothing in a check's opening said where the work was. The only path it held was the footer's working directory, and the project folder's name in that path spells the person's checkout. The checker decoded it (
cd /tmp/fxfresh/repo 2>/dev/null || pwd) and read an unrelated diff there. It moved into its own copy only when a write was refused. A check that only reads is never refused, so it could have answered on the wrong tree.Now the check section says the work is in its working directory, every check and probe runs there, and the person's checkout is not the work.
Manual:
how-tasks-run.mdgains a section on which folder the checker reads, plus a sentence on stopping jobs.worker-harness.mdnow says the kept hands are called directly. Both come with probes.Validation contract
jobskill call for a job it started, the call runs, answersjob 1 killed, and the job's process group is gone.[not run] no action executed: …. Two calls in one response are still refused.run.NewBashWorker, aRoleChecktask) says the work is in its working directory and never names the person's checkout.jobstool and the promotion sentence are unchanged.How it was checked
make pr-ready: green (see below).sleep 900in the background, then its trajectory readsjobskill →job 1 killedandjobslist →killed. Nosleepprocess was left.cd …/trees/1(its own copy). Itsjobscall was let through.Follows #1429 / #1485 / #1494 / #1436 review.
🤖 Generated with Claude Code