Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
da23b8c to
2736a71
Compare
…ng its end AgentProcessExitWatch probes a pane's agent process after it reports a session end, backing off from 250 ms to 8 s for at most 90 s, and stops as soon as the probe confirms the exit, has nothing to check, or the pane no longer holds what the watch started for. A probe that settles after a stop or restart is ignored. Hook providers whose SessionEnd can precede the process exit (a /clear also ends a session) use it to end the row only once the process is gone.
…se timers Provider-owned pane maps now register with ProviderHookStateSlots, so pane teardown, moves and claim checks reach them without each map being listed in listener-state by hand. Claude's two claim-bearing maps and its prompt turn order move onto slots. Claude's owed-notification timers become one lease provider behind a generic AgentLeaseExpiryTimers, which main and the WSL relay both arm after every stored row. Claude rows restate exactly as before.
2736a71 to
c1f1e41
Compare
ELI5
Each agent that reports status through hooks keeps a little memory per terminal pane. This gives that memory one registration point, so cleanup reaches every agent without listing each by hand.
What Changed
Rebased onto main at 845867a. It depends on #47839; until it merges, this diff also shows its commit. Review only this PR's commit
c1f1e4136c.ProviderHookStateSlots: provider-owned pane maps register once, and pane teardown, moves and claim checks reach them through the registry.AgentLeaseExpiryTimers, armed after every stored row by both main and the WSL relay.Review fixes since the first push:
Why
The Droid child-work PR (#47841) needs per-pane Droid state. Without slots, each new map has to be wired into
listener-stateteardown, moves and claims by hand, and a missed spot leaks state across panes.Linked Issue
Groundwork for #47841 and #47842. #47826 itself was closed by #47836.
Visual Proof
N/A: internal refactor with no visible change.
Testing
Local macOS only.
ORCA_CODE_QUALITY_BASE=ac/03-f7-process-exit-watch pnpm check:changedpassed on this commit after the rebase (format, oxlint, typecheck, tests importing the change, selected ratchets).pnpm test --maxWorkers=6) on this branch: 1322 test files passed, 3 failed, 15 skipped. The failing files also fail on main at 845867a on this machine:agent-cli-update-timeout(timing),bot-upcoming-copy(locale),worktree-removal-real-git(temp-dir cleanup).golden-fresh-profile-terminalfailed the same way on main. Not rerun after the rebase.Not run: Linux, Windows, or SSH remote hosts.
Changed test files:
Performance
None, because the same timers and maps run as before; registration happens once per provider at module load.
Risk
Level: Medium
This touches Claude hook-state teardown and notification timers. If a slot were missed, a Claude pane could keep a stale claim or fire an owed notification late. Back out with a plain revert.
AI Disclosure
Review
Self-reviewed this PR's single commit for correctness, security, and performance. Merge order:
Agent skill upstream boundary
Notes
Considered security, macOS/Linux/Windows paths, SSH remote hosts, mobile compatibility, folder workspaces, and performance. Execution coverage is limited to the checks listed under Testing.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Merge message