Skip to content

refactor(core): thin leftover production/compatibility bridges - #705

Merged
Drswith merged 1 commit into
mainfrom
cursor/thin-production-compatibility-bridges-332b
Sep 6, 2026
Merged

refactor(core): thin leftover production/compatibility bridges#705
Drswith merged 1 commit into
mainfrom
cursor/thin-production-compatibility-bridges-332b

Conversation

@Drswith

@Drswith Drswith commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Post-1.12 P2 cleanup: import-graph evaluation of leftover src/services/*-production and src/core/*-compatibility bridges. Thin only what is proven redundant; keep facades required for frozen outward contracts.

Intake: mechanical dead-bridge removal / no observable behavior — no new OpenSpec change.

Aligned with team freeze + QA refinement: delete only pure pass-through / zero-ref layers; KEEP anything with differential responsibility (projection, CLI observation/lock wrapping, stdio policy, dry-run shaping, etc.).

Inventory (import-graph proof)

File Result Remaining production importer(s) / reason
src/core/uninstall-compatibility.ts DELETE (inlined) Pure pass-through (sole importer uninstall.ts) → now calls executeCoreUninstall + createProductionCoreUninstallPorts directly
runCoreSingleAgentUpdate / runCoreUpdateBatch in update-compatibility.ts DELETE Zero importers after 1.12 + P0/P1; invocation factories remain
src/core/installation-compatibility.ts KEEP core-installation-cli.ts, lifecycle-execution-production.ts — outputPolicy injection + richer Core outcomes for v1 projector
src/core/update-compatibility.ts KEEP lifecycle-updates-production.ts — prepare/run/dispose invocation engine
src/core/installation-production.ts KEEP installation-compatibility, core/client.ts, contract tests — mutate/verify/lock/state ports
src/core/update-production.ts KEEP update-compatibility defaults; types used by lifecycle-updates-production
src/core/production-observation.ts KEEP Broad Core read ports (client, install, update, packages/core internal)
src/services/lifecycle-updates-production.ts KEEP update.ts, idempotency/lifecycle-policy.ts — CLI observation/lock + cancellation wrapping
src/services/lifecycle-execution-production.ts KEEP run.ts — human stdio inherit + --install via installation-compatibility
src/services/doctor-diagnosis-production.ts KEEP doctor.ts — CLI-coupled observations; Core diagnosis stays CLI-free
src/services/self-upgrade-production.ts KEEP upgrade.tsP3 out of scope; do not rewrite
src/commands/unmanaged-install-compatibility.ts KEEP install.ts, ensure.ts — frozen v1 no-op for unmanaged externals

KEEP rationale also recorded as short file comments on retained bridges.

Freeze confirmation

  • Outward contracts untouched: commands/aliases, --json/--output, exit codes (incl. dry-run DRY_RUN / changed: false / exit 0), no engine/route leak in JSON, --install enum, human stdio inherit for exec
  • Manual smoke: install/ensure --dry-run --jsonwarnings[0].code=DRY_RUN, data.changed=false, ok=true, exit 0, no top-level engine/route fields
  • No published quantex-core API expansion; no YAML / release-core.yml / protect-main
  • Same package/binaries/state v2; no 2.x; based on main with v1.13.0 sealed

Out of scope (explicit)

Linked Artifacts

Validation

  • bun run memory:check (pre-push)
  • bun run lint
  • bun run format:check
  • bun run typecheck
  • Contract tests: 17 files / 168 passed (install/ensure/update/uninstall/list/inspect/info/resolve/run/doctor + ownership/compatibility/production suites)
  • Full CI three-platform — keep draft until green

Release Intent

  • Release: not applicable - internal bridge thinning only (no behavior change)

Release Summary

  • Not applicable - this source PR does not produce a release entry.

Docs Updated

  • Not needed for product README (KEEP comments on bridges only)

Scope Check

  • I did not add a new ad hoc root-level Markdown file.
  • I documented KEEP/DELETE inventory in this PR.
  • I did not silently expand into P3 / YAML / SDK expansion.

Closure Check

  • Working tree was clean after commit.
  • Branch was pushed and this PR is the active delivery artifact (draft).
  • OpenSpec change not required (mechanical).
  • Release is not applicable.

Notes

  • Investigate-first: deleted only zero-ref helpers + the pure uninstall pass-through.
  • Ownership tests that lock layered update/exec/doctor routing remain unchanged.
  • Draft until CI green.
Open in Web Open in Cursor 

Delete zero-importer runCore* helpers from update-compatibility and inline
the pass-through uninstall-compatibility wrapper into the uninstall command.
Document KEEP rationale on retained production/compatibility facades required
for frozen CLI contracts (no SDK expansion, no P3 upgrade rewrite).
@Drswith
Drswith marked this pull request as ready for review September 6, 2026 11:32
@Drswith
Drswith merged commit c5c1665 into main Sep 6, 2026
14 of 17 checks passed
@Drswith
Drswith deleted the cursor/thin-production-compatibility-bridges-332b branch September 6, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants