Skip to content

Carry the typed task assignment conflict on the HTTP facade body and the SDK errors - #10008

Open
olety wants to merge 6 commits into
opus-task-proof/refuse-second-task-assignmentfrom
opus-task-proof/task-assignment-conflict-http-field
Open

olety wants to merge 6 commits into
opus-task-proof/refuse-second-task-assignmentfrom
opus-task-proof/task-assignment-conflict-http-field

Conversation

@olety

@olety olety commented Nov 20, 2026

Copy link
Copy Markdown
Member

FIX [TASK-ASSIGNMENT-CONFLICT-HTTP-FACADE-FIELD] (follow-up of #9983; ruling TASK-ASSIGNED-FORK = C: the local approve answers 409 INVALID_STATE with typed fields).

#9983 refuses a second, different task assignment with a typed MemoryError.task_assignment_conflict (task_ref, held_assignee, offered_assignee), and the MCP gateway carries it. Every other surface dropped it: an HTTP or SDK caller got the 409 and the message, not the fields.

This PR carries the block end to end, exactly as check-in P3.8 carried pending (058e2cf):

  • HTTP facade: FacadeErrorBody.task_assignment_conflict (snake_case key, as legal_hold, room_join_hold, pending), its OpenAPI mirror (new error/task_assignment_conflict_schema.rs, 32-hex patterns), every fill site in facade/errors.rs including the replayed body (REPLAYED_ERROR_FIELDS 16 -> 17).
  • Server errors: ApiError (field, accessor, wire deserialize, envelope), AppError (livequery), the raw error schemas and components.
  • Remote client: ApiErrorBody field, copied into the MemoryError it rebuilds.
  • SDK generator: EXTRA_ROOTS and UNIFFI_STREAM_ROOTS root crate::memory::TaskAssignmentConflict; the facade envelope literal names it.
  • UniFFI: OneironError::Failure.task_assignment_conflict (lifted record). TS: OneironError.taskAssignmentConflict. Python: OneironError.task_assignment_conflict and stubs. Agent docs: the INVALID_STATE remedy names the block.

Test: crates/oneiron-server/tests/task_assignment_conflict_wire.rs: the facade answers 409 INVALID_STATE with the typed block. Red pin: branch opus-task-proof/proof-assignment-http-field-red (#9983's head b20a975 with the test only): the block is absent.

Stored change: none. Wire change: additive (an optional error member). No verb, no grant.
Launch-reset stack only (stack #9823, on #9983).

…the SDK errors

#9983 refuses a second, different task assignment with a typed
MemoryError.task_assignment_conflict (the task, the held assignee and the
offered one), and the MCP gateway carries it. The HTTP facade body, the server
ApiError and AppError, the OpenAPI error schemas, the remote client, the UniFFI
Failure and the TS and Python errors did not, so an HTTP or SDK caller got the
409 and the message but not the typed fields.

Each layer now carries the block exactly as check-in P3.8 carried `pending`
(058e2cf): the facade body and its OpenAPI mirror (new
TaskAssignmentConflictSchema), the replayed-body fields, ApiError (accessor,
wire, envelope), AppError, the remote ApiErrorBody, the generator roots
(EXTRA_ROOTS, UNIFFI_STREAM_ROOTS, the facade envelope literal), the UniFFI
Failure field, OneironError in TS and Python, and the INVALID_STATE remedy in
the agent docs. New test tests/task_assignment_conflict_wire.rs: the facade
answers 409 with the block.

FIX [TASK-ASSIGNMENT-CONFLICT-HTTP-FACADE-FIELD].
@greptile-apps

greptile-apps Bot commented Nov 20, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@olety olety added the launch-reset Lands only in the launch-reset stack; no normal train or direct merge takes it label Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 21 billable files and costs up to $5.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 36 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 152 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8f71d53 and ac39a99.

Files selected for processing: 21

  • crates/oneiron-py/python/oneiron/__init__.py
  • crates/oneiron-py/python/oneiron/__init__.pyi
  • crates/oneiron-remote/src/remote/response.rs
  • crates/oneiron-sdk-generator/src/generate/emit_http.rs
  • crates/oneiron-sdk-generator/src/generate/outputs.rs
  • crates/oneiron-sdk-generator/src/generate/uniffi.rs
  • crates/oneiron-server/src/api/error_map.rs
  • crates/oneiron-server/src/api/facade.rs
  • crates/oneiron-server/src/api/facade/errors.rs
  • crates/oneiron-server/src/api/mod.rs
  • crates/oneiron-server/src/error/mod.rs
  • crates/oneiron-server/src/error/schema.rs
  • crates/oneiron-server/src/error/task_assignment_conflict_schema.rs
  • crates/oneiron-server/src/error/typed_refusal.rs
  • crates/oneiron-server/src/livequery/error.rs
  • crates/oneiron-server/src/test_doors/refusal_wire.rs
  • crates/oneiron-server/tests/task_assignment_conflict_wire.rs
  • crates/oneiron-uniffi/src/codec.rs
  • crates/oneiron-uniffi/src/error.rs
  • packages/oneiron/scripts/agent-docs.py
  • packages/oneiron/src/error.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@olety
olety added this pull request to stack #9823 November 20, 2026 20:05
…rror arm

The arm answered the 409 with its state and message but no typed block, as
ApiError::new leaves it empty (review FIX, REVIEW-10008 error_map.rs:212).
It now carries the task and both assignees as the facade's MemoryError
does, through a new ApiError::with_task_assignment_conflict builder.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

launch-reset Lands only in the launch-reset stack; no normal train or direct merge takes it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant