Skip to content

docs: diagram how context is projected through the proxy#1

Open
scottmeyer wants to merge 1 commit into
mainfrom
claude/diagram-context-projection-TafUf
Open

docs: diagram how context is projected through the proxy#1
scottmeyer wants to merge 1 commit into
mainfrom
claude/diagram-context-projection-TafUf

Conversation

@scottmeyer

Copy link
Copy Markdown
Member

Adds docs/CONTEXT_PROJECTION.md with Mermaid diagrams covering the
end-to-end /v1/messages flow, the layered byte-stability strategy,
mode divergence, the per-turn feedback loop, and an index of the
relevant code locations.

Adds docs/CONTEXT_PROJECTION.md with Mermaid diagrams covering the
end-to-end /v1/messages flow, the layered byte-stability strategy,
mode divergence, the per-turn feedback loop, and an index of the
relevant code locations.
scottmeyer added a commit that referenced this pull request Jun 10, 2026
Root cause (two stacked defects, both fixed):
1. Header miss: proxy read 'anthropic-session-id' but Claude Code sends
   'x-claude-code-session-id' → fallback hash(workspace:api-key) collapsed
   every fleet seat to ONE session id (438/438 rows identical in the
   haystack state file). Now reads x-claude-code-session-id first,
   anthropic-session-id as fallback.
2. Unfiltered read: read_recent took last-N rows of the shared
   per-workspace cycle_digests.jsonl globally, rendering peer seats'
   digests as first-person [t-K] turns → self-misID (evidence #1-#5).
   Now read_recent_for_session filters by session BEFORE the N-budget;
   peer digests render only under a labeled '## Peer activity (other
   seats, digest — NOT your turns)' section, cap 3, per ratified →1974 K2.

Tests: 3 new (peer exclusion, post-filter budget, peer-section labeling);
TEST_HOME_LOCK promoted crate-wide — module-local mutexes raced across
standalone/cycle_digest under parallel execution (fixes a real flake).

Acceptance (lead spec): post-fix, a seat can never see another seat's
digest as its own turn.
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.

2 participants