Skip to content

Tracking S2: per-task observation registry (A2) #1390

Description

@easonLiangWorldedtech

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions