refactor: add scoped transcript target writers#89262
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 19, 2026, 4:07 AM ET / 08:07 UTC. Summary PR surface: Source +195, Tests +257, Docs 0, Generated 0. Total +452 across 7 files. Reproducibility: not applicable. This is an additive public SDK/API migration slice rather than a bug; source inspection shows current main does not already provide the requested public transcript runtime helpers. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Add the Do we have a high-confidence way to reproduce the issue? Not applicable. This is an additive public SDK/API migration slice rather than a bug; source inspection shows current main does not already provide the requested public transcript runtime helpers. Is this the best way to solve the issue? No as-is. The scoped writer seam is a plausible layer, but the public file-shaped parameter needs the requested deprecation marker and the stack needs refreshed proof before it is the best landable SDK contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 86b24ac2b2fc. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +195, Tests +257, Docs 0, Generated 0. Total +452 across 7 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Follow-up before land: |
What
Adds public SDK transcript target and writer helpers on top of the transcript identity API. The PR lets callers bind scoped transcript identity to an active
sessionFiletarget and then read, append, publish, or run locked transcript work against that same target.Refs #88838. Stacked on #89261.
Why
Plugin and memory transcript consumers cannot safely migrate with read-only scoped identity APIs. Several callers still lock and append to an active transcript file; if reads resolve a different target than writes, mirror writers and history/projector paths can miss existing events or duplicate messages. This PR defines the missing target/writer contract without flipping storage.
Changes
Testing
node scripts/run-vitest.mjs src/plugin-sdk/session-transcript-runtime.test.ts- 9 passednode scripts/run-tsgo.mjs -p tsconfig.core.json ...- passednode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json ...- passednode scripts/sync-plugin-sdk-exports.mjs --check- passednode scripts/check-plugin-sdk-subpath-exports.mjs- passednode --max-old-space-size=8192 --import tsx scripts/generate-plugin-sdk-api-baseline.ts --check- passedgit diff --check- passed