← Back to Pull requests

fix(workhub): preserve topic identity and remote conversation continuity #6068

Closed
unknown closed this pull request without merging on Oct 11, 2026 14:36 UTC
View on GitHub
unknown unknown commented on Oct 11, 2026 12:34 UTC
Author

Summary

WorkHub could answer a follow-up such as “刚才到第几讲内容了?” in the right context but omit its work identity. Even a successful CS336 association lost its heading on an immediate WeChat reply. Modern tool-call transcripts could also leave delegated results without their originating remote chat.

  • Record topic association independently of execution. Require a successful association decision before other work, and retry missing decisions at the Runtime completion boundary (at most two repairs). Explicit unrelated/overview/ambiguous decisions avoid inheriting an unrelated work. This does not force delegation or guarantee semantic classification accuracy.

  • Restore result routing from modern task-call receipts, retain delivery deduplication across restart, and prefix every associated remote reply with its work name. Successful same-turn null association decisions clear prior topic attribution in both remote replies and the Desktop projection; failed or mismatched receipts cannot clear another turn. Existing delivered messages are not resent or relabeled.

  • Compact remote choices into lettered options with separate progress/next-step lines and nxt pagination. Keep one assistant voice across acknowledgments, execution, and returned results.
  • Verification

  • npm run build:test, npm run typecheck, npm run lint, and npm run format:check: passed.

  • Ten affected test files, including the complete AI SDK backend suite: 338 passed, 0 failed. Coverage includes topic prerequisites, prepared capability calls, direct-answer labels, remote routing/restart/deduplication, and picker answers.

  • CI architecture repair: place topic receipt parsing in the application contracts layer and consume the feature testing entry. Renderer architecture check passed against the CI base; desktop build/typecheck, lint/format, and 18 focused tests passed.

  • Runtime Host integration fixtures now complete topic association through Desktop capability receipts before replying, including cold recovery and Code Mode. Target immutability, capability ownership, and single-successor assertions remain in place. Both original failing tests pass locally.

  • CI run 38141796913 passed on 8603b3028, including all affected workspace tests, Runtime Host tests, and desktop E2E.

  • Additional local Node 24 run of the two complete integration files: 87/88 passed; the unchanged WorkHub steering/handoff test timed out locally. The complete Runtime Host suite passes in CI. A local Node 26 full-suite run encountered multiple timeouts and was stopped.

  • Review correction (e364f8afa): the three clearing-reason regressions failed with the stale SQL heading before the fix. Afterward all 161 Desktop WorkHub tests passed, including restart/paging, delivery deduplication, failed/mismatched receipts, cross-turn/chat isolation, and SQL-to-CS336 switching. Desktop main build, all four desktop typechecks, renderer architecture, changed-file lint, repository formatting, and diff checks passed.

  • Desktop review correction (2192ba537): fold validated topic decisions in transcript order per turn, removing superseded topic links while retaining actual delegation/result links. Five defect reproductions failed before the fix; afterward all 167 Desktop WorkHub tests passed. Desktop main build, all four desktop typechecks, renderer architecture, changed-file lint, repository formatting, and diff checks passed.

  • ASF header audit, git diff --check, and node scripts/protocol-epoch-check.mjs --base upstream/main: passed; no protocol epoch change required.

  • Native development instance: the omitted-subject lecture follow-up acquired CS336 labels without delegation; an unrelated question acquired no CS336 label. Live WeChat delivery state confirmed the reported reply already had a CS336 association; its heading was suppressed by the old timing condition. Rebuilt and restarted after fixing it. A fresh external WeChat delivery after that restart was not performed.
  • Remote transport regression evidence (work name abbreviated in the fixture):

    Input: 刚才到第几讲内容了?
    Before: 刚到第 2 讲。
    After:  [CS336]
            刚到第 2 讲。
    

    The new regression failed with the unprefixed reply before the fix and passed afterward. Full-repository tests and screenshot capture were not run; verification uses native accessibility state, durable runtime receipts, and transport output assertions.

    AI use

  • No generative tool made a substantive contribution

  • Generative tooling made a substantive contribution
  • Tool(s) and scope: OpenAI Codex implemented the changes, regression tests, and validation. The commit includes Generated-by: OpenAI Codex.

    Checklist

  • Tests cover the change and fail without it

  • Lint, format, typecheck and CI pass; local test limitations are recorded above
  • Does this PR entail a change in behavior?

  • Yes — described under Summary above

  • No
  • Diff: 621 lines (+465 / -156) across 7 files Reviewer: chinawch007 Review duration: 121m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 621 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.385
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6068"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 50.3% (MEDIUM) · Higher = larger blast radius
    50.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.9% · Safe to merge
    19.9%
    Repository