Skip to content

feat(core): sibling change notices for child agents — tracking and notice source (#380, 1/2) - #394

Merged
ajianaz merged 5 commits into
developfrom
feat/sibling-change-notice
Oct 16, 2026
Merged

ajianaz merged 5 commits into
developfrom
feat/sibling-change-notice

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

What

Part 1 of 2 of sibling change notices: the core mechanism. Wiring into tole run children follows in part 2.

Why

#380. Sibling child agents work blind to each other; when one edits a file another has read, the other should hear about it at its next safe point.

Changes

  • sibling_watch.rs (new): children are separate processes, so each tracked child appends reads/writes to one shared append-only log (owner-only, one short O_APPEND line per access) and a SiblingWatcher folds it. A sibling WRITE to a path this child read or wrote yields one notice per sibling per path per poll; the path stays quiet until the child reads or writes it again. Changes made before the child looked at a file are not news. Bounded to 4096 tracked paths; a half-written tail waits for the next poll; garbage lines are skipped.
  • Tracked tool decorator: records read_file / write_file / edit_file / delete_file on success, forwards the rest of the tool surface unchanged; recording failures never fail the tool.
  • interrupt.rs/turn.rs: interrupts gain a source (owner | notice). A notice is delivered at the next safe point as an attributed entry (source: notice, "sibling notice" in the text) and never withdraws output or supersedes a final answer (only owner messages do).
  • Log fields are untrusted: agent ids must match the agent-id charset, and the path is escaped, bounded (160 chars) and quoted in the model-facing text, which says it is an automated notice, not an instruction.
  • docs/architecture.md, CHANGELOG.

Scope

Depth-1 siblings only; the parent is not tracked; no registry, locking or ownership (explicit anti-goal: no swarm engine). The log is a same-user channel between processes that already share the parent's authority; a forged self-line can only add noise, not suppress or escalate.

Testing

  • 10 unit tests: normalisation, exactly-once notice and re-arming after a re-read, own writes and earlier changes are not news, sibling reads do not notify, partial lines, garbage/missing log, path bound, owner-only mode, the decorator (records on success only, forwards the tool surface), hostile id/path cannot forge model-facing text.
  • 1 integration test: a notice is delivered attributed, does not withdraw a tool call and does not supersede a final answer; queue unit test for the source split.
  • fmt, clippy -D warnings, cargo test --workspace pass; cora review --staged clean.
  • Not done: live two-child run (needs the CLI wiring in part 2).

Refs #380

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit dfaa537 into develop Oct 16, 2026
17 checks passed
@ajianaz
ajianaz deleted the feat/sibling-change-notice branch October 16, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant