Repository navigation
feat(session): add durable model-facing session refs - #666
Merged
Merged
Conversation
yyjeqhc
approved these changes
Sep 25, 2026
This was referenced Sep 25, 2026
This was referenced Sep 29, 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
session_refselectors such as~s1for exact Workflow Session incarnationswork_on_project, Session bootstrap/summary, authorized resume discovery, and explicit handoff surfacessession_refback to the canonicalwc_sess_*identity before the existing collaboration, authorization, lifecycle, guard, audit, and dispatch pathsBehavior
A
session_refis a durable model-facing selector for one exact Workflow Session incarnation. References are scoped to the authenticated principal and carry no additional authority.Dereferencing first recovers the pinned canonical Session, then reuses the existing Session and Project authorization path. Cross-principal reuse fails closed, and a reference whose pinned Session no longer exists or can no longer be proven does not recycle or retarget to another Session.
Existing canonical
wc_sess_*selectors continue to work. Closed Sessions retain the same lifecycle semantics as canonical Session IDs: reference resolution identifies the Session, while the existing lifecycle and per-tool checks remain authoritative for what operations are allowed.Bootstrap, discovery, and handoff projections can expose both the canonical Session identity and
session_refwhere continued model interaction benefits from the shorter selector. Ordinary hot-path results remain compact. Recorder provenance remains an explicit canonical Session context.The model-reference storage layer reuses the established Project reference contract for Project refs and adds a dedicated durable Session-reference namespace, keeping existing Project reference storage, allocation, validation, and resolution semantics unchanged.
Validation
cargo fmt --all -- --checkcargo check --locked -p webcodex-core -p webcodex-store -p webcodex-tool-contractscargo check --locked -p webcodexcargo test --locked -p webcodex-tool-contracts --lib— 234 passedgit diff --checkImplements the Workflow Session slice of #571.