Qualify registration domain against disposable SQL proposal

Merged
SI
5d ago
+1002-0

The registration create/read domain previously had fixture-backed adapter tests but no direct exercise against the reviewed SQL proposal. This adds a standalone disposable PostgreSQL harness that invokes the actual domain with one parameterized SQL function call per storage operation, checks real receipts and explicit authority, and recovers an actual committed response only through original-input replay.

The eight-file slice pins API and inactive Database proposal inputs, admits only the owned PostgreSQL Unix socket, preloads network guards before auth/test code, and reuses the reviewed Database lifecycle supervisor. Native DNS is denied; Vitest receives a fixed synthetic localhost answer. The native socket connector is module-private, protocol/listen denials have explicit assertions, and fault results require matching readiness and cleanup receipts. Ordinary unit discovery excludes this opt-in SQL suite.

The launcher binds physical tracked non-env API bytes/types to the accepted revision, requires its ancestry, and limits cumulative changes to the eight qualification paths. It rejects unexpected tracked/untracked source before workers start, independently of Git index flags, stat caches or clean filters. Existing selected hashes remain additional checks. Environment-file contents are not read.

Accepted API #1270 merge a2a6d6b70644fcda5b89c5bbec281573b2dab9e9 is composed normally. All six incoming files remain byte-identical; only this harness's Vercel source hash was refreshed, with original baseline and accepted-composition provenance retained. Database pins are unchanged.

Validation on final head 988263d81600afd77123cbf23496104ad04b04ee:

  • PostgreSQL 15.10 and 17.7: eight cases each on explicit Node 24.18.0 through the documented minimal env -i parent, with synthetic poison and confirmed worker/postmaster/socket cleanup.
  • Accepted adapter/MCP controlled suite: 61 cases passed.
  • Initialized-Node signal, child-wait timeout and worker-exit controls: expected failures with verified cleanup.
  • Eight source-binding negatives reject four unlisted auth changes, staged edits, assume-unchanged/skip-worktree concealment, and untracked source before worker execution.
  • Scoped static checks and independent exact-source review passed.
  • A separate isolated Node 23.6.1 comparison reproduced the socket/FIFO-stat loader failure and directory-stat repair. Node 22 composition-harness execution remains untested; ordinary CI and the existing controlled adapter job do not establish it.

This adds no production storage factory, public route, MCP/runtime wiring or policy adoption. Database #138 remains unchanged, draft, unmerged and unapplied. Ordinary CI is not execution evidence for this new PostgreSQL composition suite. Source publication only; final merge remains separately gated.


Summary by cubic

Adds a disposable PostgreSQL qualification harness that runs the actual registration create/read domain against the exact inactive Database 138 SQL proposal, replacing fixture-only adapter coverage with real SQL execution.

The suite lives under scripts/application-registration-proposal/sql-composition/ and is excluded from ordinary unit discovery. It pins API and Database source files by SHA-256, reuses the reviewed Database lifecycle supervisor to own a disposable cluster, and denies native DNS, TCP, UDP, and unrelated Unix sockets before auth code loads. Vitest receives a synthetic localhost answer.

  • Executes one parameterized SQL function call per create/read storage operation and validates receipts, explicit read authority, isolation, and denials against real 42501/P0001 errors without classifying failures from message text.
  • Recovers an actual committed response only through original-input replay; outcome_unknown is never inferred as a conflict.
  • Includes fault controls (signal, timeout, worker-exit) that must fail and still report verified worker/postmaster/socket cleanup, with network guard bypass paths closed and fault receipts validated.
  • Qualified on PostgreSQL 15.10 and 17.7 with Node 24.18.0; Node 22 execution remains untested.
  • No production storage factory, route, MCP wiring, or policy adoption; Database 138 remains draft, unmerged, and unapplied.