Repository navigation
Harden SDK execution, extension topology, contracts, and exact coverage - #916
Conversation
Deliver a broad SDK and CLI trust-contract tranche across Plan lifecycle atomicity, extension runtime dependency topology, merge-driver scope, monotonic runtime contracts, exact local/hosted coverage enforcement, and compatible tooling updates.\n\nAdd strict and manual regressions, preserve managed extension merge state, refresh tsx and pm-changelog, and record complete PM evidence for pm-hxuqsa, pm-pg9599, pm-t9qbmp, pm-x0iv17, pm-2qqcgl, and pm-l9fv1e.
|
Warning Review limit reached
Next review available in: 26 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (37)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideAdds an exact coverage JSON gate to both local and CI test flows, hardens extension runtime activation topology and merge-attribute scoping for extension assets, and ensures CLI contracts keep compact command semantics monotonic between summary and full projections while updating tooling versions. Sequence diagram for extension install runtime activation topologysequenceDiagram
participant Install as performExtensionInstallUnderLock
participant Probe as probeRuntimeCommandPathsForInstall
participant Queue as extensionRuntimeProbeQueue
participant Loader as loadExtensionRuntimeCommands
participant Activator as activateExtensions
Install->>Probe: probeRuntimeCommandPathsForInstall(pm_root, parent, settings, extensions, global)
Probe->>Queue: extensionRuntimeProbeQueue.enqueue(async () => { ... })
Queue-->>Probe: async callback
Probe->>Probe: fs.mkdtemp(path.join(parent, ".pm-module-graph-")) as snapshotRoot
Probe->>Loader: loadExtensionRuntimeCommands({ module_graph_snapshot_root: snapshotRoot, cache_bust: true })
Loader-->>Probe: { loaded, failed, contribution_inventories }
Probe->>Activator: activateExtensions(loadResult)
Activator-->>Probe: activationResult
Probe-->>Install: { activationResult, contribution_inventories, runtime_failures }
Probe->>Probe: fs.rm(snapshotRoot, { recursive: true, force: true })
Sequence diagram for runtime contracts summary and full projectionssequenceDiagram
participant CLI as runContracts
participant Helper as attachAgentCommandContractsResult
CLI->>CLI: resolve selection (summary, fullOutput)
alt selection.summary or selection.fullOutput
CLI->>Helper: attachAgentCommandContractsResult(result, outputCommands)
Helper-->>CLI: result with command_summaries, output_policy
end
alt selection.summary
CLI-->>CLI: return result
else selection.fullOutput
CLI->>CLI: buildCommandAliasSurface(commands)
CLI-->>CLI: return full contracts with command_summaries and output_policy
end
Sequence diagram for exact coverage gate in CI and local runssequenceDiagram
actor Developer
participant CI as GitHubActions
participant Vitest as vitest
participant Gate as coverage_threshold_gate.mjs
participant Finder as findCoverageDeficits
Developer->>Vitest: pnpm exec vitest --coverage
Vitest-->>Vitest: write coverage/coverage-summary.json
Developer->>Gate: node scripts/release/coverage-threshold-gate.mjs
Gate->>Gate: main(summaryPath)
Gate->>Gate: readFileSync(summaryPath)
Gate->>Finder: findCoverageDeficits(summary)
Finder-->>Gate: deficits[]
alt deficits.length === 0
Gate-->>Developer: log "Exact coverage gate passed"
else deficits.length > 0
Gate-->>Developer: log uncovered files and metrics
Gate-->>Developer: process.exitCode = 1
end
CI->>Vitest: pnpm exec vitest --merge-reports=.vitest-reports --coverage
CI->>Gate: node scripts/release/coverage-threshold-gate.mjs
Gate-->>CI: same exact coverage enforcement as local
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@greptileai review |
|
@coderabbitai full review |
|
Record exact-head delivery links, final gate evidence, and active quality lineage for all six SDK/CLI tranche items.
|
@greptileai review |
|
@coderabbitai full review |
|
|
@greptileai review |
|
@coderabbitai full review |
|
|
@greptileai review |
|
@coderabbitai full review |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Disposition for CodeRabbit summary: the bot did not perform a review because its free review quota was exhausted. Exact head fea4ba9 is green, but this is recorded as a review limitation, not approval. |
|
Disposition for this CodeRabbit invocation: action not completed due to rate limiting; no finding was produced and no approval is inferred. |
|
Disposition for this CodeRabbit invocation: action not completed due to rate limiting; no finding was produced and no approval is inferred. |
|
Disposition for this CodeRabbit invocation: action not completed due to rate limiting; no finding was produced and no approval is inferred. |
|
Disposition for the latest CodeRabbit invocation on fea4ba9: action not completed due to rate limiting. All hosted gates are green, but the missing review remains an explicit limitation. |
|
Disposition for Sourcery review guide: useful and accurate architecture summary. It identified no actionable defect; its coverage flow description matches the corrected shard-to-merged exact gate topology on fea4ba9. |
|
Disposition for CodSpeed: accepted. The exact-head report shows no performance change across 11 benchmarks, consistent with the local SDK entrypoint and CLI transport checks. |
|
Disposition for Codecov: accepted. All modified coverable lines and tests are green, while the repository exact-count gate independently proves 100/100/100/100 without percentage rounding. |
|
Disposition for Sourcery review: the formal review was not completed because the weekly diff-character quota was exhausted. The separate reviewer guide was useful, but this rate-limit response is a limitation, not approval. |
|
@greptileai review |
|
@coderabbitai full review |
|
|
Disposition for the final-head CodeRabbit invocation on d5c146c: action not completed due to rate limiting. No finding was produced and no approval is inferred; all exact-head hosted gates remain green. |
Outcome
This broad SDK/CLI tranche strengthens the universal context-management substrate across six coupled trust boundaries:
pm contracts --fullmonotonic by retaining command summaries and output policy;PM lineage
Fixes #910
Fixes #911
Fixes #912
Verification
Summary by cubic
Hardens SDK/CLI trust boundaries: atomic Plan creation, accurate extension activation, safe merge-driver scope, monotonic contracts, and an exact coverage gate enforced after shard merge. Fixes #910, #911, and #912, and updates
tsxto4.23.8andpm-changelogto2026.8.6.New Features
coverage-shardthen runsscripts/release/coverage-threshold-gate.mjs; added a negative-control unit test.command_summariesandoutput_policy; refreshed the full structured contract fixture.Bug Fixes
.agents/pm/extensions/**from item merge drivers; kept JSON merge for.managed-extensions.json.Written for commit d5c146c. Summary will update on new commits.