Add unwired registration SQL helpers and restricted execution qualification

Merged
SI
5d ago
+818-114

The proposed registration domain previously lacked an SQL storage adapter. This adds two unwired helpers that accept an existing pg-compatible client and execute one fixed parameterized call through the reviewed disposable execution wrappers. Create maps structured P2101 to conflict; both operations map 42501 to denied and other failures to fresh unknown outcomes. Receipt validation and authenticated actor ownership remain in the domain. The injected client must already be idle and in autocommit with intended privileges.

The contained harness separates controller setup from a restricted runtime client and exercises actual domain/helper/wrapper/SQL behavior and real MCP SDK create/read. Candidate bytes, API baseline, D contract and execution profile are pinned separately. No connection factory, route, production activation or role adoption is added.

The proposal-local contract rejects NUL and malformed UTF-16 before storage, preserving valid keys exactly and retaining name trimming. Successor caaa1b5835a92ce6ae985ca446aa359147117899 changes only two existing tests to cover high-surrogate plus ordinary text, reversed low/high pairs, and positive literal backslash-u text for key/name, including zero-query rejection, exact persistence and replay. Valid surrogate pairs and U+FFFD remain covered. Shared public applicationRegistrationSchema is unchanged.

Validation at this exact head:

  • 145 controlled auth/domain/MCP tests passed; scoped types, lint and formatting passed.
  • PostgreSQL 15 and 17 each passed 30 actual restricted registration SQL/SDK tests with successful bounded worker/cluster/socket cleanup. The final PG17 run exited zero under unchanged guards; its registered paths and worker group were independently verified absent.
  • Earlier PG17 cleanup and Git-preflight timeouts remain preserved. After local command execution recovered, the existing cleanup helper verified the original worker group, postmaster and socket absent. Original diagnostic directories are preserved. No guard or timeout was relaxed.
  • All eleven reported CI checks succeeded. CI PostgreSQL jobs run a different older 16-test application-proof suite; PG17 acceptance is supported by the actual local registration runner, not those CI labels.
  • Exact-head independent spec/standards and Sites source reviews pass; Codex reports no major issues. Nine inline threads are resolved. CodeRabbit still reports a warning about baseline socket-guard naming/network-denial duplication. Its latest claimed merge-base 60af5644 is not this contribution's merge-base: Git confirms ec284cba, and both flagged files have identical blobs there and at caaa1b58. This source-based disposition is not external review clearance.
  • Prior 52 adapter unit tests and six cleanup fault controls are inherited from adb8c1ef against unchanged implementation/lifecycle sources, not fresh successor runs.

Cumulative scope remains seventeen paths; database execution profile acea75c0, D f507a776 and API baseline ec284cba are unchanged. Coordinator retains final review disposition and merge gate. Nothing is merged or activated.