refactor(state): remove superseded lifecycle lock duplication
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
Parent epic: #9955
## Outcome
Delete lifecycle-lock implementations, helpers, and tests that the shared decision model supersedes. Confirm that the completed epic reduces production lines without weakening behavior evidence.
## Acceptance evidence
- No common lifecycle-lock decision remains independently implemented in synchronous and asynchronous paths.
- Separate executors remain only where current contracts require different I/O, waiting, callbacks, diagnostics, or synchronous reentrant handling.
- Existing exports remain compatible.
- Focused tests still cover every common and executor-specific state from the parity task.
- Production LOC for the affected lifecycle-lock implementation is lower than the baseline recorded by the epic.
- The architecture change does not introduce a generic framework, public extension point, or new dependency.
## Test plan
Run:
- focused lifecycle-lock, Shields timer, and sandbox mutation tests
- `npm run typecheck:cli`
- `npm run checks:repository`
- `npm run test:shuffle -- --sequence.seed=`
- `npm run test:diagnose:leaks`
Use the trusted base revision to record the before count. Report production, test, and total LOC deltas separately.
## Dependencies and decisions
- Depends on both the ordinary-acquisition and Shields deadline-fence tasks under #9955.
- This task completes the epic only after both branches land and their behavior suites pass together.
## Scope boundary
- Do not combine the cleanup with a module rename.
- Do not remove tests only to produce a negative total LOC result.
- Do not normalize intentional sync/async behavior differences.
Contributor guide
Research direction
Start by reviewing epic #9955 and the ordinary-acquisition and Shields deadline-fence tasks, then inspect the affected lifecycle-lock implementation and its focused tests. Run the listed lifecycle-lock, timer, sandbox, typecheck, repository, shuffle, and leak checks. Done means shared decisions are no longer duplicated, required sync/async behavior and exports remain intact, and production, test, and total LOC deltas are reported against the trusted base revision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100