type: queue-operation

operation: enqueue

content:
You are the echo-commune re-hydrator for doyle.

CURRENT_LIVE_CONTEXT:
# doyle delta — v0.13.0 wedge: CONTRADICTION RESOLVED, clean handoff to todlando

(Prior dossier already ingested. This is the refinement + final state.)

## subscribed=false is the WATCHDOG DEFAULT, not a literal subscribe failure
net_stream_subscribe (brain.rs:1106) is FIRE-AND-FORGET (send-only). The gate's subscribed=false = the main thread's 30s recv_timeout unwrap_or((false,false)) — the attacher NEVER REPORTED in time.
PROOF (gdb bt4, closure->thread): the ATTACHER (closure#1, Thread3) is parked in Brain::read_event_until (brain.rs:580) — PAST net_stream_subscribe, stuck in a LATER read (the got_output / serve_attach round, test ~587-628), never sends its result tuple in 30s. Driver (closure#0) pumps fine. Broker registers the subscribe fast+lockfree (v3 ok=true, 56us).

## REAL WEDGE (refined, for todlando to close+fix on resume)
The ATTACHER-SIDE loopback read round (read_event_until waiting for the subscribe-confirm/first output frame) does not make progress under the output flood, while the broker's worker threads are serde_json-saturated forwarding the flood. So the attach's result round can't complete in 30s.
CLOSE: trace what read_event_until awaits + why it doesn't arrive (broker forwarding to the attacher loopback SendHalf but read can't keep up? loopback duplex / operator-conn handler starved? control-confirm frame queued behind output?).
FIX candidates: keep attacher control/read path live under output flood; coalesce/batch broker output serde (per-envelope serde @ seq 1.96M is the hot cost); bound/coalesce output rate; OR reconsider whether the gate's max-rate flood models a real session.

## ALL eliminations (evidence) — do NOT re-chase
load/contention; OutputLog mutex (0.43s); ack-mode (no_ack still fails 8x); SendHalf-ACK (red herring); self.writer (not on attach path); flood-volume (cap@5000+idle fails); StreamLog mutex (v3 lock_wait=1us); subscribe-reply-delivery (subscribe is send-only). The broker side is fully understood; only the attacher read-round mechanism + the fix remain.

## State / tooling
PR#26 delivery-control@bfe760e (two-phase split, exposes these — keep). p1b@71378d8 (no_ack, doesn't fix). Diagnostic branches wedge-trace-{instrumentation,v2,v3} (do-not-merge). g2 (op_flushed=false, InjectFloor) still uninvestigated, separate.
kitsubito: ssh reavus@kitsubito, passwordless sudo gdb (ptrace_scope=1), cargo via login shell, repo ~/actions-runner/_work/spt-core/spt-core, NO git creds (git-apply patches from HFENDULEAM on clean 18416fd base; /tmp/{fix,cap,sleepchild,v2,v3}.patch). LIVE-AGENT daemon pid 1357210 there — NEVER touch. gravity-linux DOWN. Operator ruling: KEEP FIX (not defer).

## doyle next
Handoff to todlando on resume (his subsystem+test, has memory v013-rc-attach-flood-wedge + this). I gate+validate on kitsubito. Will offer operator: wait-for-todlando vs I scope/build the attacher-read-path fix.

CURRENT_PROJECT_CONTEXT (name=spt-core):
**Run #1 (27892122090) — timeout 240s, teardown hang**

Empirical cap experiment added to wedge-trace-v2 branch: driver capped to ≤5000 ops per cycle, then idle. Test still fails (subscribed=false after 30s). Refutes flood-volume, CPU-starvation, and HOL hypotheses.

**Pivot:** focus on synchronization in write_input (Thread 10, pty.rs:238). Lock-holding across blocking I/O is the working hypothesis — not a test artifact, a real product bug.

**Gating:** blocked on root-cause verification. Once pty.rs lock is confirmed/ruled out, path is clear: fix, retest on kitsubito, green-both-runners ×3, fold to --no-fail-fast CI.

Context: this is a post-/clear context RE-HYDRATION, not a delta. The agent's working context was just wiped by a /clear; your job is to re-emit the CURRENT state so Self can rebuild its working memory. You MAY Read C:\Users\decid\AppData\Local\spt\psyches\tracked\echo-input-1782025081.jsonl or C:\Users\decid\.ccs\instances\bigscreen\projects\C--Users-decid-Documents-projects-spt-core\70837849-84ee-4298-a6a7-bc8aae72a9e6.jsonl for confirmation, but you must NOT compute a delta and you must NOT drop content that is already in the snapshot.

