Skip to content

feat(scroll): P6.5 native attention-anchored agent driver — closes #68 - #69

Merged
github-actions[bot] merged 2 commits into
mainfrom
p6.5-agent-driver
Jul 27, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
p6.5-agent-driver

Conversation

@cordialApple

Copy link
Copy Markdown
Owner

P6.5 — native attention-anchored agent driver (headless)

The driver that reorganize cold doc regions while no human viewport move ("nothing change beneath you"). Closes #68, which close #66.

what land

  • attentionAgent.ts (new) — the driver. Each tick(): resolve reader cameras → observe the cold set → propose reorganize of the least-recently-worked cold block through peer.propose (fork-and-diff, NEVER self-apply) → advance LRU. Default actor = idempotent whitespace tidy; actor injectable for P6.6+ richer restructure.
  • cameraResolve.ts (new) — non-laundering camera resolve. Read .raw (published anchor), NOT .anchor (laundered to order[0]). Mirror the room authority liveCameras (server/agent/spatialProposalGuard.ts): raw id if in order → redirect successor if in order → raw AS-IS. Keep unplaceable reader unplaceable so guardedBlocks fail closed. This is the P6.5 carry-forward: agent non-laundering camera resolution (gating) + ObserverState + awarenessKnown producer #66 F-02 fix.
  • observer.ts (refactor) — take one ObserverState {tracked, lru} + pre-resolved cameras (was raw remotes + two separate state values). P6.5 carry-forward: agent non-laundering camera resolution (gating) + ObserverState + awarenessKnown producer #66 F-06.
  • removed the dead guardCamerasFromRemotes laundering bridge (+ its test). Zero refs repo-wide.

belt & suspenders

Agent pick cold (belt); room authority re-check the same asymmetric residency band at commit (suspenders, P6.3). A proposal into a region a reader just enter is refuse op-grain. Fail closed on unknown awareness OR unplaceable camera → guard whole doc.

gate

4 inspector (guard/fail-closed · state/LRU · peer-discipline · test-integrity) → adjudicator.

  • 1 blocker, fixed: a throwing actor make propose throw SYNC (headlessPeer run mutate sync), skip the LRU advance → livelock + cold-set starvation + split ObserverState. Fix: try/catch/finally — LRU advance on ANY attempt (commit/refuse/throw); a crash become a structured result, never a rejected tick. Tooth added (faithful sync fake peer prove the real mechanism).
  • fix-now: e2e unplaceable-camera driver test (fail closed end to end); strict-increasing now doc (equal-timestamp tie-break else starve cold[0]).
  • carry-forward (pin P6.6): tick() single-flight guard (state unguarded across await) + agent stop/destroy. Later: pinned-source wiring, empty-proposal short-circuit. All backstopped by the server commit-gate or the default clock today.

checks

typecheck ✓ · test ✓ (253 pass / 2 skip; agent suite 55, +2 new teeth) · build ✓. e2e unaffected (headless, no UI surface).

Closes #68

🤖 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 17:19
@github-actions
github-actions Bot merged commit e28434a into main Jul 27, 2026
4 checks passed
@cordialApple
cordialApple deleted the p6.5-agent-driver branch July 27, 2026 17:22
cordialApple added a commit that referenced this pull request Jul 27, 2026
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

1 participant