Skip to content

chore: L5 KEEP leftover scan after lifecycle barrel deletion - #729

Merged
Drswith merged 1 commit into
mainfrom
cursor/l5-leftover-scan-4d73
Sep 7, 2026
Merged

chore: L5 KEEP leftover scan after lifecycle barrel deletion#729
Drswith merged 1 commit into
mainfrom
cursor/l5-leftover-scan-4d73

Conversation

@Drswith

@Drswith Drswith commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

Post-L4 L5 leftover scan after src/lifecycle/ barrel deletion (#727) and OpenSpec archive (#728). Import-graph proof that remaining src/services, src/compatibility, src/self, and src/idempotency bridges are still referenced and still add differential behavior (CLI context, port injection, v1 projection, domain planning/providers/binary/lock, idempotency replay). Delete none. Keep every still-imported module and every bridge that still adds differential behavior.

Intake: mechanical leftover scan / no observable behavior — no new OpenSpec change. An actual fold of the published v1 facade or Core-internal engines would be an architecture-boundary change and would need OpenSpec; this PR documents that the fold is not safe.

DELETE vs KEEP

Module Result Proof
src/lifecycle/ already DELETED in L4 Ownership test asserts the directory is gone. Do not restore.
src/core/lifecycle/index.ts KEEP absent No Core lifecycle barrel (ADR 0011–0014). Ownership test asserts the path is gone.
src/core/lifecycle/{model,provider-binding,provider-evidence,agent-observation,update-planner,agent-execution,uninstall-postcondition}.ts KEEP Core-internal engines. Product-path KEEP hang lives here so classify stays product-impacting. Not leftover pass-throughs.
src/self/application.ts already DELETED in P6 Ownership test asserts the path is gone.
src/core/self-upgrade-production.ts already DELETED in P6 Would import src/self and fail the Core boundary.
src/services/self-upgrade.ts already DELETED in P6 No leftover services shim.
src/services/lifecycle-updates.ts / lifecycle-execution.ts already DELETED in P2 Ownership test asserts the paths are gone.
src/services/index.ts KEEP Published v1 facade only (agents + update planning). Importer: src/compatibility/index.ts. P5 already pruned unused production re-exports.
src/services/agents.ts KEEP Published v1 resolveAgent / resolveAgentInspection / inspectRegisteredAgents. CLI routes no longer call the inspection helpers; the barrel still publishes them.
src/services/update.ts KEEP Published v1 planAgentUpdates grouping. Importer: services barrel.
src/services/self-upgrade-production.ts KEEP Differential: CLI context, cancellation, runtime ports, src/self plan/upgrade/lock/persistence binding into Core. Importer: src/commands/upgrade.ts.
src/services/lifecycle-execution-production.ts KEEP Differential: human stdio inherit, --install via installation-compatibility. Importer: src/commands/run.ts. L4 only retargeted LifecycleOutcome onto src/core/lifecycle/model.
src/services/lifecycle-updates-production.ts KEEP Differential CLI→Core update adapter (operation context, observation/lock ports). Importers: src/commands/update.ts, src/idempotency/lifecycle-policy.ts.
src/services/doctor-diagnosis-production.ts KEEP Differential: CLI-coupled observations + Core diagnosis. Importer: src/commands/doctor.ts.
src/services/lifecycle-observations.ts KEEP Differential catalog/PATH/latest-version enrichment over Core-internal observeAgentLifecycle.
src/services/core-read-observations.ts KEEP Differential v1 enrichment over quantex-core/internal inspect/list.
src/services/provider-observations.ts KEEP Differential provider snapshot + frozen v1 installer-id projection.
src/services/command-capabilities.ts KEEP Differential command-contract snapshot → frozen v1 capability flags.
src/compatibility/index.ts KEEP Published v1 root facade (src/index.ts re-exports it). Folding would change the published command/SDK boundary.
src/compatibility/agent-inspection.ts KEEP Differential v1 inspection projector (source/update labels, unmanaged lifecycle).
src/self/index.ts KEEP Domain barrel: planSelfUpgrade / upgradeSelf plus lock/planning/facts/release. Published v1 subset via compatibility.
src/self/planning.ts KEEP Domain planning. Importer: src/self/index.ts.
src/self/{lock,facts,binary,recovery,registry,release,types,update-metadata,update-notice,state-persistence}.ts KEEP Still referenced (CLI, planning, doctor, command-runtime, production ports).
src/self/providers/** KEEP Domain providers (bun / npm / binary / source).
src/idempotency.ts KEEP Versioned record I/O (TTL, atomic write, parse). Importer: src/command-runtime.ts.
src/idempotency/lifecycle-policy.ts KEEP Differential presence/update replay + provider evidence. L4 only retargeted imports onto Core-internal modules.
src/idempotency/{canonical,replay,schema}.ts KEEP Canonical fingerprinting, replay decisions, record schema. Not pass-throughs.
src/core/{installation,update}-compatibility.ts / *-production.ts / production-observation.ts / self-upgrade-executor.ts KEEP Differential Core ports / compatibility (P2/P6). Not L4 leftovers.
src/commands/unmanaged-install-compatibility.ts KEEP Frozen v1 no-op for unmanaged externals.
src/state.ts / src/planning/index.ts / src/inspection/index.ts / src/runtime/index.ts KEEP Established convenience barrels with live importers (and, for planning/inspection, published v1 re-exports). Not L4 leftover shells.
packages/core/src/{index,internal}.ts KEEP Published SDK root + internal subpath. Frozen: do not expand.

DELETE: none (0 zero-reference modules and 0 pure pass-through leftover wrappers after #727).

Same-file helpers that look unused from outside stay: they are live internals, not leftover bridges. Named re-exports on the published compatibility facade stay: they are the v1 root export surface locked by test/compatibility/v1-baseline.test.ts.

Freeze confirmation

  • --json / aliases / exit codes / state v2 / receipt untouched
  • --json does not expose engine / route
  • Published SDK has no lifecycle helpers; runtime export remains createQuantex
  • YAML / release-core.yml / protect-main untouched
  • Shelved OpenSpec changes untouched (release-one-line-delivery, release-pr-skip-human-heuristics, windows-ci-advisory-merge-gate)
  • Active restore-managed-update-and-resume-releases untouched
  • Did not fold config / capabilities / commands / schema
  • Did not restore src/lifecycle/

Linked Artifacts

Validation

  • bun run memory:check
  • bun run lint
  • bun run format:check
  • bun run typecheck
  • bun run test — 176 files / 2152 passed / 5 skipped
  • bun run openspec:validate — 25 passed / 0 failed
  • Manual freeze smoke: install/ensure opencode --dry-run --jsonok=true, warnings[0].code=DRY_RUN, data.changed=false, exit 0, no engine/route; upgrade --json --checkMANUAL_ACTION_REQUIRED on source install, no engine/route
  • SDK import keys remain ["createQuantex"]
  • Local classify: run_test_matrix=true / product-impacting
  • GitHub CI green on d049304 (classify + lint + governance + ubuntu/windows/macos + Agent Canaries); draft kept

Release Intent

  • Release: not applicable - internal leftover scan with no behavior change (KEEP comments + ownership lock only)

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 YAML / SDK expansion / folding config/capabilities/commands/schema / restoring src/lifecycle/.

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: file-level scan found zero unused src/services, src/compatibility, src/self, or src/idempotency modules after L4 deleted src/lifecycle/.
  • KEEP-only report PR still counts as done — this is not a hard-cut.
  • Product-path KEEP comments hang on existing src/core/lifecycle/* paths so classify stays on the full ubuntu/windows/macos test matrix (protect-main unchanged).
  • Draft kept after CI green (requested as draft — do not mark ready).
Open in Web Open in Cursor 

Import-graph proof that remaining services, compatibility, self, and
idempotency layers are still referenced and still add differential
behavior after L4 deleted src/lifecycle/. Delete none.
@Drswith
Drswith marked this pull request as ready for review September 7, 2026 07:22
@Drswith
Drswith merged commit 9cdf664 into main Sep 7, 2026
17 checks passed
@Drswith
Drswith deleted the cursor/l5-leftover-scan-4d73 branch September 7, 2026 07:22
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