The composed-workflow test opened a second fixture, which writes its own
temp artifact, so a replay record's subject path and the session-attributed
provider selection no longer matched the snapshot copy. Both are display
metadata outside the Evidence id; the provider call is what establishes
the binding here, so compare the content the id commits to and assert the
ids separately, which the test already does.
Also apply the formatter to BinarySessionInvestigation.test.ts, which
fails format:check on its own.
Attribution replaced the whole stored record with the incoming copy, so a
provider-produced duplicate without the caller-selected path, alias set or
subject display erased the metadata the recording session retained merely to
add provider_selection. Adopt only the display facts the incoming copy actually
carries; omission is not deletion. Import keeps its documented replace
semantics.
The duplicate branch also returned before refreshEvidenceMetadata and
#emitSnapshotChanged, so replay caches and snapshot subscribers kept the old
metadata after a successful replacement. Treat a non-no-op replacement exactly
as the import path does.
Recording an observation the ledger already holds under the same semantic ID
returned duplicate and discarded the attributed object, so lookup and export
kept the imported record's missing or foreign provider_selection. Replace the
retained display metadata with the active selection on that path; semantic
identity and the stored payload stay the same record.
The provenance schema also accepted a selected candidate that is unavailable
or unsupported, which no registry path can bind. Require the selected
candidate to be available and supported so an imported bundle cannot
re-export a selection that never occurred.
provider_selection carries no separate selected-provider id, so a reader can only name the recording session's provider when exactly one candidate claims the selection. The schema accepted any candidates array, so an imported bundle could re-export zero or several selected candidates under a stable Evidence id and consumers would have no way to resolve the provider.
The recording paths always derive the selection from a single bound provider (AnalysisProviderRegistry selects one usable candidate, and SessionProviderRouter marks only the bound id selected), so the refine rejects only foreign input.
recordEvidenceWithUnknown synthesizes its own rea.residual-unknown-mutation record, so the selection the session threads into recordUnknown and updateUnknown never reached it. The atomic comparison workflows therefore exported one record without provider_selection, contradicting the guarantee that every admitted record carries the recording session's selection. Thread the active binding through the atomic method as well; analyst-authored mutation records still keep analyst-inference authority and gain only the session selection.
Address the open review findings on session provider provenance:
- importAnalysisSnapshot merged the re-attributed bundle into the ledger but
staged the snapshot's own bundle, so AnalysisSnapshotCache rebuilt replay
bindings from records the merge had replaced. Hand the merged bundle back
to the stage so replays bind to the attributed evidence.
- recordResult recorded an attributed record and then serialized the
caller's copy, so successful MCP responses omitted provider_selection
while the ledger and exports carried it. Read the recorded Evidence back
before delivery, as the direct analysis path already does.
- recordUnknown and updateUnknown synthesized unknown-mutation Evidence
without the active session's provider selection, so those exported
records were unattributed. Thread the binding's selection through to
unknownMutationEvidence, which is where the record is produced.
* fix(cli): validate named inputs before target admission
* fix(mcp): preserve valid inputs when advertised schema references widen
* test(inputs): reach session behavior with admitted inputs
One-shot admission now rejects incomplete requests before a session exists. Lifecycle tests supply the required fields, and unknown arguments are rejected before provider issues are retained.
* fix(cli): preserve Electron fuse path spelling
Anchor relative fuse paths without stripping dot segments, and let an empty path reach the operation so it still reports invalid_request.
* fix(cli): reject outline-depth unless detail is summary
The advertised schema already required detail summary whenever outline-depth
was present. The parser still applied the full default and accepted that
combination, so its output failed the same schema. Parsing now rejects it
before the command runs.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Keep inventory counts inline and preserve explicit 1–32 record detail requests. The real 26-record Windows sample serialized 57,946 metadata bytes before detail selection.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Retain one completed pair per resource scope, revalidate selected file state on every page, invalidate failures, and clear retained bytes at shutdown. Keep cold CLI process costs explicit.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>