fix(dispatcher): correlate routed activity with the originating input anchor #266

Open
karsten wants to merge 1 commit from fix/dispatcher-activity-anchor into main
Owner

Real cross-repo dependency of harness/plugins#49 (one native Matrix activity message per input instead of one per internal run).

Dispatcher classifier and worker activity is routed to the parent channel with a synthetic envelope (sessionKey: task.parent, source: host, text: "") that carried no origin. This adds only the originating input's completion-anchor id (from the task's durable dependency; no prose, no tags; the worker's own input anchor is never trusted).

Independently usable: without plugins#49, channels ignore the field (no behavior change). Without this PR, plugins#49 still collapses classifier+worker per dispatched task (fallback), so the main bubble and the task bubble remain separate (2 instead of 4); with both PRs: one bubble per input.

Test: test/dispatcher-activity-anchor.test.ts (fails on main, passes here): exact anchor per task, spoofed worker anchor ignored, legacy task without anchor stays undefined, no prose/tags.
Validation: tsc 0, build 0, related activity/dispatcher suites 23/23. Full suite 1465 pass / 19 fail; the failure set matches the main baseline (macOS canonical-home tests, session-observer-stream timing, also failing on main). Mandatory review: 1 round, passed, 0 findings, fingerprint 319aa34d.

Not activated. #265 and #264 untouched.

Real cross-repo dependency of harness/plugins#49 (one native Matrix activity message per input instead of one per internal run). Dispatcher classifier and worker activity is routed to the parent channel with a synthetic envelope (`sessionKey: task.parent, source: host, text: ""`) that carried no origin. This adds only the originating input's completion-anchor **id** (from the task's durable dependency; no prose, no tags; the worker's own input anchor is never trusted). Independently usable: without plugins#49, channels ignore the field (no behavior change). Without this PR, plugins#49 still collapses classifier+worker per dispatched task (fallback), so the main bubble and the task bubble remain separate (2 instead of 4); with both PRs: one bubble per input. Test: `test/dispatcher-activity-anchor.test.ts` (fails on main, passes here): exact anchor per task, spoofed worker anchor ignored, legacy task without anchor stays undefined, no prose/tags. Validation: tsc 0, build 0, related activity/dispatcher suites 23/23. Full suite 1465 pass / 19 fail; the failure set matches the main baseline (macOS canonical-home tests, session-observer-stream timing, also failing on main). Mandatory review: 1 round, passed, 0 findings, fingerprint 319aa34d. Not activated. #265 and #264 untouched.
Classifier and worker activity is routed to the parent channel with a
synthetic envelope that carried no origin. Add only the originating input's
completion-anchor id (no prose, no tags) so channels can render all internal
runs of one input in one progress message (harness/plugins#49).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/dispatcher-activity-anchor:fix/dispatcher-activity-anchor
git switch fix/dispatcher-activity-anchor
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harness/core!266
No description provided.