Skip to content

Commit 47c9eca

Browse files
committed
feat(tmux): resume agent and hunk sessions
1 parent a136146 commit 47c9eca

15 files changed

Lines changed: 2223 additions & 123 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Worklog: hunk-session-resume
2+
3+
Status: complete
4+
5+
## Objective
6+
7+
Durably resume native OMP, Pi, Hermes, and OpenCode conversations with the same per-worktree Hunk review source. Stop after focused/upstream tests, Darwin checks/rebuild, runtime smoke checks, review, commit, rebase, push, and upstream verification pass.
8+
9+
## Decisions
10+
11+
- Execute approved `local://hunk-session-resume-plan.md` without changing locked Hunk input.
12+
- Store only Hunk reloadable input; native runtimes own transcripts.
13+
- Preserve unrelated history and changes.
14+
- The plan’s Hunk `c05558` revision was stale; repository lock is `f809983781b7eac9edf676600cfe3033430cfa11` (v0.17.0). Generated 0003 against the current lock/current 0001+0002 without changing `flake.lock`.
15+
16+
## Evidence
17+
18+
- Host: `mactraitor-pro.cinnamon-rooster.ts.net`, Darwin 27.0.0 arm64.
19+
- Initial repository: `main...origin/main [ahead 1]`, clean.
20+
- Hunk fresh checkout: current 0001+0002+0003 apply; focused tests `154 passed, 0 failed`; `bun run typecheck` passed.
21+
- `bun test config/tmux/tests/agent-hunk-sessions.test.ts`: 5 passed, 0 failed, 31 assertions.
22+
- `zunit run config/tmux/tests/worktree-agent-hunk.zunit`: 12 passed, 0 failed/errors/skipped.
23+
- Shellcheck on four changed scripts passed.
24+
- `hey check` passed Darwin evaluation and full zunit suite; its changed-file formatter/hooks reported no changed files, so they are not counted as verification.
25+
- `hey agent-audit-tests`: `PASS test-confidence`.
26+
- `hey agent-finish --worklog ...`: `PASS` after formatter stabilization; repo-quality, agent-quality, test-confidence, and inventory checks passed.
27+
- `sudo /run/current-system/sw/bin/darwin-rebuild switch --flake .`: passed; deployed Hunk 0.17.0 with patch.
28+
- Deployed `hunk resume --help` shows the new command; live collector emitted metadata-only OMP/Pi rows for the canonical checkout; `opencode service status` returned `http://127.0.0.1:4096`.
29+
- Disposable Git repo smoke: `hunk diff --staged` wrote a v1 per-worktree marker with `staged: true`; `hunk resume` restored one-file staged source while excluding a different unstaged file.
30+
- OMP native smoke created `omp-resume-sentinel`, collector returned its absolute JSONL token, and `omp --cwd ... --resume <jsonl> -p` returned the sentinel.
31+
- Pi native smoke created `pi-resume-sentinel`, collector returned its absolute JSONL token, and exact `pi --session <jsonl> -p` returned the sentinel without fork flags.
32+
- Tmux full-window/focus/repair behavior was exercised deterministically by the 12-case zunit suite on an isolated mocked server; live native transcript and Hunk-source restoration were exercised separately to avoid mutating the user’s running tmux server.
33+
- Hermes one-shot created `hermes-resume-sentinel` and persisted session `20260712_114038_dfcb77`; it is intentionally not a picker row because one-shot sessions are outside retained `cli`/`tui` rows. OpenCode live service availability was verified; pagination/resume dispatch and unavailable-service isolation use deterministic API/tmux tests.
34+
35+
## Reviews
36+
37+
- User approved the authoritative plan.
38+
- Automated plan gate attempted with `hey agent-review plan --active-model-family openai`; blocked by `Authentication required`. User approval is authoritative; implementation proceeds while the exact gate blocker remains recorded.
39+
- Automated landing gate attempted with `hey agent-review landing --active-model-family openai`; blocked by the same `Authentication required`.
40+
- Independent final reviewer found no high-confidence correctness, security, privacy, argv, marker, shell-injection, Nix, or coverage blockers.
41+
42+
## Feedback
43+
44+
None.
45+
46+
## Remaining work
47+
48+
None.
49+
50+
## Commits
51+
52+
- `5eff06078 feat(tmux): resume agent and hunk sessions`.
53+
- Tag: `agent-work/hunk-session-resume`.

0 commit comments

Comments
 (0)