refactor(core): move lifecycle model into Core-internal leaf - #721
Merged
Conversation
Own receipt/observation types in src/core/lifecycle/model so Core no longer imports them from src/lifecycle. State may share that leaf without depending on Core runtime. Remaining lifecycle engines stay in place for L2+.
Validation, tests, and draft PR delivery for lifecycle-model-core-internal-l1 are done; keep the change active until merge and archive closure.
Drswith
marked this pull request as ready for review
September 7, 2026 03:45
This was referenced Sep 7, 2026
Drswith
added a commit
that referenced
this pull request
Sep 7, 2026
Sync accepted L1 lifecycle-model deltas into living specs after #721, and drop the completed change from the working tree without committing the generated archive directory. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This was referenced Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
L1 lifecycle internalization: move receipt/observation types and
LIFECYCLE_RECEIPT_SCHEMA_VERSIONfromsrc/lifecycle/modelinto a Core-internal leaf atsrc/core/lifecycle/model.ts. This removes the start of the Core →src/lifecyclereverse dependency without expanding the published SDK.P8 (#717) kept the file outside Core because a naive fold would invert
state → Core. The architecture conclusion (ADR 0011): state may import the leaf, never Core runtime. The leaf has zero imports, soCore → state → leafis a chain, not a cycle. Remainingsrc/lifecycle/*engines stay in place for L2+.Before / after import map
src/core/installation-production.ts../lifecycle/model(+ receipt version fromstate/schema)./lifecycle/modelsrc/core/installation-state-record.ts../lifecycle/model./lifecycle/modelsrc/core/uninstall-executor.ts../lifecycle/model./lifecycle/modelsrc/core/update-executor.ts../lifecyclebarrel./lifecycle/model(planner types still from../lifecycle)src/core/execution-executor.ts../lifecyclebarrel./lifecycle/model(preflight still from../lifecycle)src/state/{schema,store,index}.ts../lifecycle/model../core/lifecycle/modelonly (no Core runtime)src/package-manager/index.ts../lifecycle/model../core/lifecycle/modelsrc/lifecycle/*./model../core/lifecycle/modelsrc/lifecycle/index.tsbarrel./modelsrc/lifecycle/modelsrc/core/lifecycle/modelUnchanged for L2+: Core still imports provider-binding, observation, update-planner, agent-execution, uninstall-postcondition, and the barrel.
SDK non-export checklist
src/core/index.tsdoes not exportLifecycleReceipt,LifecycleObservation,LIFECYCLE_RECEIPT_SCHEMA_VERSION, or./lifecyclepackages/core/src/index.tsdoes not export those symbolscreateQuantexonly (test/core/import-purity.test.ts)packages/coreexport subpathsrc/lifecyclebarrel andsrc/state/schema(LIFECYCLE_RECEIPT_SCHEMA_VERSION)Freeze checklist
--json/ NDJSON still omitengine/route(existing command tests)release-core.yml/ protect-main untouchedrelease-one-line-delivery,release-pr-skip-human-heuristics,windows-ci-advisory-merge-gatesrc/lifecycle/*)Linked Artifacts
lifecycle-model-core-internal-l1docs/adr/0011-core-internal-lifecycle-model-leaf.mdValidation
bun run memory:checkbun run lintbun run format:checkbun run typecheckbun run test— 176 files / 2141 passed / 5 skippedbun run openspec:validateinstall/ensure --dry-run --json→ok=true,warnings[0].code=DRY_RUN,data.changed=false, exit0, noengine/route["createQuantex"]7503e24: lint, governance, test (ubuntu/windows/macos)Release Intent
refactor:/ Internal Improvements and does not bump on its own.Release Summary
BEGIN_COMMIT_OVERRIDE
refactor(core): move lifecycle model into Core-internal leaf
END_COMMIT_OVERRIDE
Docs Updated
openspec/changes/lifecycle-model-core-internal-l1/docs/adr/0011-core-internal-lifecycle-model-leaf.mdAGENTS.md(thin pointer tosrc/core/lifecycle/andruntime-boundaries)Scope Check
Closure Check
lifecycle-model-core-internal-l1is still active until this merge, then queued for agent-driven archive closure.Notes
src/lifecycle/model.tsabsent;src/core/lifecycle/contains onlymodel.ts;src/stateCore imports are leaf-only.