Skip to content

fix: preserve completed chat responses after stream retry - #6302

Closed
ironloopai[bot] wants to merge 2 commits into
mainfrom
ironloop/issue-6189-0eb951d56f24
Closed

ironloopai[bot] wants to merge 2 commits into
mainfrom
ironloop/issue-6189-0eb951d56f24

Conversation

@ironloopai

@ironloopai ironloopai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat a received final reply as successful completion for its run.
  • Ignore a trailing retryable stream/replay error for that completed run.
  • Add regression coverage for final_reply followed by replay_unavailable.

Validation

  • corepack pnpm lint
  • corepack pnpm test
  • corepack pnpm build
  • scripts/pre-commit-safety.sh

Rust crate tests were attempted but the environment has no cc linker. This is a frontend-only state-handling change; reverting the commit restores prior behavior.


Closes #6189.

Opened by IronLoop after verifying the local implementation branch.

@ironloopai

ironloopai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor Author

🔎 IronLoop Review Status

Head: 2783c1296c348755eca53ee524e4088ff31ac3f2
Result: 1/1 reviewers completed without blocking findings.
Next: Ready for normal human review and CI checks.
Updated: 2026-07-21T17:58:38.537Z

Current reviewers:

Reviewer State Verdict Findings Last update
ironloop/common-reviewer (reviewer) Completed Approved 0 blocking findings / 0 notes 2026-07-21T17:58:38.530Z
Reviewer summaries
Reviewer Detail
ironloop/common-reviewer (reviewer) Approved; 0 blocking findings; Focused 48-line frontend change correctly settles a received final reply, preserving it through a retryable replay error and triggering the existing durable timeline refresh.
Recent activity
Time Reviewer State Detail
2026-07-20T08:36:33.612Z ironloop/common-reviewer (reviewer) Deduplicated Repeated trigger reused the existing reviewer job.
2026-07-21T17:51:42.358Z ironloop/common-reviewer (reviewer) Superseded A newer PR head replaced this review (2783c12).
2026-07-21T17:51:42.663Z ironloop/common-reviewer (reviewer) Queued Accepted review request for head 2783c12.
2026-07-21T17:51:42.663Z ironloop/common-reviewer (reviewer) Queued Waiting for this reviewer lane to become available.
2026-07-21T17:55:38.390Z ironloop/common-reviewer (reviewer) Started Reviewer worker started.
2026-07-21T17:55:41.804Z ironloop/common-reviewer (reviewer) Workspace ready Prepared isolated checkout (head_ref) at 2783c12.
2026-07-21T17:58:38.530Z ironloop/common-reviewer (reviewer) Result captured Approved; 0 blocking findings.
2026-07-21T17:58:38.530Z ironloop/common-reviewer (reviewer) Completed Review completed and terminal status was persisted.
Available commands
  • @ironloopai help
  • @ironloopai agents
  • @ironloopai review
  • @ironloopai review --agent <agent>
Run metadata

Admission: webhook accepted the request and IronLoop persisted reviewer state before this projection.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6302 July 20, 2026 02:44 Destroyed
@github-actions github-actions Bot added size: S 10-49 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: experienced 6-19 merged PRs labels Jul 20, 2026

@ironloopai ironloopai Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ IronLoop Review: reviewer

Review at a glance

Verdict Blocking Notes Inline Head
✅ Approved 0 0 0 dbf1a3485208

Head: dbf1a34852082673a7f1c25a18887ee0984c7401
Next: No reviewer action needed.

Run details

Status: Current
Needs human: no
Needs validation: no

Summary

Approved. Focused two-file frontend state-handling change correctly treats final replies as successful terminal completion and covers the trailing retryable replay-error regression.

Findings

None.

Developer follow-up

After fixing this feedback:

  1. Push the fix to this PR branch.
  2. Re-run this reviewer with @ironloopai review --agent reviewer if you only changed this reviewer's findings.
  3. Re-run all reviewers with @ironloopai review when the fix may affect multiple areas.

@railway-app

railway-app Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the ironclaw-pr-6302 environment in ironclaw-ci-preview

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 21, 2026 at 6:13 pm

