Skip to content

lorenzo/start kw integration pr 2 - #199

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

lorenzo/start kw integration pr 2#199
lorenzoberts wants to merge 7 commits into
lorenzo/start-kw-integration-pr-1from
lorenzo/start-kw-integration-pr-2

Conversation

@lorenzoberts

Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLIGive Feedback 💬

@lorenzoberts
lorenzoberts force-pushed the lorenzo/start-kw-integration-pr-2 branch from cf4bf1d to 7cab36c Compare August 20, 2026 21:01
lorenzoberts and others added 7 commits August 24, 2026 14:19
This commit adds a configuration knob, defaulting to true, so apply
can leave HEAD on the new patchset branch. The setting goes through
the existing edit-config round-trip, and existing config files pick up
the default without a migration.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit makes apply honor stay_on_applied_branch. After a
successful git am, patch-hub leaves HEAD on the new patchset branch so
kw build can run from the applied state without an extra checkout;
setting the option to false keeps the previous switch-back. Failed
applies still abort and restore the original branch.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit introduces the kw module's apply-history store. Each
successful git am is recorded as user state — message id, tree, and
branch snapshot — in kw_apply_history.json, using the same atomic
write pattern as the other JSON repositories. A missing file reads as
empty; a corrupt file errors instead of being silently overwritten.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit writes an apply record after a successful git am so the
applied patchset, tree, and branch are durable across sessions. A
history-write failure does not turn a successful apply into a reported
failure: the success popup stays and the error is traced. The store is
injected as a shared instance through AppServices.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit keys apply records by message id and kernel tree so the
same patchset applied to several trees keeps one record per tree.
Store errors name the history file with an actionable popup, and an
unresolvable target tree warns instead of panicking the TUI.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit lifts the tmp-then-rename JSON write used by lore, config,
and kw history into a shared file-system helper. Serialization is
uniformly pretty-printed; serde failures on config save now surface as
filesystem errors, and the unused ConfigError::Save variant is
removed.

This commit completes the kw integration's step 2.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit drops comments that point at later steps, KwOps, or
readiness probes that are not in this change. The dead_code allowance
on apply_record stays; the comment around it does not.

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

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
Co-authored-by: Cursor <cursoragent@cursor.com>
@lorenzoberts
lorenzoberts force-pushed the lorenzo/start-kw-integration-pr-2 branch from 7cab36c to 720501a 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