Skip to content

lorenzo/start kw integration pr 4 - #202

Draft
lorenzoberts wants to merge 6 commits into
lorenzo/start-kw-integration-pr-3from
lorenzo/start-kw-integration-pr-4
Draft

lorenzo/start kw integration pr 4#202
lorenzoberts wants to merge 6 commits into
lorenzo/start-kw-integration-pr-3from
lorenzo/start-kw-integration-pr-4

Conversation

@lorenzoberts

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLIGive Feedback 💬

@lorenzoberts
lorenzoberts force-pushed the lorenzo/start-kw-integration-pr-4 branch from 3ed3b77 to c997ae7 Compare August 20, 2026 21:01
lorenzoberts and others added 6 commits August 24, 2026 14:22
This commit introduces KwActor with the full message surface and the
immediate-reply contract for Start requests. The skeleton refuses
unimplemented starts instantly, exposes idle status over a watch
channel, and already routes RecordApply and GetReadiness through the
shared history store and probes.

This commit is part of the kw integration's step 4.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit makes StartBuild accept a job without waiting for it to
finish. A detached task owns the process, broadcasts Idle to a
terminal status, and cancel or shutdown kill the process group so the
actor never wedges on a live job.

This commit is part of the kw integration's step 4.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit spawns KwActor at startup and moves apply-history writes
onto KwHandle so recording serializes with job state inside the actor.
The handle is optional because the process module is unix-only;
non-unix builds keep writing the store directly. Shutdown follows
InputActor so a running job's process group is killed before the
runtime tears down.

This commit is part of the kw integration's step 4.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit makes Shutdown wait until kill escalation finishes, so
tearing down the runtime cannot orphan kw's process group. Cancel
escalates from SIGTERM to SIGKILL, and a process that exits before the
signal lands keeps its real outcome instead of being reported as
cancelled. The pre-job branch is recorded at accept time so
RestorePreviousBranch has a target.

This commit is part of the kw integration's step 4.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
…spawn

This commit maps a post-cancel reap by whether the process was
signal-terminated, so a build that exits on its own keeps its real
outcome. The pre-job branch probe moves above spawn so it records the
branch from before the job starts, not from after the process is
already running.

This commit completes the kw integration's step 4.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit drops plan citations and comments about KwOps, checkout,
and deploy that this skeleton does not implement. StartDeploy still
replies NotImplemented; the comment now says that.

This commit is part of the kw integration's step 4.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
Co-authored-by: Cursor <cursoragent@cursor.com>
@lorenzoberts
lorenzoberts force-pushed the lorenzo/start-kw-integration-pr-4 branch from c997ae7 to 39b9c3f Compare August 24, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant