lorenzo/start kw integration pr 5 - #203
Draft
lorenzoberts wants to merge 10 commits into
Draft
Conversation
lorenzoberts
force-pushed
the
lorenzo/start-kw-integration-pr-5
branch
from
August 20, 2026 21:01
9dbca6a to
57b4e94
Compare
This commit makes StartBuild refuse before touching the tree when kw is missing, the kw env cannot be resolved, or the tree is not ready. The version floor stays advisory. A refused start leaves the actor idle and able to accept a later job. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit runs each build on the branch the caller asked for. Start refuses on a dirty or unverifiable worktree, switches, and leaves HEAD on that branch after the job. Restore context is recorded only on accept so a refused start cannot clobber a previous job's restore target. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit lets the user switch the tree back to the branch it was on when the last job was accepted. Restore refuses while a job runs, when nothing was recorded, or when the worktree is dirty, and only a successful switch consumes the context so a failed attempt can be retried. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit replaces the skeleton's fixed argv with a reserved-flag merge: patch-hub always wins on --alert and --save-log-to, and user extras cannot override them. --save-log-to is reserved but not passed, because ProcessTrait is already the sole log writer. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit finds the patchset that produced the branch a build runs on by scanning apply history for that tree, newest timestamp winning. The link does not depend on the caller threading a message id, so manually typed branches and cross-session rebuilds still resolve. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit writes a build record on success and failure so deploy-alone readiness has durable evidence of what the job produced. Cancelled jobs write nothing; an unresolvable env at completion skips the record rather than keying a false no-env match; a write error is logged without changing the job's terminal status. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit refuses git am while a kw job owns the tree's branch state. The user sees a blocked popup and the apply toggle resets; if the actor cannot be reached, apply proceeds because an unreachable actor cannot be running a job. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit rolls HEAD back when a start is refused after the branch switch, so a failed spawn never mutates the tree or clobbers restore context. Build records now reuse the output dir and arch probed at accept instead of re-resolving at completion, which could key a successful job as a no-env build. Checkout git calls run off the actor task, untracked files are ignored by the dirty check, and --menu is reserved so menuconfig cannot hang a redirected build. This commit completes the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit drops plan section numbers, KwOps, and comments about deploy that this change does not implement. The remaining comments describe the checkout, argv merge, and apply-blocking behavior as they stand. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br> Co-authored-by: Cursor <cursoragent@cursor.com>
lorenzoberts
force-pushed
the
lorenzo/start-kw-integration-pr-5
branch
from
August 24, 2026 17:27
57b4e94 to
9979cdf
Compare
This commit stops injecting --alert=n on kw build: lab kw (beta-0.9) rejects unrecognized options as a hard failure, while kw's own default is already alert=n. User --alert extras remain stripped. Cancel after a process-group SIGTERM/SIGKILL now maps exit 143/137 to Cancelled, because the bash kw wrapper often reports those as plain exits rather than WIFSIGNALED. This commit is part of the kw integration's step 5. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