Skip to content

[3834 by Claude Opus 5.5] Pi: live view and stored output parsing - #3856

Merged
integry merged 7 commits into
3831-epic-pi-coding-jmlfrom
3834/claude-opus-5-5-pi-live-view-and-stored-o-20261127-1852-8kc
Nov 27, 2026
Merged

integry merged 7 commits into
3831-epic-pi-coding-jmlfrom
3834/claude-opus-5-5-pi-live-view-and-stored-o-20261127-1852-8kc

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3834

Branch: 3834/claude-opus-5-5-pi-live-view-and-stored-o-20261127-1852-8kc
Commits: ✅ Changes committed (6589d47)


AI Processing Completed

Execution Details:

  • Issue: Pi: live view and stored output parsing #3834
  • Repository: integry/propr
  • Status: Success
  • Execution Time: 15m 27s
  • Tokens used: 6.52M tokens [6.48M input + 41.67K output]
  • API cost: $2.84
  • Timestamp: Nov 27, 2026, 7:08 PM UTC
  • LLM Model: Claude Opus 5.5
  • Subscription usage: Weekly +1%, Fable +1%

Summary:
I've added live view and stored-output parsing for Pi runs. Each tool call now shows up with its result, assistant text and thinking stream as they arrive, and token usage adds up across responses. The new and nearby test suites pass, and API typecheck and lint pass. I haven't seen it work against a real running Pi task in the UI.

Parser (packages/api/services/redisOutputParserPi.ts, new)

  • Routing: parseLine sends Pi records to the new parser before the Codex, OpenCode and Antigravity checks. That ordering matters: a Pi assistant message_end would otherwise pass for an OpenCode message. Records only count as Pi's if they have Pi's shape (e.g. a session needs a numeric version and an id; tool_execution_* needs a toolCallId), so other agents' records are left alone.
  • Streaming text: deltas are buffered per contentIndex and shown as the pending message while they stream. text_end/thinking_end replaces the buffer with the final content, and thinking is marked as reasoning. message_end fills in any block that never got an end event; a block that already ended isn't repeated. A finished block keeps the ID it had while streaming, so the live view doesn't jump.
  • Tools:
    • Tool calls are emitted from the assistant message_end blocks, which carry the arguments, or from tool_execution_start, whichever comes first.
    • Pi reports each result three times (tool_execution_end, the toolResult message, turn_end). Only one result per call is emitted, with its error flag.
    • If a result arrives for a call that was never announced, a tool_use line is added first so they still pair up.
  • Also:
    • User prompts are not shown.
    • Usage comes from assistant message_end only.
    • An assistant stop with error or aborted shows Pi's error message.

Wiring

  • Fix outside the issue's list: Pi's agent_end.messages contains messages keyed by role, which the whole-document Vibe transcript scan could claim, swallowing the Pi stream. Both parseRedisOutput and the live projector (liveOutputStream.ts) now skip that scan when the output contains Pi lines. A test covers it and fails without the guard.
  • Stored output: liveDetailsStoredOutputFormat.ts now detects a 'pi' format, and the live-details routes parse it through the same parser via a new parsePiOutputToConversationResult. Without this, the live projector held Pi output back as unidentified preamble.
  • Task watcher: taskWatcher.ts now uses the Redis watcher for pi tasks.
  • Line splitting: output is split on LF only, as Pi's docs require.

Tests

  • test/redisOutputParser.test.ts, the fixture regression test: the fixture gives four tool calls, and the three results pair with their calls (the cat missing.txt bash call is the one error). It also checks the final assistant text, and usage of 3,785 input and 229 output tokens.
  • Other new tests there:
    • delta buffering and the pending message.
    • the Vibe guard.
    • other agents' record shapes not being read as Pi.
    • stored-format detection, including a startup banner and CRLF line endings.
  • packages/api/test/liveOutputPi.test.ts: reading the stream one record at a time gives the same events and IDs as one full read.
  • Existing suites still green: redisOutputParser (Codex, OpenCode, Vibe 3, Antigravity), liveDetails (Antigravity, Codex DB fallback, OpenCode, completed persisted), liveOutput (stream, identity, retention), agentStreamProjection, the two taskWatcher suites, and the Codex app-server and Antigravity native goal suites.

The trimmed fixture has one call with no result (7Rc4Yw8fp) and one result whose call isn't in it (6UNoPXH4u). The test checks that every result has a call before it, not that every call has a result.

No preview images: the Pi live view reads from Redis, and there's no Redis server here to run the UI against a Pi stream. The preview manifest suggests adding one to the agent image.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (7 files)
    • packages/api/routes/liveDetailsOutputParsers.ts (+14/−0)
    • packages/api/routes/liveDetailsRoutes.ts (+2/−1)
    • packages/api/routes/liveDetailsStoredOutputFormat.ts (+4/−1)
    • packages/api/services/liveOutputStream.ts (+4/−1)
    • packages/api/services/redisOutputParser.ts (+10/−2)
    • packages/api/services/redisOutputParserPi.ts (added, +328/−0)
    • packages/api/services/taskWatcher.ts (+1/−1)
  • Low risk (2 files)
    • packages/api/test/liveOutputPi.test.ts (added, +38/−0)
    • test/redisOutputParser.test.ts (+147/−0)

Diff size: 9 files changed, +548/−6 lines

View task for the run's logs and conversation.


This PR was created automatically by ProPR after processing issue #3834.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

Suggested agent tools

  • redis-server in the agent image: The Pi live view is fed from Redis live-output keys; without a Redis server the API and propr-ui task details page cannot be run against a seeded Pi stream to capture the live events panel.

I've added live view and stored-output parsing for Pi runs. Each tool call now shows up with its result, assistant text and thinking stream as they arrive, and token usage adds up across responses. The new and nearby test suites pass, and API typecheck and lint pass. I haven't seen it work against a real running Pi task in the UI.

Parser (`packages/api/services/redisOutputParserPi.ts`, new)
- Routing: `parseLine` sends Pi records to the new parser before the Codex, OpenCode and Antigravity checks. That ordering matters: a Pi assistant `message_end` would otherwise pass for an OpenCode message. Records only count as Pi's if they have Pi's shape (e.g. a `session` needs a numeric `version` and an `id`; `tool_execution_*` needs a `toolCallId`), so other agents' records are left alone.
- Streaming text: deltas are buffered per `contentIndex` and shown as the pending message while they stream. `text_end`/`thinking_end` replaces the buffer with the final content, and thinking is marked as reasoning. `message_end` fills in any block that never got an end event; a block that already ended isn't repeated. A finished block keeps the ID it had while streaming, so the live view doesn't jump.
- Tools:
  - Tool calls are emitted from the assistant `message_end` blocks, which carry the arguments, or from `tool_execution_start`, whichever comes first.
  - Pi reports each result three times (`tool_execution_end`, the `toolResult` message, `turn_end`). Only one result per call is emitted, with its error flag.
  - If a result arrives for a call that was never announced, a tool_use line is added first so they still pair up.
- Also:
  - User prompts are not shown.
  - Usage comes from assistant `message_end` only.
  - An assistant stop with `error` or `aborted` shows Pi's error message.

Wiring
- Fix outside the issue's list: Pi's `agent_end.messages` contains messages keyed by role, which the whole-document Vibe transcript scan could claim, swallowing the Pi stream. Both `parseRedisOutput` and the live projector (`liveOutputStream.ts`) now skip that scan when the output contains Pi lines. A test covers it and fails without the guard.
- Stored output: `liveDetailsStoredOutputFormat.ts` now detects a `'pi'` format, and the live-details routes parse it through the same parser via a new `parsePiOutputToConversationResult`. Without this, the live projector held Pi output back as unidentified preamble.
- Task watcher: `taskWatcher.ts` now uses the Redis watcher for `pi` tasks.
- Line splitting: output is split on LF only, as Pi's docs require.

Tests
- `test/redisOutputParser.test.ts`, the fixture regression test: the fixture gives four tool calls, and the three results pair with their calls (the `cat missing.txt` bash call is the one error). It also checks the final assistant text, and usage of 3,785 input and 229 output tokens.
- Other new tests there:
  - delta buffering and the pending message.
  - the Vibe guard.
  - other agents' record shapes not being read as Pi.
  - stored-format detection, including a startup banner and CRLF line endings.
- `packages/api/test/liveOutputPi.test.ts`: reading the stream one record at a time gives the same events and IDs as one full read.
- Existing suites still green: redisOutputParser (Codex, OpenCode, Vibe 3, Antigravity), liveDetails (Antigravity, Codex DB fallback, OpenCode, completed persisted), liveOutput (stream, identity, retention), agentStreamProjection, the two taskWatcher suites, and the Codex app-server and Antigravity native goal suites.

The trimmed fixture has one call with no result (`7Rc4Yw8fp`) and one result whose call isn't in it (`6UNoPXH4u`). The test checks that every result has a call before it, not that every call has a result.

No preview images: the Pi live view reads from Redis, and there's no Redis server here to run the UI against a Pi stream. The preview manifest suggests adding one to the agent image.

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=8
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 27, 2026
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 8)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds Pi parsing across live streams, stored output, and task watching with a focused implementation. It needs a correction to tool-result identity after Redis retention before merge.

✅ Shared parsing path — Stored Pi output and live output use the same parser, keeping tool extraction and usage aggregation consistent.

✅ Streaming continuity — Completed text and thinking blocks preserve their pending event keys and timestamps during uninterrupted streaming.

✅ Duplicate suppression — Per-call tracking suppresses Pi’s repeated results while the same parser state survives.

The supplied current-head status has no failed checks and five pending checks. This review used static analysis only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Preserve result identity after retention

  • Category: correctness

  • Required behavior: A live event must retain its identity across incremental reads and fresh reads after Redis retention, so the UI does not append the same tool result twice.

  • Evidence: packages/api/services/redisOutputParserPi.ts, emitToolResult; packages/api/services/liveOutputStream.ts, genericProjection and withIds.

    1. An existing watcher processes tool_execution_end for call c. The parser emits its result without an explicit ID, so withIds assigns an ID derived from that record’s byte offset.
    2. Pi subsequently repeats the result in a message_end with role toolResult and in turn_end. The watcher suppresses those copies using emittedToolResultIds.
    3. Redis retention removes the original tool_execution_end while retaining a later copy. A fresh HTTP projection starts with empty Pi tracking sets; the retained session header does not restore them. genericProjection seeds only OpenCode tracking.
    4. The fresh Pi parser emits the retained copy with an ID derived from its different record offset. The same logical result now has different IDs in watcher and HTTP projections. The supplied UI merge logic treats different IDs as new events, allowing duplicate results when these projections are combined.

    The per-projection sets prevent duplicates only within one parser lifetime. The new incremental/full-read test never trims records, so it does not cover this sequence. static trace: verified against the supplied retention reconstruction, result emission, ID assignment, and UI merge code. proposed regression: compare an uninterrupted projection with a fresh retained read beginning between tool_execution_end and its repeated toolResult message.

  • Minimum fix: Make Pi result identity and deduplication survive retention—for example, assign results a stable, execution-scoped identity derived from the tool-call ID and deduplicate repeated retained copies consistently. Add the retention regression described above.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Exercise the watcher-to-UI path

A Redis-backed integration test covering a pending Pi message, its completion, and a tool result would strengthen confidence in the new watcher wiring. The supplied tests cover parser and projector behavior, while the implementation summary explicitly notes that a running Pi task was not observed in the UI. This additional integration coverage is optional.

Score

The implementation covers the main parsing requirements and includes useful focused tests. The verified retention identity defect prevents merge readiness; the pending checks are not themselves blockers.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 11s
  • Tokens: 61,549 (60,147 in / 1,402 out)
  • Cost: $0.54

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 1ac83c7

Addressed 1 AI review comment (IDs: 7226276023)

Addressed finding F1

Summary of Changes

I fixed F1: a Pi tool result now gets the same live ID whether it comes from tool_execution_end or from a copy Pi repeats later. That holds for a long-running watcher and for a fresh read after Redis trimmed the earlier record, so the UI no longer shows the same result twice.

The fix (packages/api/services/redisOutputParserPi.ts, emitToolResult)

  • The result's ID used to come from the byte offset of whichever record emitted it. It now comes from the tool-call ID, so all three of Pi's copies (tool_execution_end, the toolResult message, turn_end) give the same ID.
  • Skipped repeat copies no longer reserve a numbered slot in their record. A slot only matters for events numbered by position, and results no longer are, so watcher and fresh read can't disagree about it.
  • Nothing changes for other agents: withIds and the ID scheme in liveOutputStream.ts are untouched.

Other Pi events. I checked the rest of the Pi parser for the same problem and found none:

  • Tool calls already take their ID from the call ID.
  • Text, thinking and error-stop events are each emitted from only one kind of record, so trimming can't change which copy a reader sees first.

Regression test (packages/api/test/liveOutputPi.test.ts)

  • A call is followed by its tool_execution_end, toolResult message and turn_end. The test compares a record-by-record watcher, a full read, and a fresh read that starts at the toolResult message after earlier output was trimmed.
  • It checks that each read has exactly one result, that the result's ID is the same in all three, and that every event in the trimmed read matches one the watcher emitted.
  • With the fix removed, the test fails on the ID assertion.

One difference remains: in the fresh read, the result's timestamp is the toolResult message's own, about a second later than the watcher's, because tool_execution_end carries none. The call event that read adds before its result has the tool name but not the arguments. Both are under the same IDs, so they don't cause duplicates, and the test allows for them.

Verification:

  • The Pi, live-output and live-details suites plus test/redisOutputParser.test.ts: 126 tests, 109 passed, 0 failed, 17 skipped.
  • API typecheck and lint on the changed files both pass.

There's no preview, since nothing on screen changes beyond the duplicate no longer appearing.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/api/services/redisOutputParserPi.ts (+13/−6)
  • Low risk (1 file)
    • packages/api/test/liveOutputPi.test.ts (+50/−1)

Diff size: 2 files changed, +63/−7 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 7m 0s
  • Tokens: 1,259,466 (1,250,649 in / 8,817 out)
  • Cost: $0.75
  • Subscription usage: Weekly +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

I fixed F1: a Pi tool result now gets the same live ID whether it comes from `tool_execution_end` or from a copy Pi repeats later. That holds for a long-running watcher and for a fresh read after Redis trimmed the earlier record, so the UI no longer shows the same result twice.

**The fix** (`packages/api/services/redisOutputParserPi.ts`, `emitToolResult`)
- The result's ID used to come from the byte offset of whichever record emitted it. It now comes from the tool-call ID, so all three of Pi's copies (`tool_execution_end`, the `toolResult` message, `turn_end`) give the same ID.
- Skipped repeat copies no longer reserve a numbered slot in their record. A slot only matters for events numbered by position, and results no longer are, so watcher and fresh read can't disagree about it.
- Nothing changes for other agents: `withIds` and the ID scheme in `liveOutputStream.ts` are untouched.

**Other Pi events.** I checked the rest of the Pi parser for the same problem and found none:
- Tool calls already take their ID from the call ID.
- Text, thinking and error-stop events are each emitted from only one kind of record, so trimming can't change which copy a reader sees first.

**Regression test** (`packages/api/test/liveOutputPi.test.ts`)
- A call is followed by its `tool_execution_end`, `toolResult` message and `turn_end`. The test compares a record-by-record watcher, a full read, and a fresh read that starts at the `toolResult` message after earlier output was trimmed.
- It checks that each read has exactly one result, that the result's ID is the same in all three, and that every event in the trimmed read matches one the watcher emitted.
- With the fix removed, the test fails on the ID assertion.

One difference remains: in the fresh read, the result's timestamp is the `toolResult` message's own, about a second later than the watcher's, because `tool_execution_end` carries none. The call event that read adds before its result has the tool name but not the arguments. Both are under the same IDs, so they don't cause duplicates, and the test allows for them.

**Verification:**
- The Pi, live-output and live-details suites plus `test/redisOutputParser.test.ts`: 126 tests, 109 passed, 0 failed, 17 skipped.
- API typecheck and lint on the changed files both pass.

There's no preview, since nothing on screen changes beyond the duplicate no longer appearing.

PR: #3856
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds Pi parsing across live streaming, stored output, and task watching. It needs a localized correctness fix before merge: assistant event identities are not stable across Redis retention.

✅ Tool-result deduplication — Repeated results are suppressed by call ID, and result keys remain stable when retention leaves a later copy.

✅ Shared parsing path — Stored Pi output uses the same parser as live output, including usage accumulation and reasoning classification.

✅ Focused coverage — Tests cover fixture parsing, incremental reads, and retained tool results. Current checks report 15 passed, with no failures or pending checks.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F2: 🔴 Preserve assistant identities across retention

  • Category: correctness

  • Required behavior: The same live event must retain its identity across uninterrupted streaming and reads after Redis retention, so snapshots can merge without duplicating narration.

  • Evidence: packages/api/services/redisOutputParserPi.ts:emitBlock, processAssistantMessageEnd

    1. An uninterrupted Pi projection receives an assistant text_delta. The generic projection assigns its record offset to pendingAssistantKey.
    2. text_end calls emitBlock, which uses that pending key. The subsequent assistant message_end suppresses the already emitted block.
    3. Redis retention removes the delta and end records but retains the assistant message_end. A fresh projection receives the preserved session header and this retained message.
    4. Its emittedBlocks is empty and there is no pending key, so emitBlock emits the same narration using the retained message_end record’s offset. That produces a different live event ID from the uninterrupted projection.
    5. A client that already received the original narration now receives the same narration under a new ID. The supplied mergeFullLiveDetails path retains previously collected history within the same execution and merges by IDs, allowing duplicate narration.

    static trace: This follows from the supplied emitBlock, createRedisOutputProjection.feed, LiveOutputProjector.withIds, and snapshot merge code. The same mismatch occurs when retention leaves text_end but removes the first delta, and also affects thinking blocks. emittedBlocks only protects one projector’s in-memory history; it cannot recover identity after trimming. The new retention test exercises tool results, whose explicit call-derived keys avoid this problem, but does not exercise assistant blocks. No commands or tests were run.

  • Minimum fix: Preserve or recover a canonical assistant-block identity across delta, end, and final-message representations, including after retention. Add regression coverage comparing uninterrupted IDs with retained reads starting at both text_end and message_end, for text and thinking.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Exercise stopped-message diagnostics

The new stopped-message branch has no direct coverage in the supplied tests. A small test for error and aborted messages carrying errorMessage would help preserve the intended diagnostic behavior. This is optional coverage, not evidence of another defect.

Score

The implementation is focused and current checks pass, but retained assistant output can acquire new identities and duplicate visible narration. The tool-result retention coverage provides a useful pattern for closing this gap.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 53s
  • Tokens: 61,842 (60,746 in / 1,096 out)
  • Cost: $0.53

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F2 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 3495365

Addressed 1 AI review comment (IDs: 7226833212)

Addressed finding F2

Summary of Changes

I fixed F2. Pi assistant text and thinking now keep the same live ID whether a reader watched the stream without interruption or started fresh after Redis retention trimmed earlier records. The UI should no longer show the same narration twice.

The fix (packages/api/services/redisOutputParserPi.ts)

  • New key: each text or thinking block is keyed by its message's timestamp and its contentIndex, instead of the byte offset of whichever record emitted it. I checked Pi's source (pi-ai / pi-agent-core 0.73.1): the provider stamps an assistant message once when it starts streaming, and message_end carries that same message object. So message_start and message_end always give the same key, and so does the block's own text_end or thinking_end in between.
  • Pending message: while a block streams it uses that same key, so the finished block still keeps the ID it had while streaming.
  • Reader that missed message_start: it can't know the key, so it no longer emits a block at text_end/thinking_end, or when the next block starts. It keeps showing the block as the pending message and emits it at message_end, under the same key and timestamp the watcher used.
  • Slots: blocks with a key no longer reserve a numbered slot in the message_end record. This keeps the later "Pi stopped (error)" event's ID the same across readers.
  • Fallback: if an assistant message has no timestamp, the old record-offset behaviour applies unchanged.

Tests

  • New test in packages/api/test/liveOutputPi.test.ts: a message with a thinking block, a text block and an error stop is read four ways, besides the record-by-record watcher. A full read, and fresh reads starting at a thinking delta, at thinking_end, at text_end and at message_end. Each read must match the watcher's events exactly, IDs and timestamps included. The test also checks that each completed block keeps its streaming ID. It fails on the previous parser.
  • Changed existing test in test/redisOutputParser.test.ts: it gave message_start and message_end different timestamps, which Pi never does. I made them match, and updated the expected pending key to the new block key.

Verification

  • The live-output and live-details suites: 105 tests, 88 passed, 0 failed, 17 skipped.
  • test/redisOutputParser.test.ts: 22 passed.
  • API typecheck and lint both pass.

There's no preview, since nothing on screen changes beyond the duplicate no longer appearing.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/api/services/redisOutputParserPi.ts (+49/−10)
  • Low risk (2 files)
    • packages/api/test/liveOutputPi.test.ts (+39/−0)
    • test/redisOutputParser.test.ts (+4/−3)

Diff size: 3 files changed, +92/−13 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 7m 21s
  • Tokens: 2,079,024 (2,062,847 in / 16,177 out)
  • Cost: $1.10

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

I fixed F2. Pi assistant text and thinking now keep the same live ID whether a reader watched the stream without interruption or started fresh after Redis retention trimmed earlier records. The UI should no longer show the same narration twice.

**The fix** (`packages/api/services/redisOutputParserPi.ts`)
- **New key:** each text or thinking block is keyed by its message's timestamp and its `contentIndex`, instead of the byte offset of whichever record emitted it. I checked Pi's source (pi-ai / pi-agent-core 0.73.1): the provider stamps an assistant message once when it starts streaming, and `message_end` carries that same message object. So `message_start` and `message_end` always give the same key, and so does the block's own `text_end` or `thinking_end` in between.
- **Pending message:** while a block streams it uses that same key, so the finished block still keeps the ID it had while streaming.
- **Reader that missed `message_start`:** it can't know the key, so it no longer emits a block at `text_end`/`thinking_end`, or when the next block starts. It keeps showing the block as the pending message and emits it at `message_end`, under the same key and timestamp the watcher used.
- **Slots:** blocks with a key no longer reserve a numbered slot in the `message_end` record. This keeps the later "Pi stopped (error)" event's ID the same across readers.
- **Fallback:** if an assistant message has no timestamp, the old record-offset behaviour applies unchanged.

**Tests**
- **New test in `packages/api/test/liveOutputPi.test.ts`:** a message with a thinking block, a text block and an error stop is read four ways, besides the record-by-record watcher. A full read, and fresh reads starting at a thinking delta, at `thinking_end`, at `text_end` and at `message_end`. Each read must match the watcher's events exactly, IDs and timestamps included. The test also checks that each completed block keeps its streaming ID. It fails on the previous parser.
- **Changed existing test** in `test/redisOutputParser.test.ts`: it gave `message_start` and `message_end` different timestamps, which Pi never does. I made them match, and updated the expected pending key to the new block key.

**Verification**
- The live-output and live-details suites: 105 tests, 88 passed, 0 failed, 17 skipped.
- `test/redisOutputParser.test.ts`: 22 passed.
- API typecheck and lint both pass.

There's no preview, since nothing on screen changes beyond the duplicate no longer appearing.

PR: #3856
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from 3831-epic-pi-coding-jml into 3834/claude-opus-5-5-pi-live-view-and-stored-o-20261127-1852-8kc in commit ea3f9fd

Conflicting Files

  • packages/api/services/taskWatcher.ts

Resolution Summary

I resolved the one conflict, in packages/api/services/taskWatcher.ts. A search of the repository found no other conflict markers.

What the conflict was about: both branches made the same change to the check that decides which agent types get the Redis watcher instead of tailing a log file on the host. Each added agentType === 'pi' to the codex / antigravity / vibe condition. The line was identical on both sides. The only difference was that 3831-epic-pi-coding-jml also put a comment above it:

// Pi sessions live in each run's disposable agent dir: the host dir has nothing to tail.

The PR side had the same line without the comment, so Git flagged the comment as a conflict.

How I resolved it: I kept the shared 'pi' condition and the epic branch's comment, and removed the conflict markers. The file now matches the epic branch's version exactly. The PR made no other changes to this file, so none of its work was lost.

Why: there was no real disagreement about the code, because both sides route Pi tasks to the Redis watcher. The comment explains why that's necessary, and keeping it brings in the target branch's update without changing what the PR does.

Verification: running the TypeScript compiler (tsc --noEmit) on packages/api reported no errors in taskWatcher.ts. I didn't run any tests, since the resolved file is identical to the epic branch's version.


🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 4m 30s

View Task Execution


System-triggered merge conflict resolution

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- packages/api/services/taskWatcher.ts

PR: #3856
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate Changes

Please investigate and fix this CI failure.

Failure evidence

.github:8
Process completed with exit code 1.

.github:413
Process completed with exit code 1.

@github-actions

Copy link
Copy Markdown

Checks Failed

Validation failed during setup, tests, CLI packaging, linting, or build checks.

View Logs
Build check diagnostics for run 46061076184, attempt 1
Checkout outcome: success

--- GitHub Actions workflow lint ---
docker.io/rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667: Pulling from rhysd/actionlint
589002ba0eae: Pulling fs layer
c09af8888d6a: Pulling fs layer
4ccd7d76ca98: Pulling fs layer
b6b4b7b0e257: Pulling fs layer
b6b4b7b0e257: Waiting
589002ba0eae: Verifying Checksum
589002ba0eae: Download complete
c09af8888d6a: Verifying Checksum
c09af8888d6a: Download complete
4ccd7d76ca98: Verifying Checksum
4ccd7d76ca98: Download complete
589002ba0eae: Pull complete
c09af8888d6a: Pull complete
4ccd7d76ca98: Pull complete
b6b4b7b0e257: Verifying Checksum
b6b4b7b0e257: Download complete
b6b4b7b0e257: Pull complete
Digest: sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
Status: Downloaded newer image for rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
docker.io/rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667

--- Release shell script lint ---

--- Toolchain ---
v22.23.5
10.9.9

--- Dependency installation ---
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]

added 1112 packages, and audited 1121 packages in 18s

318 packages are looking for funding
  run `npm fund` for details

8 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

--- CLI release package ---
Verifying propr-cli release package...

> [email protected] cli:pack
> node packages/cli/scripts/build-publish.mjs


> @propr/[email protected] build
> tsc


> @propr/[email protected] build
> tsc


> @propr/[email protected] build
> tsc && node scripts/copy-assets.mjs

copy-assets: copied 9 file(s) into the CLI package.

