Skip to content

chore: register supervision recovery divergence - #15

Merged
tiago-peixoto merged 2 commits into
mainfrom
fm/reg-supervision-guard
Aug 18, 2026
Merged

tiago-peixoto merged 2 commits into
mainfrom
fm/reg-supervision-guard

Conversation

@tiago-peixoto

Copy link
Copy Markdown
Owner

Intent

Register the second and final carried fork divergence in the fork divergence ledger: the Claude primary-session supervision fix, submitted upstream as pull request 2392 and still open there. With this the ledger describes every divergence the fork intentionally carries. IMPORTANT DELIVERY REQUIREMENT: merge with the REGULAR merge method, never squash and never rebase. The two-parent merge IS the registration: bin/fm-fork-status.sh requires every manifest unit to have a reachable branch-level integration merge whose second parent is an ancestor of its canonical topic, so squashing or rebasing would destroy the link that makes the registration valid and leave the fork unhealthy. PRECISE CHANGE SET, stated this way deliberately because a vaguer wording previously caused an acceptance-criterion conflict across two gates: the first-parent diff changes exactly ONE file, fork-divergences.json, adding the manifest entry for id supervision-owner-aware-recovery with class pending, its canonical topic, its open upstream pull-request record, its falsifiable retirement condition, and the 22 exact paths its patch touches. There is deliberately NO product-content change, because the canonical topic reproduces work already present on fork main; the merge records ownership and provenance rather than altering code. An acceptance criterion must expect a manifest-only diff plus a two-parent merge commit. The canonical topic is one aggregate non-merge commit based on current official upstream, published on the fork as refs/heads/fm/divergence/supervision-owner-aware-recovery at exactly d257ba1 so every clone can resolve it, and git cherry against upstream reports exactly one non-equivalent commit. The topic deliberately excludes the governance manifest itself, excludes the fork-main integration workflow that is registered as its own separate unit, and excludes integration-path documentation artifacts that earlier pipeline runs committed, so the unit's patch matches its stated intent exactly. Follow the fork-main-integration procedure: isolated candidate from the private fork integration clone, validation through the isolated fork-target registration, no force-push, and no rewriting of published history.

What Changed

  • Register supervision-owner-aware-recovery as a pending fork divergence, linking its canonical topic and open upstream PR fix(bin): make supervision recovery owner-aware and durable kunchenguid/firstmate#2392.
  • Record its falsifiable retirement condition and complete 22-path patch ownership in fork-divergences.json.
  • Preserve the canonical topic as the second parent of the regular integration merge without changing product content.

Risk Assessment

✅ Low: Captain, this is a well-bounded manifest-only registration whose merge topology, canonical topic, exact 22-path ownership, upstream basis, and open PR disposition match the authoritative intent.

Testing

No prior baseline output was supplied; targeted Git assertions, live fork/upstream/PR checks, and an isolated end-to-end fork-status run all matched the required manifest-only two-parent registration, with CLI evidence saved and the source worktree left clean.

Evidence: Fork health CLI transcript

Health report recognizes both retained divergence units, including supervision-owner-aware-recovery, with errors=0.

Fork divergence health: retained=2 patches=2 not-upstream=9 integration-artifacts=7 retired-history-patches=0 accepted-upstream-patches=0 trend=up superseded=0 signals=7 errors=0
Refs: fork=HEAD@1c3ae04d upstream=upstream/main@64d61aed
Classes: pending=2 rejected-but-retained=0 private=0 superseded=0
Oldest pending: fork-main-integration introduced=2026-08-17 age_days=1
Last upstream merge touched: 0
fork-main-integration [pending] topic=fm/divergence/fork-main-integration upstream=open https://github.com/kunchenguid/firstmate/pull/1944
  does: Permanent fork-main integration workflow: guarded remote topology, isolated fork-target validation clone, divergence manifest and health report, topic integrate and discard helpers, upstream merge helper, and the startup upstream probe.
  retire when: Upstream pull request 1944 is merged into official upstream main, so official upstream ships the fork-main integration workflow itself.
supervision-owner-aware-recovery [pending] topic=fm/divergence/supervision-owner-aware-recovery upstream=open https://github.com/kunchenguid/firstmate/pull/2392
  does: Claude primary-session supervision fix: session-ownership alignment for the Stop auto-arm and turn-end guard, a bounded volatile entry trace, one-shot repeated-block escalation, a single supervision snapshot behind queue warnings, queued delivery treated as a supervision need until post-handling acknowledgement, and the BASH_SUBSHELL lock-ownership check stock macOS Bash 3.2 requires.
  retire when: Upstream pull request 2392 is merged into official upstream main, so official upstream ships owner-aware durable supervision recovery itself.
Accepted upstream and retired: 0
Manifest/Git signals (informational):
  - non-upstream commit fe30ee2e2ccf678bba877659e47bae71318a5fab is not represented by a canonical manifest topic
  - non-upstream commit 067881f8a67c9270edfb621784f7cf530fd38ccf is not represented by a canonical manifest topic
  - non-upstream commit 2def68de4882b16f3c5160dc44616a650606b321 is not represented by a canonical manifest topic
  - non-upstream commit d0a5f5a3f72a36e833b5ace9229d8bad8d1c407f is not represented by a canonical manifest topic
  - non-upstream commit 00e17f65aa3173ab9d3a3824565609baba569db6 is an integration-path artifact after cb61bd3364cdc8e2d0ef04fcad8096664bc1df60, not a carried divergence
  - non-upstream commit d51c7085780b106ec2b3b7d1847bf47e898889c6 is an integration-path artifact after 86df18c97a02421e3baf8003353476458293a208, not a carried divergence
  - non-upstream commit aee6c2e1eb55b8fca88d2d5cf216bc3e7bb28030 is an integration-path artifact after 3c9a985ad8763d92d9806284514a20b6af1ce5a0, not a carried divergence
