Repository navigation
feat(session): accept session refs for recorder provenance - #670
Merged
Merged
Conversation
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
recording_session_idwrappers to reuse an already-issued principal-scopedsession_refsuch as~s1wc_sess_*identity before existing recorder authorization, provenance, audit, and ledger handlingsession_idand recorder provenance as independently authorized semantic roles while reusing the same durable Session-reference resolverBehavior
session_refremains a principal-scoped selector for one exact Workflow Session incarnation. When supplied asrecording_session_id, Runtime resolves it to the pinned canonical Session before the existing recorder authorization path runs. Durable audit, provenance, correlation, and Session ledger state therefore continue to usewc_sess_*identities.Recorder provenance does not provide business Session, Project, execution, or guard authority. Business
session_idandrecording_session_idmay explicitly target different Sessions and continue through their independent authorization paths.Closed Sessions preserve the existing recorder-provenance behavior. Missing, deleted, malformed, stale, and foreign-principal references fail closed. Omitting
recording_session_iddoes not infer or retain a recorder from Window, credential, Project, transport, or recent-call state.MCP Plugin and SSH specialized gateways use the same canonical Session-reference resolver. SSH fallback result projection preserves equivalent Project context for valid short and canonical recorder selectors while keeping existing business-error precedence. App-only tools that do not admit generic recorder metadata keep their existing discard behavior. Code Mode server-owned recorder context is unchanged.
Model-facing startup guidance now prefers the returned
session_reffor recorder provenance while retaining canonicalwc_sess_*compatibility.Validation
cargo check --locked -p webcodexcargo test --locked -p webcodex-tool-contracts --lib— 234 passedpython3 scripts/check_markdown_links.py— 651 local links, 0 missingagyreview: no blocker; abstraction ownership, authorization boundaries, and specialized-path parity judged clean4485fda12f9fb89cfe45b005f5dbf98d0a1e5060, including server, workspace crates, runner, tooling, contract, MCP conformance, Docker, Windows, macOS, and native aggregate lanesCloses #574.