@github-actions

github-actions Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Coverage ratchet

Ratchet mode: ENFORCING

RATCHET PASS: global
  observed: 86.33% (320358 / 371078 lines)
  floor:    85.3% (tolerance 0.5pp -> effective floor 84.8%)
  denominator: 371078 lines now vs 320188 at floor capture (+50890 lines, +15.89%) — material change (>5%)

⚠️ 2 Reborn crate(s) have 0 int-tier coverage (target: 0) — ironclaw_prompt_envelope, ironclaw_scripts

Reborn integration-tier coverage

Line coverage (Reborn crates): 86.33% — 320358 / 371078 lines

Per-crate breakdown (65 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 345
ironclaw_event_projections 43.31% 673 / 1554
ironclaw_observability 61.54% 16 / 26
ironclaw_channel_host 62.08% 185 / 298
ironclaw_authorization 62.46% 604 / 967
ironclaw_dispatcher 62.88% 83 / 132
ironclaw_mcp 65.63% 611 / 931
ironclaw_filesystem 66.93% 4137 / 6181
ironclaw_memory 69.2% 773 / 1117
ironclaw_reborn_migration 72.48% 2510 / 3463
ironclaw_trust 72.88% 661 / 907
ironclaw_capabilities 74.59% 2516 / 3373
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_extractors 74.72% 538 / 720
ironclaw_projects 76.48% 400 / 523
ironclaw_reborn_cli 76.64% 9897 / 12914
ironclaw_triggers 77.33% 2531 / 3273
ironclaw_llm 78.43% 20568 / 26224
ironclaw_product_context 78.57% 11 / 14
ironclaw_wasm_product_adapters 80.36% 1448 / 1802
ironclaw_process_sandbox 80.65% 671 / 832
ironclaw_first_party_extensions 81.06% 5965 / 7359
ironclaw_memory_native 81.17% 3195 / 3936
ironclaw_events 81.95% 1594 / 1945
ironclaw_telegram_extension 82.04% 4404 / 5368
ironclaw_network 82.98% 673 / 811
ironclaw_reborn_event_store 83.03% 1169 / 1408
ironclaw_reborn_identity 83.59% 433 / 518
ironclaw_processes 83.76% 939 / 1121
ironclaw_secrets 83.8% 2550 / 3043
ironclaw_wasm 84.44% 1069 / 1266
ironclaw_reborn_config 84.66% 2152 / 2542
ironclaw_product_workflow 84.89% 11373 / 13397
ironclaw_auth 84.97% 3279 / 3859
ironclaw_run_state 85.61% 458 / 535
ironclaw_channel_delivery 86.11% 1383 / 1606
ironclaw_common 86.66% 1741 / 2009
ironclaw_threads 87.08% 4844 / 5563
ironclaw_skills 87.6% 4471 / 5104
ironclaw_slack_v2_adapter 87.89% 2024 / 2303
ironclaw_extensions 87.93% 2913 / 3313
ironclaw_host_api 87.97% 4645 / 5280
ironclaw_product_adapter_registry 88.06% 531 / 603
ironclaw_product_adapters 88.1% 3384 / 3841
ironclaw_reborn_traces 88.2% 11946 / 13544
ironclaw_turns 88.49% 14409 / 16284
ironclaw_hooks 88.62% 9597 / 10829
ironclaw_reborn_openai_compat 88.79% 3778 / 4255
ironclaw_host_runtime 88.89% 17766 / 19987
ironclaw_webui 89.41% 7768 / 8688
ironclaw_reborn_composition 89.53% 73218 / 81776
ironclaw_telegram_v2_adapter 89.65% 2712 / 3025
ironclaw_approvals 90.18% 1598 / 1772
ironclaw_conversations 90.39% 3123 / 3455
ironclaw_event_streams 90.82% 1009 / 1111
ironclaw_runner 91.2% 17007 / 18649
ironclaw_resources 91.67% 4477 / 4884
ironclaw_loop_host 92.29% 16101 / 17447
ironclaw_attachments 93.06% 630 / 677
ironclaw_agent_loop 94.81% 9467 / 9985
ironclaw_safety 95.15% 3749 / 3940
ironclaw_outbound 95.52% 3451 / 3613
ironclaw_first_party_extension_ports 95.62% 3672 / 3840
ironclaw_runtime_policy 96.55% 811 / 840

This table itself is informational and never gates the PR on its own — not the percentage, not the per-crate holes, not the 0-coverage callout. A separate coverage ratchet (dry-run until enforce=true; see tests/integration/coverage-floor.toml) can fail the build on specific configured floors.

Exemptions (3 entry/entries excluded from the accounting above)
Module / Crate Reason Issue
crate: ironclaw_embeddings v1-only: consumed only by root ironclaw (src/app.rs, src/tools/builtin/memory.rs, src/workspace/mod.rs, src/config/{mod,embeddings}.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_gateway v1-only: consumed only by root ironclaw (src/channels/web/platform/static_files.rs, src/channels/web/handlers/frontend.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_tui v1-only: consumed only by root ironclaw (src/main.rs, src/channels/tui.rs); no crates/* dependents. Crate's own doc comment confirms it bridges INTO v1, not Reborn. Covered by "Tests (Legacy)". #5657

@serrrfirat
serrrfirat marked this pull request as ready for review July 20, 2026 08:36
@think-in-universe

Copy link
Copy Markdown
Collaborator

@ironloopai resolve

@ironloopai

ironloopai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor Author

🔧 IronLoop Resolve Status

Issue: #6302
Current step: At least one resolve job failed.
Next: Check the failed row, adjust the request if needed, then re-run the command.
Updated: 2026-07-21T18:54:16.406Z

Current resolve:

Developer State Branch Result Last update
ironloop/small-fix-resolver (resolver) Failed ironloop/issue-6189-0eb951d56f24 IronLoop hit an unexpected runtime failure. Phase: developer.running. Retryable after the next step. Next: Inspect server logs with the job id, then retry after correcting the cause. 2026-07-21T18:54:15.321Z
Recent activity

Each row is one developer job. Phase details below belong to that job.

Developer Current state Branch Last update Latest phase
ironloop/small-fix-resolver (resolver) Failed ironloop/issue-6189-0eb951d56f24 2026-07-21T18:54:15.321Z Failed: IronLoop hit an unexpected runtime failure. CI diagnostics are insufficient to identify an actionable defect. GitHub Actions logs are inaccessible from this runtime (HTTP 403), so changing unrelated Responses API code would be speculative.
ironloop/small-fix-resolver (resolver) Failed ironloop/issue-6189-0eb951d56f24 2026-07-21T18:50:21.628Z Failed: IronLoop hit an unexpected runtime failure. The only failing CI command passed locally (16/16 exact Responses API E2E nodes). GitHub Actions detailed logs are inaccessible to this job (HTTP 403), so an attributable repair cannot be identified safely.
ironloop/small-fix-resolver (resolver) Failed ironloop/issue-6189-0eb951d56f24 2026-07-21T18:20:51.673Z Failed: IronLoop hit an unexpected runtime failure. The CI diagnostics do not identify a failing test, and GitHub job logs were unavailable (HTTP 403). Making an unrelated backend change would be speculative.
ironloop/small-fix-resolver (resolver) Failed ironloop/issue-6189-0eb951d56f24 2026-07-21T18:16:41.189Z Failed: IronLoop hit an unexpected runtime failure. The original PR commit dbf1a34 passed both Reborn E2E and Reborn WebUI v2 smoke. The current merged head fails the Responses API step in 8 seconds, but public check data provides only exit code 1 and GitHub log acces...

Phase log:

ironloop/small-fix-resolver (resolver)

Time Phase Detail
2026-07-21T18:50:27.539Z Accepted Accepted resolve request.
2026-07-21T18:50:27.539Z Queued Developer job entered the queue.
2026-07-21T18:50:27.709Z Running Worker claimed the developer job.
2026-07-21T18:50:44.135Z Running Prepared resolve workspace.
2026-07-21T18:54:15.321Z Failed IronLoop hit an unexpected runtime failure. CI diagnostics are insufficient to identify an actionable defect. GitHub Actions logs are inaccessible from this runtime (HTTP 403), so changing unrelated Responses API code would be speculative.

ironloop/small-fix-resolver (resolver)

Time Phase Detail
2026-07-21T18:20:57.488Z Accepted Accepted resolve request.
2026-07-21T18:20:57.488Z Queued Developer job entered the queue.
2026-07-21T18:20:58.381Z Running Worker claimed the developer job.
2026-07-21T18:21:14.275Z Running Prepared resolve workspace.
2026-07-21T18:50:21.628Z Failed IronLoop hit an unexpected runtime failure. The only failing CI command passed locally (16/16 exact Responses API E2E nodes). GitHub Actions detailed logs are inaccessible to this job (HTTP 403), so an attributable repair cannot be identified safely.

ironloop/small-fix-resolver (resolver)

Time Phase Detail
2026-07-21T18:16:57.559Z Accepted Accepted resolve request.
2026-07-21T18:16:57.559Z Queued Developer job entered the queue.
2026-07-21T18:16:58.187Z Running Worker claimed the developer job.
2026-07-21T18:17:14.022Z Running Prepared resolve workspace.
2026-07-21T18:20:51.673Z Failed IronLoop hit an unexpected runtime failure. The CI diagnostics do not identify a failing test, and GitHub job logs were unavailable (HTTP 403). Making an unrelated backend change would be speculative.

ironloop/small-fix-resolver (resolver)

Time Phase Detail
2026-07-21T18:10:28.129Z Accepted Accepted resolve request.
2026-07-21T18:10:28.129Z Queued Developer job entered the queue.
2026-07-21T18:10:28.969Z Running Worker claimed the developer job.
2026-07-21T18:10:44.070Z Running Prepared resolve workspace.
2026-07-21T18:16:41.189Z Failed IronLoop hit an unexpected runtime failure. The original PR commit dbf1a34 passed both Reborn E2E and Reborn WebUI v2 smoke. The current merged head fails the Responses API step in 8 seconds, but public check data provides only exit code 1 and GitHub log acces...
Available commands
  • @ironloopai help
  • @ironloopai agents
  • @ironloopai implement
  • @ironloopai implement --agent <agent>
  • @ironloopai resolve
  • @ironloopai resolve --agent <agent>
Run metadata

Admission: webhook accepted the request and IronLoop persisted developer state before this projection.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-6302 July 21, 2026 17:51 Destroyed
@github-actions github-actions Bot added size: XS < 10 changed lines (excluding docs) and removed size: S 10-49 changed lines labels Jul 21, 2026

@ironloopai ironloopai Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ IronLoop Review: reviewer

Review at a glance

Verdict Blocking Notes Inline Head
✅ Approved 0 0 0 2783c1296c34

Head: 2783c1296c348755eca53ee524e4088ff31ac3f2
Next: No reviewer action needed.

Run details

Status: Current
Needs human: no
Needs validation: no

Summary

Focused 48-line frontend change correctly settles a received final reply, preserving it through a retryable replay error and triggering the existing durable timeline refresh.

Findings

None.

Developer follow-up

After fixing this feedback:

  1. Push the fix to this PR branch.
  2. Re-run this reviewer with @ironloopai review --agent reviewer if you only changed this reviewer's findings.
  3. Re-run all reviewers with @ironloopai review when the fix may affect multiple areas.

@serrrfirat

Copy link
Copy Markdown
Collaborator

Closing as superseded. #6337 changed retryable stream errors into transport interruptions that preserve the completed response/state, and #6876 further hardened reconnect behavior, so this PR no longer needs a separate final-reply tracker.

@serrrfirat serrrfirat closed this Aug 4, 2026

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-6302 — 2783c129 Deployed Jul 21, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: experienced 6-19 merged PRs risk: low Changes to docs, tests, or low-risk modules size: XS < 10 changed lines (excluding docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retryable stream error leaves completed response in failed state

3 participants