Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): attribute async question replies #10793

ClosedGigioxx(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/10793/headopened View on GitHub

Async question replies put the agent’s question and the user’s answer in one user bubble without attribution. Label them Agent question: and User answer: in the shared server formatter, preserving question context and attachments for the provider.

Closes #10786.

Reproduced with the existing engine test: both running and stopped sessions failed the new attribution assertion before the fix. All 29 engine tests now pass, including multiple questions, attachments, restarts, and duplicate replies. Server typecheck, targeted lint, and formatting pass.

Verified the real web transcript with isolated fixtures. Before uses the reproduced original message text; after is generated by the fixed engine. The shared payload serves web, desktop, and mobile; native clients were not separately exercised. Existing stored messages are unchanged.

Before:

Before: question and answer without attribution

After:

After: agent question and user answer labeled

Model: GPT-6. Harness: Codex.

Summary by CodeRabbit

  • Improvements
    • User-provided answers now clearly label each associated question and answer, including relevant attached-file details.
    • Empty response sections continue to be omitted for cleaner message formatting.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Approved at 88d7e59

      Macroscope's review found this PR approvable — This is a narrowly scoped fix that labels asynchronous replies with their originating question and user answer, with a matching test update. It changes only message text in the existing response path and introduces no schema, configuration, security, or deployment risk.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Review Change StackReview Change Stack

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Advanced

      Run ID: ae9489f5-5d82-4dc9-bad0-370b1529a570

      📥 Commits

      Reviewing files that changed from the base of the PR and between 061543e9e5b54ec0048725c37d52fef2962df173 and 88d7e59a07ce2f4b5e3e93f42308cf7980b99727.

      📒 Files selected for processing (2)
      • apps/server/src/orchestration/Layers/OrchestrationEngine.test.ts
      • apps/server/src/orchestration/decider.ts

      Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


      📝 Walkthrough

      Walkthrough

      Async question replies now label the agent’s question and the user’s answer in persisted message text. The orchestration test validates the new format.

      Changes

      Async answer attribution

      Layer / File(s)Summary
      Format and validate async answers
      apps/server/src/orchestration/decider.ts, apps/server/src/orchestration/Layers/OrchestrationEngine.test.ts
      The decider prefixes questions with Agent question: and answers with User answer:. The test expects these labels and preserves attached-file details.

      Priority: ⬇️ Low — Defer this narrow async question message-formatting change because it only labels agent questions and user answers in the shared server transcript.

      Estimated code review effort: 1 (Trivial) | ~5 minutes

      Severity of issue fixed: Low

      Merge Risk: ⚪ Minimal · up to 88d7e

      Async question replies now clearly distinguish the agent’s question from the user’s answer while preserving provider context and attachments. No current merge-blocking risk is identified.

      Suggested reviewers: t3dotgg, juliusmarminge, shivamhwp

      🚥 Pre-merge checks | ✅ 5
      ✅ Passed checks (5 passed)
      Check nameStatusExplanation
      Title check✅ PassedThe title clearly and concisely describes the main change: attributing async question replies in the server.
      Description check✅ PassedThe description explains the change, reason, affected flow, validation, UI evidence, and limitations. It does not reproduce the template headings or checklist, but the required information is mostly p…
      Linked Issues check✅ PassedThe change prefixes async question content with "Agent question:" and user responses with "User answer:" in the shared server formatter. This preserves question context and attachments, fixes transcri…
      Out of Scope Changes check✅ PassedThe changes are limited to the async-answer formatter and its corresponding test. No unrelated code changes are described.
      Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      Comment `@coderabbitai help` to get the list of available commands.
    4. Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.

      Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.

    5. juliusmarminge closed this

Sign in to join this conversation.