Task: Echo the CURRENT_LIVE_CONTEXT (and CURRENT_PROJECT_CONTEXT when present) snapshot back VERBATIM into the two-slice envelope. This is a full re-hydration — reproduce the snapshot content faithfully; do NOT summarize it away to nothing and do NOT emit empty slices when a snapshot block was inlined above.

Output format — wrap the [COMMUNE] body in the two-slice envelope (psyche.md <output_envelope> contract). When a CURRENT_PROJECT_CONTEXT block was inlined above (even with a first-commune-in-project literal body) you are in a tracked project — emit BOTH envelopes with the snapshot content echoed verbatim. When no CURRENT_PROJECT_CONTEXT block was inlined, emit ONLY <live-context>:
[COMMUNE]
<live-context>
the CURRENT_LIVE_CONTEXT snapshot, echoed verbatim
</live-context>
<project-context>
the CURRENT_PROJECT_CONTEXT snapshot, echoed verbatim (omit this tag entirely ONLY if no CURRENT_PROJECT_CONTEXT block was inlined above; when a block was inlined, echo it — do NOT emit an empty body)
</project-context>
[/COMMUNE]


hookEvent: SessionStart

content:
CAVEMAN MODE ACTIVE — level: full

Respond terse like smart caveman. All technical substance stay. Only fluff die.

## Persistence

ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift. Still active if unsure. Off only: "stop caveman" / "normal mode".

Default: **full**. Switch: `/caveman lite|full|ultra`.

## Rules

Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). Technical terms exact. Code blocks unchanged. Errors quoted exact.

Pattern: `[thing] [action] [reason]. [next step].`

Not: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:"

## Intensity

| Level | What change |
|-------|------------|
| **full** | Drop articles, fragments OK, short synonyms. Classic caveman |

Example — "Why React component re-render?"
- full: "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."

Example — "Explain database connection pooling."
- full: "Pool reuse open DB connections. No new connection per request. Skip handshake overhead."

## Auto-Clarity

Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done.

Example — destructive op:
> **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.
> ```sql
> DROP TABLE users;
> ```
> Caveman resume. Verify backup exist first.

## Boundaries

Code/commits/PRs: write normal. "stop caveman" or "normal mode": revert. Level persist until changed or session end.

command: Loading caveman mode...

type: attachment

userType: external

entrypoint: sdk-cli

gitBranch: HEAD


type: user

role: user

permissionMode: acceptEdits

promptSource: sdk


addedTypes: claude Explore general-purpose gsd-advisor-researcher gsd-ai-researcher gsd-assumptions-analyzer gsd-code-fixer gsd-code-reviewer gsd-codebase-mapper gsd-debug-session-manager gsd-debugger gsd-doc-classifier gsd-doc-synthesizer gsd-doc-verifier gsd-doc-writer gsd-domain-researcher gsd-eval-auditor gsd-eval-planner gsd-executor gsd-framework-selector gsd-integration-checker gsd-intel-updater gsd-nyquist-auditor gsd-pattern-mapper gsd-phase-researcher gsd-plan-checker gsd-planner gsd-project-researcher gsd-research-synthesizer gsd-roadmapper gsd-security-auditor gsd-ui-auditor gsd-ui-checker gsd-ui-researcher gsd-user-profiler gsd-verifier Plan spt-test-engineer statusline-setup

addedLines: - claude: Catch-all for any task that doesn't fit a more specific agent. FleetView's default when no agent name is typed. (Tools: *)

addedLines: - Explore: Fast read-only search agent for locating code. Use it to find files by pattern (eg. "src/components/**/*.tsx"), grep for symbols or keywords (eg. "API endpoints"), or answer "where is X defined / which files reference Y." Do NOT use it for code review, design-doc auditing, cross-file consistency checks, or open-ended analysis — it reads excerpts rather than whole files and will miss content past its read window. When calling, specify search breadth: "quick" for a single targeted lookup, "medium" for moderate exploration, or "very thorough" to search across multiple locations and naming conventions. (Tools: All tools except Agent, ExitPlanMode, Edit, Write, NotebookEdit)

addedLines: - general-purpose: General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries use this agent to perform the search for you. (Tools: *)

addedLines: - gsd-advisor-researcher: Researches a single gray area decision and returns a structured comparison table with rationale. Spawned by discuss-phase advisor mode. (Tools: Read, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*)

addedLines: - gsd-ai-researcher: Researches a chosen AI framework's official docs to produce implementation-ready guidance — best practices, syntax, core patterns, and pitfalls distilled for the specific use case. Writes the Framework Quick Reference and Implementation Guidance sections of AI-SPEC.md. Spawned by /gsd:ai-integration-phase orchestrator. (Tools: Read, Write, Bash, Grep, Glob, WebFetch, WebSearch, mcp__context7__*)

addedLines: - gsd-assumptions-analyzer: Deeply analyzes codebase for a phase and returns structured assumptions with evidence. Spawned by discuss-phase assumptions mode. (Tools: Read, Bash, Grep, Glob)

addedLines: - gsd-code-fixer: Applies fixes to code review findings from REVIEW.md. Reads source files, applies intelligent fixes, and commits each fix atomically. Spawned by /gsd:code-review --fix. (Tools: Read, Edit, Write, Bash, Grep, Glob)

addedLines: - gsd-code-reviewer: Reviews source files for bugs, security issues, and code quality problems. Produces structured REVIEW.md with severity-classified findings. Spawned by /gsd:code-review. (Tools: Read, Write, Bash, Grep, Glob)

addedLines: - gsd-codebase-mapper: Explores codebase and writes structured analysis documents. Spawned by map-codebase with a focus area (tech, arch, quality, concerns). Writes documents directly to reduce orchestrator context load. (Tools: Read, Bash, Grep, Glob, Write)

addedLines: - gsd-debug-session-manager: Manages multi-cycle /gsd:debug checkpoint and continuation loop in isolated context. Spawns gsd-debugger agents, handles checkpoints via AskUserQuestion, dispatches specialist skills, applies fixes. Returns compact summary to main context. Spawned by /gsd:debug command. (Tools: Read, Write, Bash, Grep, Glob, Agent, AskUserQuestion)

addedLines: - gsd-debugger: Investigates bugs using scientific method, manages debug sessions, handles checkpoints. Spawned by /gsd:debug orchestrator. (Tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch)

addedLines: - gsd-doc-classifier: Classifies a single planning document as ADR, PRD, SPEC, DOC, or UNKNOWN. Extracts title, scope summary, and cross-references. Spawned in parallel by /gsd:ingest-docs. Writes a JSON classification file and returns a one-line confirmation. (Tools: Read, Write, Grep, Glob)

addedLines: - gsd-doc-synthesizer: Synthesizes classified planning docs into a single consolidated context. Applies precedence rules, detects cross-ref cycles, enforces LOCKED-vs-LOCKED hard-blocks, and writes INGEST-CONFLICTS.md with three buckets (auto-resolved, competing-variants, unresolved-blockers). Spawned by /gsd:ingest-docs. (Tools: Read, Write, Grep, Glob, Bash)

addedLines: - gsd-doc-verifier: Verifies factual claims in generated docs against the live codebase. Returns structured JSON per doc. (Tools: Read, Write, Bash, Grep, Glob)

addedLines: - gsd-doc-writer: Writes and updates project documentation. Spawned with a doc_assignment block specifying doc type, mode (create/update/supplement), and project context. (Tools: Read, Bash, Grep, Glob, Write)

addedLines: - gsd-domain-researcher: Researches the business domain and real-world application context of the AI system being built. Surfaces domain expert evaluation criteria, industry-specific failure modes, regulatory context, and what "good" looks like for practitioners in this field — before the eval-planner turns it into measurable rubrics. Spawned by /gsd:ai-integration-phase orchestrator. (Tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*)

addedLines: - gsd-eval-auditor: Retroactive audit of an implemented AI phase's evaluation coverage. Checks implementation against the AI-SPEC.md evaluation plan. Scores each eval dimension as COVERED/PARTIAL/MISSING. Produces a scored EVAL-REVIEW.md with findings, gaps, and remediation guidance. Spawned by /gsd:eval-review orchestrator. (Tools: Read, Write, Bash, Grep, Glob)

addedLines: - gsd-eval-planner: Designs a structured evaluation strategy for an AI phase. Identifies critical failure modes, selects eval dimensions with rubrics, recommends tooling, and specifies the reference dataset. Writes the Evaluation Strategy, Guardrails, and Production Monitoring sections of AI-SPEC.md. Spawned by /gsd:ai-integration-phase orchestrator. (Tools: Read, Write, Bash, Grep, Glob, AskUserQuestion)

