Skip to content

refactor(core): delete leftover src/lifecycle barrel - #727

Merged
Drswith merged 2 commits into
mainfrom
cursor/lifecycle-barrel-l4-b27c
Sep 7, 2026
Merged

refactor(core): delete leftover src/lifecycle barrel#727
Drswith merged 2 commits into
mainfrom
cursor/lifecycle-barrel-l4-b27c

Conversation

@Drswith

@Drswith Drswith commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

L4 lifecycle internalization: retarget remaining callers from the leftover src/lifecycle barrel onto Core-internal modules, then delete src/lifecycle/. This is an independent OpenSpec change (lifecycle-barrel-core-internal-l4) after L3 (#724). It does not expand the published SDK and does not add src/core/lifecycle/index.ts.

Delete list

Path Role after L3 L4 action
src/lifecycle/index.ts non-SDK barrel re-exporting Core-internal helpers deleted
src/lifecycle/ directory containing only that barrel deleted (no shim)

Not deleted: src/core/lifecycle/*.ts (model, binding, evidence, observation, planner, execution, postcondition). test/lifecycle/ stays; those files test Core-internal modules.

Remaining caller retarget

Importer Before After
src/services/lifecycle-execution-production.ts barrel LifecycleOutcome ../core/lifecycle/model
src/idempotency/lifecycle-policy.ts barrel receipt/binding types + observeLifecycleProvider / equality / receipt binding ../core/lifecycle/model, provider-binding, provider-evidence
related tests (test/commands/{inspect,doctor,resolve}, test/command-runtime, test/compatibility/agent-inspection, test/idempotency/lifecycle-policy, test/services/lifecycle-{observations,updates}, test/lifecycle/*) src/lifecycle matching src/core/lifecycle/*

No src/core/lifecycle/index.ts.

Ownership locks

  • src/lifecycle/ is absent (barrel and former engine paths)
  • src/core/lifecycle/index.ts is absent
  • src/core/lifecycle/ contains only the seven Core-internal modules
  • lifecycle-execution-production and lifecycle-policy import Core-internal modules, not ../lifecycle
  • related tests no longer import src/lifecycle
  • src/state Core imports remain leaf-only (../core/lifecycle/model)
  • published SDK root does not export lifecycle helpers; runtime export remains createQuantex

SDK non-export checklist

  • src/core/index.ts does not export lifecycle helpers or ./lifecycle
  • packages/core/src/index.ts does not export those symbols
  • No new packages/core export subpath
  • No src/core/lifecycle/index.ts barrel

Freeze checklist

  • State schema remains v2; receipt JSON field names/requiredness/meanings unchanged
  • --json / NDJSON still omit engine / route
  • Aliases and exit codes untouched
  • No command/SDK expansion; no fold of config/capabilities/commands/schema
  • 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 touch L2/L3 OpenSpec archive paths

Linked Artifacts

Validation

  • bun run memory:check
  • bun run lint
  • bun run format:check
  • bun run typecheck
  • bun run test — 176 files / 2147 passed / 5 skipped
  • bun run openspec:validate — 28 passed / 0 failed
  • Freeze smoke: install/ensure opencode --dry-run --jsonok=true, warnings[0].code=DRY_RUN, data.changed=false, exit 0, no engine/route
  • SDK import keys remain ["createQuantex"]
  • Ownership tests: lifecycle-core-ownership + import-purity + core-boundary — 17 passed

Release Intent

  • Release: not applicable - internal leftover deletion; no user-facing CLI or SDK change. Changelog framing is refactor: / Internal Improvements and does not bump on its own.

Release Summary

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

Docs Updated

  • openspec/changes/lifecycle-barrel-core-internal-l4/
  • docs/adr/0014-core-internal-lifecycle-barrel-deletion.md
  • AGENTS.md (thin pointer to ADR 0014; drop src/lifecycle/)

Scope Check

  • I did not add a new ad hoc root-level Markdown file.
  • I updated the relevant ADR, OpenSpec change, and AGENTS.md pointer.
  • I did not silently expand into SDK exports, YAML, shelved OpenSpec changes, or L2/L3 archive paths.

Closure Check

  • Working tree was clean after commit.
  • Branch was pushed and this PR is the active delivery artifact.
  • OpenSpec change lifecycle-barrel-core-internal-l4 is still active until this merge, then queued for agent-driven archive closure.
  • Release is not applicable (internal refactor; no version bump from this knife).

Notes

  • Draft kept (requested as draft — do not mark ready).
  • Delete list is only src/lifecycle/index.ts and the src/lifecycle/ directory. Core-internal modules stay. test/lifecycle/ stays.
  • Archive closure waits on merge; this is a complete L4 change, not an umbrella milestone. L2/L3 archive stay separate PRs. L3 archive MUST NOT re-assert that the leftover barrel exists after this lands.
Open in Web Open in Cursor 

Retarget remaining CLI/services/idempotency and test imports onto
Core-internal lifecycle modules, then remove the leftover non-SDK barrel.
Record local validation, test, and draft PR delivery for the leftover barrel deletion.
@cursor
cursor Bot force-pushed the cursor/lifecycle-barrel-l4-b27c branch from da7068b to e071a32 Compare September 7, 2026 05:58
@Drswith
Drswith marked this pull request as ready for review September 7, 2026 06:04
@Drswith
Drswith merged commit 86a252f into main Sep 7, 2026
11 checks passed
@Drswith
Drswith deleted the cursor/lifecycle-barrel-l4-b27c branch September 7, 2026 06:04
Drswith added a commit that referenced this pull request Sep 7, 2026
Sync accepted L4 leftover-barrel deltas into living specs after #727,
and drop the completed change from the working tree without committing the
generated archive directory.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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