You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/09/05 18:03:45 UTC

Re: [PR] fix(workhub): resolve WorkHub delegation linkage on demand [maka]

Astro-Han commented on PR #4699:
URL: https://github.com/apache/maka/pull/4699#issuecomment-5553749077

   Addressed on head `7c011585`.
   
   **[P2] Two terminal filters had no failing test — fixed.** I reproduced both mutations before writing anything: dropping the `delegation_replacement_aborted` filter left storage 10/10 and coordinator 67/67 green, and dropping the terminal `delegation_stop_resolved` filter did the same. `packages/storage/src/__tests__/workhub-message-assignment.test.ts` now carries one terminal matrix — five assignments on one target, one per terminal shape plus the `not_owned` exception, asserting the two survivors in newest-first order. Verified discriminating: each of the two mutations above now reddens it.
   
   **[P2] Candidate hot path — not fixed, and the reason is in the description now.** The finding is right, including that the cap counts accepted rows rather than the iterator. I did not patch it, because every bounded variant is wrong and every correct variant is out of scope for this PR:
   
   - A scan budget instead of an accept budget drops an older still-active link, which is the failure your own caveat names.
   - Pushing the anti-join into SQL needs the terminal id to be derivable in the query. It is `sha256(delegationId)`, so it is not.
   
   What is left is changing the terminal-record identity scheme, or changing who names the delegation. On the second: `stop_work` is the only caller that needs the full set, and only because its proposal carries a `targetSessionId` and the Gate resolves the link itself. `replace` in the same protocol carries `replacesActionId` and the Gate validates it — same trust boundary, opposite answer. The stated reason ("a client cannot prove which link is live") no longer holds now that candidates carry `latestDelegationActionId`; what needs protecting is authorization, and that is already held by `confirmation: { kind: 'user_stop' }` outside strategy output. If stop named its delegation, the active set, the competitor-retirement loop and `listActiveAssignments` all disappear, and this hot path with them.
   
   That is an abstraction change, not a fix to this diff, so it is being written up separately. The `Review focus` section now records the measurement, why bounding is unsafe, and where the real correction lives. Also worth stating: this is residual cost, not a regression — before this change the renderer replayed the entire Coordination transcript across all targets on every open and reconnect.
   
   **Disclosure — pre-terminal Nightly workspaces.** Confirmed independently: `v0.2.0-dev.11.20260831` defines none of the three terminal kinds. The PR does cover those workspaces without migrating them, and the description now has an `Upgrade` section saying so and why it is safe.
   
   Head `7c011585`: storage 11 pass, runtime-host 163 pass, desktop 120 pass, format, lint, ASF header and epoch guard all green.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org