feat(harness): run persistent role inbox, ACK, lease, and handoff loop
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 969
Description
## Parent
- #436
## Goal
Implement the shared runtime lifecycle for a persistent role after stable-role-to-Directory identity resolution.
## Scope
- Acquire a uniqueness lease for `role:` before polling.
- Poll the private inbox by immutable Directory ULID, ACK assigned tasks, then acquire `issue:` before work.
- Heartbeat both leases and fail closed on ownership loss.
- Handoff with a non-empty continuation note and release issue/role leases cleanly.
- Enforce coordinator-only dispatch and keep merge authority exclusive to `coord-main`.
## Acceptance
- A second live session for the same stable role cannot proceed.
- ACK/claim/heartbeat/release are attributable to the Directory ULID.
- Interrupted work is recallable/reassignable with a durable handoff note.
- Worker/reviewer roles cannot dispatch or merge.
- Tests cover duplicate session, expired lease, lost ownership, and recovery.
- `./init.sh` passes.
## Dependencies
- #436
- stable role resolver child
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading parent issue #436 and the stable role resolver child dependency, then trace the harness runtime lifecycle described in this issue. The work is done when duplicate sessions are blocked, lease ownership and Directory ULID attribution survive recovery, handoffs are durable, role permissions are enforced, and ./init.sh passes with the listed tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100