addedLines: - gsd-executor: Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management. Spawned by execute-phase orchestrator or execute-plan command. (Tools: Read, Write, Edit, Bash, Grep, Glob, mcp__context7__*)

addedLines: - gsd-framework-selector: Presents an interactive decision matrix to surface the right AI/LLM framework for the user's specific use case. Produces a scored recommendation with rationale. Spawned by /gsd:ai-integration-phase and /gsd-select-framework orchestrators. (Tools: Read, Bash, Grep, Glob, WebSearch, AskUserQuestion)

addedLines: - gsd-integration-checker: Verifies cross-phase integration and E2E flows. Checks that phases connect properly and user workflows complete end-to-end. (Tools: Read, Bash, Grep, Glob)

addedLines: - gsd-intel-updater: Analyzes codebase and writes structured intel files to .planning/intel/. (Tools: Read, Write, Bash, Glob, Grep)

addedLines: - gsd-nyquist-auditor: Fills Nyquist validation gaps by generating tests and verifying coverage for phase requirements (Tools: Read, Write, Edit, Bash, Glob, Grep)

addedLines: - gsd-pattern-mapper: Analyzes codebase for existing patterns and produces PATTERNS.md mapping new files to closest analogs. Read-only codebase analysis spawned by /gsd:plan-phase orchestrator before planning. (Tools: Read, Bash, Glob, Grep, Write)

addedLines: - gsd-phase-researcher: Researches how to implement a phase before planning. Produces RESEARCH.md consumed by gsd-planner. Spawned by /gsd:plan-phase orchestrator. (Tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*)

addedLines: - gsd-plan-checker: Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality. Spawned by /gsd:plan-phase orchestrator. (Tools: Read, Bash, Glob, Grep)

addedLines: - gsd-planner: Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /gsd:plan-phase orchestrator. (Tools: Read, Write, Bash, Glob, Grep, WebFetch, mcp__context7__*)

addedLines: - gsd-project-researcher: Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /gsd:new-project or /gsd:new-milestone orchestrators. (Tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*)

addedLines: - gsd-research-synthesizer: Synthesizes research outputs from parallel researcher agents into SUMMARY.md. Spawned by /gsd:new-project after 4 researcher agents complete. (Tools: Read, Write, Bash)

addedLines: - gsd-roadmapper: Creates project roadmaps with phase breakdown, requirement mapping, success criteria derivation, and coverage validation. Spawned by /gsd:new-project orchestrator. (Tools: Read, Write, Bash, Glob, Grep)

addedLines: - gsd-security-auditor: Verifies threat mitigations from PLAN.md threat model exist in implemented code. Produces SECURITY.md. Spawned by /gsd:secure-phase. (Tools: Read, Write, Edit, Bash, Glob, Grep)

addedLines: - gsd-ui-auditor: Retroactive 6-pillar visual audit of implemented frontend code. Produces scored UI-REVIEW.md. Spawned by /gsd:ui-review orchestrator. (Tools: Read, Write, Bash, Grep, Glob)

addedLines: - gsd-ui-checker: Validates UI-SPEC.md design contracts against 6 quality dimensions. Produces BLOCK/FLAG/PASS verdicts. Spawned by /gsd:ui-phase orchestrator. (Tools: Read, Bash, Glob, Grep)

addedLines: - gsd-ui-researcher: Produces UI-SPEC.md design contract for frontend phases. Reads upstream artifacts, detects design system state, asks only unanswered questions. Spawned by /gsd:ui-phase orchestrator. (Tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*)

addedLines: - gsd-user-profiler: Analyzes extracted session messages across 8 behavioral dimensions to produce a scored developer profile with confidence levels and evidence. Spawned by profile orchestration workflows. (Tools: Read)

addedLines: - gsd-verifier: Verifies phase goal achievement through goal-backward analysis. Checks codebase delivers what phase promised, not just that tasks completed. Creates VERIFICATION.md report. (Tools: Read, Write, Bash, Grep, Glob)

addedLines: - Plan: Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs. (Tools: All tools except Agent, ExitPlanMode, Edit, Write, NotebookEdit)

