Skip to content

P421: Record independent owner requests - #2473

Closed
trissim wants to merge 11 commits into
mainfrom
fix/p421-owner-requests
Closed

trissim wants to merge 11 commits into
mainfrom
fix/p421-owner-requests

Conversation

@trissim

@trissim trissim commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

P421 — independent owner requests (unfinished draft)

Source checkpoint: requests own their rows/lifetime; Todo stores a nominal request id with an actual foreign key; the goal-slot request and directive implementation is deleted. Native/connector schema checks and an isolated real TodoStore workflow passed. Not ready for installation: retained-data carry, fixture migration, P422/P433 integration and native/connector/live acceptance remain unfinished.

Changed owners and consumers:

  • OwnerRequest TypedTable beside Todo owns commander incarnation, text, state, original directive references and creation time. OpenRequestState.complete contains the pending-order refusal once. Completion reads serving orders on its actual write connection.
  • OwnerRequestId composes the stored-link and selection capabilities within the existing SubclassUnion family. NoRequestLink and NewestOpenRequest are distinct declarations. Named selection checks the record's commander/open state; unnamed selects newest open, bounded to one row.
  • Todo.request is TEXT REFERENCES owner_request(id), replacing GoalReference/GoalRef/NoGoalReference and their three copied owner/id fields. Native order actions, reissue, dispatch and CLI order producers use this id. The record supplies verdict audiences. No compatibility alias or legacy reader remains in src.
  • Pending orders use a request partial index whose predicate derives from PendingProblemOrder's declared membership; serving-order queries, stalled reporting and completion do not decode completed history. EXPLAIN QUERY PLAN used that actual partial index in the storage check.
  • RequestGoalOrder and DirectiveGoalAction are deleted. GoalOrder no longer routes directives or enumerates owner requests. RequestStalled, DirectiveUnacted, heartbeat selection and command answer lookup read request records. P433's owner confirmed the shared selector boundary; its new refusal/head-review changes still need main integration.
  • SendTool owns the common send fields and publication, PublishingTool the existing HeldBusWrite admission. Native and connector declarations compose those capabilities without merging their separate tool registries. ConnectorSendTool adds the request selector, validates it before sending and records its original message reference afterward. The competing ToolCaller.sent hooks are deleted. SQL writer admission is held only for the short record commit, not across message preparation/publication. Request add/complete share HeldBusWrite through RequestMutation.

Evidence (all under /home/ts/.cache/agent-scratch/pi-build-proof):

  • p421-linked-schema.log/.rc: codec round trips, native/connector registry separation, derived tool schema and actual foreign-key DDL passed.
  • p421-command-schema.log/.rc: request mutation MRO, native/connector registries, and named send/problem CLI parsers passed. No agent turn started.
  • p421-linked-final.log/.rc: real TodoStore on a disposable synthetic root passed two independent requests, named/newest selection, an actual pending order link/round trip, pending-order completion refusal, independent completion, withdrawal and final completion. Actual query plan used todo_request_where_json_extract_order_kind_in_pending_idx. This is storage API evidence, not native turn, MCP or installed acceptance.
  • The earlier linked application/workflow/orders probes failed in hand-built fixture constructors (missing run, empty banned, wrong RepositoryName constructor). They are retained separately and are NOT passing checks. No original bus or input was touched.
  • Existing Package/Repository AST inventories p421-before-ast and p421-link-before-ast used all src/tools/tests modules with zero parse omissions. The focused link inventory is pinned to 9cf860d. Lexical receivers are not dynamic resolution; no complete NRA scan is claimed.
  • Whole-src search now finds 0 RequestGoalOrder declarations (before 1) and no GoalRef/GoalReference or DirectiveGoalAction.
  • No pytest family result, ratchet, full suite, install or live-list acceptance claimed at this checkpoint. Targeted Ruff initially reported four imports made unused by deletion; those imports were removed. Existing diagnostics are not a clean-tree claim.

Remaining before ready:

  1. Integrate P422/P433's final main changes, including ClaimOrder's report owner lookup, while preserving their claim/delivery/refusal/head-review behavior. P433 owns migration of its changed parity review producers; P421 owns their request-link fixture changes.
  2. One stopped carry preserving current open requests, all original directives/Todo links and retained goal/history decoding; record actual counts. Existing roots deliberately need that carry rather than a compatibility reader.
  3. One family test and migration of all old goal-request fixtures/assertions. Actual native orders, named/newest connector sends, answer/overdue behavior and copied retained history still need qualification.
  4. Queue/merge, merger-owned install and live list showing commander native in Core and virtual bus. No carry count or installed completion yet.

Assumed: unnamed claude-ai messages to a recipient with no open owner request remain ordinary bus messages; explicit unknown/closed/foreign requests are refused before publication. Public request mutations and directive/order publication share existing bus admission, and SQLite transactions protect row publication. Historical tools/carry_rts_orders.py is scheduled for deletion by plans/REMAINING-SLOP-PLAN.md; it is not a retained production reader and was not modernized or used here. No saved session, original bus or uncertain input was changed/replayed.

Concurrent CI repair P436 uses the finished, published P405 checkout on its own branch; P421 remains owned in /home/ts/wt/pi-build-proof. P405 source is merged in #2429; installed/live acceptance is not established by this draft.

trissim commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Closed by claude-ai: every commit here is in #2560 (fix/P421-owner-requests-unit-forks), which finishes P421 on top of it.


Generated by Claude Code

@trissim trissim closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant