Skip to content

lorenzo/start kw integration pr 7 - #205

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

lorenzoberts wants to merge 12 commits into
lorenzo/start-kw-integration-pr-6from
lorenzo/start-kw-integration-pr-7

Conversation

@lorenzoberts

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLI • Give Feedback 💬

This commit reads kw's ssh-config-like remote.config directly instead of
scraping `kw remote --list`, so deploy can target a stable host:port. The
tree's .kw/remote.config wins over the XDG/home copy, and a present local
file is never skipped — falling through would deploy to a different
machine than the tree is configured for.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit constructs the kw deploy command line so patch-hub's
resolved --remote, reboot, and force flags always win. User extras that
would switch to local, list or uninstall kernels, run interactive setup,
or flip boot-into-new-kernel-once are stripped; --alert is stripped too,
because it is not a deploy option and older kw rejects it as invalid.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit maps the deploy exit codes verified in kw 0.10 so KwOps can
explain a failed deploy instead of showing only a number. Unknown codes,
including the stale 30/EROFS entry, stay unnamed so the raw exit is still
visible.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit adds kw_reboot_after_deploy (default false) and
kw_deploy_force (default true) so deploy argv can follow user config
instead of hard-coded flags. Missing keys in existing JSON keep the
compiled-in defaults, matching the other optional config fields.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit extends GetReadiness so KwOps can judge deploy-alone against
the typed branch while still reporting real HEAD, and snapshots the
resolved --remote target plus boot-into-new-kernel-once. Only literal
`no` is Off; a missing or unknown value is a confirm gate, because kw
has no CLI off-switch.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit starts kw deploy through the same checkout policy as build,
then refuses unless a remote resolves, boot-once is off or acknowledged,
and a matching successful build record still has an image. A deploy never
writes a build record; a post-switch refusal rolls HEAD back so a failed
start cannot leave the tree on the typed branch.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit starts BuildThenDeploy as a build, then on a successful
exit writes the build record and spawns kw deploy without a second
Start. A failed or cancelled build never deploys; a cancel or spawn
failure during Deploying keeps the record so deploy-alone can reuse it.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit adds a proceed/back-out confirm popup for kw's one-shot
boot-into-new-kernel-once, because there is no CLI off-switch. Back out
is the default; proceeding stores the acknowledgement and consumes the
pending deploy kind. The quit prompt now says "job" so a running deploy
is not described as a build.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit replaces the KwOps deploy placeholder with the resolved
remote, boot-once state, deploy argv, and (d)/(D) availability so the
dashboard shows why deploy is blocked. Deploy failures append a known
exit hint; boot-once On/Unknown does not disable the labels, because
the confirm popup is still the gate.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit wires d/D on KwOps to StartDeploy and StartBuildThenDeploy so
the dashboard can actually launch the jobs it already previews. Boot-once
On/Unknown opens the confirm popup instead of starting; Proceed re-issues
the pending kind with the acknowledgement, and a branch-field commit
re-probes deploy-alone for the typed branch.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit keeps a cancelled build from chaining into deploy, and
makes deploy extras safe for kw's getopt: shared flags are filtered,
and reserved options are stripped in GNU long-option forms.
Deploy-alone refuses when the latest successful build is on another
branch, and start-path probes run off the actor task so they cannot
stall replies. KwOps labels and gate order match what the actor
accepts.

This commit completes the kw integration's step 7.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit drops plan and lab-scenario citations, comments about
unmapped exit codes and future kw master, and long reserved-flag
essays. What remains describes the remote parser, argv merge, and
deploy-alone gate as they stand.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
@lorenzoberts
lorenzoberts added this pull request to stack #200 September 20, 2026 14:02
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