feat(cli): add verifiable session lifecycle#29
Merged
Conversation
mmilanez
marked this pull request as ready for review
July 18, 2026 08:29
This was referenced Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the OpenAI Build Week executable session lifecycle to the public CLI:
lead-protocol session openregisters the pair, transitions handoff state, and writes a SHA-256 boot receipt;lead-protocol checkpointcreates a UTC checkpoint owned by the active session and updates only its pointer;lead-protocol session closevalidates state, requires an explicit JOURNAL answer, writes the terminal handoff, removes only the owned row, and emits a close receipt.Build Week provenance
Lead Protocol predates the July 13, 2026 submission-period start. This PR contains the post-July-13 extension being submitted: executable lifecycle commands, deterministic receipts, optimistic peer-safe mutation, guarded close, lifecycle tests, and install-from-tarball smoke coverage.
Public PRs #22, #26, and #27 and their commits predate the submission period and are intentionally not included. They will need rebase and version renumbering after this release.
User impact
Agents and developers can now prove which protocol state was loaded, preserve unrelated concurrent sessions, create an attributable checkpoint, and close without reporting success after failed validation or checklist confirmation.
Supported platforms: Windows, macOS, and Linux with Node.js 18+.
Validation
npm run typechecknpm test— 5/5 lifecycle tests passednpm run test:pack— built@leadsolutions/lead-protocol@2.1.0, installed the exact tarball in a clean temporary project, and completedinit -> validate -> status -> session open -> checkpoint -> session closeCloses #28