Evidence: Registration acceptance proof

Shows the two-parent target, manifest-only first-parent change, exactly one added entry, exact 22-path match, one-commit cherry result, and published topic SHA.

target_parents=1c3ae04d35b75e3c8293fa717855c997bcf77bac 5ab8af3b90131be2690effd2dde0d5f143629094 d257ba1f718ddb59edd84fe160dd4d4910671d9f
first_parent_changed_files=fork-divergences.json
manifest_change=exactly_one_added_divergence_entry
manifest_id=supervision-owner-aware-recovery
manifest_class=pending
canonical_topic=fm/divergence/supervision-owner-aware-recovery
upstream_pr=https://github.com/kunchenguid/firstmate/pull/2392 disposition=open
retire_when=Upstream pull request 2392 is merged into official upstream main, so official upstream ships owner-aware durable supervision recovery itself.
manifest_path_count=22 topic_path_count=22 exact_path_set_match=true
topic_parent=64d61aed84373e02b1a28c4e6b262908ed8128d5 aggregate_non_merge_commits=1
git_cherry=+ d257ba1f718ddb59edd84fe160dd4d4910671d9f
published_topic_ref=d257ba1f718ddb59edd84fe160dd4d4910671d9f	refs/heads/fm/divergence/supervision-owner-aware-recovery
live_upstream_ref=64d61aed84373e02b1a28c4e6b262908ed8128d5	refs/heads/main
topic_paths:
.agents/skills/harness-adapters/SKILL.md
AGENTS.md
bin/fm-claude-stop-autoarm.sh
bin/fm-guard.sh
bin/fm-supervision-lib.sh
bin/fm-turnend-guard.sh
bin/fm-wake-lib.sh
docs/architecture.md
docs/configuration.md
docs/supervision-protocols/claude.md
docs/turnend-guard.md
docs/verification/process-event-sources.md
docs/verification/supervision.md
docs/watcher-continuity.md
tests/fm-claude-stop-autoarm-live-e2e.test.sh
tests/fm-claude-stop-autoarm.test.sh
tests/fm-guard-stale-banner.test.sh
tests/fm-turnend-guard.test.sh
tests/fm-wake-queue.test.sh
tests/fm-watch-triage.test.sh
tests/fm-watcher-lock.test.sh
tests/wake-helpers.sh
Evidence: Live upstream PR state

Source: Live upstream PR state

PR 2392 is open, not draft, and not merged.

pull_request:
  number: 2392
  title: "fix(bin): make supervision recovery owner-aware and durable"
  state: open
  author: tiago-peixoto
  draft: no
  merged: no
  checks: "11 passed, 2 failed, 13 total"
  body: "## Intent\n\nFix the Claude primary-session supervision failure observed on 2026-08-14, where work was in flight, no watcher was live, and the turn-end guard could repeat forever while the Stop auto-arm did not claim recovery. First add a durable, bounded, self-trimming, best-effort state trace that records every auto-arm entry and selected pre-claim gate without changing hook output, status, or failure behavior. Reproduce only in a throwaway home with real Claude, let the evidence choose among si\n... (truncated, 25449 chars total - use --full to see complete body)"
  comment_count: 1 — use --comments to see full comments
  review_count: 0 — use --reviews to see full reviews

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • git rev-list --parents -n 1 1c3ae04d35b75e3c8293fa717855c997bcf77bac and git diff-tree --no-commit-id --name-only -r 5ab8af3b90131be2690effd2dde0d5f143629094 1c3ae04d35b75e3c8293fa717855c997bcf77bac
  • Focused manifest comparison proving removal of supervision-owner-aware-recovery from the target manifest reproduces the base manifest exactly
  • Compared the manifest’s 22 paths with git diff-tree for d257ba1f718ddb59edd84fe160dd4d4910671d9f using sorted comm -3 output
  • git cherry 64d61aed84373e02b1a28c4e6b262908ed8128d5 d257ba1f718ddb59edd84fe160dd4d4910671d9f
  • git ls-remote git@github.com:tiago-peixoto/firstmate.git refs/heads/fm/divergence/supervision-owner-aware-recovery and git ls-remote git@github.com:kunchenguid/firstmate.git refs/heads/main
  • GH_REPO=kunchenguid/firstmate gh-axi pr view 2392
  • Isolated candidate: bin/fm-fork-status.sh --repo <disposable-candidate> --fork-ref HEAD --facts-only
  • git status --short and evidence-directory cleanup audit
✅ **Document** - passed

✅ No issues found.

⚠️ **Lint** - 1 warning
  • ⚠️ linter found issues (exit code 127)
✅ **Push** - passed

✅ No issues found.

Canonical divergence topic for the Claude primary-session supervision fix
the personal fork carries beyond official upstream: session-ownership
alignment for the Stop auto-arm and turn-end guard, a bounded volatile
entry trace that distinguishes a hook that never ran from one that took a
pre-claim gate, one-shot repeated-block escalation, a single supervision
snapshot behind queue warnings, queued delivery treated as a supervision
need until post-handling acknowledgement, and the BASH_SUBSHELL
lock-ownership check stock macOS Bash 3.2 needs because it has no BASHPID.

Submitted upstream as PR 2392 and retired when that lands.
@tiago-peixoto
tiago-peixoto merged commit 12e5d2a into main Aug 18, 2026
13 checks passed
@tiago-peixoto
tiago-peixoto deleted the fm/reg-supervision-guard branch September 4, 2026 21:11
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