Staged [email protected] at /home/runner/work/propr/propr/dist-publish/propr-cli
npm notice
npm notice 📦  [email protected]
npm notice Tarball Contents
npm notice 32.0kB README.md
npm notice 36.3kB dist/agentSkill.js
npm notice 477B dist/api/admission.js
npm notice 754B dist/api/agentRuntime.js
npm notice 7.2kB dist/api/agents.js
npm notice 2.6kB dist/api/agentTank.js
npm notice 4.4kB dist/api/automations.js
npm notice 13.3kB dist/api/client.js
npm notice 5.9kB dist/api/errors.js
npm notice 1.6kB dist/api/followupHandoffs.js
npm notice 16.9kB dist/api/goals.js
npm notice 6.0kB dist/api/implement.js
npm notice 2.9kB dist/api/index.js
npm notice 1.9kB dist/api/logs.js
npm notice 7.7kB dist/api/plans.js
npm notice 586B dist/api/pullRequests.js
npm notice 4.2kB dist/api/relay.js
npm notice 12.5kB dist/api/repos.js
npm notice 2.5kB dist/api/repositoryEvents.js
npm notice 16.2kB dist/api/settings.js
npm notice 2.0kB dist/api/stats.js
npm notice 1.6kB dist/api/syntheticPools.js
npm notice 1.8kB dist/api/system.js
npm notice 5.9kB dist/api/tasks.js
npm notice 2.9kB dist/api/todos.js
npm notice 86B dist/api/types.js
npm notice 313B dist/api/visualPreviewAuth.js
npm notice 32.9kB dist/assets/env.example.txt
npm notice 5.9kB dist/auth/githubLogin.js
npm notice 5.0kB dist/auth/verifyToken.js
npm notice 9.0kB dist/commands/admissionCommands.js
npm notice 19.7kB dist/commands/agentCommands.js
npm notice 4.2kB dist/commands/agentPoolCommands.js
npm notice 4.3kB dist/commands/agentSkillCommands.js
npm notice 30.0kB dist/commands/agentValidation.js
npm notice 31.2kB dist/commands/automationCommands.js
npm notice 72.3kB dist/commands/checkCommands.js
npm notice 8.9kB dist/commands/configCommands.js
npm notice 14.6kB dist/commands/connectCommand.js
npm notice 12.2kB dist/commands/eventCommands.js
npm notice 5.5kB dist/commands/githubAppApi.js
npm notice 27.7kB dist/commands/githubAppCommands.js
npm notice 60.9kB dist/commands/goalCommands.js
npm notice 9.4kB dist/commands/handoffCommands.js
npm notice 2.4kB dist/commands/imageCommands.js
npm notice 8.6kB dist/commands/implementCommands.js
npm notice 2.0kB dist/commands/index.js
npm notice 8.4kB dist/commands/initCommands.js
npm notice 14.1kB dist/commands/initStack.js
npm notice 6.1kB dist/commands/logCommands.js
npm notice 26.5kB dist/commands/planCommands.js
npm notice 3.1kB dist/commands/prCommands.js
npm notice 8.4kB dist/commands/relayCommands.js
npm notice 41.4kB dist/commands/repoCommands.js
npm notice 2.7kB dist/commands/repoValidate.js
npm notice 7.5kB dist/commands/runtimeCommands.js
npm notice 19.8kB dist/commands/settingCommands.js
npm notice 4.6kB dist/commands/setup/agentHostActions.js
npm notice 123B dist/commands/setup/agents.js
npm notice 4.7kB dist/commands/setup/engine.js
npm notice 51B dist/commands/setup/github.js
npm notice 37.3kB dist/commands/setup/hostActions.js
npm notice 3.2kB dist/commands/setup/imagePlatform.js
npm notice 27.3kB dist/commands/setup/sequential.js
npm notice 51B dist/commands/setup/state.js
npm notice 51B dist/commands/setup/types.js
npm notice 10.7kB dist/commands/setupCommand.js
npm notice 4.4kB dist/commands/stackCommands.js
npm notice 1.4kB dist/commands/startCommand.js
npm notice 4.8kB dist/commands/statsCommands.js
npm notice 4.9kB dist/commands/statsCostCommand.js
npm notice 14.8kB dist/commands/systemCommands.js
npm notice 3.5kB dist/commands/tankCommands.js
npm notice 47.6kB dist/commands/taskCommands.js
npm notice 29.7kB dist/commands/todoCommands.js
npm notice 31.0kB dist/commands/tunnelCommand.js
npm notice 2.7kB dist/commands/uiDocsCommands.js
npm notice 8.3kB dist/completion.js
npm notice 27.3kB dist/config/ConfigManager.js
npm notice 276B dist/config/index.js
npm notice 989B dist/config/rootKey.js
npm notice 345B dist/config/types.js
npm notice 46.0kB dist/connectIdentity.js
npm notice 25.0kB dist/connectRootAuthority.js
npm notice 32.5kB dist/connectWindowsAuthority.js
npm notice 2.2kB dist/desktopDiscovery.js
npm notice 13.3kB dist/desktopLocalSetup.js
npm notice 17.4kB dist/index.js
npm notice 4.5kB dist/native/darwin-authority-broker.c
npm notice 8.9kB dist/native/directory-operations.c
npm notice 50.1kB dist/native/prebuilds/darwin-arm64/connect-authority-broker
npm notice 54.2kB dist/native/prebuilds/darwin-arm64/directory-operations.node
npm notice 17.1kB dist/native/prebuilds/darwin-x64/connect-authority-broker
npm notice 24.3kB dist/native/prebuilds/darwin-x64/directory-operations.node
npm notice 28.9kB dist/native/prebuilds/linux-arm64/directory-operations.node
npm notice 17.4kB dist/native/prebuilds/linux-x64/directory-operations.node
npm notice 1.2kB dist/native/README.md
npm notice 3.1kB dist/orchestrator/format.js
npm notice 13.4kB dist/orchestrator/index.js
npm notice 302B dist/orchestrator/manifest.json
npm notice 131.2kB dist/orchestrator/orchestrator.mjs
npm notice 408B dist/orchestrator/types.js
npm notice 6.2kB dist/rootHelp.js
npm notice 237B dist/skill/propr/agents/openai.yaml
npm notice 8.9kB dist/skill/propr/SKILL.md
npm notice 4.5kB dist/tui/AgentTableApp.js
npm notice 4.5kB dist/tui/app.js
npm notice 11.6kB dist/tui/CheckApp.js
npm notice 5.1kB dist/tui/render.js
npm notice 32.5kB dist/tui/SetupApp.js
npm notice 18.4kB dist/tui/SetupApp.test.js
npm notice 8.2kB dist/tui/StartApp.js
npm notice 3.8kB dist/utils/apiErrorPresentation.js
npm notice 12.0kB dist/utils/directoryDescriptor.js
npm notice 739B dist/utils/dockerPort.js
npm notice 5.0kB dist/utils/envFile.js
npm notice 520B dist/utils/index.js
npm notice 5.7kB dist/utils/io.js
npm notice 717B dist/utils/localSetupPlatform.js
npm notice 1.5kB dist/utils/nativeArtifact.js
npm notice 544B dist/utils/parseState.js
npm notice 417B dist/utils/positiveInteger.js
npm notice 4.5kB dist/utils/privateFilesystem.js
npm notice 4.2kB dist/utils/resolveProject.js
npm notice 7.2kB dist/vendor/local-setup/agents.js
npm notice 64.5kB dist/vendor/local-setup/engine.js
npm notice 5.0kB dist/vendor/local-setup/envFile.js
npm notice 11.4kB dist/vendor/local-setup/github.js
npm notice 188B dist/vendor/local-setup/index.js
npm notice 27.5kB dist/vendor/local-setup/publicInstanceIdentity.js
npm notice 14.6kB dist/vendor/local-setup/state.js
npm notice 2.8kB dist/vendor/local-setup/types.js
npm notice 13.2kB dist/vendor/shared/acceptanceCriteria.js
npm notice 1.0kB dist/vendor/shared/accountStatusTimestamp.js
npm notice 7.7kB dist/vendor/shared/activityEvents.js
npm notice 2.8kB dist/vendor/shared/agentConfigRedaction.js
npm notice 4.4kB dist/vendor/shared/agentDefinitions.js
npm notice 2.3kB dist/vendor/shared/agentFailureLine.js
npm notice 3.4kB dist/vendor/shared/agentLogin.js
npm notice 3.1kB dist/vendor/shared/agentTank.js
npm notice 1.2kB dist/vendor/shared/agentTankHistory.js
npm notice 2.8kB dist/vendor/shared/analyticsTimeframe.js
npm notice 4.4kB dist/vendor/shared/antigravityCompatibility.js
npm notice 5.1kB dist/vendor/shared/apiOrigin.js
npm notice 3.5kB dist/vendor/shared/assignment.js
npm notice 17.2kB dist/vendor/shared/automationDefinitions.js
npm notice 9.2kB dist/vendor/shared/automationReportPreview.js
npm notice 2.4kB dist/vendor/shared/automationRunProductivity.js
npm notice 6.4kB dist/vendor/shared/automationTemplateContract.js
npm notice 18.5kB dist/vendor/shared/automationTemplates.catalog.json
npm notice 1.3kB dist/vendor/shared/automationTemplates.js
npm notice 3.4kB dist/vendor/shared/changedFileKinds.js
npm notice 1.4kB dist/vendor/shared/claudeCompatibility.js
npm notice 12.1kB dist/vendor/shared/commitSubject.js
npm notice 8.5kB dist/vendor/shared/connectDiscovery.js
npm notice 9.6kB dist/vendor/shared/cronSchedule.js
npm notice 254B dist/vendor/shared/demoMode.js
npm notice 4.3kB dist/vendor/shared/desktopPairing.js
npm notice 481B dist/vendor/shared/desktopTokenRevocation.js
npm notice 8.9kB dist/vendor/shared/events.js
npm notice 13.3kB dist/vendor/shared/extensionLibrary.js
npm notice 703B dist/vendor/shared/extensionOAuth.js
npm notice 4.0kB dist/vendor/shared/extensionPackages.js
npm notice 2.9kB dist/vendor/shared/extensionProfiles.js
npm notice 2.7kB dist/vendor/shared/fleetData.js
npm notice 2.5kB dist/vendor/shared/githubAppManifest.js
npm notice 1.6kB dist/vendor/shared/githubAuthMode.js
npm notice 2.0kB dist/vendor/shared/githubEventIntakeMode.js
npm notice 12.8kB dist/vendor/shared/goalBlockers.js
npm notice 6.0kB dist/vendor/shared/goalCheckpoints.js
npm notice 4.0kB dist/vendor/shared/goalCreation.js
npm notice 5.2kB dist/vendor/shared/goalWait.js
npm notice 14.6kB dist/vendor/shared/index.js
npm notice 214B dist/vendor/shared/instanceAuthorization.js
npm notice 54B dist/vendor/shared/instanceCatalog.js
npm notice 584B dist/vendor/shared/instanceStorage.js
npm notice 4.0kB dist/vendor/shared/intakeModePrerequisites.js
npm notice 2.9kB dist/vendor/shared/labelUtils.js
npm notice 22.9kB dist/vendor/shared/modelDefinitions.js
npm notice 3.5kB dist/vendor/shared/notificationLinks.js
npm notice 51.3kB dist/vendor/shared/notifications.js
npm notice 2.9kB dist/vendor/shared/openCodeCompatibility.js
npm notice 16.9kB dist/vendor/shared/planItemGraph.js
npm notice 7.5kB dist/vendor/shared/previewStorage/v1.js
npm notice 866B dist/vendor/shared/projectSlug.js
npm notice 3.8kB dist/vendor/shared/proprCompatibility.js
npm notice 884B dist/vendor/shared/proprRuntimePaths.js
npm notice 13.0kB dist/vendor/shared/proprServiceUrls.js
npm notice 17.0kB dist/vendor/shared/prTemplate.js
npm notice 6.9kB dist/vendor/shared/prTitleStatusSlot.js
npm notice 2.2kB dist/vendor/shared/publishedVisualPreviews.js
npm notice 3.0kB dist/vendor/shared/reasoningLevels.js
npm notice 1.8kB dist/vendor/shared/repositoryEvents.js
npm notice 6.7kB dist/vendor/shared/repositoryEventWait.js
npm notice 1.2kB dist/vendor/shared/repositoryIcon.js
npm notice 1.4kB dist/vendor/shared/repositoryIconUrl.js
npm notice 3.9kB dist/vendor/shared/repositoryPresentation.js
npm notice 10.4kB dist/vendor/shared/reviewContextBudget.js
npm notice 5.8kB dist/vendor/shared/reviewFeedbackIds.js
npm notice 2.7kB dist/vendor/shared/reviewPrompt.js
npm notice 907B dist/vendor/shared/runCostCap.js
npm notice 861B dist/vendor/shared/sessionSecret.js
npm notice 392B dist/vendor/shared/sqliteTimestamp.js
npm notice 603B dist/vendor/shared/statusKeys.js
npm notice 7.5kB dist/vendor/shared/syntheticAgents.js
npm notice 2.2kB dist/vendor/shared/taskIdentifiers.js
npm notice 2.0kB dist/vendor/shared/taskLifecycle.js
npm notice 733B dist/vendor/shared/taskReplacement.js
npm notice 957B dist/vendor/shared/text.js
npm notice 2.6kB dist/vendor/shared/tokenOutlierSettings.js
npm notice 1.9kB dist/vendor/shared/ultrafixCycle.js
npm notice 1.8kB dist/vendor/shared/unfinishedRun.js
npm notice 9.8kB dist/vendor/shared/usageTips.catalog.json
npm notice 5.0kB dist/vendor/shared/usageTips.js
npm notice 335B dist/vendor/shared/usageTypes.js
npm notice 1.1kB dist/vendor/shared/userWhitelist.js
npm notice 758B dist/vendor/shared/validateRelayUrl.js
npm notice 2.2kB dist/vendor/shared/validateRoutingUrl.js
npm notice 7.1kB dist/vendor/shared/visualPreviewCapacity.js
npm notice 9.3kB dist/vendor/shared/voice.js
npm notice 222B dist/vendor/shared/workEvidence.js
npm notice 828B package.json
npm notice Tarball Details
npm notice name: propr-cli
npm notice version: 0.9.3
npm notice filename: propr-cli-0.9.3.tgz
npm notice package size: 550.9 kB
npm notice unpacked size: 2.2 MB
npm notice shasum: c3ad2d96b091203093d23049414d7e996390d1c7
npm notice integrity: sha512-e4m+wXDnXk+PD[...]tcgd8u52JMZIw==
npm notice total files: 222
npm notice
propr-cli-0.9.3.tgz

Dry run only. Re-run with --publish to publish to npm.
✅ propr-cli release package verified
Starting changed-area validation process...
Reusing this job's @propr/shared build from CLI packaging.
Reusing this job's @propr/local-setup build from CLI packaging.

--- Core Service: Lint & Build ---
✅ Core Lint passed
❌ Core Source Build FAILED

> [email protected] build
> tsc

packages/api/routes/liveDetailsOutputParsers.ts(119,17): error TS2323: Cannot redeclare exported variable 'parsePiOutputToConversationResult'.
packages/api/routes/liveDetailsOutputParsers.ts(119,17): error TS2393: Duplicate function implementation.
packages/api/routes/liveDetailsOutputParsers.ts(170,17): error TS2323: Cannot redeclare exported variable 'parsePiOutputToConversationResult'.
packages/api/routes/liveDetailsOutputParsers.ts(170,17): error TS2393: Duplicate function implementation.

--- API: Build & Lint ---
❌ API Build FAILED

> @propr/[email protected] build
> tsc

routes/liveDetailsOutputParsers.ts(119,17): error TS2323: Cannot redeclare exported variable 'parsePiOutputToConversationResult'.
routes/liveDetailsOutputParsers.ts(119,17): error TS2393: Duplicate function implementation.
routes/liveDetailsOutputParsers.ts(170,17): error TS2323: Cannot redeclare exported variable 'parsePiOutputToConversationResult'.
routes/liveDetailsOutputParsers.ts(170,17): error TS2393: Duplicate function implementation.
npm error Lifecycle script `build` failed with error:
npm error code 2
npm error path /home/runner/work/propr/propr/packages/api
npm error workspace @propr/[email protected]
npm error location /home/runner/work/propr/propr/packages/api
npm error command failed
npm error command sh -c tsc

--- API Reference: OpenAPI Spec & Client Contract ---
✅ OpenAPI spec is current and valid
✅ @propr/client matches the OpenAPI spec

--- Stage outcomes ---
Workflow lint: success
Release shell lint: success
Pre-setup gate: skipped
Node setup: success
Toolchain: success
Dependency install: success
Release metadata: success
CLI packaging: success
Change detection: success
Changed-area checks: failure
Chromium install: skipped
PWA and mobile browser smoke: skipped

View Workflow

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit b44b8d5

Processed 2 comments:

  • Comment 1 by @propr-dev[bot] (ID: 7227181093✓)
  • Comment 2 by @github-actions[bot] (ID: 7227181488✓)

Summary of Changes

I fixed the Validate Changes failure: the Core source build and the API build both pass again.

Cause: When the epic branch was merged into this PR, packages/api/routes/liveDetailsOutputParsers.ts ended up with two exported functions named parsePiOutputToConversationResult. The epic's version uses core's parsePiConversationLog; this PR's version used the Redis live-view parser. TypeScript rejects the duplicate, so both builds failed.

Fix: I kept the epic's version and deleted this PR's duplicate, plus its parseRedisOutput import, which nothing else in the file used. The epic's version names MCP tools <server>/<tool> and lists the calls a codemode script makes as their own tool events, and its tests in packages/api/test/liveDetailsPiParser.test.ts check for exactly that. The live-details route still sends 'pi' stored output to this function.

What changes for this PR: Saved Pi output is no longer read by the same parser as the live view. Reading the stream one record at a time still gives the same events as one full read, but that test only covers the live-view parser.

Checks run:

  • The repo build and the packages/api typecheck pass after rebuilding shared and core.
  • These test suites pass: liveDetailsPiParser, liveOutputPi, test/redisOutputParser and the liveDetails* suites.
  • ESLint passes on the edited file with zero warnings.

This is a backend build fix with nothing visible to a user, so there are no preview images.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/api/routes/liveDetailsOutputParsers.ts (+0/−14)
  • Low risk: none

Diff size: 1 file changed, +0/−14 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-dev[bot], @github-actions[bot]
  • Time: 5m 22s
  • Tokens: 459,373 (456,744 in / 2,629 out)
  • Cost: $0.43

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment IDs: 7227181093✓, 7227181488✓

I fixed the Validate Changes failure: the Core source build and the API build both pass again.

**Cause:** When the epic branch was merged into this PR, `packages/api/routes/liveDetailsOutputParsers.ts` ended up with two exported functions named `parsePiOutputToConversationResult`. The epic's version uses core's `parsePiConversationLog`; this PR's version used the Redis live-view parser. TypeScript rejects the duplicate, so both builds failed.

**Fix:** I kept the epic's version and deleted this PR's duplicate, plus its `parseRedisOutput` import, which nothing else in the file used. The epic's version names MCP tools `<server>/<tool>` and lists the calls a `codemode` script makes as their own tool events, and its tests in `packages/api/test/liveDetailsPiParser.test.ts` check for exactly that. The live-details route still sends `'pi'` stored output to this function.

**What changes for this PR:** Saved Pi output is no longer read by the same parser as the live view. Reading the stream one record at a time still gives the same events as one full read, but that test only covers the live-view parser.

**Checks run:**
- The repo build and the `packages/api` typecheck pass after rebuilding shared and core.
- These test suites pass: `liveDetailsPiParser`, `liveOutputPi`, `test/redisOutputParser` and the `liveDetails*` suites.
- ESLint passes on the edited file with zero warnings.

This is a backend build fix with nothing visible to a user, so there are no preview images.

PR: #3856
Comment by: @propr-dev[bot] (ID: 7227181093)
Comment by: @github-actions[bot] (ID: 7227181488)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds Pi streaming projection, tool-result deduplication, usage accumulation, and format detection. It needs a localized correction before merge: a watcher joining after retention can publish the same assistant block under two different IDs.

✅ Tool-result deduplication — All three Pi result representations converge on a call-keyed result, with a synthesized tool-use event when necessary.

✅ Retention regression coverage — Tests compare completed events across uninterrupted, full, and retained reads, including reasoning blocks and errors.

The supplied current-head status reports no failed checks and three pending. This review used static analysis only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F3: 🔴 Retained streaming blocks change identity

  • Category: correctness

  • Required behavior: A pending assistant block must retain its identity when completed, including when a watcher starts from retained output, so the UI updates the existing event instead of duplicating it.

  • Evidence: packages/api/services/redisOutputParserPi.ts, processMessageUpdate, processAssistantMessageEnd, and emitBlock.

    1. Redis retention removes an assistant message’s message_start; a new watcher reads a retained text_delta before that message finishes.
    2. The Pi parser has no messageId, but publishes pending content. createRedisOutputProjection.feed assigns the delta record’s offset as its fallback key. The watcher sends this pending event to the UI.
    3. The subsequent assistant message_end supplies its timestamp. processAssistantMessageEnd sets messageId, and emitBlock now emits the completed block under pi:block:<timestamp>:<index>, rather than the previously published offset key.
    4. The supplied UI consumer, appendUniqueEvents, sees a new ID and appends the completed event. The earlier partial event remains visible as a duplicate.

    The retained-read tests include message_end before inspecting output; they never publish the unidentified pending event and then finish it in a later read. Consequently, their final-output equality assertions do not prevent this sequence. static trace: followed retained projection initialization, pending-key assignment, watcher publication, completion, and UI ID-based merging through the supplied code.

  • Minimum fix: Prevent an unidentified pending block from being published under an ID that completion replaces. A localized solution is to retain its buffer without publishing it until its message identity is available. Add a regression that publishes a retained mid-message snapshot and then feeds message_end separately.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Compare live and stored parser semantics

