feat(control-plane): add tenant provision orchestration with fake driver - #7539
feat(control-plane): add tenant provision orchestration with fake driver#7539jsdevninja wants to merge 1 commit into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7539 +/- ##
=======================================
Coverage 88.47% 88.47%
=======================================
Files 720 720
Lines 75733 75733
Branches 22547 22548 +1
=======================================
Hits 67008 67008
Misses 7679 7679
Partials 1046 1046
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-20 21:25:07 UTC
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (AI reviewers agree on a likely critical defect: control-plane/src/deprovision-tenant.ts:33-67 — when `options.provisioned` is omitted, the `if (provisioned)` block is skipped entirely and the function never calls `driver.revokeSecrets`/`destroyDatabase`/`destroyContainer`; it just returns `{state: "gone", alreadyAbsent: true}` unconditionally, contradicting the JSDoc/type comment ('the driver is asked to destroy using best-effort absent-tolerant calls') — a caller that lost its in-memory handles (e.g. after a restart) will get a false 'gone' result while the container/database/secrets are still live, and the added test (`#7524: deprovision without provisioned handles reports alreadyAbsent`) only asserts the trivially-true no-op outcome rather than that the driver was actually asked to clean up.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
control-plane/package (mirroringreview-enrichment/) hosting product-agnosticprovisionTenant()/deprovisionTenant()orchestration.TenantProvisioningDriver(create-container / provision-DB / inject-secrets + destroy/revoke) and an in-memory fake driver; secrets injection goes through a#7174-shapedTenantSecretBrokerseam (no hand-rolled secrets path, no live Cloudflare/Postgres SDKs).control-plane:testintotest:ci, addcontrol-plane/towantedPaths(+ bundled focus-manifest parity), and cover create→exists→destroy→gone plus rollback / invalid-input / idempotent-absent branches.Closes #7524
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
control-plane/package (likereview-enrichment/): not under root Vitest/Codecovcoverage.include. Rannpm --prefix control-plane test(13 pass) andnpm run manifest:drift-check. Codecov patch does not numerically gate this tree — noted below. Remainingtest:ci(including the newcontrol-plane:teststep) will run in CI.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
N/A — control-plane orchestration library only; no visible UI.
Notes
packages/loopover-engine/src/miner/coding-agent-driver.ts(CodingAgentDriver+createFakeCodingAgentDriver);review-enrichment/package skeleton;src/orb/broker.ts#7174secret_typegeneralization for the inject-secrets broker seam.control-plane/**is outside rootcoverage.include(same convention asreview-enrichment//apps/**); package tests enforce the lifecycle acceptance criteria instead.