Skip to content

chore: P8 KEEP leftover scan for lifecycle→Core - #717

Merged
Drswith merged 1 commit into
mainfrom
cursor/p8-lifecycle-core-closure-50ae
Sep 6, 2026
Merged

chore: P8 KEEP leftover scan for lifecycle→Core#717
Drswith merged 1 commit into
mainfrom
cursor/p8-lifecycle-core-closure-50ae

Conversation

@Drswith

@Drswith Drswith commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Post-P7 P8 lifecycle→Core closure probe. Import-graph proof that remaining KEEP src/lifecycle/* modules still add preflight, observation, planning, postcondition, or other differential logic consumed by in-repo Core (and by CLI/state). Move none. Delete none. Relocating them into src/core would invert src/state → Core, pull shared domain into Core ownership, or risk the published SDK eager closure — without being a zero-ref or pure pass-through leftover.

Intake: mechanical leftover scan / no observable behavior — no new OpenSpec change. An actual move into Core would be an architecture-boundary change and would need OpenSpec; this PR documents that the move is not safe.

DELETE vs KEEP

Module Result Proof
src/lifecycle/agent-execution.ts KEEP Differential planAgentExecutionPreflight (install-policy / dry-run / interactive). Core execution-executor imports it via the barrel. Independent planner tests remain.
src/lifecycle/agent-observation.ts KEEP Differential observeAgentLifecycle (receipt/state/PATH/provider drift). Core production-observation + update-production. Also CLI lifecycle-observations. Listed as allowed outside-Core in the published SDK eager closure.
src/lifecycle/model.ts KEEP Shared receipt/observation types + LIFECYCLE_RECEIPT_SCHEMA_VERSION. src/state/{schema,store,index} and package-manager import LifecycleReceipt from here. Moving into src/core would invert state → Core.
src/lifecycle/provider-binding.ts KEEP Differential catalog/state/receipt binding. Core install/uninstall/update/execution + core-installation-cli. Allowed outside-Core in the SDK eager closure.
src/lifecycle/provider-evidence.ts KEEP Not a pure re-export: observeLifecycleProvider defaults to the first-party registry. Core uninstall-executor and idempotency consume it via the barrel. Binding helpers stay re-exported for existing import sites.
src/lifecycle/uninstall-postcondition.ts KEEP Differential waitForUninstallAbsence retry. Sole production importer: Core uninstall-executor.
src/lifecycle/update-planner.ts KEEP Differential planLifecycleUpdate (blocked-source / downgrade / up-to-date / upgrade). Importers: src/planning/updates.ts, Core update-production, lifecycle-updates-production. Install/ensure --dry-run no longer imports this module.
src/lifecycle/index.ts KEEP Used barrel (Core execution/update/uninstall, services, idempotency). Not zero-ref. Unused named type re-exports stay; the barrel itself is imported.

DELETE / MOVE: none (0 zero-reference modules and 0 pure pass-through wrappers).

Same-file helpers that look unused from outside stay (resolveCatalogProviderBindings is a .bindings convenience over live resolveCatalogProviderEvidence). Unused named type re-exports on the lifecycle barrel are unchanged (P7 precedent; barrel itself is still imported).

Already-deleted leftovers stay gone: src/lifecycle/shadow-planning.ts remains absent (ownership lock).

Why not fold into src/core

  • Rule: if a module still adds preflight/observation/planning/postcondition/differential logic used by Core — KEEP.
  • These modules are shared domain: CLI services, state, planning, and idempotency import them in addition to Core.
  • Core boundary currently lists agent-observation and provider-binding as allowed outside Core in the published SDK eager closure.
  • Folding model.ts into Core would make src/state depend on Core.
  • Published quantex-core must not grow an engine/route/lifecycle export surface.

Freeze confirmation

  • --json envelope unchanged; JSON does not expose engine / route
  • Aliases, exit codes, state v2 untouched
  • No published SDK expansion (src/core/index.ts / packages/core still export createQuantex + inspection/mutation types only)
  • 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)
  • Did not fold config / capabilities / commands / schema
  • Avoided issue Cursor agent version probe reports incorrect version #715 files (catalog / observation version probe / agents tests)

Linked Artifacts

Validation

  • bun run memory:check
  • bun run lint
  • bun run format:check
  • bun run typecheck
  • bun run openspec:validate
  • bun run test — targeted 14 files / 147 passed; full suite 176 files / 2131 passed / 5 skipped
  • Manual freeze smoke: install/ensure --dry-run --jsonwarnings[0].code=DRY_RUN, data.changed=false, ok=true, exit 0, no engine/route
  • Local classify: product-path KEEP comments under src/lifecycle so run_test_matrix=true / product-impacting
  • Full CI three-platform (classify + lint + governance + ubuntu/windows/macos) green on 979c177; Agent Canaries also pass

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.

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/lifecycle modules after P0–P7.
  • 无可迁/无可删也算过 — this is a KEEP-only report PR, not a hard-cut.
  • Product-path KEEP comments under src/ keep classify on the full ubuntu/windows/macos test matrix (protect-main unchanged).
  • Draft kept after CI green (requested as draft — do not mark ready).
  • Parallel work: issue Cursor agent version probe reports incorrect version #715 (Cursor version probe PATH collision) is out of scope; this PR does not edit catalog, version-probe, or agents tests.
Open in Web Open in Cursor 

Import-graph probe of remaining src/lifecycle modules after P0–P7. None are
zero-ref or pure pass-through; keep differential preflight/observation/
planning/postcondition used by Core. Lock the KEEP inventory in comments
and an ownership test without relocating modules into src/core.
@Drswith
Drswith marked this pull request as ready for review September 6, 2026 14:32
@Drswith
Drswith merged commit 97c3640 into main Sep 6, 2026
17 checks passed
@Drswith
Drswith deleted the cursor/p8-lifecycle-core-closure-50ae branch September 6, 2026 14: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