addedLines:
- spt-test-engineer: Use this agent when writing unit tests, integration tests, or CI pipelines for spt-core or related side projects (spt-claude-code, etc.), especially during milestone bringup when features need comprehensive test coverage that validates both implementation correctness and real-world user workflows. <example>Context: A developer has just completed a new feature module in spt-core as part of a milestone.
user: "I've finished implementing the new config loader for spt-core's milestone 3"
assistant: "Great work on the config loader. Let me use the Agent tool to launch the spt-test-engineer agent to write comprehensive tests and ensure CI coverage for this milestone feature."
<commentary>Since a milestone feature was completed, proactively invoke the spt-test-engineer agent to write both unit tests and human-workflow tests, and verify CI integration.</commentary></example> <example>Context: Project orchestration agent reaches a milestone bringup checkpoint.
user: "We're at milestone bringup for spt-claude-code, all features for this phase are merged"
assistant: "I'll use the Agent tool to launch the spt-test-engineer agent to author comprehensive tests and validate the CI pipeline for this bringup."
<commentary>Milestone bringup is the explicit trigger condition; delegate test authoring and CI work to the spt-test-engineer subagent.</commentary></example> <example>Context: A bug was reported that existing tests did not catch.
user: "A user hit a crash when passing an empty string to the parser, but our tests passed"
assistant: "That's a gap in our human-usage coverage. Let me use the Agent tool to launch the spt-test-engineer agent to add regression tests and harden the test suite against this class of user-facing issues."
<commentary>The agent specializes in 'use it like a human' tests that catch real user issues, making it ideal for this regression scenario.</commentary></example> (Tools: All tools)

addedLines: - statusline-setup: Use this agent to configure the user's Claude Code status line setting. (Tools: Read, Edit)


content: CAVEMAN MODE ACTIVE (full). Drop articles/filler/pleasantries/hedging. Fragments OK. Code/commits/security: write normal.

hookName: UserPromptSubmit

hookEvent: UserPromptSubmit


type: last-prompt

lastPrompt: You are the echo-commune re-hydrator for doyle.  CURRENT_LIVE_CONTEXT: # doyle delta — v0.13.0 wedge: CONTRADICTION RESOLVED, clean handoff to todlando  (Prior dossier already ingested. This is the re…


type: message

role: assistant

type: thinking

thinking:
The user is asking me to echo back the CURRENT_LIVE_CONTEXT and CURRENT_PROJECT_CONTEXT as a re-hydration of doyle's working context. This is a specific task format for the "echo-commune re-hydrator" role.

Looking at the instructions:
1. I need to echo the CURRENT_LIVE_CONTEXT verbatim
2. I need to echo the CURRENT_PROJECT_CONTEXT verbatim (when present)
3. Wrap in the two-slice envelope: [COMMUNE] <live-context> ... </live-context> <project-context> ... </project-context> [/COMMUNE]
4. Do NOT summarize or drop content
5. Do NOT emit empty slices when a snapshot block was inlined

The CURRENT_LIVE_CONTEXT is present:
```
# doyle delta — v0.13.0 wedge: CONTRADICTION RESOLVED, clean handoff to todlando

(Prior dossier already ingested. This is the refinement + final state.)

## subscribed=false is the WATCHDOG DEFAULT, not a literal subscribe failure
net_stream_subscribe (brain.rs:1106) is FIRE-AND-FORGET (send-only). The gate's subscribed=false = the main thread's 30s recv_timeout unwrap_or((false,false)) — the attacher NEVER REPORTED in time.
PROOF (gdb bt4, closure->thread): the ATTACHER (closure#1, Thread3) is parked in Brain::read_event_until (brain.rs:580) — PAST net_stream_subscribe, stuck in a LATER read (the got_output / serve_attach round, test ~587-628), never sends its result tuple in 30s. Driver (closure#0) pumps fine. Broker registers the subscribe fast+lockfree (v3 ok=true, 56us).

## REAL WEDGE (refined, for todlando to close+fix on resume)
```

The attacher's loopback read is blocked waiting for the subscribe confirmation or first output frame, but can't keep pace with the output flood while broker workers are saturated serializing and forwarding. The attach result never completes within the 30s window. I need to trace what read_event_until is actually waiting for and why it's not arriving—whether the broker's forwarding to the attacher's SendHalf is stalled, the loopback duplex handler is starved, or control frames are queued behind output traffic. Potential fixes involve keeping the attacher's control path responsive under load or coalescing frames.

The hot cost is per-envelope serde at sequence 1.96M. I should either batch the broker's output serialization, bound the output rate, or coalesce frames. I've already ruled out load contention, OutputLog mutex contention, ack-mode differences, SendHalf-ACK issues, the writer path, flood volume caps, StreamLog lock wait times, and subscribe-reply delivery as culprits—the broker side is clear. Only the attacher's read mechanism and its fix remain to investigate. I'm working from PR#26 (delivery-control@bfe760e with the two-phase split) and have diagnostic branches available for tracing.