The new parser duplicates some tool, content, and usage handling already present in the core Pi parser used by stored-output routes. Shared fixtures comparing both paths would help prevent drift, particularly for nested calls and readable MCP tool names. This is optional maintenance work; separate streaming state is justified, and the supplied excerpts do not establish another concrete regression.

Score

The implementation has useful coverage and no reported current check failures, but the retained-stream identity defect can leave duplicate narration in the live UI. The correction should be localized.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 46s
  • Tokens: 67,140 (66,049 in / 1,091 out)
  • Cost: $0.58

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F3 S3

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 3216091

Addressed 1 AI review comment (IDs: 7227570188)

Addressed finding F3

Summary of Changes

I fixed F3: a Pi text or thinking block no longer shows up twice in the live view when a watcher starts reading after retention has trimmed that message's message_start.

The fix (packages/api/services/redisOutputParserPi.ts, processMessageUpdate): while the parser doesn't know which message a block belongs to, it keeps buffering the deltas but no longer shows them as the pending message. Before, the block was shown under the offset of the delta record, and message_end then emitted it under pi:block:<timestamp>:<index>. appendUniqueEvents treated that as a new event, so the UI showed both. Now the first time the block appears is at message_end, under its block key, the same as a full read. When the message identity is known, the block still streams under its block key and keeps that ID when it completes.

Same defect elsewhere: the only place the Pi parser shows a pending block is processMessageUpdate. The fix also covers a message_start that has no timestamp, which hit the same duplicate before. With pending blocks now always keyed, the branch that dropped an unkeyed earlier block on a block switch couldn't run any more, so I removed it. I also reworded one doc comment on emitBlock to match.

Regression test (packages/api/test/liveOutputPi.test.ts): a watcher's first read starts at a delta (or at thinking_end, or mid-text-delta) and stops before message_end. The test checks that nothing is published and nothing is pending. It then feeds message_end as a separate read and checks that the completed blocks come out under the same IDs a full read gives, with no ID repeated. Against the HEAD parser it fails at "the read from record 3 publishes no unidentified block"; with the fix it passes.

Trade-off: when a watcher joins a message part-way through, that message's text stays hidden until it finishes, instead of streaming in from the first retained delta. Messages the watcher sees from their start stream exactly as before.

Verification:

  • liveOutputPi passes, 4 of 4.
  • test/redisOutputParser.test.ts passes, 22 of 22.
  • liveDetailsPiParser, liveOutputIdentity, liveOutputRetention, liveOutputStream and agentStreamProjection all pass.
  • API tsc --noEmit and eslint with --max-warnings 0 on the changed files are clean.
  • liveOutputTimestamps ran 0 tests because it needs a real Redis server.

I didn't capture a preview: the change is visible in the live view, but there's no Redis server here to run the UI against a trimmed Pi stream. The manifest suggests adding redis-server to the agent image.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/api/services/redisOutputParserPi.ts (+8/−8)
  • Low risk (1 file)
    • packages/api/test/liveOutputPi.test.ts (+42/−0)

Diff size: 2 files changed, +50/−8 lines

Visual preview

Suggested agent tools

  • redis-server in the agent image: The Pi live view reads Redis live-output keys with retention; without a Redis server the API and task details page cannot be run against a trimmed Pi stream to show that a streaming block no longer appears twice.

🤖 Implementation Details

  • Model: Claude Opus 5.5 (high)
  • Requested By: @propr-ultrafix
  • Time: 6m 9s
  • Tokens: 1,024,551 (1,015,782 in / 8,769 out)
  • Cost: $0.67

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

@integry

integry commented Nov 27, 2026

Copy link
Copy Markdown
Owner

F1, F2 and F3 are three cases of one design gap: live event IDs depend on where a reader starts in the Redis stream. Each fix closed one case and the next review found another. Please fix the whole class in one change:

ID rule: derive every live event ID only from data carried by the record itself. Never use parse order, counters or "first seen" state.

  • Tool events: toolCallId. tool_execution_start/_update/_end and the toolResult message all carry it, so a call and its result always share one ID, whatever line a read starts on.
  • Assistant text and thinking blocks: the assistant message identity plus contentIndex.
    • The message identity is message.timestamp, or responseId once known. message_start carries the timestamp; message_end carries the timestamp and responseId.
    • Pi's wire message_update records are delta-only and carry no message identity. So deltas seen before the identity is known (a read that starts mid-message after retention) must stay buffered and unpublished until message_end supplies it, as F3 suggests. Then they publish once, under the final ID.
  • Final text: text_end/thinking_end/message_end replace the buffered content under the same ID; they never add a second event.

One test covering all cases: take the real stream fixture (test/fixtures/pi/pi-1.6.1-json-tool-task.jsonl, plus a fixture with several streamed text and thinking deltas). For every start offset i (simulating retention trimming everything before line i), parse lines i..end and assert:

  1. every event ID it produces also appears in the uninterrupted parse;
  2. no ID appears twice;
  3. each tool result's ID equals its tool call's ID, and every completed assistant block has the same ID and final text as in the uninterrupted parse.

Also combine an incremental read (lines 0..k) with a later retained read (j..end, where j ≤ k) and assert that the merged set has no duplicates.

This replaces the one-off F1/F2/F3 regressions, which can stay, and should stop further identity findings of this kind.

I fixed F3: a Pi text or thinking block no longer shows up twice in the live view when a watcher starts reading after retention has trimmed that message's `message_start`.

**The fix** (`packages/api/services/redisOutputParserPi.ts`, `processMessageUpdate`): while the parser doesn't know which message a block belongs to, it keeps buffering the deltas but no longer shows them as the pending message. Before, the block was shown under the offset of the delta record, and `message_end` then emitted it under `pi:block:<timestamp>:<index>`. `appendUniqueEvents` treated that as a new event, so the UI showed both. Now the first time the block appears is at `message_end`, under its block key, the same as a full read. When the message identity is known, the block still streams under its block key and keeps that ID when it completes.

**Same defect elsewhere:** the only place the Pi parser shows a pending block is `processMessageUpdate`. The fix also covers a `message_start` that has no timestamp, which hit the same duplicate before. With pending blocks now always keyed, the branch that dropped an unkeyed earlier block on a block switch couldn't run any more, so I removed it. I also reworded one doc comment on `emitBlock` to match.

**Regression test** (`packages/api/test/liveOutputPi.test.ts`): a watcher's first read starts at a delta (or at `thinking_end`, or mid-text-delta) and stops before `message_end`. The test checks that nothing is published and nothing is pending. It then feeds `message_end` as a separate read and checks that the completed blocks come out under the same IDs a full read gives, with no ID repeated. Against the HEAD parser it fails at "the read from record 3 publishes no unidentified block"; with the fix it passes.

**Trade-off:** when a watcher joins a message part-way through, that message's text stays hidden until it finishes, instead of streaming in from the first retained delta. Messages the watcher sees from their start stream exactly as before.

**Verification:**
- `liveOutputPi` passes, 4 of 4.
- `test/redisOutputParser.test.ts` passes, 22 of 22.
- `liveDetailsPiParser`, `liveOutputIdentity`, `liveOutputRetention`, `liveOutputStream` and `agentStreamProjection` all pass.
- API `tsc --noEmit` and eslint with `--max-warnings 0` on the changed files are clean.
- `liveOutputTimestamps` ran 0 tests because it needs a real Redis server.

I didn't capture a preview: the change is visible in the live view, but there's no Redis server here to run the UI against a trimmed Pi stream. The manifest suggests adding `redis-server` to the agent image.

PR: #3856
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 2e29174

Summary of Changes

Every Pi live event ID now comes only from data in the record itself, and one test checks every start line of each stream. The new and existing Pi tests pass, along with the nearby live-output and live-details suites, API lint (--max-warnings 0) and API typecheck.

