IW-620: Shutdown-safe GitAdapter read, stage and commit #624
No reviewers
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli!624
Loading…
Reference in a new issue
No description provided.
Delete branch "IW-620"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GitAdapter.dirtyState,stageAll,commitandgetFullHeadShanow takedestroyOnExit: Boolean = trueas their last parameter and pass it toProcessAdapter.run(added by #616). A caller can now read the dirty state, stage, commit and read the new SHA from inside a JVM shutdown hook. kanon'sLiveWorkingTreecan delegate to core and stop repeating these methods.Changes
core/adapters/Git.scala: the flag goes through the full call chain of each public method, includingcommit→getFullHeadShaand the privateporcelainStatus. The default keeps all current callers unchanged.core/test/GitTest.scala,core/test/ShutdownSpawnProbe.scala,core/test/ProcessTest.scala: forked-JVM tests rundirtyState,stageAllandcommitinside a shutdown hook. The probe harness is shared with theProcessAdaptershutdown test.docs/api/Git.md: documents the new parameter.Testing
core.testpass, including two forked-JVM shutdown tests (seereview-packet.md).Follow-ups filed
Release notes
Bezpečnější čtení stavu gitu, příprava a commit při ukončování procesu. Zjištění rozpracovaných změn, jejich příprava ke commitu a vytvoření commitu mohou proběhnout i v kroku spuštěném těsně před ukončením procesu, se stejným chováním a chybovými hláškami jako za běžného provozu. Bez výslovného vyžádání se nic nemění. Podrobnosti:
project-management/issues/IW-620/release-notes.md.🤖 Generated with Claude Code
Closes #620
GitAdapter dirtyState, stageAll and commit cannot take destroyOnExit, so a shutdown-safe caller must repeat them Artifacts: - analysis.md - issue.md 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Issue: IW-620 Phase: 1 - Shutdown-safe GitAdapter read, stage and commit This commit marks the checkpoint for phase 1 context generation. Use wf-implement IW-620 to return to this point. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Shutdown-safe GitAdapter read, stage and commit Artifacts: - phase-01-tasks.md 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>