Skip to content
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

docs: document complete session-start digest handling - #93

Merged
JTInventory merged 2 commits into
mainfrom
fm/firstmate-adapt-1794-digest-preview-0810
Aug 12, 2026
Merged

JTInventory merged 2 commits into
mainfrom
fm/firstmate-adapt-1794-digest-preview-0810

Conversation

@JTInventory

Copy link
Copy Markdown
Owner

Intent

Semantic adapt of upstream kunchenguid#1794 (commit 2cf0283) in JTInventory/firstmate, Slice A only: when a harness shows only a preview of the session-start digest and the full output was persisted, firstmate must read the exact path supplied by the harness or session-start wrapper before acting, and act on that complete artifact. Change only AGENTS.md, preserving CLAUDE.md as its existing symlink if needed. Do not port kunchenguid#1798 truncation/order, kunchenguid#1781 hooks/runner, or kunchenguid#1860 network worker; do not edit hook files or bin/fm-session-start.sh, add libraries, or add a network worker. Commit on fm/firstmate-adapt-1794-digest-preview-0810 and deliver through JTInventory/firstmate; do not merge. Skip only the local pinned ShellCheck lint because the prior run's lint failure was a daemon/driver timeout with no source finding; retain review, test, document, push, PR, and CI validation.

What Changed

  • Added session-start guidance to read the exact path supplied by the harness or wrapper when only a preview is shown and the full digest is persisted, then act on the complete artifact.
  • Clarified that filenames must not be guessed or the complete artifact bulk-reread, while preserving the section 5 requirement to read every state/*.meta and state/*.status.

Risk Assessment

✅ Low: The change is a bounded AGENTS.md-only semantic adaptation. It requires the exact persisted digest path, forbids filename guessing, preserves section 5 recovery reads, and leaves CLAUDE.md and all executable files unchanged.

Testing

The configured baseline passed, and the focused watch-session test passed. Scope and symlink checks passed. The bootstrap test was attempted but is incompatible with the current isolation fixture. No reviewer-visible product artifact was produced because no executable consumer exists for this AGENTS.md contract.

  • Outcome: ⚠️ 2 warnings across 1 run (7m7s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ AGENTS.md:114 - AGENTS.md:114 adds the blanket rule Do not bulk-reread state/, but the pre-existing recovery contract at AGENTS.md:177-178 requires reading every state/*.meta and state/*.status after bootstrap. An agent can therefore skip the metadata and status reads needed to reconcile direct-report windows and wake history. Narrow this rule to avoiding duplicate reconstruction from the persisted artifact, while preserving the required section 5 recovery reads.

🔧 Fix: Narrowed persisted digest reread rule
✅ Re-checked - no issues remain.

⚠️ **Test** - 2 warnings
  • ⚠️ AGENTS.md:112 - The exact-path/full-artifact behavior is only an AGENTS.md instruction. This repository has no executable session-start consumer or focused integration test that demonstrates a harness preview leading to a read of the supplied persisted artifact. Current checks validate wording and scope, but not end-to-end user behavior.
  • ⚠️ tests/fm-bootstrap.test.sh:148 - The optional bootstrap test failed before its intended assertion because its fixture lacks the primary attestation/cwd proof now required by S1 worker isolation. This is unrelated to the AGENTS.md-only change and was not modified.
  • bash tests/fm-worker-isolation.test.sh && bash tests/fm-watch-session.test.sh && bash tests/fm-slot-occupant-proof.test.sh && FM_TEARDOWN_TEST_FOCUS=s1 bash tests/fm-teardown.test.sh
  • bash tests/fm-worker-isolation.test.sh && bash tests/fm-watch-session.test.sh && bash tests/fm-slot-occupant-proof.test.sh && FM_TEARDOWN_TEST_FOCUS=s1 bash tests/fm-teardown.test.sh (configured baseline)
  • bash tests/fm-watch-session.test.sh
  • bash tests/fm-bootstrap.test.sh (fixture failure before target assertion)
  • git diff --name-status aa80e9c HEAD
  • test -L CLAUDE.md && test "$(readlink CLAUDE.md)" = AGENTS.md
  • Manual contract review of AGENTS.md:112-114
✅ **Document** - passed

✅ No issues found.

⏭️ **Lint** - skipped

Step was skipped.

✅ **Push** - passed

✅ No issues found.

@JTInventory
JTInventory merged commit a9d1610 into main Aug 12, 2026
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant