You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "MoonOld (via GitHub)" <gi...@apache.org> on 2026/09/21 13:15:01 UTC

[PR] fix(runtime-host): log why a transcript page read failed [maka]

MoonOld opened a new pull request, #5573:
URL: https://github.com/apache/maka/pull/5573

   ## Summary
   
   `SessionContinuityCoordinator#readTranscriptPage` collapses every error that is not a `TranscriptPageRequestError` into `persistence_failed` / "Session transcript is unavailable", and **returns** it as an operation outcome. Because the handler returns instead of throwing, the `[runtime-host] unexpected <operation> failure` log in `operation-dispatcher.ts` — the only caller of `boundedFailureDiagnostic` — never runs for this operation. The cause therefore reaches neither the Runtime Host log, the desktop diagnostic report, nor the Renderer, which falls back to generic copy ("任务内容暂时无法刷新,请稍后重试。").
   
   This records the cause with `boundedFailureDiagnostic` before the generic outcome is returned. The outcome the caller receives is unchanged; the only new output is one `[runtime-host]` log line.
   
   Refs #5572
   
   ## Verification
   
   - `npm --workspace @maka/runtime-host run typecheck` — clean
   - `npx biome check` on both touched files — clean
   - `node --test packages/runtime-host/dist/__tests__/session-continuity-coordinator.test.js` — 47/47 pass
   - Fails without the change: with the source hunk reverted and the test kept, the new case fails with `AssertionError` (0 pass / 1 fail)
   
   The new test injects a reader that fails only on the page path — bootstrap requests carry no `position`, page requests always do — then asserts the generic outcome is still returned **and** that `console.error` was called exactly once with the injected cause:
   
   ```
   ✔ a failed transcript page records the underlying cause before the generic outcome
   ℹ tests 47 / pass 47 / fail 0
   ```
   
   Not run: the full workspace `test` suite.
   
   ## Review focus
   
   Whether logging directly here is right, versus routing it through `onPublicationFailure`. The sibling bootstrap path (`session-continuity-coordinator.ts:966`) calls `onPublicationFailure` under a comment saying the failure "has to leave a trace here", but that hook is wired to `context.requestDrain` (`execution-composition.ts:925`), not a logger — so no trace is emitted there either. That path is deliberately untouched here; it is context for #5572, not part of this change.
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: Maka (a DeepSeek-backed agent running in Maka Desktop) drafted the log line and the regression test, and ran the verification commands above. The root-cause analysis that motivated the change was reviewed and corrected before this PR by the author.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [ ] Yes — described under Summary above
   - [x] No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(runtime-host): log why a transcript page read failed [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #5573:
URL: https://github.com/apache/maka/pull/5573


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org