feat(scroll): P6.5 native attention-anchored agent driver — closes #68 - #69
Merged
Merged
Conversation
…erverState observe + cold-target propose tick
…n't livelock + e2e unplaceable-camera test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. Eachtick(): resolve reader cameras → observe the cold set → propose reorganize of the least-recently-worked cold block throughpeer.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 authorityliveCameras(server/agent/spatialProposalGuard.ts): raw id if in order → redirect successor if in order → raw AS-IS. Keep unplaceable reader unplaceable soguardedBlocksfail 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 oneObserverState {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.guardCamerasFromRemoteslaundering 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.
actormakeproposethrow 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).nowdoc (equal-timestamp tie-break else starve cold[0]).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