The fix (packages/api/services/redisOutputParserPi.ts)

  • Tool calls and results: both are keyed by toolCallId. The parser no longer uses per-record slot numbers, so how many earlier copies a read saw can't shift an ID.
  • Text and thinking blocks: keyed by message identity plus contentIndex. The identity is message.timestamp, falling back to responseId only when there's no timestamp. I put the timestamp first because the captured fixtures reuse responseId: "c1" for every message, so responseId alone would collide.
  • Deltas before the identity is known: they stay buffered and unpublished until message_end, which publishes each block once under its final ID. When the identity is known, text_end/thinking_end publish the block under the ID it streamed under, and message_end doesn't add a second copy.
  • Two more start-dependent paths, now removed:
    • If a new block or a new message started before the previous block ended, the parser used to publish that block's partial text. Its content then depended on how many deltas a read had seen. Now the block stays buffered until message_end supplies the final text, and a message that never ends is not published.
    • The "Pi stopped (error)" note is now keyed by its message identity instead of its position in the record.

The test (packages/api/test/liveOutputPi.test.ts) runs on three streams:

  • the captured pi-1.6.1-json-tool-task.jsonl.
  • a new fixture, test/fixtures/pi/pi-1.6.1-json-streamed-blocks.jsonl, with several thinking and text deltas, a tool call, and an error stop. I built it by hand from the shapes in the 1.6.1 captures; it is not a real capture.
  • an irregular stream: a block starting before the previous one ended, a message that never ends, and one without a timestamp.

For every start line i, it checks your three conditions. It also feeds lines 0..k to a line-by-line watcher, merges the result with a read from every j ≤ k, and checks that nothing appears under two IDs. The F1/F2/F3 regressions are still there.

Three caveats:

  • "A tool result's ID equals its call's ID": I read this as both IDs derived from the same toolCallId (…:tool_use:external:<id> and …:pi:tool_result:<id>:0). Making them literally the same string would break your "no ID appears twice" rule, since a call and its result are separate events. The test checks that both extract to the result's toolUseId.
  • The old parser passes on both real fixtures. After F1–F3 it was already consistent on those streams; only the irregular stream makes it fail, at line 2. The new parser passes all three.
  • Unstamped messages: in the irregular stream, a message with no timestamp shows the time of the last stamped record, which depends on where the read started. Its ID and text are stable, so the test skips the time check for that stream only. Pi stamps every message, so this doesn't come up with real output.

Not run: 17 tests in the neighbouring suites were skipped because they need a running Redis server, which this container doesn't have; they only cover other agents' streams. I made no preview images, because this change has no visible effect in the UI.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/api/services/redisOutputParserPi.ts (+44/−48)
  • Low risk (2 files)
    • packages/api/test/liveOutputPi.test.ts (+144/−0)
    • test/fixtures/pi/pi-1.6.1-json-streamed-blocks.jsonl (added, +51/−0)

Diff size: 3 files changed, +239/−48 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 12m 10s
  • Tokens: 2,894,134 (2,863,312 in / 30,822 out)
  • Cost: $1.70

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7227626300✓

Every Pi live event ID now comes only from data in the record itself, and one test checks every start line of each stream. The new and existing Pi tests pass, along with the nearby live-output and live-details suites, API lint (`--max-warnings 0`) and API typecheck.

**The fix** (`packages/api/services/redisOutputParserPi.ts`)
- **Tool calls and results:** both are keyed by `toolCallId`. The parser no longer uses per-record slot numbers, so how many earlier copies a read saw can't shift an ID.
- **Text and thinking blocks:** keyed by message identity plus `contentIndex`. The identity is `message.timestamp`, falling back to `responseId` only when there's no timestamp. I put the timestamp first because the captured fixtures reuse `responseId: "c1"` for every message, so `responseId` alone would collide.
- **Deltas before the identity is known:** they stay buffered and unpublished until `message_end`, which publishes each block once under its final ID. When the identity is known, `text_end`/`thinking_end` publish the block under the ID it streamed under, and `message_end` doesn't add a second copy.
- **Two more start-dependent paths, now removed:**
  - If a new block or a new message started before the previous block ended, the parser used to publish that block's partial text. Its content then depended on how many deltas a read had seen. Now the block stays buffered until `message_end` supplies the final text, and a message that never ends is not published.
  - The "Pi stopped (error)" note is now keyed by its message identity instead of its position in the record.

**The test** (`packages/api/test/liveOutputPi.test.ts`) runs on three streams:
- the captured `pi-1.6.1-json-tool-task.jsonl`.
- a new fixture, `test/fixtures/pi/pi-1.6.1-json-streamed-blocks.jsonl`, with several thinking and text deltas, a tool call, and an error stop. I built it by hand from the shapes in the 1.6.1 captures; it is not a real capture.
- an irregular stream: a block starting before the previous one ended, a message that never ends, and one without a timestamp.

For every start line `i`, it checks your three conditions. It also feeds lines `0..k` to a line-by-line watcher, merges the result with a read from every `j ≤ k`, and checks that nothing appears under two IDs. The F1/F2/F3 regressions are still there.

Three caveats:
- **"A tool result's ID equals its call's ID":** I read this as both IDs derived from the same `toolCallId` (`…:tool_use:external:<id>` and `…:pi:tool_result:<id>:0`). Making them literally the same string would break your "no ID appears twice" rule, since a call and its result are separate events. The test checks that both extract to the result's `toolUseId`.
- **The old parser passes on both real fixtures.** After F1–F3 it was already consistent on those streams; only the irregular stream makes it fail, at line 2. The new parser passes all three.
- **Unstamped messages:** in the irregular stream, a message with no timestamp shows the time of the last stamped record, which depends on where the read started. Its ID and text are stable, so the test skips the time check for that stream only. Pi stamps every message, so this doesn't come up with real output.

Not run: 17 tests in the neighbouring suites were skipped because they need a running Redis server, which this container doesn't have; they only cover other agents' streams. I made no preview images, because this change has no visible effect in the UI.

PR: #3856
Comment by: @integry (ID: 7227626300)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds Pi streaming projection with buffered text and reasoning, paired tool events, and accumulated usage. It is merge-ready within the reviewed scope, conditional on the remaining test shard passing.

✅ Stable event identities — Tool events use call IDs, while assistant blocks use message identity and content index. The added tests cover incremental reads and retention boundaries.

✅ Duplicate result suppression — Results repeated through execution events, tool-result messages, and turn-end records share a deduplication set.

✅ Transcript routing protection — Both batch parsing and live projection bypass the Vibe transcript scan when Pi records are detected.

This review used static tracing of the supplied code; no commands or tests were run. The authoritative current checks report no failures, with one test shard pending.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S4: 🟢 Align live tool-name presentation

The new parser’s emitToolUse publishes the raw Pi tool name, whereas the existing stored-output parser uses readablePiToolName; the supplied integration tests expect readable MCP names such as propr_repository/read_repository_file. Reusing that normalization would make live and stored views more consistent. This is an optional presentation improvement; the new parser preserves call identity and result pairing.

S5: 🟢 Share small protocol helpers

count, contentText, timestamp conversion, and usage mapping overlap with helpers in the existing core Pi parser. Sharing these small protocol conversions would reduce future drift while preserving the separate state machines needed for streaming and stored-output processing. This cleanup is optional; the supplied implementations currently agree on the relevant conversions.

Score

The implementation covers the principal streaming and retention invariants with substantial targeted tests. Static review found no verified merge blocker, and current checks have no failures.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 41s
  • Tokens: 71,066 (70,321 in / 745 out)
  • Cost: $0.63

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S4 S5

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 27, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3834 by Claude Opus 5.5] Pi: live view and stored output parsing ✅❽ [3834 by Claude Opus 5.5] Pi: live view and stored output parsing Nov 27, 2026
@integry
integry merged commit 04e22e2 into 3831-epic-pi-coding-jml Nov 27, 2026
42 checks passed
@propr-dev propr-dev Bot changed the title ✅❽ [3834 by Claude Opus 5.5] Pi: live view and stored output parsing [3834 by Claude Opus 5.5] Pi: live view and stored output parsing Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant