feat(workhub): persist delegation linkage - #3930
Closed
ARE404 wants to merge 1 commit into
Closed
Conversation
Generated-by: Codex
7 tasks
Contributor
Author
|
Superseded by #3935. GitHub automatically closed this PR when the fork branch was renamed to satisfy CONTRIBUTING.md; the replacement contains the same Slice 5 work plus the production retry-identity P1 fix and complete verification matrix. — Codex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Persist the first Slice 5 delegation authority in the existing WorkHub Coordination Session:
delegation_intentanddelegation_committedrecords aroundcreate_newanddelegate_existingeffectsThis intentionally does not add
replace, Stop ownership, target lifecycle state, or a general workflow phase machine. Those remain later Slice 5 work.Refs #3492
Proposal: #3286
Design choice: minimal intent before the effect
A committed-only journal is insufficient because
candidateRefis deliberately opaque and scoped to one candidate snapshot. If the target effect succeeds but the committed link is not appended before a Host restart, a later candidate set cannot safely reconstruct which Session the action selected.The Action Gate therefore writes one immutable
delegation_intentcontaining the resolved target before attempting the effect, then appends one immutabledelegation_committedrecord with the accepted target Turn. This is the minimum recovery seam: the two records are append-only facts, not mutable phases, and they do not claim ownership of Stop or target execution lifecycle.Verification
npm -w packages/core test— PASS (658/658)build:test— PASSgit diff --check— PASSnpm run buildreaches the unchanged@maka/uiworkspace and stops on existing prop/type mismatches (settledText,conversationKey,unlockAutoFollow, andtrailingAction). This PR does not modifypackages/ui; all affected package builds and Desktop main build pass.No screenshot or recording: this PR changes internal persistence/recovery behavior and adds no visual UI change.
AI use
Select exactly one:
Tool(s) and scope: Codex implemented the typed records, durable journal and recovery wiring, added tests and ADR updates, and ran the verification above. The commit includes the required
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?