Skip to content

feat(scroll): P6.6 agent driving loop + lifecycle + milestone e2e (guard enforce live) - #71

Merged
github-actions[bot] merged 3 commits into
mainfrom
p6.6-agent-milestone
Jul 27, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
p6.6-agent-milestone

Conversation

@cordialApple

Copy link
Copy Markdown
Owner

Land the native attention-anchored agent's driving loop + lifecycle and the milestone e2e that PROVE the spatial guard enforces LIVE — first test with a live proposer AND a live camera, so it de-latents everything P6.2–6.5 built (before this, no test published a camera → the guard guarded nothing).

What

  • runAttentionAgent(peer, {intervalMs, actor?, config?, now?, onTick?}) — drive tick() on a cadence until stop(). Each tick fully settles before the next is scheduled (setTimeout AFTER the await, not setInterval) so slow propose round-trips can't pile up; tick()'s single-flight guard is the backstop.
  • Single-flight + fail-closed tick() — state is read/written across the await, so an overlapping tick would last-write-wins clobber the observer fold (P6.5 carry-forward: agent non-laundering camera resolution (gating) + ObserverState + awarenessKnown producer #66 F-06). A racing tick() gets an idle no-op. Any throw from the pre-propose section fail-closes to an idle result — tick() never rejects, and the error stays observable via onTick.
  • Milestone e2e (real server + ws + Postgres): human publishes a camera, agent reorganizes cold regions. Proves BELT (agent NEVER proposes into the band), SUSPENDERS (a band write is refused op-grain — both a static in-band write AND the check-then-act race where a reader enters a block cold at read-time before the commit lands), and durability (the band survives byte-for-byte in Postgres; a cold agent edit lands).

Gate

simplifier → 4 parallel inspectors (one lens each) → adjudicator PASS. First pass BLOCKED on B1 (belt untested — the e2e proved only suspenders): fixed by tracking PROPOSED apart from COMMITTED and driving the WHOLE cold set, so a reader-blind belt is forced to propose band blocks and the assertion catches it. Teeth-proven: sabotage resolveCameras → [] fails the milestone at the belt assertion (agentMilestone.test.ts:144); revert → green. Also landed FN1–5 (runner leak net, deferred-fake reschedule-guard test, fail-closed tick(), cold-tied durability, F-06 skip pin) + C1 (race test) + C2 (P6.5 cold-target teeth).

Carry-forward (non-blocking, no caller hits them)

  • CF1 — stop() can't abort an in-flight propose; a commit that lands after stop() mutates but fires no onTick.
  • CF2 — the runner doesn't auto-stop against a destroyed peer.

Both are lifecycle-ownership decisions.

Closes #70.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X7WHDHurYHVibsjwvevzFr

@cordialApple cordialApple added the automerge auto-merge when CI green label Jul 27, 2026
@github-actions
github-actions Bot enabled auto-merge (squash) July 27, 2026 18:46
@github-actions
github-actions Bot merged commit 1ff57fe into main Jul 27, 2026
4 checks passed
@cordialApple
cordialApple deleted the p6.6-agent-milestone branch July 27, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge auto-merge when CI green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P6.6: agent milestone e2e (guard enforces live) + driving loop/lifecycle

1 participant