Repository navigation
spike: isolate cordis plugin runtime - #7450
t3-code[bot] wants to merge 7 commits into
Conversation
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces a substantial new plugin runtime POC (~1500 lines of new code) with complex dependency management, reconciliation logic, and lifecycle handling. While isolated from production code, the scope and complexity of this new capability warrants human review to validate the design approach. You can add or adjust custom eligibility rules. Learn more. |
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
|
addressed the review findings in
22 tests pass with node 24.13.1, plus typecheck, lint, formatting, frozen install, and the demo. |
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
|
addressed the latest findings in
25 tests, typecheck, lint with warnings denied, formatting, and frozen install pass on node |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fb81809. Configure here.
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
|
addressed the latest review findings in
29 tests, typecheck, lint with warnings denied, formatting, frozen install, and the demo pass on node |
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
Dismissing prior approval to re-evaluate c42beab
|
synced the plain-function callback return regression test and fix in 30 tests and the full local validation pass on node |
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
|
Consolidated into #8007 as one PR targeting main. |

what changed
why
this lets reviewers evaluate cordis without the effect-scope or framework-free implementations in the same diff. the branch preserves the adapter and its measured tradeoffs, including the extra runtime dependency and structural type shim.
validation
24.13.1limits
this is an isolated runtime poc. it does not load packages, add a sandbox, expose plugin rpc, or wire product ui.
checklist
request provenance
Note
Low Risk
New private POC package with no product wiring; changes are additive and test-heavy, with no auth, data, or UI surface.
Overview
Adds a standalone
@t3tools/plugin-runtime-cordis-pocpackage that pulls the Cordis-backed plugin runtime out of the broader three-way experiment so reviewers can evaluate it alone.The POC implements
createCordisRuntimeagainst a sharedPluginRuntimecontract: dependency ordering and blocking, cycle detection, differential reconcile (reuse unchanged fibers), stagedisolatelabels for transactional provider overlap, frozen contribution snapshots, queued exclusive operations with reentrancy guards viaAsyncLocalStorage, and rollback/retire cleanup with aggregated errors. A structural shim works around Cordis rc.8 declaration issues under this repo’s ESM setup.Shared contract tests (
defineRuntimeContract, 31 cases) and Effect Schema manifest validation (semver, path escape, mobile declarative) ship with the package; a demo script benchmarks activation, noop reconcile, and a 250-plugin chain.cordisis added to the lockfile. Scope is explicitly POC-only—no package loading, sandbox, RPC, or product UI.Reviewed by Cursor Bugbot for commit 50112cd. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add Cordis-backed plugin runtime POC with transactional reconciliation
@t3tools/plugin-runtime-cordis-pocpackage implementing a plugin runtime backed by Cordis, with full lifecycle management in cordisRuntime.ts.reconcile()performs dependency analysis (cycle detection, topological ordering, duplicate id/capability rejection), restarts only changed plugins and their dependents, rolls back staged plugins on failure, and returns deeply frozen snapshots.Macroscope summarized 50112cd.