Repository navigation
fix(transcripts): keep model summary completion deadline on the monotonic clock - #185146
Conversation
…onic clock The transcript summary lane seeds its deadline with Date.now() (wall clock) and then derives the per-completion timeoutMs from that wall-clock deadline before handing it to runIsolatedCompletion, which schedules the abort on the monotonic clock. A wall-clock rewind inflates timeoutMs and lets a stalled completion run well past the 20s budget; a forward jump clamps it toward 1ms and aborts healthy summary generation. Seed, check, and remaining-budget all now use performance.now() so the deadline stays in the same clock domain as the downstream monotonic timer.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesUse a monotonic clock for the meeting-summary deadline, expiry check, and remaining completion budget. Example: The wall clock advances 30 seconds while a meeting summary is preparing its model request.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current deadline-calculation bug with a focused change and no actionable patch findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe transcript summary owner converts saved meeting utterances into model-enhanced notes, using isolated completions and retaining heuristic notes when inference fails. flowchart TD
A[Transcript summarize RPC] --> B[Capture summary owner]
B --> C[Model summary deadline]
C --> D[Utility or isolated completion]
D --> E[Model provider]
E --> B
B --> F[Saved meeting notes]
Technical reviewBest possible solution: Keep the existing summary owner and use performance.now() consistently for its process-local completion deadline. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the forward-jump failure, and the contributor supplies matching pre-fix/post-fix RPC traces and a red/green rewind regression; no target code was executed during this review. Is this the best way to solve the issue? The three substitutions repair the clock-domain invariant without new machinery; the PR's rewind-hang claim is overstated because the unchanged outer abort timer already bounds active inference. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dd1743951ddc. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +20. Total +20 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 26, 2026, 11:05 PM ET / October 27, 2026, 03:05 UTC (Revision 3). |
|
@clawsweeper re-review. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review. |
|
🦞👀 Re-review progress:
|
|
Independent proof through the built Gateway's authenticated Each leg uses a fresh Gateway process and isolated profile/state. A supported A proof-only in-memory prelude at evaluation of the real compiled The configured provider is a task-owned HTTP fixture speaking the existing OpenAI-compatible protocol. It returns fixed valid notes JSON through the real completion transport. This proves routing and persistence, not real-model inference quality; no external provider credential is involved.
The model-note marker is Important correction to the earlier impact wording: this is premature fallback after a forward step, not an unbounded rewind hang. The unchanged outer 20-second abort already bounds active inference on main. With a −30s process-local rewind and a deliberately stalled HTTP fixture, main returns heuristic notes in 20,648ms, and candidate in 20,640ms. Both make a real request; the fixed outer abort remains effective. Provider-error controls also return heuristic notes on both builds (654ms main, 619ms candidate). The heuristic overview, decisions, action items, risks, participants and utterance count are identical across all fallback legs. Title, start/stop calendar times, participants and all three utterances survive each RPC unchanged; the supported archive readback also confirms unchanged stored calendar metadata. All ten legs complete successfully. No production, prompt, schema, inference-route or timeout-policy change was needed beyond the contributor's three clock-domain substitutions. The body is being corrected to remove the unbounded-hang claim. |
|
Landed in 8cebac4. Thanks @SunnyShu0925. Transcript summaries no longer skip the model after a clock jump. |
|
@obviyus Thanks! |
…onic clock (openclaw#185146) fix(transcripts): keep the model summary completion deadline on the monotonic clock The transcript summary's model completion deadline was measured with the wall clock, so after a forward clock step it treated the deadline as already passed and fell back to heuristic notes without asking the model. The deadline now uses monotonic time. Evidence: authenticated transcripts.summarize on built Gateways with a local HTTP provider fixture and Date.now stepped forward 30 seconds inside the process only. On main no completion request was sent and heuristic notes were saved (twice); with this change one request was sent and model notes were saved (twice). No-step runs give model notes and provider errors give the same fallback on both refs; the existing 20-second outer abort still bounds a stalled request. Details: openclaw#185146 (comment). Production 6 lines. Thanks @SunnyShu0925. Co-authored-by: SunnyShu <0668000539@local> Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
A forward wall-clock correction during asynchronous transcript-summary preparation can make a healthy model-summary deadline appear already expired. The shipped
transcripts.summarizepath then skips completion and silently saves deterministic heuristic notes instead of the model-enhanced notes it would normally generate.The previous deadline used
Date.now()for an elapsed-time budget. This PR usesperformance.now()for its seed, expiry check and remaining completion budget, keeping all three reads in the same monotonic clock domain.User Impact
Healthy model notes are no longer skipped solely because the wall clock steps forward. Meeting identity, calendar metadata, participants and captured utterances remain unchanged. Provider failures and genuine timeouts still use the existing heuristic fallback.
This is not an unbounded-hang fix. A rewind can inflate the downstream timeout argument on main, but the existing fixed outer 20-second abort already bounds active inference. That timer is unchanged by this PR.
Why This Change Was Made
The summary owner's deadline is private process-local elapsed state, not a persisted calendar time. Aligning its three reads with the existing monotonic timer is the smallest complete repair: three one-line substitutions, with no new abstraction, configuration option or retry policy.
The inference route, summary prompt, heuristic fallback, saved schema, calendar timestamps and outer
MODEL_SUMMARY_TIMEOUT_MSabort remain unchanged.Evidence
Independent shipped-RPC forward-step repetitions, no-step controls, provider-error controls and bounded stalled-request proof.
Built current main
542a03d30c953964f7d4176954d09a20423c147fand this candidate in an isolated Node 24.22.1 container. Each leg starts a fresh Gateway with task-owned state and a valid three-utterance transcript archive created through the supported store writer.A proof-only prelude changes only process-local JavaScript
Date.nowduring evaluation of the real lazy summary runtime, after the deadline seed. The host/VM clock,performance.nowand native timers are not changed. No summary owner, completion wrapper or inference operation is mocked or skipped by the harness.The local protocol-compatible HTTP fixture returns fixed valid model-note JSON through the real transport; this demonstrates routing and persistence, not real-model inference quality. Results are reread through
transcripts.get, with unchanged utterances and meeting metadata.A stalled HTTP fixture under a −30s process-local rewind returns heuristic notes in 20.648s on main and 20.640s on candidate, confirming the unchanged outer abort already bounds inference on both. Provider-error controls preserve identical heuristic note content on both. Stored calendar metadata also remains unchanged. All ten shipped-RPC legs complete successfully.
The existing committed rewind regression checks that the completion timeout argument stays within the configured budget. It does not establish an unbounded hang on the old code. No test-budget baseline was raised.
Merge Risk
Two-way door: reverting restores the prior deadline calculation without changing any stored format. Existing generated summaries remain readable; the change does not regenerate historical heuristic notes. Blast radius is the optional model-enhancement budget for transcript summaries. No public API, prompt, provider-precedence or timeout-policy changes.