Skip to content

feat: align chief supervision with lead semantics - #93

Merged
boadij merged 6 commits into
mainfrom
feat/chief-supervision-coherence
Sep 20, 2026
Merged

boadij merged 6 commits into
mainfrom
feat/chief-supervision-coherence

Conversation

@boadij

@boadij boadij commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Require Pi 0.86 and persist the displaced Lead tool baseline across Chief transitions, resume, and transcript-backed tool restoration.
  • Add read-only staff transcript using exact persisted Pi session identity and the shared bounded transcript projection.
  • Align Chief and Lead lifecycle/presentation semantics while preserving descendant states, separating attention from lifecycle, and replacing per-Lead activity ghosts.
  • Update supervision contracts, documentation, package metadata, and focused regression coverage.

Key behavior

  • Active Chief mode retains exactly staff, including after /tree restoration and at the model-call boundary.
  • Lead resume repairs stale restored Chief tools from the durable leadTools checkpoint, while legitimate branch-local Lead tool state remains authoritative.
  • Suspended Chief mode exposes no Herdsman authority tools.
  • A non-empty persisted session candidate advertises staff transcript; the transcript action validates the current session header, version, and exact Pi session ID before returning evidence; internal session paths are not serialized.
  • Chief projections preserve working, settling, starting, blocked, unknown, and lost states. Aggregate counts use active, blocked, and total.
  • Attention, lifecycle, and delegated activity use distinct presentation markers; ◐ remains blocked and ◉ remains delegated activity.

Validation

  • npm test -- extension/supervision.test.ts extension/presentation.test.ts extension/commands.test.ts extension/extension-contract.test.ts extension/controller-api.test.ts extension/recovery.test.ts — 291 passed.
  • npm run check — passed.
  • npm run validate — passed (check, build, and package audit).
  • git diff --check — passed.

Manual smoke

No live manual smoke run was performed; this worktree did not run a live Pi 0.86 + Herdr environment.

Persist displaced Lead tool baselines across Chief transitions and Pi 0.86 session restoration, and add bounded staff transcript access with exact persisted session identity.\n\nUnify lifecycle and presentation semantics, preserve descendant states, and replace misleading activity aggregates while updating the supervision contract, documentation, and focused tests. Require Pi 0.86 for the native session APIs and transcript-backed tool restoration.
Restore stat-only O(1) transcript readiness so status and supervision refreshes do not parse complete JSONL files. Reuse resolved path-backed sessions without a duplicate open, while actual transcript reads retain full session-header validation.
Document that a non-empty persisted session candidate only makes transcript readiness advisory. The transcript action still validates the current session header, version, and exact Pi session ID before returning evidence.
Add a PR #93-only Windows job that runs the first missing test file independently from the validation matrix. This diagnostic is temporary and will be removed after the hang evidence is collected.
Wait for observed reconnect conditions instead of relying on a fixed delay, so the lifecycle watcher test synchronizes on subscription evidence across platforms.

Track and destroy accepted sockets during unconditional cleanup, then remove the temporary PR #93 Windows diagnostic job now that the focused isolation is complete.
@boadij
boadij merged commit f82a194 into main Sep 20, 2026
3 checks passed
@boadij
boadij deleted the feat/chief-supervision-coherence branch September 20, 2026 11:46
boadij added a commit that referenced this pull request Oct 2, 2026
## Summary

- Publish Lead herd-run start time and Pi context percentage as
display-only metadata through the existing Herdr path, and project it
only after Lead identity validation.
- Show responsive elapsed/context columns on Manager work rows, dropping
elapsed before context as width tightens.
- Reuse Pi's semantic theme roles for supervision rows; Chief receives
theme styling only and no telemetry columns.
- Keep persistence, project/work schemas, model context, staff/control
surfaces, and Chief telemetry unchanged.

## Rationale

This preserves ADR 0002's separation of durable intent from derived
runtime state and ADR 0012's Manager-owned project resolution. It reuses
the canonical herd-run timing from PR #19 and respects the boundaries
established by PRs #93, #184, and #201. The implementation follows the
applicable Pi 1.0.0 and Herdr 0.9.3 contracts without adding polling,
persistence, or protocol changes.

## Validation

- Focused suites: Herdr (67 passed), supervision (54 passed),
presentation (75 passed), controller lifecycle + extension contract (97
passed)
- `npm run check` (792 passed, 1 skipped)
- `npm run build`
- `npm run package:audit`
- `npm run smoke -- manager-recovery`
- `git diff --check`

Closes #199

---------

Co-authored-by: Jeffrey Boadi <25706638+boadij@users.noreply.github.com>
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