Repository navigation
Cell attachment verifies registration and fences activation - #735
Merged
Merged
Conversation
…are takes the same lock The attach command holds the attach lock on a direct, marked session of the cell's Postgres for its run and resumes by the directory row and the cell's mode. It refuses before any write on the stores' identity, the session, the roles, settings and subscriptions that would let an unchecked writer through, the database encoding, durability, its own grants, the ClickHouse writers, the table list and the processes' heartbeats; posts attach/begin; creates the triggers under the migration lock; in recording scans and writes the tenancy rows, refusing an org past ORG_MAX_BYTES; commits enforced, proves it durable, waits out every transaction that could have read recording, rescans, places every org in batches and marks the cell serving. A refusal after the mode commit leaves the cell enforced and attaching, and a rerun resumes there. Prepare refuses a session behind a pooler or a database that is not UTF8, and takes the attach lock. Doctor runs attach's Postgres reads again and reads stray orgs with --stray-orgs. instances.read_recent keeps stopped rows inside the widened window, and PRUNE_AFTER_S names the sweep's hour. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…t gate measured end to end docs/operations/cell-attach.md is the operator's procedure: the preconditions attach checks and those it relies on, the flags, the point of no return at the mode commit, the orgs attach does not place and the manual removal of an org past the length limit, and doctor's reads after serving. cells.md describes the first attach as it runs (the lock, the refusals, the trigger pass, the mode commit and its durable read, step 4's wait, rescan and final checks), with its stated limits and failure rows. upgrades.md step 18 rotates the ClickHouse writer credential after the LOOM_CELL rollout. bench/cell_trigger_gate.py measures memory.set and a delivery-sized insert through an attached cell with the org triggers on and off; results.md records a local run. Attach compares the final root-secret fingerprint with the one its begin wrote, and the nonce cleanup's message names no single command. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…s no boot or insights module instances.read_recent takes the window it reads back; attach's heartbeat module computes it from the live window and a stopping process's drain and retirement budgets. PRUNE_AFTER_S is marked as the contract it is. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… in wall time, and says when the mode commit's outcome is unknown The refusals name every table the trigger pass would alter whose owner role attach's role is not a member of, before any write; ensure_table and _run_ddl answer applied, busy or denied, so a denial during the pass refuses at once rather than after --wait as a busy lock. --wait is wall time: each bounded wait charges its elapsed time, lock tries included, and every lock try waits at most what is left; scan time stays outside it. From the mode commit on, a stop that comes before the durable read says the commit's outcome is unknown and to rerun attach, for a refusal and for any other error alike. The prune-window check runs with the refusals, before any write; an enforced resume runs one trigger pass; the lock session opens inside the block that closes it; the durable read retries a timeout or an outage only; refusals name no command that does not exist. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… the attach docs describe one step numbering and today's procedure --stray-orgs labels only a spent budget as tables left unchecked; any other refusal names its table and the read continues. A failed catalog read reports both of attach's Postgres checks as not read. The runbook and doctor describe removing a stray or over-long org by hand, and name no command that does not exist yet. cells.md labels the first attach's list with the design's step names, so step 1 to step 4 mean the same everywhere, rewrites the stuck-process failure row and the planned tests for a mode that only rises, and says --wait is wall time. The trigger-cost harness uses cell_triggers.create_statement and deletes the rows its inserts wrote. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… inside --wait, and doctor warns on the role it runs as The mode is taken from the first state read, set to unknown only once the router accepted attach/enforced, and set from what the durable read saw; an interrupt prints the mode line and goes on. The trigger DDL's lock bound is taken after the migration lock, from what --wait has left then. An ended mode transaction whose lock does not clear refuses, naming its backend. A busy table's holders come back with ensure_table's answer, and attach says them once per change rather than a boot's warning a try. Attach counts the role it runs as among its own; doctor does not. The dead SCIM recheck and the unused scim_ok parameter are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… figures say what they establish cells.md and the runbook state that attach exempts the role it runs as and doctor does not. results.md gives the marked batch's per-round changes and their mean, says the delivery-pass gate is met on the mean but not established by three rounds alone, and that the memory.set p99 gate is unresolved locally. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…nknown only while a try's UPDATE is out, and a busy migration lock is named Each trigger and mode-commit try gets a lock wait of at least TRY_FLOOR_MS before --wait is judged spent, so --wait 0 is one try of each wait with no retry, and an idle cell attaches with it. The run's mode turns unknown just before a try sends its UPDATE and back to recording when that try rolls back. A trigger try that finds the migration lock busy names that lock's holder, in the retry line and in the refusal. The step-4 watch task is awaited after its cancel. The ATTACH_LOCK_KEY comment says who holds the lock. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…span on one line inside its list items Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Check each probe privilege separately because a comma-separated privilege list accepts any one of them. Run the attach integration tests in the Postgres matrix and limit their heartbeat reads to the test's own process IDs while retaining the real queries. Signed-off-by: zlareb1 <[email protected]>
Manage mode and direct-session transactions explicitly so a canceled statement cannot start an unbounded rollback. Roll back ordinary mode statement errors within the try's deadline; terminate synchronously when a try ends with an error or cancellation. Signed-off-by: zlareb1 <[email protected]>
Give each trigger attempt a client deadline covering migration lock acquisition, DDL, commit, rollback and unlock. Use explicit transactions so cancellation terminates the session without waiting for rollback or masking the original error with lock cleanup. Give gate batch scopes a unique prefix per run so cleanup preserves existing rows. Signed-off-by: zlareb1 <[email protected]>
Count privileges a login can reach through SET ROLE or an ADMIN regrant, including noninherited group grants. Keep the owner exemptions and explicit role allow list. Repeat the writer, trigger, Postgres catalog and standby checks after the rescan and placement before marking the cell serving. Retain the heartbeat watch and its final wait floor. Signed-off-by: zlareb1 <[email protected]>
Check USAGE of pg_read_all_stats and pg_signal_backend because attach uses their privileges without SET ROLE. Keep MEMBER for the separate untrusted-writer reachability checks. Refuse noninherited capabilities before attach writes, and explain the inherited grant requirement in the refusal labels and runbook. Test both inherited neighbors and signaling a scratch backend. Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Concurrent index builds release the ordinary migration key so a shipped blocking migrator can finish without retaining a snapshot behind the build. Retry from the catalogs and checksum ledger, and acknowledge a WAL fence on recorded reruns. Signed-off-by: zlareb1 <[email protected]>
Claim a fresh directory UUID before acceptance writes, and compare the generation, registration and exact fingerprint pair on control mutations. Keep every local acceptance transaction on its attach-lock backend and stop after a lost session. The additive router column permits older data-plane reads and inserts. Online control requires turnover of older clients and router handlers; the recovery guide covers claimed state cleanup and offline generation rotation. Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Refuse explicit open requests under the guarded attaching row lock, preserving quota atomicity and the durable zero-placement boundary. Inventory control writers and their required boundaries, including dynamic cleanup SQL. Signed-off-by: zlareb1 <[email protected]>
Concurrent index builds release the ordinary migration key so a shipped blocking migrator can finish without retaining a snapshot behind the build. Retry from the catalogs and checksum ledger, and acknowledge a WAL fence on recorded reruns. Signed-off-by: zlareb1 <[email protected]>
Send public driver cancellation before aborting the transport, within one absolute cleanup deadline. Separate borrowed migration execution so its operator keeps sole session supervision. Verify backend lock release and preserve interrupted migration errors. Signed-off-by: zlareb1 <[email protected]>
Send public driver cancellation before aborting the transport, within one absolute cleanup deadline. Separate borrowed migration execution so its operator keeps sole session supervision. Verify backend lock release and preserve interrupted migration errors. Signed-off-by: zlareb1 <[email protected]>
Supervise bounded Postgres phases independently, reserving cleanup inside each existing deadline. Send public close while query and transaction work are alive, then cancel and reap within that same bound. Borrowed checks and trigger DDL leave failed-session cleanup to their owner. Bound the lock owner's close and preserve its original failure across cleanup errors or repeated cancellation. Keep wait floors and normal busy retries. Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Supervise bounded Postgres phases independently, reserving cleanup inside each existing deadline. Send public close while query and transaction work are alive, then cancel and reap within that same bound. Borrowed checks and trigger DDL leave failed-session cleanup to their owner. Bound the lock owner's close and preserve its original failure across cleanup errors or repeated cancellation. Keep wait floors and normal busy retries. Signed-off-by: zlareb1 <[email protected]>
Supervise attach, prepare, removal and backout on their exact lock backend. Keep cleanup inside phase deadlines, forward fatal guard exceptions after close, and retry mode contention only after acknowledged rollback and ownership checks. Signed-off-by: zlareb1 <[email protected]>
Register each owned database and session as it is acquired. Attempt every cleanup when setup or teardown fails and preserve the original setup or body error. Keep all native assertions and deadlines unchanged. Signed-off-by: zlareb1 <[email protected]>
A scan can outlive its ATTACH backend and recreate tenancy through the pool after fenced cleanup. Use the existing owner transaction for each unchanged batch and stop after an unknown commit. Keep synthetic request state scoped in its test, account for the tracker owner, and attempt every native fixture cleanup. Signed-off-by: zlareb1 <[email protected]>
A stalled backend can outlive bounded client cleanup. Require exact-holder verification when release cannot be proved. Signed-off-by: zlareb1 <[email protected]>
Backend termination can remain unproved after cleanup, and later-cell removal verifies paired stores. Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
A whole-run query-log scan loses later cost evidence at an unidentified database refusal. Sample the API tail once within the existing limits, retain only numeric categories and error codes, and reuse the observation after settlement. Keep the original acceptance workload and deadlines. Signed-off-by: zlareb1 <[email protected]>
Consume exactly one bounded API cost observation before each arm's worker records and verify its later reuse. Bound the affected owned-task tests and always release their fake blocking work without changing their assertions or product deadlines. Signed-off-by: zlareb1 <[email protected]>
Share canonical candidate preparation to remove repeated normalization without changing ranking, attestation redirects or stored rows. Cover the measured normalization work and duplicate-row semantics. Signed-off-by: zlareb1 <[email protected]>
Self-mapped rows carry identical mention and canonical strings. Normalize that rendered input once while retaining separate normalization for different strings and preserving all resolution, attestation and persistence decisions. Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Keep the shared Unicode normalization and both length caps while removing unused entity IDs, aliases and objects. Preserve complete resolver outputs and original native deadlines. Keep the private Postgres index drill outside the default ephemeral port range. Signed-off-by: zlareb1 <[email protected]>
Generate the combined CLI help from its parser so native cell commands and account connection commands remain visible together. Signed-off-by: zlareb1 <[email protected]>
Score already normalized candidates with their prepared compact forms. Keep raw-input normalization, ratio order and complete resolver decisions unchanged. Signed-off-by: zlareb1 <[email protected]>
Two exact scores close enough to one rule out the required winner gap. Return the same self decision without scoring the remaining candidates. Keep full decision and row controls, and state that attach dry-run still records command participation in the docs and generated CLI help. Signed-off-by: zlareb1 <[email protected]>
Use a nonblocking stdin reader inside the connected command lifetime so interruption completes retirement without waiting for stdin to close. Preserve confirmation, EOF refusal and the fresh acceptance check before release. Signed-off-by: zlareb1 <[email protected]>
Keep EOF and decline controls on the confirmation helper while descriptor tests exercise real stdin. Preserve the existing owner and no-write assertions. Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
4 of 5 tasks
Signed-off-by: zlareb1 <[email protected]>
A reaped router migration command has no service termination signal. Mark it complete after its checked zero exit so cleanup preserves that result while retaining descendant cleanup, the child census and pidfds. Signed-off-by: zlareb1 <[email protected]>
Retain owned connection openings and close children through completion, then verify the authority pair and backend absence under the existing retirement deadline. Apply the same evidence to manual and dead-process recovery, preserving first errors and supported rolling upgrades. Signed-off-by: zlareb1 <[email protected]>
Supply explicit clients and absolute deadlines, verify fresh authority metadata, and observe terminal pool cleanup before certification. Preserve first failures, cancellation identity and refusal controls; distinguish reversible pre-enrollment cleanup from permanent completion. Signed-off-by: zlareb1 <[email protected]>
The store-admission fixture completes the native participant before the outer disconnect. Assert that completion and forbid a second generic pool wait while retaining both client disconnects and the admission order. Signed-off-by: zlareb1 <[email protected]>
5 tasks done
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.
Related: #693
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
loom cell attachplaces a prepared first cell's orgs, installs tenancy triggers and activates routed traffic. Attach verifies store pairing and fences stale control requests; native commands retain ownership through database and process retirement, and the HelmretireLostPodsflag is removed.Why
A prepared first cell can serve routed traffic only after placements, tenancy mode and triggers agree. Attach advances those states in order, verifies the durable result and resumes from recorded state. An already-serving cell must pass deployment, configuration, cell and bucket-pairing checks before attach reports success.
Scope and risk
Attach scans declared org sources in bounded batches, checks writer privileges and process evidence, places orgs and raises tenancy mode to
enforced. Each tenancy batch uses the exact supervised ATTACH backend. A lost backend cannot resume through another connection; an unknown commit is not replayed.Directory mutations compare the full registered configuration and a fresh server-generated UUID claim. Stale requests refuse even when configuration returns to earlier values. Cleanup preserves the first failure. Client termination alone does not prove backend termination or lock release.
Native commands enroll before a fresh acceptance read and retain ownership through their work and cleanup. Authority Postgres sessions carry their participant tag at startup. Retirement drains application work, seals further PG openings, retains unfinished pool and native-control children, verifies the exact fresh store pair and requires backend absence, including idle sessions. Its metadata-only verifier must close within the same absolute end. Local abort or process death alone never certifies completion. Manual retirement and every death-recovery sweep use the same predicate; later positive absence can resolve an uncertain close. A terminal outer disconnect starts no second cleanup wait. Retirement covers request tails, background producers and database work. Expired heartbeats, deleted pods and completed rollouts do not prove physical death. Unknown identity or query settlement refuses retirement. Dry-run records normal participant enrollment and retirement while leaving cell state, tenancy triggers and placements unchanged.
Claim-release confirmation stays inside its enrolled command lifetime and reads stdin without a blocking executor thread. Interruption removes the owned readiness callback and restores stdin blocking mode before retirement; a fresh acceptance check still immediately precedes release.
Online Postgres index creation checks physical readiness separately from ledger visibility and verifies synchronous durability. Head locking sorts all six identity columns before correlated exact-key locking probes. Entity resolution reuses normalization within each fetched row and prepares candidate indexes once. Text-only normalization uses the shared capped normalizer without constructing discarded entity records, IDs or aliases. Prepared pair scoring also reuses its canonical and compact strings; direct raw-input scoring keeps both original normalizations. Candidate scoring stops when two exact scores prove that no possible winner can meet the existing gap; otherwise stable score ordering and the same entropy, score and short-name checks apply. Scoped SQL, complete redirect rows, scoring, attestation and the 5,000-row bound remain unchanged. No cross-request cache is added.
The independent final provenance proof reuses the checked delivery-row normalization for both full-row equality and its expected proof chain. It retains every row, audit, revision, scope, cardinality, snapshot and chain check, the fixed workload and the original deadline. Completed finite fixture commands retain their successful terminal result through cleanup. They remain registered for descendant cleanup, final child census and descriptor closure. Long-running services keep their existing owner-signal and terminal-status checks.
Diagnostics retain bounded status, elapsed time, allowlisted codes and source sites while excluding response content, SQL, addresses and credentials. Principal risks are incomplete control-fleet turnover, writer roles that bypass tenancy checks and configuration changes during attach. Later-cell administration and the complete capacity model remain separate concerns.
Committed heads remain current, search validates authority heads, and tenant isolation, redaction and erasure remain mandatory. Ranking, candidate selection and publication policy are unchanged. Fake-I/O controls do not establish normal-load latency or native acceptance.
Compatibility, rollout and rollback
loom mint-tokenrequires reachable, migrated stores; offline minting refuses.loom participant retire --yesis removed. Manual retirement requires a trusted host that can prove exact physical death and settled queries. The HelmretireLostPodsoption and its automatic API-token mount and pod-read RBAC are removed: a deleted pod does not prove physical process death. An explicitly requested service-account token mount remains supported.CONTROL_UPGRADE_REQUIRED. No data-plane operation is removed.docs/operations/cell-control.md, and followdocs/operations/cell-attach.md. Prepare and attach require direct Postgres connections and a synchronous standby. Rotate the ClickHouse writer credential after cell rollout and before attach.loomauthority sessions, including idle legacy pools, to drain. Other tagged participants can remain. Verified immutable ClickHouse-authority recovery needs no PG connection; missing or contradictory authority metadata refuses.LOOM_NATIVE_COMMAND_DRAIN_TIMEOUT_Sdefaults to 15 seconds.LOOM_WORKERS_CHILD_RETIREMENT_TIMEOUT_Sdefaults to one second, capped by the original remaining stop or restart allowance. Both must be positive and finite; expiry leaves retirement unproved.Tests
Postgres retirement has a causal 17-case regression: twelve intended assertion failures and five passing controls become the same seventeen passing cases after positive authority-session settlement is required. Final-head full CI and native acceptance pass as detailed below.
Meaningful regressions retain the same failure and success controls:
The unchanged seventeen PG-settlement cases exercise real native ownership, close, retirement predicate and certificate writing with external IO seams. Unknown close acknowledgement, remote sessions after local abort, resistant application children, mismatched or unknown metadata and cancellation preserve the first failure and prevent a false certificate. Acknowledged close, ClickHouse authority and later positive absence remain controls. Thirty-five additional lifecycle cases cover every recovery entry point, raw legacy ordering, retained pool close, pool/codec/acquire/seal/fork races and duplicate outer cleanup. Existing affected caller checks pass in groups of 91, 14 and 35. One earlier combined caller invocation reached the unchanged 90-second supervisor limit because a fake CH getter omitted its imported alias; that incomplete result is retained, and both aliases now select the same fake IO client without mocking settlement. These checks use no live database and do not replace PG16/18 or native CI.
Follow-up retirement-contract checks pass 110 first-error cases, 25 completion cases, 81 wrapper cases, 14 tracker cases and five shutdown/recovery cases. Their fake authority reads use the exact recorded-metadata query; the real settlement predicate stays active. Terminal pool-close observations precede certification and forbid a second generic close after permanent closure. Every observed retry retains the original end, and first-error/cancellation identity and negative certificate assertions remain. Two newly added count expectations fail before correction: three carry settlements require a fourth, final retirement check, and nested pre-enrollment refusal paths can invoke reversible cleanup twice. Both failures are retained; the affected modules pass after their test-only count corrections. The genuine two-replica fixture now uses the same UUID authority-ID format as normal deployment creation; its live check runs in CI.
A tracker store-admission case fails its old generic-pool-close expectation after its fake participant teardown marks retirement complete. The same case and four admission/cleanup controls pass after asserting one enrolled completion, the closed gate and no second generic pool wait. Both client disconnects, initialization and admission order remain checked; this fixture does not claim real PG settlement.
Nine attach and diagnostic assertion failures plus twelve passing controls become the same 21 passing cases.
Five persisted-state failures and two healthy exact-backend controls become the same seven passing cases, including loss between thousand-org batches and unknown commit acknowledgement.
Test-owned request-bag isolation reproduces two victim failures with three controls; the same five pass after using the existing context manager. Production behavior and victim assertions are unchanged.
Native enrollment, first-error preservation, repeated cancellation, exact physical-death proof, process census and diagnostic secrecy have focused controls. The directly related attach cohort passes 16 cases. All 254 assertions across six corrected database fixtures remain unchanged.
Three confirmation regressions demonstrate cancellation termination failures with an open empty pipe, consumed partial input and an open terminal; six answer and EOF controls pass. The same nine pass after the nonblocking reader correction, with one enrollment, retirement, restored descriptor state and no release after cancellation. That confirmation correction retains the pre-existing native-command assertions; the authority correction supplies their explicit fake metadata client. Two older claim-release tests replace only their confirmation stubs and retain all 25 assertions. A follow-up invocation of the complete command module was refused before test execution and is not a pass.
The unchanged 15,700-head and 2,500-absent-key regression demonstrates the five-second statement-budget failure before the head-lock correction. The same regression passes in authenticated Postgres 16 and 18 batches with deadlines, indexes, rows and ordering unchanged. The physical-standby index drill passes after committing its explicit ledger transaction before the standby assertion; all 14 assertions remain. The final-head native result is recorded below.
Fourteen cost-extractor cases demonstrate thirteen assertion failures and one cancellation control; the same fourteen plus four sample-placement controls pass. The bounded sample is reused in the physical receipt. A reader regression demonstrates three failures with six strict controls; the same nine pass. Missing, duplicate, foreign-arm, private, oversized or changed records refuse. Forty related task-ownership cases pass with all 337 original assertions unchanged.
Normalization work has causal failure controls plus complete output, candidate, score, redirect and attestation controls. Equal rendered row fields share one normalization. Compact scoring now filters its already-normalized inputs directly: two excessive-work failures and fourteen controls become the same sixteen passing cases. Those cases, original resolver controls and the unchanged 5,000-row profile pass together: 89 cases. The profile records 6,301 normalizer calls, down from 7,583, with the same 641 scored pairs and 1,282 similarity calculations. Its single unprofiled CPU observation is 139.8 ms versus 147.1 ms before this correction; these fake-row observations establish neither statistical significance nor native latency.
Text-only normalization reproduces one allocation assertion failure with thirty passing text, identifier and alias controls. The same cases plus existing canonicalization, resolver, prefilter and frozen 5,000-row controls pass together: 200 cases. Both Unicode length caps, structured output, 6,301 normalizer calls, 641 scored pairs and 1,282 similarity calculations remain unchanged. Unpaired synthetic CPU observations range from 137.6 to 187.5 ms and establish no speedup or native headroom. Both original CLI snapshot checks also pass against the composed parser, for 202 related passing cases.
Three prepared-pair regressions fail only on repeated normalization counts after asserting identical decisions and both ratio calls per pair; 32 controls pass. The same cases and all original entity, prefilter, text-normalization and graph controls give 287 passes. The unchanged synthetic 5,000-row case passes complete decision, insert, scope, attestation and redirect comparisons. It records 5,019 normalizer calls instead of 6,301, with the same 641 scored pairs and 1,282 ratios. Its counter observes the shared prepared scorer; workload, independent output oracle and every assertion remain unchanged. Removed redundant work establishes neither native savings nor sufficient deadline headroom.
Six fixed-key regressions fail only on excess real scoring calls after complete independent decision equality; nine gap, boundary, singleton and later-winner controls pass. The same fifteen pass after the gap bound. The original 35 prepared-scoring controls and unchanged 5,000-row case also pass, including every expected row, setting, tenant scope and attestation assertion. Its physical profile records 567 scored pairs, 1,134 ratios, 2,929 overlap tests and 5,019 normalizations, compared with 641, 1,282, 4,993 and 5,019 before the bound. These are one synthetic workload's actual counts, not native savings or deadline headroom.
Two delivery-page cases fail only on duplicate normalization counts after complete typed row, audit, revision, ClickHouse and four frozen chain checks. Fourteen wrong-row, origin, revision, hash and multiplicity controls plus an API control pass. The same seventeen pass after reusing the checked normalization. An initial invocation refused the local protocol file permissions before reaching those checks; it is preserved separately and is not the meaningful baseline. The tests use the existing owned protocol-copy fixture with unchanged bytes and hash, ownership and symlink checks. They stop after their completed small page and do not manufacture a successful full-workload proof.
A completed finite router command reproduces one false cleanup refusal with nineteen passing controls. The same twenty pass after marking the verified successful command complete. Real command, terminal receipt, failure ledger and cleanup code are exercised with process, kernel and clock seams. Populated adopted-child cleanup, refusal on a remaining child, descriptor closure, failed or pending commands, diagnostic errors, preserved first failures, strict service outcomes and escalation refusals remain covered. This focused check establishes the cleanup classification correction; the final-head native acceptance passes with the completed command cleanup retained.
Both CLI snapshots use their original generator functions. Recursive comparison finds only the dry-run help substitution in each output. An additional comparison invocation did not start; it is not a pass, and CI retains both snapshot checks.
Thirteen observer controls pass for fixed sampling, exact application and tracing delegation, inherited and detached contexts, error and cancellation identity, record bounds, numeric-only publication and diagnostic I/O failures. The observer retains six fixed native API request positions and at most 192 records or 64 KiB. It adds no request, acceptance exception, threshold or deadline change. Process CPU and span intervals can overlap and must not be summed as exclusive request CPU.
The trigger workload retains its fixed identities, payloads, order, thresholds, request timers and original 7,020-second useful-work deadline. All five prior completed attempts remain invalid. The first completed all 20,500 API writes and 25,000 deliveries before the deadline interrupted final staged verification. The second completed 19,242 API writes and 22,500 deliveries. The preceding prepared-scoring build completed 19,180 API writes, all HTTP 200, and 22,500 deliveries before the deadline cancelled the next write in arm 9. It leaves 1,320 API completions and the last 2,500 deliveries unproved; client cancellation does not prove backend rollback. Its API calls account for 6,540.0 seconds and delivery loops for 66.1 seconds. Source verification, participant retirement and owned-store cleanup succeeded separately. Six fixed request samples show entity work extending beyond response completion, with overlapping process CPU; they establish neither an exclusive cause nor a speedup. That head's Postgres 16 and 18 jobs pass, while trigger acceptance fails. The gap-bound build then completed all 20,500 API writes, all HTTP 200, and all 25,000 deliveries across the ten settled arms. Both provisional statistical limits are true, but the unchanged 7,020-second work deadline was reached during independent final provenance. Its final provenance certificate is absent and a secondary terminal-outcome refusal remains. Source-before and source-after agree on the actual tested merge, including the entity-resolution correction; participant retirement, closed ports and sessions, database teardown and removal of all three owned containers have positive receipts. Those cleanup observations do not convert the invalid workload acceptance into a pass. That build has 51 successful checks, two expected publication skips and the failed trigger check. The next composed run completes all 20,500 API writes, all HTTP 200, and all 25,000 deliveries, then completes the independent 45,500-row provenance certificate. All row, revision, scope, cardinality, snapshot and four-chain comparisons pass. Its sole retained refusal is cleanup terminal-outcome classification: a successfully reaped finite router command is later treated as a long-running service requiring a recorded termination signal. Source-before and source-after agree on all nine checked inputs; participant retirement, closed ports and sessions, database teardown and removal of all three owned containers have positive receipts. Individual command terminal contents were not published, so the role and status diagnosis follows the mandatory source path rather than an uploaded per-command receipt. This run remains invalid; its provisional statistical limits do not override cleanup failure. Both Postgres versions and both Quickstarts pass; the lesson fixture failure is corrected by the unchanged merged per-test-org fix. Final-head full CI and native acceptance pass as detailed below. Removing duplicate normalization proves neither native time savings nor deadline headroom. The successful final-head attempt below is separate; none of those failures is waived.
The private physical-standby index drill uses a host port below the default ephemeral allocation range and a matching DSN. An unavailable bind still refuses; ownership, cleanup and all drill assertions remain unchanged.
An earlier pushed head fails a Java parser linear-cost assertion, whose source cause remains unproved. A later head passes that shard without a parser correction; no flaky-test or causal-fix claim follows. The next composed head exposes missing explicit deadlines and stale native cleanup fixtures in unit shards 5 and 6; those failures and their scoped fixture corrections remain recorded; final-head CI passes as detailed below. A subsequent unit shard exposes the tracker fixture expectation above and a Python import-parser CPU-growth assertion. The tracker correction is test-only; the parser source cause remains unproved, with no threshold change, retry or flaky-test claim. Dependent skipped checks are not passes. Scoped formatting and Ruff pass; type checks run in CI. The whole-source census keeps strict expected roots and equality checks. Its two additional declarations identify connected-account erasure writers by exact function, operation and table placeholder; they do not exclude cell-control mutations or relax the scanner.
The preceding composed CI run passes Postgres 16 and 18 and both Quickstarts. Its lesson-retrieval integration test fails because two tests share an org: a valid row from the second test breaks the first test's exact three-row assertion. The current tree takes the already-merged per-test-org correction unchanged. Both tests and all seven assertions remain. The final-head CI result is recorded below.
Full final-head unit, coverage, integration, Postgres 16/18, mixed-version, Quickstart, browser and trigger acceptance checks pass in GitHub CI. Fresh independent review covers all 199 changed paths with no findings or nits. Broad suites run only in GitHub CI.
Final-head verification has 52 successful checks and two expected publication skips. Both Postgres majors pass 836 main cases, with one skip and one unexpected pass, plus 354 auth-isolation cases, six reconcile drills and the dedicated physical-standby promotion case with zero skips. The real two-replica case is selected with live API and router prerequisites; quiet main logs establish selection and aggregate success, rather than an individually logged outcome for every case. The identities of the lone main skip and unexpected pass are not established by those logs.
The final native run passes all ten fixed arms: 20,500 API writes and 25,000 deliveries, followed by the complete independent 45,500-row provenance certificate. Typed rows, revisions, scopes, cardinalities, both snapshots and all four proof chains agree. Source pins match before and after the actual CI merge. The outer result passes with an empty failure ledger; all three participants retire, owned ports and Postgres sessions close, all four owned databases drop, and the three exact owned containers are removed without errors. The preceding finite-command cleanup refusal is absent.
The fixed arm summaries give median per-arm p99 of 526.998 ms with triggers on and 564.641 ms with triggers off, a difference of -37.643 ms against the unchanged maximum increase of 10 ms. Delivery throughput loss is 2.315% against the unchanged 10% limit. The original work, wall and provenance-command limits remain unchanged. These observations meet the acceptance limits; they establish neither causal speedup nor spare deadline headroom. The sanitized artifact omits individual command terminal contents and raw runtime logs. Bounded independent review reads the small receipts and matching mandatory verifier source, leaves large intent payloads unread, and does not claim a second request-by-request scan. The completed native certificate supplies the full content proof.
AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Claude Code and Codex. Independent reviews cover the complete change, failure paths, store pairing, operator procedures and regression evidence.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist