Skip to content

Commit 46464e1

Browse files
committed
docs: polish lifecycle model guidance
1 parent 2205d8d commit 46464e1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎docs/architecture/task-lifecycle-model.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The following map separates issue observations from the architectural interpreta
8383

8484
| Issue and directly observed evidence | Derived protocol rule | Production transition and current check |
8585
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
86-
| [#1469](https://github.com/Zoo-Code-Org/Zoo-Code/issues/1469): the issue report states that a barrier-controlled two-host run reproduced an old child completion clearing a newer handoff 25/25 times. | Completion is conditional on the parent still awaiting that exact child; a live linked child must remain owned by its parent. | `completeDelegatedChild` rejects stale authoritative input. The lifecycle explorer checks that reducer rule, while the shared-store explorer reproduces the cross-host stale-cache counterexample with an exact causal witness. |
86+
| [#1469](https://github.com/Zoo-Code-Org/Zoo-Code/issues/1469): the issue report states that a barrier-controlled two-host run reproduced an old child completion clearing a newer handoff 25/25 times. | Completion is conditional on the parent still awaiting that exact child; a live-linked child must remain owned by its parent. | `completeDelegatedChild` rejects stale authoritative input. The lifecycle explorer checks that reducer rule, while the shared-store explorer reproduces the cross-host stale-cache counterexample with an exact causal witness. |
8787
| [#1021](https://github.com/Zoo-Code-Org/Zoo-Code/issues/1021): an in-flight `saveClineMessages` can restore parent/root IDs after abandonment cleared them. | Detachment should be monotonic: later lifecycle work must not reattach an abandoned child. | `abandonDelegatedChild` clears both sides. The shared-store explorer proves the detach commit occurs, then reproduces a refreshed-cache delta that preserves interrupted status while restoring stale live-task lineage. |
8888
| [#1453](https://github.com/Zoo-Code-Org/Zoo-Code/issues/1453), under user report [#1279](https://github.com/Zoo-Code-Org/Zoo-Code/issues/1279): CI observed `TaskCompleted` before restart-visible API history once; 120 local repetitions did not reproduce it, while an Alloy abstraction permits the ordering. | A completion/readiness contract must define whether completion implies restart visibility. This is a liveness/durability boundary, not only a `HistoryItem` safety transition. | Not claimed by this checker. Add a controlled persistence barrier test after the contract decision; move to temporal model checking if eventual readiness and failure handling become protocol guarantees. |
8989
| [#921](https://github.com/Zoo-Code-Org/Zoo-Code/issues/921): delegation across parallel tabs lacks coverage for different view-local mode/profile state. | Delegation must bind an explicit immutable execution-context snapshot rather than read whichever view is focused later. | The persisted ownership transition is covered; mode/profile snapshot isolation is outside this state model and belongs in a production adapter/model-based test. |
@@ -98,9 +98,9 @@ The issue-derived cases intentionally map to bug classes rather than issue-speci
9898

9999
When production lifecycle behavior changes:
100100

101-
1. Add or update the pure transition in `taskLifecycle.ts`, then call it from the production operation.
102-
2. Add the corresponding enabled event in `scripts/check-task-lifecycle.ts`.
103-
3. Add an invariant for the bug class, or a representative rejected-event scenario when the event intentionally leaves state unchanged.
101+
1. Define or update the pure transition in `taskLifecycle.ts`, then call it from the production operation.
102+
2. Model the corresponding enabled event in `scripts/check-task-lifecycle.ts`.
103+
3. Encode an invariant for the bug class, or a representative rejected-event scenario when the event intentionally leaves state unchanged.
104104
4. Increase depth or task slots only when the new scenario requires it. Keep the state budget explicit and ensure CI completes quickly.
105105
5. Convert any discovered counterexample into a focused production regression test as well as retaining the architectural invariant.
106106

0 commit comments

Comments
 (0)