Tracking issue for the S2 / A2 PR (branch feat/observation-registry-s2; PR to be opened after review).
Part of the file-write safety series — plan: easonLiangWorldedtech/Zoo-Code#33, epic: #1375. Item: S2 / A2 — Per-task observation registry. Stacked on #1383 (S1 version token); to be rebased onto main once #1383 lands.
Scope
- New
src/core/task/observationRegistry.ts: per-task Map<absolutePath, { version, observedAt }>; the task owns the instance, so parent and subtask observations are independent.
Task owns an instance; ReadFileTool records an observation after a successful read of an existing file (one extra fs.stat via computeVersionToken — the same call the S4 write guard will reuse; a stat failure leaves the target unobserved and does not fail the read).
- No behavior change — observations are recorded but not yet consulted (that is S4).
Acceptance
- Read path cost = +1 stat; no other observable change
- Registry unit tests (observe / get / replace-on-reobserve)
- ReadFileTool spec: a read of an existing file registers an observation with the on-disk version
- Subtask isolation: parent and subtask registries are independent
- CI green (ubuntu unit-test gate), 100% codecov patch coverage
Status
- PR: #1394 open (targets
main; includes the S1 commits — merge after #1383)
Tracking issue for the S2 / A2 PR (branch
feat/observation-registry-s2; PR to be opened after review).Part of the file-write safety series — plan: easonLiangWorldedtech/Zoo-Code#33, epic: #1375. Item: S2 / A2 — Per-task observation registry. Stacked on #1383 (S1 version token); to be rebased onto
mainonce #1383 lands.Scope
src/core/task/observationRegistry.ts: per-taskMap<absolutePath, { version, observedAt }>; the task owns the instance, so parent and subtask observations are independent.Taskowns an instance;ReadFileToolrecords an observation after a successful read of an existing file (one extrafs.statviacomputeVersionToken— the same call the S4 write guard will reuse; a stat failure leaves the target unobserved and does not fail the read).Acceptance
Status
main; includes the S1 commits — merge after #1383)