Repository navigation
Conversation
When another device of this vault already assigned a task, the mint door refuses an Assigned or HumanAssigned fact that names another binding with RecordError::TaskAssignmentConflict (the task, the held assignee, the offered assignee) instead of committing a fork that every later read fails on (Engine ANSWER TASK-ASSIGNED-FORK = C, FIX [TASK-ASSIGNED-FORK-ON-CONCURRENT-AMENDED-SETTLES]). A fact naming the held binding still writes as a set duplicate. settle_refusal keeps the refusal typed, so each approve door answers INVALID_STATE (409) instead of a 400; MemoryError carries the field task_assignment_conflict, the MCP gateway answers kind task_assignment_conflict with the same data, and the HTTP error map answers 409 InvalidState "task_assignment_conflict". The approving transaction fails, so the proposal stays pending. Test: task_assignment_conflict_refused.
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Warning Review limit reached
This review includes 28 billable files and costs up to $7.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 55 minutes for your next included review. View limit details
|
…d TASK holds Both create-proposal settle paths returned Ok as soon as the TASK row they would land existed. A concurrent approval on another device can land that TASK with its Assigned fact first; a later local approval of the same proposal, amended to another assignee, then committed while the TASK stayed assigned to the first one. The early return now runs the check the assignment write makes: when the fold holds an assignment and the approval offers another, it refuses with TaskAssignmentConflict (409 INVALID_STATE with typed fields, TASK-ASSIGNED-FORK = C). The same assignee, or none, still changes nothing. Review round 1 of #9983, P1 task_verb/proposal_create.rs:193 and highway_post/settlement.rs:114.
…store The whole-vault import queued an ask answer behind its group only. A foreign-stated answer's link proof also reads its actor's PERSON row; when the archive held both the answer and that PERSON and the answer came first in a pass, its guard answered AskDependencyPending and the whole restore failed. ask_record_dependencies now names that PERSON too. Review round 1 of #9983, P1 task_verb/ask_record/guard.rs:48.
…estore order task_assignment_conflict_refused.rs: the other device's approval landed the TASK and its Assigned fact first; the local approval offering another assignee answers 409 INVALID_STATE with the typed conflict and the proposal stays pending (red at b20a975: the approval returns Ok); offering the same assignee changes nothing (control). ask_record/tests.rs: a foreign-stated answer's archive dependencies name its group and its actor's PERSON; a human answer names its group only (red at b20a975). Review round 1 of #9983, both P1s.
olety
added a commit
that referenced
this pull request
Nov 20, 2026
This branch has not been deployed
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.
FIX [TASK-ASSIGNED-FORK-ON-CONCURRENT-AMENDED-SETTLES] (P3). Ruling: Engine ANSWER TASK-ASSIGNED-FORK = C (20 Nov 21:32), a mechanism ruling inside the owner's SR-1 TASK-OWNER-FORK = A.
What was wrong
A task's Assigned fact says who the task is for, and the fold refuses two different bindings at every read ("task assignment fork"). Two of the owner's devices can each approve one task proposal with a different assignee, and both settles mint the same task id. When device B already holds device A's Assigned fact and B's owner approves, B's settle wrote its own Assigned fact through
put_task_authority_fact_in_txn. That door folded the facts before it wrote, saw only A's single binding, admitted the owner's write and committed the fork. The approve succeeded, and from then on every read of the task failed.The change
put_task_authority_fact_in_txn(task_authority/mod.rs): after the admits check, an Assigned or HumanAssigned fact whose(actor, assignee)binding differs from the one the fold already holds is refused with the newRecordError::TaskAssignmentConflict { task_ref, held_assignee, offered_assignee }(ErrorKind::TaskAssignmentConflict). Nothing is written. A fact naming the held binding still writes as a set duplicate. The fork still fails closed at every read.settle_refusal(task_verb/highway_post.rs) keeps the refusal typed instead of wrapping it asInvalidConfig, so every approve door answers INVALID_STATE (409) rather than 400. The approving transaction fails, so the proposal stays pending.MemoryErrorgainstask_assignment_conflict: Option<Box<TaskAssignmentConflict>>(task, held and offered as 32 hex; boxed, skipped when absent) and one suggestion. The engine'sFrom<Error>sets it withMEMORY_CODE_INVALID_STATE.task_assignment_conflict(-32020) witherror.data.task_assignment_conflict, from both the engine-error path and the facade-refusal path. The device release hold words include the field.core_engine_erroranswers 409InvalidState { state: "task_assignment_conflict" }with the engine message (which names the task and both assignees) and the suggestion. The owner plane reaches it through its existing fallthrough. Carrying the typed field on the HTTP facade body and in the SDK error types comes in the next PR of this stack ([TASK-ASSIGNMENT-CONFLICT-HTTP-FACADE-FIELD]).task_assignment_conflict: Noneat everyMemoryErrorliteral (napi, py, remote, the SDK generator's native template, three engine sites).Test
crates/oneiron/tests/task_assignment_conflict_refused.rs(new). It uses the host and owned-device fixtures oftask_fact_carrier_proof.rs. A foreign agent parks a STANDARD task-create proposal on the host, assigned to Y. The device signs an Assigned fact for the settled task id naming X, and the fact lands on the host without the TASK row. The owner then reviews and approves on the host. Expected:ErrwithMEMORY_CODE_INVALID_STATE, the serializedtask_assignment_conflictnaming the task, X and Y, the proposal still Proposed, and the task's facts still folding with X as the only assignee.Red on the base (#9981's head plus this file): the approve returns Ok, so
expect_errfails. Green here.Run:
RUSTFLAGS="--cfg oneiron_test_support" cargo test --locked -p oneiron --all-features --test task_assignment_conflict_refused.Stored change
None: no stored row changes shape, and a refused write writes nothing.
MemoryErroris a wire shape, and its new field is additive and skipped when absent. Builds on the launch-reset stack (#9096, then #9823) and lands only with it. No verb, no grant.