Skip to content

♻️ refactor(tasks): move main claim authority to daemon - #55

Merged
zrr1999 merged 6 commits into
codex/pi-session-daemon-heartbeatfrom
codex/daemon-task-claim-expiry-cutover
Jul 31, 2026
Merged

♻️ refactor(tasks): move main claim authority to daemon#55
zrr1999 merged 6 commits into
codex/pi-session-daemon-heartbeatfrom
codex/daemon-task-claim-expiry-cutover

Conversation

@zrr1999

@zrr1999 zrr1999 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • move main-session task claim authority and expiry reconciliation into the daemon
  • fence claim, finish, recovery, heartbeat, and release mutations through daemon-issued workspace client leases
  • preserve explicit task statuses and partial-success metadata when daemon authority succeeds but local projection fails
  • expose typed daemon RPC/status surfaces and remove the extension-owned claim reaper

Validation

  • pnpm run check:static
  • daemon task-claim focused suite: 12 passed
  • extension/host focused suite: 182 passed
  • fresh isolated-daemon live lease harness: acquire, stale-fence rejection, release, and daemon-restart reattach all passed; PID and generation changed across restart
  • hygiene ratchet and working/cached/range diff checks passed

Stack dependency

Stacked on #49 (codex/pi-session-daemon-heartbeat). This PR must remain based on that branch until the heartbeat layer lands.

@zrr1999
zrr1999 force-pushed the codex/daemon-task-claim-expiry-cutover branch from 1a47562 to b4ac39c Compare July 30, 2026 14:50
@zrr1999
zrr1999 merged commit 68bb9a0 into main Jul 31, 2026
7 checks passed
@zrr1999
zrr1999 deleted the codex/daemon-task-claim-expiry-cutover branch July 31, 2026 01:49
zrr1999 added a commit that referenced this pull request Jul 31, 2026
## Summary

- reduce production circular dependencies from 75 edges / 10 SCCs to 0 /
0
- extract ownership contracts across daemon and Cockpit/TUI
coordination, AI and ask routing, extension background/drive state, and
role runtime clusters
- enforce a global production-cycle prohibition in dependency-cruiser
and hygiene ratchets
- preserve existing public APIs, daemon command behavior, session
lifecycle, runtime control, and transport semantics while moving
implementation ownership behind explicit contracts

## Stack dependency

This PR is stacked directly on #49
(`codex/pi-session-daemon-heartbeat`). It is a sibling of #55 and does
not depend on #55.

## Validation

- `pnpm run check:static`
- `pnpm run test:unit` (Cockpit: 630; daemon: 591; package checks
passed)
- `pnpm run test:process:source` (1 passed)
- `pnpm run check:boundaries` (1543 modules / 5914 dependencies; 0
violations)
- `node scripts/check-hygiene-ratchets.mjs` (`circular=0`)
- fresh dependency-cruiser JSON: production circular 0, SCC 0, owner
distribution empty, violations 0
- `git diff --check origin/codex/pi-session-daemon-heartbeat...HEAD`

## Review scope

The relative stack diff is exactly 52 files: four reviewed ownership
clusters plus the global dependency/configuration and ratchet batch.
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