Files
cindy/packages/orca-workflow
yan d1b1967bbd feat(orca): coalesce system auto-bridge worker reports before Lead drain
When several Workers finish while the Lead is busy, their system auto-bridge
reports now merge into a single batched user message at the Lead's input-queue
drain instead of one turn per report. The batch keeps every report's role,
status and full body; the model-facing text carries a
"[Auto-bridged batch: N worker reports]" header plus per-report worker_id for
routing, while the visible/persisted text strips the header and worker_id and
shows a quantity title on Desktop and Mobile (12 locales).

- Only the task-owning Desktop's system fallback stamps autoBridge; wire
  self-reports of autoBridge/autoBridgeBatchCount on INPUT_ENQUEUE/INPUT_STEER
  are stripped.
- Batching is bounded (<=8 reports, <=32000 chars of final wrapped body); the
  head report always dispatches untruncated and the remainder waits a round.
  Count accumulates real reports so retry/restore cannot bypass the cap.
- The batch origin keeps the first senderSessionId for team-continuation
  authorization and is treated as a delegated continuation; guest projections
  reuse the same redaction (no worker_id / first-worker attribution).
- Lead prompt rule 7 recognizes the batch header; docs record the wire delta
  and the drain-before-coalesce invariant.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: yan <yan233@xd.com>
2026-11-11 17:23:14 +08:00
..