# DataRegion lifecycle contract

## Outcome

Add idempotent `mount()`, `update(next)`, and `destroy()` lifecycle convergence to the canonical `DataRegion` while preserving its store-driven scoped reconciliation, public API, keyed node identity, accessibility, and every caller contract.

## Status

IDLE — D5-DATAREGION-01 deterministic-asset correction is committed locally; landing is explicitly excluded.

## Task IDs

- D5-DATAREGION-01 — DataRegion lifecycle slice

## Source request

Owner requested the Delivery 5 DataRegion lifecycle slice from current `origin/master`, working directly without delegation, skills, or external models. The slice must include focused compatibility, identity, repeated lifecycle, cleanup/remount, and safe content-update tests; focused and full admin tests, lint, production build, inventory/gate, and full factory gate; a terse local commit only.

Coordinator correction: guarded landing found a candidate-build generated tracked asset, `admin/dist/js/321.08f29800.js`, outside the local commit. Reconcile all generated tracked `admin/dist` assets through a locked dependency install and production build, stage every resulting changed/deleted tracked asset, commit the correction, then prove a second production build leaves the worktree clean and run the full factory gate. Do not land.

Coordinator escalation: the exact guarded landing candidate is still dirty at `admin/dist/js/321.08f29800.js`. Treat this as a release blocker. Compare the branch, base, and candidate asset content; reproduce the lander's dependency/build sequence if necessary; make generated assets deterministic for the exact candidate; commit the actual reconciliation; then run a second clean build and full factory gate. Do not document a harmless-file theory or land.

## Acceptance criteria

- Existing store-driven scoped-update behavior, public API, keyed node identity, accessibility, and callers remain unchanged.
- `mount()`, `update(next)`, and `destroy()` are idempotent where applicable.
- Destroy removes subscriptions, listeners, pending work, and DOM; the same instance can remount safely.
- Direct content updates use the existing keyed, interaction-safe reconciliation path without replacing stable nodes.
- Tests cover constructor compatibility, repeated lifecycle calls, cleanup/remount, region identity, and safe updates.
- All requested verification commands pass cleanly and the local commit is not landed.
- Every changed or deleted tracked `admin/dist` asset produced by the locked production build is included in the local commit.
- A second production build is clean and the full factory gate passes after asset reconciliation.

## Preserved WIP

- Ref/path: `/home/user/Projects/Press.zone/wordpress/wp-content/.claude/worktrees/agent-aad0f0ec7911909d3`
- Baseline: clean `worktree-agent-aad0f0ec7911909d3` at current `origin/master` `8685418a5`.
- Do not alter unrelated pages or components.

## Constraints

- Follow `.claude/agents/expert.md` without invoking skills, delegation, or external models.
- Keep this independently revertible Delivery 5 primitive slice.
- Do not land the commit.

## Execution steps

1. Read landed lifecycle components and the Delivery 5 contract.
2. Implement focused lifecycle convergence in DataRegion.
3. Add focused lifecycle tests.
4. Run every requested verification gate and update inventory/report truthfully.
5. Commit only this slice and leave it unlanded.

## Current receipt

D5-DATAREGION-01 remains committed locally. Diagnosis established that `321.08f29800.js` was identical to `origin/master` and therefore escaped the earlier incremental build reconciliation, while `321.ac5cd245.js` was the current emitted chunk. Rebuilding from an empty `admin/dist` reproduced the guarded candidate and deleted `321.08f29800.js`; that deletion is committed in `7d8d03d73`. A second production build left every generated asset clean. The full factory gate passed, including 43 UI architecture tests and a clean inventory/gate check. The commit remains unlanded.

## Next executable action

No action is scheduled within the owner-approved no-landing scope.