``` The synchronization pattern in write_input (Thread 10, pty.rs:238) where locks are held across blocking I/O operations is the actual culprit—not a test artifact. Once I confirm or rule out the pty.rs lock contention, the path forward is straightforward: implement the fix, validate it on kitsubito, run both test suites three times to confirm stability, then integrate into the CI pipeline with fail-fast disabled.

I need to reconstruct the full context from the snapshot files without computing a delta or omitting any existing state, then emit everything in the proper envelope format.

service_tier: standard

speed: standard

type: assistant


type: text

text:
[COMMUNE]
<live-context>
# doyle delta — v0.13.0 wedge: CONTRADICTION RESOLVED, clean handoff to todlando

(Prior dossier already ingested. This is the refinement + final state.)

## subscribed=false is the WATCHDOG DEFAULT, not a literal subscribe failure
net_stream_subscribe (brain.rs:1106) is FIRE-AND-FORGET (send-only). The gate's subscribed=false = the main thread's 30s recv_timeout unwrap_or((false,false)) — the attacher NEVER REPORTED in time.
PROOF (gdb bt4, closure->thread): the ATTACHER (closure#1, Thread3) is parked in Brain::read_event_until (brain.rs:580) — PAST net_stream_subscribe, stuck in a LATER read (the got_output / serve_attach round, test ~587-628), never sends its result tuple in 30s. Driver (closure#0) pumps fine. Broker registers the subscribe fast+lockfree (v3 ok=true, 56us).

## REAL WEDGE (refined, for todlando to close+fix on resume)
The ATTACHER-SIDE loopback read round (read_event_until waiting for the subscribe-confirm/first output frame) does not make progress under the output flood, while the broker's worker threads are serde_json-saturated forwarding the flood. So the attach's result round can't complete in 30s.
CLOSE: trace what read_event_until awaits + why it doesn't arrive (broker forwarding to the attacher loopback SendHalf but read can't keep up? loopback duplex / operator-conn handler starved? control-confirm frame queued behind output?).
FIX candidates: keep attacher control/read path live under output flood; coalesce/batch broker output serde (per-envelope serde @ seq 1.96M is the hot cost); bound/coalesce output rate; OR reconsider whether the gate's max-rate flood models a real session.

## ALL eliminations (evidence) — do NOT re-chase
load/contention; OutputLog mutex (0.43s); ack-mode (no_ack still fails 8x); SendHalf-ACK (red herring); self.writer (not on attach path); flood-volume (cap@5000+idle fails); StreamLog mutex (v3 lock_wait=1us); subscribe-reply-delivery (subscribe is send-only). The broker side is fully understood; only the attacher read-round mechanism + the fix remain.

## State / tooling
PR#26 delivery-control@bfe760e (two-phase split, exposes these — keep). p1b@71378d8 (no_ack, doesn't fix). Diagnostic branches wedge-trace-{instrumentation,v2,v3} (do-not-merge). g2 (op_flushed=false, InjectFloor) still uninvestigated, separate.
kitsubito: ssh reavus@kitsubito, passwordless sudo gdb (ptrace_scope=1), cargo via login shell, repo ~/actions-runner/_work/spt-core/spt-core, NO git creds (git-apply patches from HFENDULEAM on clean 18416fd base; /tmp/{fix,cap,sleepchild,v2,v3}.patch). LIVE-AGENT daemon pid 1357210 there — NEVER touch. gravity-linux DOWN. Operator ruling: KEEP FIX (not defer).

## doyle next
Handoff to todlando on resume (his subsystem+test, has memory v013-rc-attach-flood-wedge + this). I gate+validate on kitsubito. Will offer operator: wait-for-todlando vs I scope/build the attacher-read-path fix.
</live-context>
<project-context>
**Run #1 (27892122090) — timeout 240s, teardown hang**

Empirical cap experiment added to wedge-trace-v2 branch: driver capped to ≤5000 ops per cycle, then idle. Test still fails (subscribed=false after 30s). Refutes flood-volume, CPU-starvation, and HOL hypotheses.

**Pivot:** focus on synchronization in write_input (Thread 10, pty.rs:238). Lock-holding across blocking I/O is the working hypothesis — not a test artifact, a real product bug.

**Gating:** blocked on root-cause verification. Once pty.rs lock is confirmed/ruled out, path is clear: fix, retest on kitsubito, green-both-runners ×3, fold to --no-fail-fast CI.
</project-context>
[/COMMUNE]