Skip to content

chore: P5 prune zero-ref / pure pass-through leftovers - #710

Merged
Drswith merged 1 commit into
mainfrom
cursor/p5-prune-zero-ref-leftovers-affe
Sep 6, 2026
Merged

chore: P5 prune zero-ref / pure pass-through leftovers#710
Drswith merged 1 commit into
mainfrom
cursor/p5-prune-zero-ref-leftovers-affe

Conversation

@Drswith

@Drswith Drswith commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Post-1.12 P5 cleanup after P0–P4 (#702#709): repo-wide import-graph scan of leftover src/lifecycle, src/services, and compatibility/production bridges. Delete only proven unused pass-through barrel re-exports; keep every still-imported module and every bridge that still adds differential behavior.

Intake: mechanical unused-re-export cleanup / no observable behavior — no new OpenSpec change.

DELETE

Symbol / layer Result Proof
src/services/index.ts re-exports of executeAgentLifecycle + execution types from src/core/execution-executor DELETE Zero importers of those names from the services barrel. run.ts and lifecycle-execution-production.ts import the Core engine directly. Not on the published CLI root (src/compatibility/index.ts / root-exports.json).
src/services/index.ts re-exports of createProductionLifecycleExecutionService + types DELETE Zero barrel importers. run.ts imports ./lifecycle-execution-production directly.
src/services/index.ts re-exports of createProductionSelfUpgradeInvocation + type DELETE Zero barrel importers. upgrade.ts imports ./self-upgrade-production directly. Not an upgrade→Core rewrite.

Ownership lock: test/core/update-ownership.test.ts now asserts the services barrel does not re-export those leftover paths and still exports the published v1 agents/update facade.

Module-level zero-ref files: none (0 unused src/ modules after P0–P4).

KEEP (re-scanned; still referenced and/or differential)

Module Result Remaining production importer(s) / reason
src/lifecycle/agent-execution.ts KEEP src/core/execution-executor.ts via barrel (planAgentExecutionPreflight — real preflight decisions)
src/lifecycle/agent-observation.ts KEEP Core production observation + update-production
src/lifecycle/model.ts KEEP state, Core install/uninstall/update, package-manager
src/lifecycle/provider-binding.ts KEEP Core install/uninstall/update/execution + core-installation-cli
src/lifecycle/provider-evidence.ts KEEP adds observeLifecycleProvider; not a pure re-export
src/lifecycle/uninstall-postcondition.ts KEEP src/core/uninstall-executor.ts
src/lifecycle/update-planner.ts KEEP src/planning/updates.ts, Core update-production, lifecycle-updates-production (update path — not install/ensure dry-run)
src/lifecycle/index.ts KEEP used barrel
src/core/installation-compatibility.ts KEEP outputPolicy injection + richer Core outcomes for v1 projector
src/core/update-compatibility.ts KEEP prepare/run/dispose invocation state machine
src/core/installation-production.ts KEEP mutate/verify/lock/state ports
src/core/update-production.ts KEEP default Core update ports + managed name loader
src/core/production-observation.ts KEEP Core read/observation ports
src/services/lifecycle-updates-production.ts KEEP CLI observation/lock + cancellation wrapping
src/services/lifecycle-execution-production.ts KEEP human stdio inherit + --install via installation-compatibility
src/services/doctor-diagnosis-production.ts KEEP CLI-coupled observations; Core diagnosis stays CLI-free
src/services/self-upgrade-production.ts KEEP upgrade.tsdo not move upgrade onto Core
src/commands/unmanaged-install-compatibility.ts KEEP frozen v1 no-op for unmanaged externals
src/compatibility/agent-inspection.ts KEEP v1 inspection projector
src/services/agents.ts / src/services/update.ts KEEP published v1 root compatibility facade
Remaining src/services/index.ts agents + update re-exports KEEP imported by src/compatibility/index.ts (published CLI surface)

Same-file helpers that look unused from outside (createProductionCoreUpdatePorts, updateAgentOutcome, shouldPrint, etc.) stay: they are live internals, not leftover bridges.

Freeze confirmation

  • Outward contracts untouched: commands/aliases, --json/--output, exit codes, dry-run DRY_RUN / changed: false / exit 0, no engine/route leak in JSON
  • No published quantex-core API expansion; no YAML / release-core.yml / protect-main
  • Same package/binaries/state v2; no 2.x
  • config / capabilities / commands / schema out of scope
  • upgrade not moved onto Core

Out of scope (explicit)

  • No new commands
  • No YAML / .github/workflows/** / release-core.yml / protect-main
  • No fixtures acceptance loosening
  • No hard-delete of still-referenced src/lifecycle modules

Linked Artifacts

Validation

  • bun run memory:check (pre-push)
  • bun run lint
  • bun run format:check
  • bun run typecheck
  • bun run openspec:validate (pre-push)
  • Targeted tests: 10 files / 148 passed (ownership + services/lifecycle/update/run/uninstall)
  • Full local bun run test: 174 files / 2116 passed / 5 skipped
  • Manual freeze smoke: install/ensure --dry-run --jsonwarnings[0].code=DRY_RUN, data.changed=false, ok=true, exit 0, no top-level engine/route
  • Local classify: run_test_matrix=true / product-impacting (src/services + src/lifecycle)
  • Full CI three-platform (classify + lint + governance + ubuntu/windows/macos) — both workflow runs green on 6cad43c

Release Intent

  • Release: not applicable - internal unused re-export cleanup 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 + ownership lock 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 upgrade→Core / 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

Open in Web Open in Cursor 

Drop leftover pass-through re-exports of Core execution and self-upgrade
production from the services barrel. Commands already import those modules
directly; the published v1 facade still re-exports agents and update planning.

Co-authored-by: Drswith <Drswith@users.noreply.github.com>
@Drswith
Drswith marked this pull request as ready for review September 6, 2026 12:45
@Drswith
Drswith merged commit 7a738ac into main Sep 6, 2026
17 checks passed
@Drswith
Drswith deleted the cursor/p5-prune-zero-ref-leftovers-affe branch September 6, 2026 12:45
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