European event procurement · build status

Procurevent

From a request, through quotes and a comparison, to an award and somebody turning up. The ledger is the authority; this page is generated from it and from nothing else.

generated 2026-10-11 09:24 UTC tree c985473 (uncommitted changes present) 261 slices from docs/BUILD-LEDGER.md

Overall

93%complete
244 complete1 in progress9 blocked7 not started 261 total

Phases

Slices

P1 – P260 · 261 slices

244 complete · 1 in progress · 9 blocked · 7 not started

Every module

SliceNameStatusThe ledger’s note
Slices
P1Schema foundation and enumscomplete0001. Types, uuidv7, the forbid_mutation trigger that makes five tables append-only.
P2Identity and tenancycomplete0002. Organisations, workspaces, users, memberships, roles. db/test/isolation-test.sh, 18 assertions.
P3Federation and taxonomycomplete0003. Every federated table carries its own uuid plus a (source_id, external_id) natural key — the shape event.clinic's R6 later required, built five days earlier. D-112.
P4Suppliers and compliancecomplete0004.
P5Events and requestscomplete0005.
P6Clarifications and submissionscomplete0006.
P7Evaluation, approval, award tablescomplete0007. awards, award_snapshots, award_line_items, award_notifications.
P8Handoff, catalog, notifications, auditcomplete0008. Tables only; the handoff feature is P24.
P9Row-level securitycomplete0009, 0010. Every table forced. Never tested as the database owner — BYPASSRLS would make the suite pass against no security at all.
P10The privilege modelcomplete0021. Both databases fail closed: a table with no grant produces permission denied naming it, loudly, on the developer's machine. ./db/privilege-audit.sh.
P11Migration governancecompletemigration-ledger.sh, apply-migrations.sh. Migration state is measured, never recorded.
P12Sign-up and provisioningcompleteClerk, db/test/provisioning-test.sh and api/test/provisioning-api-test.sh, 50 assertions between them.
P13The request buildercompleteTen chapters, lots, criteria. api/test/workspace-api-test.sh, 141 assertions — the largest suite in the repository.
P14Budget, scope and timelinecomplete0017. db/test/budget-timeline-test.sh, 18.
P15Issuing a requestcomplete0022, and 0042 which moved the per-lot budget out of the snapshot after measuring that an invited supplier could read it. db/test/issue-request-test.sh, 42.
P16Inviting supplierscompletedb/test/invitation-target-test.sh, 17.
P17The supplier answerscompleteInterested or declined, with a reason the buyer reads. api/test/supplier-api-test.sh, 50.
P18Clarifications and notescomplete0016. db/test/note-visibility-test.sh, 12.
P19Bid feescomplete0031. db/test/bid-fee-test.sh, 29.
P20The supplier's quotecomplete25 fields, two-press send, everything locks on submit. api/test/quote-api-test.sh, 63.
P21Submission deadlinescomplete0036. db/test/submission-deadline-test.sh, 16.
P22ComparisoncompleteLot by lot, with exclusions. 0051 keeps every verdict rather than overwriting it, and records whether the prices were already visible when each was made (D-120). On production 2026-08-14. api/test/compare-api-test.sh 29 and db/test/exclusion-verdict-test.sh 32.
P23Awarding and issuingcompleteStages 9 and 10. Split awards, two-press confirm, email notices. On production 2026-08-13. award-api-test.sh 33, issue-api-test.sh 39, award-reference-test.sh 12.
P24The handoffcompleteStage 11. On production 2026-08-13. Scope, build-up and strike windows, site address, the person each side phones, a checklist. 0049 closed a defect that let a supplier rewrite the buyer's terms and delete the record. A list at /handoffs for both sides — without it the only route in was one tender's comparison screen. 0050 added the supplier's own tick (D-118) and the delete guard (D-119). handoff-api-test.sh 75, handoff-ownership-test.sh 20.
P32ApprovalscompleteD-122, D-123. A threshold, a queue, sign-off, delegation, and a trigger that refuses to issue an unapproved award. 0052 also closed a defect that would have made the module decorative: any member of the workspace could approve a step assigned to somebody else, and force the instance outright. approval-authority-test.sh 23, approval-api-test.sh 32. On production 2026-08-14 — measured, not inherited: migration-ledger.sh prod reports 0052 present, and the deployed Worker answers /v1/approvals 401 while a deliberately invalid control path answers 404.
P25Supplier discoverabilitycomplete0038, 0039. Being findable by a signed-in buyer and being readable by anyone are different permissions. db/test/supplier-discoverability-test.sh, 27.
P26The public supplier directorycompleteapi/test/public-directory-api-test.sh, 23. Q-047: a supplier opts in through its own control, and the copy states the consequence beside it.
P27Directory sync from event.cliniccompleteQ-054 closed: the per-venue detail request is opt-in, so a full live run went from never finishing to 1m34s, 30 845 venues. D-116. Run against production on 2026-08-22: 30 845 venues in 3m42s, then 743 hotel chains backfilled after D-171. api/test/sync-test.sh, 161.
P28Billing and subscriptionscompleteStripe, 0040 and 0041. The webhook re-fetches the event from Stripe rather than trusting the posted body. api/test/billing-api-test.sh, 35.
P29The marketing sitecompleteAstro, static, nightly rebuild. Never renders fabricated records as real.
P30The platform consolecompleteapi/test/platform-api-test.sh, 19.
P36EventscompleteOn production 2026-08-13. List, create, edit, and a request may name one — scoped so it cannot name a rival's. D-117. Closes the gap that made the handoff's date seeding dead code. api/test/events-api-test.sh, 26.
P31Immutable personal datacompleteD-016. IDs in append-only records, never names. db/test/immutable-personal-data-test.sh discovers the tables from the catalogue on every run, 11 assertions with 4 controls.
P34Supplier performancecompleteD-129 to D-133. A directory with no performance history is a list; this makes it a record. 0054 closed the eleventh instance of the recurring defect — a buyer could score a supplier it had never worked with, rewrite 1/5 to 5/5 after the supplier had read it, delete a shared review outright, and leave four reviews of one supplier. The READ half of that table was already careful, which is what made the write half easy to miss. Deliberately NOT append-only: comment is free prose that will name a person, and D-016's tables have no erasure path at all. review-authority-test.sh 26, review-api-test.sh 36 — both raised from 20 and 32 by D-142, which made a shared review correctable with the correction visible. On production 2026-08-15.
P33Purchase orderscompleteD-124 to D-128. What an accepted award becomes: a reference the supplier invoices against, and a record that they agreed to fill it. 0053 closed the tenth instance of this project's recurring defect — the buyer could mark its own order confirmed and delivered, and rewrite the total after delivery, while the supplier those words are about could not write the row at all. Two lanes, enforced by a trigger and a narrow function rather than by the routes. Q3 (D-143) then reversed D-128: an award may be called off more than once, capped at its own value and scaled to what is left, with the remainder derived rather than stored. order-authority-test.sh 38, order-api-test.sh 36. 0055 then fixed a defect found the same night: 0053 built the order from award_line_items, a table nothing in this application has ever written, so every real order would have arrived with no lines and a 0.00 total — both suites were green because both seeded that table themselves. Now built from submission_line_items, the same rows awardLot values the award from, with a refusal when the two disagree (D-134, closes Q-057). On production 2026-08-15.
P35aDocumentscompleteD-136. Every file the caller can reach in one place, with what each file's visibility actually means spelled out beside it — until now a file was reachable only from inside the one tender it hung off. The list scopes to the caller's own files and the tenders they can see: trusting attachments_read alone returned 113 other organisations' public company logos to every caller, including a supplier with no relationship to anybody. documents-api-test.sh 10, forced red by removing the scope. On production 2026-08-15.
P35bReportscompleteD-144, D-145. The retrospective questions Home does not answer: who we award to (awarded value beside what has actually been called off), who replies (four counts, never a bare percentage), how long we take from issue to award, and month by month. No SECURITY DEFINER in it — an aggregate counting unreadable rows leaks the size of everyone else's business without showing a row of it. reports-api-test.sh 16, forced red by disabling RLS on awards. On production 2026-08-15.
P37The audit logcompleteD-137 to D-141. An MVP requirement in the brief that had never recorded a row: audit_events existed since 0001 with policies, a privilege-audit entry and an immutability suite, and held 0 rows on local and 0 on production. Now written by record_audit() triggers on requests, invitations, awards, orders and reviews — triggers and not routes, because an API-written log misses set_order_status(), psql, and the next route somebody forgets. Owner decisions of 2026-08-15: erased with its tenant, buyer-only readership, amounts recorded, no screen yet. 0056 also closed a defect in 0009 that let any tenant forge events into its own trail. 0057 and 0058 fixed six foreign keys — two of mine and four older — that made teardowns and user deletion impossible. audit-log-test.sh 19, each guarantee forced red separately. On production 2026-08-15, and already recording rows there.
P38In-app notificationscompleteD-146, D-147. The other half of an MVP "Yes". Written by notify_on_change() triggers on awards, orders and reviews, addressed to the party on the OTHER side of the act, and PERSONAL — a colleague marking theirs read does not clear yours. A bell with an unread count in the header, and a feed that does not clear itself on sight. 0061 also closed a defect in 0009 that let a user insert into their own feed. notifications-api-test.sh 25, forced red by opening the insert policy. On production 2026-08-15.
P39Compliance documentscompleteD-148 to D-152, owner-confirmed on 2026-08-15, and the last of Q-058 — which is now closed. A supplier files what it holds; a buyer that has invited it verifies or sends it back. 0062 closed the twelfth instance of the recurring defect and the second inversion of it: compliance_documents_write named which row and never asked what or by whom, so a supplier could stamp its own insurance certificate verified while the buyer doing the verifying could not write the row at all. All four controls passed before the fix, which is what made it look finished for eleven migrations. Verification carries its author (D-150) because the status column is shared by every buyer — no screen renders a bare "verified". The types vocabulary was seeded as part of the work: both databases held 0 rows, and an upload screen with an empty dropdown is the same dead module in different clothes. Two defects found only by opening the screen, with 1473 assertions green: a test fixture that had leaked 96 rows into the dropdown (D-151), and every date rendering a day early (D-152). compliance-authority-test.sh 20, forced red four separate ways; compliance-api-test.sh 37, forced red by disabling RLS and by dropping the refusal translation. compliance-attachment-test.sh 11, forced red four ways including WIDENING the branch. On production 2026-08-16.
P40The supplier directorycompleteD-158. The last nav item a buyer could click and be told it did not exist — and every piece it needed was already built with no page to live on: the search (P25), the performance projection (P34) and compliance (P39). So it composes rather than adds: no new route, no new policy. Opening it found a defect a suite could not: serviceCountries left /v1/suppliers as the STRING {HU,AT} while its type said string[], because that projection never cast ::text[] — invisible for as long as nothing rendered the field, and an instant crash once something did. suppliers-api-test.sh 23, asserting the JSON type rather than the printed value. On production 2026-08-16.
P41The organisation and its peoplecompleteD-154 to D-157. An organisation could not acquire a second person: POST /v1/invitations had existed since 0024 with nothing in the application calling it, and /v1/invitations/accept had no route in the app at all — so the link Settings hands out would have 404'd. Now: a members list, an invitation, the one-time link shown with what it is, and a screen that accepts it. 0065 closed instance fourteen — the authorisation check asked whether you were a member and never which role you held, so a viewer could mint a buyer_admin. 0066 then made an invited colleague visible to the organisation that invited them, because the membership was legible and the person it named was not. invite-authority-test.sh 9 and provisioning-api-test.sh 37, both forced red. On production 2026-08-16.
P42Navigation that matches the organisationcompleteD-159. Every signed-in person was served the buyer's menu, so a supplier was offered Requests, Approvals, Reports and the supplier directory. Those screens do not error — RLS returns nothing — which is worse than an error, because an empty screen reads as "you have no work". Suppliers now have their own seven items. Five NotBuilt routes were also deleted: they had been unreachable since the screens behind them shipped, because React Router takes the first match, and the comment above them promised a deletion that never happened. No suite covers a menu; both were read from a browser as each kind of organisation. On production 2026-08-16.
P43Creating and issuing a requestcompleteD-162, D-165, D-166. The application could not create a request, and could not issue one. Both routes existed, both were covered by suites — requests-api-test.sh and issue-request-test.sh's 42 assertions — and neither had a caller. The intake screens wrote a draft into localStorage and stopped; a buyer could answer every question, press the only button, and nothing would exist outside their own browser. Found by walking the flow a new buyer walks first, which no fixture does: stage10-browser.sh seeds a tender that is already issued. Also fixed: inviting the only match said it had not been found, because inviting removes a supplier from the results and the empty state only knew how to say "nobody registered". Walked end to end in a browser — create, invite, set the timeline, issue — ending status=issued number=REQ-2026-0001. The loop then closes the rest of the way: the supplier answers, prices and submits, and the buyer compares and awards — D-167 added the whole-request award, without which a request with no lots, which is what the RFQ route creates, could not be awarded at all. On production 2026-08-16.
P44Guards against shipping what nobody can reachcompleteD-163, D-164, D-166. Two scripts, both forced red before being believed. scripts/deploy.sh measures the production ledger and refuses rather than warns: 0067 adds a column the API now selects, so deploying ahead of it fails every authenticated request rather than losing a feature. scripts/surface-audit.sh reports API routes nothing calls — the shape behind three defects in two days — and now runs inside verify-all with --strict, because a guard nobody runs is the same defect one level up. The audit was wrong four separate ways first, each found by sabotage and each recorded in D-166. On production 2026-08-16.
P45A supplier asks a questioncompleteD-169, D-170. Brief §7.1 gives the supplier responder *"view invitations, ask questions, submit and revise quotes"* — quoted in SupplierHome.tsx's own header, and never built at any layer. The route answered 405, and nothing in the application had ever written clarifications; the buyer could answer questions that could not be created. 0068's INSERT policy answers all four questions the recurring defect keeps splitting apart — which request, whose name, what state, what scope — and a supplier files supplier_private because broadcasting its own question to every rival is not the asker's decision. clarification_deadline_at is now enforced rather than drawn on a timeline. clarification-authority-test.sh 13, forced red three ways; supplier-api-test.sh 57. On production 2026-08-16.
P46Companies from the event.clinic directorycompleteD-176, and D-173's reference only. directory_companies held 0 rows on production while 27 284 companies sat upstream — not a failed run, but a resource the sync did not implement, so --resources companies was not an argument you could pass. The header said companies were "blocked by the schema", true of organizations and no longer the reason after 0013 added a table that is not a tenant: the third time in this one file a true statement quietly became false and went on telling readers not to look (see P27's D-171). Field coverage was measured across 1 000 rows sampled at 25/50/75% and the tail rather than page one, which is alphabetical and markedly less complete — trading_name and sectors read 0% and are mirrored anyway, because dropping a declared field because it is empty today is exactly the D-171 defect. organization_id is absent from the mirrored list on purpose: it is the claim a buyer makes, and the sabotage that adds it fails one assertion by name. sync-test.sh 183 → 205. On production 2026-08-22: 27 284 companies, 69% with a country, 0 named (unnamed).
P47Venues a buyer can browsecompleteD-177, D-178, and D-173's browse plus buyer notes. 30 845 venues were on production and no route or screen could reach one. The handover for this slice specified the wrong storage and I wrote it: venues has RLS disabled, no policies and no organization_id, so a note on venues.internal_notes would have been readable and overwritable by every rival buyer — 0003's "LOCAL ENRICHMENT" means *not overwritten by the sync*, not private. 0069 reuses 0015's override pattern; production carried 0 notes, so it arrived before the first one. Two rationales I wrote into that migration were then disproved by sabotage and corrected in the file (D-178) — a wrong reason in a comment is worse than none. Capacity, star rating and street address are deliberately absent: each is populated 0 times across all 30 845, and a column of dashes reads as a bug here rather than an absence upstream. Four of my own bugs found on the way, two of them browser-only and invisible to every suite. sync-test.sh 205 → 226, venues-api-test.sh 55 new. On production 2026-08-22.
P48A scheduled sync, and something that shoutscompleteD-181. The Worker WATCHES the sync; it does not run it. Measured before building: one full run is ~919 subrequests against Cloudflare's 1 000 ceiling, and 0014's RLS on categories needs a real session that the HTTP driver cannot hold. More to the point, a cron that runs the sync cannot report that it never ran — when it does not fire, nothing fires. So sync-watchdog.ts reads directory_sync_runs daily at 06:00 UTC and emails when a resource is stale, failed, or left a run open; silence means healthy, because a daily "all fine" mail is unread within a week. WATCHED_RESOURCES is named rather than discovered: a never-synced directory has no rows, so a discovered list would report perfect health. Verified end to end against production data and the real Brevo key via wrangler dev --remote --test-scheduled — healthy first, then forced unhealthy locally to watch the mail actually send. watchdog-test.sh 21, forced red three ways. On production 2026-08-22. Completed 2026-08-26, and the last step was not the one this row predicted. The owner ran the two documented commands and the agent loaded, listed, and could not execute: Operation not permitted, because ~/Documents is TCC-protected and a launchd agent has no Files-and-Folders grant. Nothing about the plist or the script was wrong and the install looked entirely successful — it would have failed identically at 03:15 with nobody watching, leaving one line in /tmp and a watchdog mail three days later about the directory being old. scripts/deploy-sync.sh builds ~/procuvent-live from git archive HEAD and points the plist there: outside the protected folders so launchd can reach it, and built from HEAD so uncommitted work cannot run on a schedule — the second property is why the NRÜ planner already works this way. Granting Full Disk Access to /bin/bash was the alternative and is far broader than this job needs. scripts/verify-sync-agent.sh is the other half: it checks the path, the credential and node_modules, then starts it, because launchctl list showing a job is exactly the evidence that misled here. Measured after: two full runs, finished ok in 310s and 300s, and the census now reads all three resources succeeded 0h ago against a 36h staleness limit.
P49Claiming a directory listingcompleteD-182 to D-184. The dead end D-173 accepted, closed. 27 284 companies a buyer could see and act on none of. A supplier now claims its listing at sign-up: approved automatically when its provider-verified email domain equals the listing's website host — 85% of the directory, measured, across 22 801 distinct domains with zero free-mail among them — and queued for the platform console otherwise. Two things almost shipped wrong and both were found before production. directory_companies has no RLS, so any tenant could have taken any listing with one UPDATE while the two doors stood by (D-183) — and the assertion covering it passed vacuously, because it grepped for a psql tag -q suppresses. And 0070 checked only is_platform_actor(), which reads a GUC no signed-in person sets, so the review queue would have been unworkable by any human being while every test passed (D-184). A buyer may note an unclaimed company but not mail one; Procurevent does not contact companies that never signed up. claim-authority-test.sh 66, forced red four ways including reverting each near-miss. P49b then added what a browser walk showed was missing: a supplier that already existed had no way to claim at all, so everything built for it was unreachable — the seventh instance of "exists, tested, no caller" in this product and the first I built myself. 0071 also lets Procurevent link one by hand, as a CLAIM carrying the decider and a required reason rather than a column write, so the field that decides who owns a listing never holds a value nothing explains (D-185). And all three doors were called as SELECT (f()).*, which runs a function once per output column — 13 times, measured — so the first call linked a listing and the second reported it as already claimed; scripts/side-effect-call-audit.sh now refuses the shape (D-186). On production 2026-08-22.
P50An agency sells as well as buyscompleteD-228, Q-063 owner-confirmed. 0075. An agency could not be invited to quote and could not be found in the directory — is_active_supplier_org and supplier_is_discoverable both required type = 'supplier', and 0030 excluded agencies by name. Zero agencies exist on either database, so the rule was never exercised and never contradicted. Both widened to IN ('supplier','agency'); the three properties 0030 protects — a rival buyer, the platform tenant and an archived company — still refuse, asserted. App: AGENCY_NAV is DERIVED from both menus, and /invitations mounts SupplierHome a second time because an agency landing on the buyer Dashboard had no reachable invitation queue. db/test/invitation-target-test.sh, 20, forced red first. | Completed 2026-08-23: an agency may hold a supplier profile (no policy or API gate stops it — measured, not assumed), supplier_is_discoverable asserted for an agency, and the sign-up label now states both halves. Found while doing it: REFUSED: a rival BUYER is not discoverable was VACUOUS — sd-rival held no profile, so it was refused for having nothing to discover and would have passed against a policy with the type check deleted. sd-rival and sd-agency now hold IDENTICAL tender_ready profiles and differ only in type, so the pair proves the rule rather than asserting it.
P51A founded organisation can actually tradecompleteD-232, owner-confirmed. 0076. Self-service onboarding dead-ended at its last step: every organisation founded through sign-up was pending, and nothing anywhere moved it on — measured live, 0 functions, 0 triggers, 0 API lines, 0 screens. Both supply-side helpers require active, so a supplier that signed up was permanently uninvitable and invisible. Found by writing the FIRST end-to-end agency test over HTTP; the database suites could not see it because they call found_organisation and assert the rules, not the journey. api/test/provisioning-api-test.sh now founds an agency, saves its profile through the real route and asserts it becomes discoverable — 45, deterministic over three runs.
P52The MVP promise, walkedcompleteD-234, D-235. api/test/journey-api-test.sh seeds NOTHING: both parties sign up, the supplier publishes a profile, the buyer creates a request, sets a deadline through the chapter that owns it, issues it, invites the supplier, and the supplier reads the invitation addressed to it. 25 assertions, deterministic over three runs, covering all of brief §6.1 — create, invite, issue, respond, quote, submit, compare, award. It stops at the award and SAYS so: issuing notifies the supplier by email and this harness starts the API with no mailer, so the 503 is asserted rather than skipped — if a mailer is ever wired in, that assertion fails and whoever did it is told to walk the last two steps. It found P51 on its first run and then found two more steps a real person must take that no seeded suite exercises — a request cannot be issued without a submission deadline, an invitation on a DRAFT is correctly invisible to the supplier, and a quote cannot be SUBMITTED until a draft exists — the route being listed in the API's own route index was not the same as the action being available. verify-all.sh also gained a floor: every suite on disk must be named in API_SUITES, which is now defined once and shared by the check and the loop.
P53Measuring rows, and enforcing what 0074 assumescompleteD-237 to D-239. db/census.sh — read-only, a FIXED set of questions rather than a query runner. Built because 0076 carried a data-modifying UPDATE and, once applied, nothing could say whether it touched 0 rows or 2: for a SCHEMA migration the after-state suffices, for a DATA migration it is compatible with several befores. Five scripts reach prod and none answered a question about rows. 0077 then makes is_system = (organization_id IS NULL) a rule rather than a data fact — 0074 ranks on that correlation and nothing enforced it. The ledger gained a check probe kind, because the existing constraint kind tests a FOREIGN KEY's ON DELETE action and would have called every applied CHECK migration MISSING.
P54Fixtures that clean up after themselvescompleteD-241, owner-confirmed. The local database grew on every test run and nobody could stop it: 4 974 users, 3 781 organisations, 2 237 requests and 1 239 fixture-minted system roles. The reason it was never fixed is that DELETE FROM organizations DOES NOT WORK — the cascade reaches clarification_messages, which is append-only, and forbid_mutation refuses it. db/test/lib/reset-fixtures.sh earns the D-115 exemption (test tree AND cannot be pointed off localhost, both forced red), suspends the triggers inside ONE transaction so a rollback restores them, and is called by 13 suites before they seed. Orphaned test users are swept too — deleting an organisation cascades to memberships but NOT to users, which is why 3 310 survived a run that took organisations from 3 781 to 89. db/verify-reset-precedes-seed.sh guards the ordering, which was wrong in three suites and failed with messages naming a 403 rather than the reset. A full battery run now leaves the row counts unchanged.
P55Certificates get cheap, honest checkscompleteD-243, owner-confirmed, Q5 closed. Measured first: SIZE was already checked (413 at 25 MB), expires_on and a computed expired already existed. Three gaps. requires_expiry described a rule nothing applied — projected to the client since P39, never read on the write path, so 8 of 10 types require an expiry and all 10 accepted a document without one; enforced in the route rather than by a constraint so the refusal can name the document a person is looking at. Content type was unchecked: a narrow allowlist, the only file-type restriction in the product, and an ABSENT type is refused rather than defaulted to application/octet-stream. expiringSoon and daysToExpiry computed in the API so list, detail and dashboard cannot disagree about "soon"; the screen renders a day count only when actionable and never recomputes it from the browser's clock. Claims nothing about authenticity — no byte sniffing, no verification. compliance-api-test.sh 55, six new with controls.
P56The catalog storefrontcompleteD-240, D-244, D-245. Phase 2, module 1 of 3. catalogs and catalog_items existed since 0008 with a policy each, ZERO rows on both databases and no caller anywhere — schema waiting for a feature. 0078 added the piece that was missing rather than merely unbuilt: buyer_specific was permitted by a CHECK constraint and satisfiable by NOBODY, because no table named a buyer. Supplier side manages catalogs, items and named buyers; buyer side browses what reached it and is never told WHY it can see a catalog. Prices are strings end to end — numeric(_,4) keeps its scale and a JSON number would drop it. db/test/catalog-visibility-test.sh 20 (every mode from three sides: owner, named buyer, stranger), api/test/catalog-api-test.sh 43, seeding nothing. On production. AND THE ORDER FLOW, which brief §6.2 names in the same sentence: orders.catalog_id has existed since 0008 and NOTHING EVER WROTE IT, because orders.award_id was NOT NULL — every order needed a tender, and a catalog order is the case where there was none. 0079 replaces the NOT NULL with num_nonnulls(award_id, catalog_id) = 1: exactly one origin, never both, because an order carrying both would claim a tender awarded it AND a catalog priced it. 0080 is the one door that writes it, and prices come from catalog_items INSIDE the transaction — a route that accepted a unit price would produce a row that is well formed, internally consistent and wrong, which no policy can detect. 0081 widened two triggers that still refused an award-less order: relaxing a column is not relaxing the rules ABOUT that column, and CLAUDE.md predicts exactly this.
P57Contract managementcompleteD-240, D-248, D-249. Phase 2, module 2 of 3. No groundwork existed — no tables, no enums. 0082 adds a clause library the buyer owns alone, templates, contracts with two sides, and contract_assents, which is append-only and joins the six: the whole value of the record is that it cannot be revised, so it carries IDs and never names (D-016). Brief §6.3 excludes "complex contract lifecycle management" in the same section that asks for contracts, so there are no approval chains, no negotiation rounds and no amendment trees: drafted, agreed, superseded, and a renewal is a NEW contract pointing at what it replaces rather than an edit of the old. An agreed contract is not editable — changing text under an assent already given is the one thing this module exists to prevent. body_sha256 is computed by the server on every write, so an assent given to earlier wording shows as staleText rather than silently looking current. Nothing is called a signature and an assertion guards it. contract-boundaries-test.sh 18, contract-api-test.sh 31. On production.
P58Invoice and paymentcompleteD-240, D-250, D-251. Phase 2, module 3 of 3 — Phase 2 is complete. Brief §6.2 asks for capture, matching and payment status; §6.3 excludes payment processing and escrow, and the second governs: paid means a person at the buyer said it was paid, elsewhere. There is no pay route because the product cannot pay, and an assertion checks the API's own route index for one. The SUPPLIER raises (a buyer inventing a debt to itself is refused); the BUYER sets the state (a supplier marking its own invoice paid is refused by a trigger, not a route). invoice_column_guard decides which COLUMN each side may touch, which a policy cannot express. Matching is computed — matched, over, under — with over named separately because it is the one that costs money. invoice_payment_events is append-only: the invoice may be corrected, what the buyer decided may not. 0084 closed a hole 0083 left: WITH CHECK (supplier_org_id = current_org_id()) reads like "only the supplier may raise one" and means "only the supplier named on the row, which the inserter chooses" — anybody could invoice anybody. Caught by a control written for a different rule. invoice-authority-test.sh 22, invoice-api-test.sh 24. On production.
P59The journey walks Phase 2 toocompleteD-252. journey-api-test.sh now covers brief §6.1 AND all of §6.2, on the SAME two organisations — a catalog, a contract and an invoice between parties who had never dealt with each other would prove the tables work and nothing about whether the product hangs together. 44 assertions, seeding nothing. It re-proves 0079's catalog order carries no award and that the buyer can READ it, which is the INNER JOIN that cost a 404. db/verify-no-inline-json-bodies.sh came out of it: an inline JSON body containing a comma is BRACE-EXPANDED by bash into separate words, and the API then answers 400 naming a missing field. It found one real instance — a contract assertion expecting 400 for a date order that was passing because the mangled body was missing a required field instead.
P60Reverse auctionscompleteD-253 to D-255. Brief §6.2 Future, module 1 of 3 attempted. §6.3 excluded reverse auctions from the FIRST release; the MVP and all of Phase 2 are complete, so that expired rather than was overridden. Public tender publication is untouched on purpose — *"Future, legally reviewed"* is not something to build unilaterally. A BID IS A SUBMISSION. The obvious auction_bids table is wrong here and the schema said so: submissions_version_key and submissions_one_live already mean "a supplier may offer again and the new offer replaces the old". A parallel table would need teaching, separately, everything submissions know — and awards.submission_id is NOT NULL, so a winning bid that was not a submission could never be awarded without a second award path. 0087 adds the WINDOW and the RULES and no new kind of bid, so comparison, evaluation, approval, award and handoff are untouched. And the assumption underneath it was wrong, which the first test run found: the versioning is a SHAPE WITH NO REACHABLE TRANSITION — submission_status_owner_guard refuses a supplier setting its own row to superseded, and 0006 permits revision only when the buyer reopens by hand, which is unusable at auction pace. 0036 wrote *"supersession is the system's when a revision replaces a version"* and nothing could ever produce the case. The exemption is a fact, not a flag: permitted only when submission_open_auction() finds a genuinely open auction over that lot, so there is no setting to spoof and no is_platform handed out; disqualification stays the buyer's. Bid privacy resolved deliberately — §3.3.4 asks for it and a bidder who learns nothing cannot know whether to improve, so auction_rank() returns the caller's OWN position and nothing else, and the refusal message compares against the supplier's own previous bid because comparing to the leader would hand back the leading price. The cost is stated rather than glossed: a rank of 4 reveals four bids exist. No auto-award (§6.3), and closing is the clock, not a job — no cron whose failure silently leaves an auction open, the reasoning P48 already applied. record_audit() raises for an unknown table so it had to learn auctions; derived via pg_get_functiondef with the insertion asserted once, and all six branches verified live afterwards — 0074's stub is what that check is for. db/test/auction-test.sh 23, sabotaged by removing the monotonic rule: 4 failed including the row COUNT, because a rule that raises and a rule that quietly permits look identical if you only assert the exception. On production 2026-08-25. P60b closed that gap 2026-08-26: routes, client functions and two screens, with surface-audit --strict passing and no new expected entries. Five defects surfaced that the database suite structurally could not see, every one needing a real request. Refusals answered 500 — check_violation is unmapped by asGuardRefusal, so a supplier failing to improve its bid was told the SERVER had broken (0088; the count was the tell — 63 uses of insufficient_privilege in this schema against 3 of check_violation, all three mine). A closed auction blamed the bidder, superseding before checking the window, so bidding late was refused with "a supplier cannot set its own quote to superseded" (0089; 0087's own comment argued against checking there, and the reasoning was sound while the ORDER was wrong). The buyer saw zero bids on an auction with two — JOIN organizations is a filter under RLS, D-251's fourth instance and the first caught by a suite rather than a person; now supplier_nameplate(). isOpen read false on an auction just opened, because auction_is_open() is STABLE and inside UPDATE ... RETURNING sees the pre-update snapshot. A supplier could open the buyer's view — nothing leaked, the submissions policy still applied, but "it happened to return nothing sensitive" is not "it refused". Two guards were also broken: verify-no-inline-json-bodies.sh had bad uninitialised under set -u and aborted the first time it ever found a real violation, having only ever been green; and 0089's probe matched text 0087 had put in the same function hours earlier, so the ledger read it as applied and skipped it. api/test/auction-api-test.sh 34 over real HTTP seeding nothing. On production 2026-08-26.
P61A supplier's answer only moves forwardcompleteQ-042, and the question was already answered. The log listed it Open with the note that a buyer could still push an invitation back to draft or re-issue it as invited; 0035 answered it on the owner's decision the day it was raised — disqualify only, with a reason — and carries the full who-may-write matrix in its own header. The first cut of 0090 therefore closed a gap that did not exist: two of its three rules were redundant with 0035 and were removed rather than shipped. Found by sabotage, not by reading — deleting the no-return-to-draft rule changed nothing and every assertion stayed green, because 0035 was refusing the whole time. The gap that IS real: 0035 governs WHO may write each status and says nothing about the ORDER of the ones a supplier owns. Measured with the trigger dropped, a supplier setting submitted -> viewed SUCCEEDED — rewriting what it did and when, on the trail §7.2 wants reconstructable. 0090 is now that one rule; statuses off the ladder stay entirely 0035's, so declined -> interested still works because a supplier changing its mind is real. Then 0090 stole a rule from 0035 and only the battery noticed. It ranked invited, which 0035 governs, so 0090 answered first with a different error and invitation-target-test.sh broke — *expected refused, got error*. 0090's own suite could not see it and never could: it asserts a psql exit code, and every refusal is exit 3 whatever raised it. 0091 unranks invited, and the suite now asserts the refusal's WORDS so the theft cannot recur silently. Three more question-log rows were stale and are corrected in place with the measurement: Q-062 (High) closed by 0074, Q-039 by verify-all.sh, Q-064 by the app's verify chain. The log's header now carries the failure mode. db/test/invitation-transition-test.sh 17, every assertion naming the guard that owns it. On production 2026-08-26.
P62The concept draftercompleteD-027, owner-confirmed 2026-07-30. Brief §6.2's last buildable Future module — the AI copilot's "brief generation" half. The other two Future modules stay untouched: *public tender publication* is marked "legally reviewed" and *reverse auctions* shipped as P60. D-027's three constraints are structural, not advisory, because its recorded risk is specific: *"Generated drafts prove more trouble to correct than to write, or a buyer issues one unreviewed."* Nothing writes a tender — 0092 stores drafts in ai_drafts, apart from the document, and no parameter would make it touch request_document_sections. There is deliberately no "use this draft" button: pasting the text in would satisfy the letter of the constraint and defeat it, because editing would become the step nobody took. The buyer copies. The friction is the feature. Append-only, so "did this paragraph come from a model" is answered by looking; a boolean on the section was the obvious alternative and goes stale the moment the buyer edits. Prompts carry almost nothing — a note the buyer wrote for this plus the category label from the closed vocabulary, never the request row, the title, or anything from users. redactForPrompt is a backstop whose own header says it cannot remove a name; the mechanism is what is sent. prompt_sent stores the redacted string and the screen shows it, so the privacy claim is readable rather than asserted. It refuses rather than degrading, the opposite of classify: D-055 makes classify degrade because a ranker works without a model, and prose has no ranker — a template presented as a draft is worse than an empty box because it looks finished. Controlled rollout, two switches: the AI binding AND AI_COPILOT=1. The binding alone is not consent to spend on prose. Shipped OFF on production 2026-08-26, switched ON 2026-08-27 behind a daily ceiling. api/test/copilot-api-test.sh 22 — the dev port ECHOES its prompt, which is what makes the redaction assertion mean anything; sabotaged to a passthrough, 5 fail including the control proving it redacts rather than deletes. db/test/ai-drafts-test.sh 18, because the API suite proves the ROUTE refuses and only the policy suite proves the POLICY does. A daily ceiling, 0094. Workers AI has no spend limit of its own — 10 000 free Neurons a day and then billing, with nothing that stops — so 60 drafts a day platform-wide, counted since midnight UTC on Cloudflare's clock rather than Budapest's. A SECURITY DEFINER function and not a count, because ai_drafts is buyer-scoped under FORCE RLS: a tenant-scoped count is a fairness control, and the bill is one account's. Returns a boolean, so no tenant learns how busy the platform is; fails closed on a NULL or non-positive ceiling. Building it surfaced an OLDER hole — ownership was proven at the INSERT, after the model call, so any authenticated caller could spend Neurons against a request they could not read and get a 404 for the money. Ownership now precedes both the ceiling and the model, which is why that category join is now a LEFT join: all 35 local requests carry a NULL category_id, and an inner join would have 404'd every draft. privilege-audit.sh gained the guard that the definer's owner really does bypass RLS, since if that stops being true the ceiling and lead_rate_exceeded both go inert with every suite still green.
P63The nightly rebuild, and three things it was doing wrongcompleteQ-048, and the row was stale in the way its own header warns about. The question said *nothing rebuilds it*; a nightly workflow had existed for weeks. What was actually wrong was three things downstream of the answer, none of them in the question. (1) The job never finished. Every venue page fetched its own detail and Astro renders pages sequentially, so the build was 2 000 round trips at ~1.55s from a GitHub runner — gh run list shows six of the last eight runs cancelled at 30m20s against a timeout-minutes: 30 ceiling. The site did not rebuild at all on most nights. Details are now fetched once in getStaticPaths through a worker pool (src/lib/concurrency.ts, 8 in flight, measured 5x against the live API with every response 200). Measured after: 7 000 details in 3.5 minutes, 0 missing, and pages that took +1.55s each now take +1ms. (2) It published the wrong 2 000 venues. getAllPages capped at 2 000, which over a 30 845-venue directory is alphabetical order: amahoro-stadium in Rwanda had a page and 1 147 of Hungary's 1 228 venues did not — 93% of the wedge missing, including audi-arena and bok-sports-and-conference-centre. This was not a new product call: docs/32-go-to-market-strategy.md §3 already said *Hungary first, Central Europe second*, and the same document argues venues are the asset being undersold. getAllVenues now fetches the §4.2 wedge complete and lets a stated budget fill the tail — 6 137 wedge + 863 tail, and 6 137 matches the strategy's own measurement exactly. The tail is still published, so pages that exist today do not become 404s. (3) It shipped a site that could not take a lead. The job ran npm run build, but PUBLIC_FORM_ENDPOINT is set only on package.json's deploy script — deliberately, so a local build exercises the unwired fallback. This job built and then deployed separately, so it inherited the fallback: measured on the live site, /contact carried zero forms and one mailto:. Every lead since the first green nightly run went to a mail client instead of POST /v1/leads, which is the whole first slice of the funnel. Fixed, and the deploy now fails if the built contact page has no form, because that absence is silent and free. A pagination guard that disagreed with its own cap was found on the way: guard < 50 at 100 rows a page silently stopped every caller at 5 000, so a 7 000 budget would have quietly returned 5 000. The guard is now derived from the cap. scripts/verify-concurrency.mjs 12, forced red with --sabotage (a pool that drops one item — the off-by-one that would silently cost one venue its spaces section and still report success), and wired into npm run verify.
P64The directory pages are page-weight boundcompleteQ-065 and Q-066, and the second one was opened by nearly shipping the bug. P63 raised the venue budget to 7 000 and that was right for detail pages and wrong for the browse page. /venues renders every row it is handed into one document and filters client-side: measured live, 2 523 999 bytes for 2 000 cards, ~1.26 KB each, so 7 000 is roughly 8.8 MB — on a site whose static architecture astro.config.mjs justifies by first-load speed, aimed at a mobile-heavy first market. The CI run that would have deployed it was cancelled mid-build once the number was measured rather than assumed. The fix is a separation, not a smaller catalogue. [slug].astro still builds all 7 000, so every venue keeps an indexable page and stays in the sitemap — which is what a search engine actually reads. venues.astro renders LISTING_MAX = 1500, and because getAllVenues returns wedge-first with Hungary at the front, that cap keeps all 1 228 Hungarian venues and fills the rest from the wedge. 1 500 is *below* today's 2 000, so this is a weight improvement rather than a regression held level — measured on the built output: 1 933 831 bytes against the live page's 2 523 999, a 24% reduction, and against the ~8.8 MB the uncapped version would have shipped. The page states the gap instead of hiding it — *"N venues browsable here; 7 000 venues have a page on this site"* — because a browse list quietly showing a fraction of the catalogue is the number somebody later quotes as the directory's size. Companies got the ordering and not the budget. getEventClinicCompanies read /companies in upstream order and cut at 2 000, which over 27 284 is alphabetical; it now takes the §4.2 wedge first, Hungary first within it. The budget stays 2 000 *because of* the weight lesson — /suppliers is 593 KB for 1 931 cards. The build now reports 2000 in the wedge, 0 from the tail, and Hungary's 1 738 companies fit inside it. That answers Q-065. A number corrected in public. The suppliers page was first read as 292 cards; it has 1 931. 292 is how many carry a *country* — Astro omits an empty attribute and 85% of these companies have none. Both numbers are in Q-066, the wrong one beside the right one, because a silently corrected measurement teaches nothing. Coverage checked rather than assumed: only four pages fetch directory data at build, and the two that render a whole dataset are now both bounded.
P65The screens say what they arecompleteAn accessibility and correctness pass over all 36 screens, run as four parallel audits on disjoint file sets, each required to prove itself with tsc and npm run verify. Verified: five screens had no <h1> a user could land on — SupplierHome (575 lines, no heading of ANY level, and it serves both the supplier landing page and /invitations), PlatformConsole and PlatformElsewhere (each rendered as the whole of / by organisation type), FoundOrganisation (its title was a styled <p>, and App.tsx renders it outside AppShell so nothing above supplied one), and Compare's no-quotes branch. Suppliers.tsx jumped h1 to h3 where Companies.tsx renders the identical card at h2. Nine table header rows given scope="col"; no <th> without scope remains in src/. Four form controls given names. Loading made distinguishable from empty on Suppliers and Venues, where the region was simply blank while a search was in flight. Two correctness defects, not cosmetic: SupplierCatalogs held the "name a buyer" input in ONE string for the whole table while rendering it once per buyer-specific catalog, so typing in one row filled the other and Share sent the id typed against the first — a price list shared with the wrong buyer. FoundOrganisation re-enabled its submit button before the session reloaded, so a second click answered a successful sign-up with a 409. Dates: Contracts sliced ten characters off a timestamptz, so an assent given at 00:30 in Budapest was shown a day early — on the record whose entire value is when a party agreed. Rejected on evidence: SupplierCompliance has no <h1> and correctly has none; App.tsx renders it inside /profile beside SupplierProfile, which owns the heading. Not checked: no screen reader was actually run; this is markup structure, not a usability test.
P66Two currencies are not one numbercompleteA supplier holding 5 000 EUR and 800 000 HUF was reported as 805000.00 EUR. Measured, not inferred — that is what the previous query returns from the new fixture in reports-api-test.sh section 2b. spendBySupplier summed value_net grouped by supplier alone and labelled the total with MIN(a.currency), which is alphabetical order; its orderedNet subquery summed every order in every currency and borrowed the awards row's label. byMonth carried no currency at all, so the screen printed a hard-coded 'EUR'. Both now group and match on currency; the month stays one row (adding currency there would multiply it through the FULL OUTER JOIN and double-count requestsIssued) and its money became a list. currency_code accepts any ISO 4217 code and this repository's own fixtures already use both, so this was never hypothetical. Verified: all six new assertions fail against the previous query and pass against this one, including one naming 805000.00 directly. The fixture needed a second lot — awards_one_live_per_lot means a supplier cannot hold two live awards on one lot — and the suite BLOCKED rather than measuring nothing when that constraint first refused the row. Deployed to production api and app, in that order, and the served bundle was diffed to confirm the edge carries it.
P67The guards that were not runningcompleteThree guard defects, each found by using the suite rather than reading it. verify-modules-load.mjs existed for the exact bug I then shipped — a backtick inside a SQL template literal, which ends the string and stops the module parsing — written 2026-08-24 for the same trap. A correction, recorded rather than quietly fixed: I first wrote that nothing ran it. That was false — db/verify-all.sh:194 runs it, and always did. It was absent only from api's own npm test, and the real failure was that I pushed without running the battery. Adding it to npm test buys faster feedback; it did not fix a missing check. The reports suite reported twelve assertions as 000, which reads like a harness fault rather than a syntax error. Sabotage-checked: restore one backtick and it exits 1 naming three files; remove it and it exits 0. It now runs FIRST in api's npm test, prepended rather than reordered because the two suites after it are order-dependent. verify-styled-controls.mjs read raw source, so a doc comment containing a control tag was reported as an unstyled control; three separate authors hit it in one night and one reworded their prose to get past it, which is the real cost. Comments are now blanked one space per character, because the reported line number derives from the match offset. A new guard, verify-screen-has-h1.mjs, asks whether each ROUTE has exactly one heading — catching both a route with none and a route with two. Two coverage holes were found and closed while writing it, both of the kind where a check passes by never looking: scoping to a bare element={<X />} covered 29 of 36 screens and skipped all four targets, and matching <Route lazily to the first /> ended the block at <SupplierProfile /> so the screen beside it was never read. Now 31 routes, sabotage-tested in both directions.
P68The site's card groups have a headingcompleteFive marketing pages jumped from the page h1 straight to h3, including the homepage: each opens with a row of cards whose titles are h3 and only reaches an h2 further down, so a reader moving by headings met three to six of them with nothing saying what they were a list of. Not fixed by promoting the cards — site.css:25 puts the display face on h1, h2, and both card rules already carried a comment saying these headings must stay on the sans; that decision is sound and this keeps it. Each group instead gets the section heading it was missing, marked visually-hidden, a class the site already defines and uses. Verified in a browser on the built output: the element is 1×1, position: absolute and clipped, so it takes no layout space, and stays display: block so it remains in the accessibility tree. Re-audited all 21 distinct page templates of the 7020 built pages: no heading findings. Copy checked against brief §13.1. Deployed through npm run deploy — NOT by shipping the local dist, which a plain npm run build leaves with the mailto: fallback instead of the wired contact form; the live form action was confirmed afterwards.
P69A keyboard user can reach the pagecompleteMeasured by tabbing the running app: a keyboard user passed the notifications bell and NINETEEN navigation links before reaching page content, on every screen, every time. WCAG 2.4.1 is Level A. A skip link is now the first tab stop. Verified end to end in the browser: it rests at -1440px and returns to 8px on focus; Enter moves focus to <main id="app-main">, which is why main needs tabIndex={-1} — without it the browser scrolls there but leaves focus behind and the next Tab returns to the navigation; the Tab after that lands on "New request", inside main. Positioned off-screen rather than hidden, because display: none and visibility: hidden both remove an element from the tab order and would leave the link decorative. The same shell serves the supplier side. Also verified and clean: all 24 tab stops on /requests change their outline or shadow on focus, compared against each element's resting style with real key presses rather than programmatic .focus(), which does not trigger :focus-visible. A note on method: clicking the page to give it focus before tabbing put Chrome's sequential-focus starting point on the clicked element, so Tab skipped the link and the test said the implementation was broken when it was not.
P70Nothing scrolls the page sideways on a phonecompleteMeasured at 375px: /reports and /documents scrolled the whole DOCUMENT horizontally, 575px and 527px against a 375px viewport, which moves the navigation and the heading too — it reads as a broken screen rather than a wide table. Four more tables had no wrapper either and were not failing only because three of them render no rows in the current fixtures. All 15 tables in the app now scroll inside a wrapper. Verified: both routes report a document scroll width of exactly 375 while their tables stay 535px and 512px; at 1280px the wrapper is inert — no border, transparent, does not scroll, exactly as wide as the table. tablewrap and table-wrap are different classes and not interchangeable; the first is bare because the card supplies the frame, the second brings its own border for a standalone table. Requests uses the second correctly, which is why the widest table in the product (1180px) never broke the page. Three new guards wired into npm run verify, now 14: verify-tables-scroll.mjs, verify-token-contrast.mjs and verify-screen-has-h1.mjs. The contrast one exists because CLAUDE.md records --text-tertiary shipping below AA while its own comment claimed it passed; measured now, every text token clears AA on all six surfaces, and every ratio stated in a comment matches to two decimals.
P71The intake keeps what it collectscompleteD-253 and D-257, both owner-confirmed 2026-08-29. The request intake asked six questions and sent two. Proven on the wire before the fix: with a category chosen and shown on screen as "AV › Light › Lighting Auxiliary Equipment", the create body was {"title":…,"route":"rfq"} and the row held category_id NULL, submission_deadline_at NULL, zero lots. Nothing in the API had ever written procurement_requests.category_id. Measured after: category Light Strips, deadline 2026-09-20 17:30 Budapest — the wall clock the buyer typed — and one lot carrying qty 12, unit each, 2026-10-01 to 2026-10-03. D-257 changed the question rather than answering it: the deadline field was a type="date" feeding a timestamptz, so somebody had to invent the hour — midnight closes a tender a day early, end-of-day needs a timezone nobody chose, and there was NO precedent for that conversion anywhere in the codebase. It now asks for a time, and the browser converts to an absolute instant so the same tender cannot close at different moments depending on where the Worker is deployed. Refusals are loud: an unknown category is a 404 and not a silent drop — it is validated rather than resolved by a subselect, because a subselect that finds nothing yields NULL, which is this exact defect moved one layer down; an unparseable deadline is a 400 and not the 500 the untranslated invalid_datetime_format would have produced. No new endpoint for the lot: saveChapterData already wrote those columns for the workspace, so the intake calls it. A second call rather than one transaction, deliberately — if it fails the request exists, the draft is still in localStorage, and nothing typed is lost. 12 new assertions, requests-api-test 55 → 67, each checking the COLUMN rather than the 201. A 201 proves acceptance, not storage: one run showed the deadline in the POST body and a 201 back with the column still empty, because the dev server was running pre-change code.
P72Standing in front of the screenscompleteThree screens had never been seen with data on them. db/seed/ is empty, nothing in this repository creates a demo tenant, and the only rows in orders, invoices and catalogs belong to leftover API-suite tenants with random names — so those screens rendered their empty state to anyone who looked, and an empty state hides copy that is wrong about rows. scripts/dev-as.sh fixes the standing-in-front-of-it problem without a seeder, because the data already exists: --list shows which tenants have any, and it refuses an unknown subject and warns when the API was not told about the port — a CORS failure shows no error, just tiles that never fill, which reads exactly like an empty tenant. Two defects it found immediately. Orders.tsx told every buyer "an order is what an accepted award becomes" while 0079 had replaced award_id NOT NULL with num_nonnulls(award_id, catalog_id) = 1 a month earlier; the file mentioned catalogues zero times, and the order in front of me had award_id NULL. And the Timeline chapter's four type="date" inputs rendered EMPTY for the timestamptz columns behind them — an issued request whose deadline was 2026-12-01 12:00 showed four blank fields and read out 2026-12-01T12:00 raw underneath. Nothing was lost, established before reporting it as loss: the chapter writer nulls a column on an empty string, but the component posts STATE rather than the input, checked by saving an untouched timeline and reading the column back intact. Four inputs are now datetime-local; award_decision_by stays a date because it IS one. That matters more from today: D-257 makes every intake request carry a time, so the blank field would have met every new request. Also: the drafter's spend cap got its first test — 22 assertions in that suite and none about the 429, on the one thing between a loop and a bill — and one of the three was worthless until sabotage showed it counting the wrong rows.
P73The surfaces say what a browser may do with themcompleteAll three public surfaces returned NO security headers. Measured 2026-08-29 with curl -D -: not nosniff, not a referrer policy, not a frame policy, not HSTS — only Cloudflare's own nel, report-to and cf-ray. The _headers pattern already existed in this repository, for the generated status page, and had never been applied to the pages anyone visits. procurevent.com now sends nosniff, strict-origin-when-cross-origin and SAMEORIGIN; app.procurevent.com sends the first two. X-Frame-Options is absent from the app deliberately: it signs in through Clerk, and an auth flow using a popup or a frame breaks invisibly — no error, a sign-in that never completes — and that could not be verified without production credentials. HSTS and CSP are left to the owner as Q-068, with a reversible first step written down for each: HSTS cannot be recalled from a browser that cached it, and a CSP breaks pages silently. Verified after deploying rather than assumed, including the things that could have broken: the contact form still posts to /v1/leads rather than a mailto: fallback, 1 500 venue cards still build, and the app serves the same bundle hash. Two other surfaces measured and found sound the same day: the supplier-registration funnel is fully wired — the live page posts form=supplier-registration and the endpoint's per-kind identity map reads exactly the fields it sends, proven by posting one to a LOCAL API so no real lead or alert was created — so 0 registrations all time is demand, not a defect. And production is fast: /venues, 1.93 MB of HTML over 1 500 cards, transfers 446 KB and first-paints in 472 ms, which moves Q-066 from "the site is slow" to "the site cannot grow much further". The API was the third surface and did not get them here -- _headers is a Workers assets feature and that Worker serves no assets. Completed by P82 on 2026-08-30.
P74A refused enquiry is told socompleteA visitor whose message was refused was shown a thank-you. thanks.astro carried both outcomes behind Astro.url.searchParams.get('error'), and that branch could never run: astro.config.mjs sets output: 'static', so the page renders at BUILD time where there is no query string — failed was always false and the failure half was compiled away. Measured on the built output AND on production: "That did not go through", "Not sent" and "Nothing was recorded" appear ZERO times in dist/thanks.html and zero times in what the live site served for /thanks?error=1. So a refusal — no email, no name, or rate limited — read *"Thank you — we have it. Your enquiry has reached us. We answer within one working day"* about an enquiry that reached nobody, on the site's only inbound channel, which has produced one lead all time. The copy now lives at /not-sent, its own page: no adapter, no JavaScript, no rendering-mode change, and it cannot fail the same way, because a path survives a static renderer and a missing one 404s loudly instead of lying quietly. Deployed site-first, which the redirect records, or the API would point at nothing. Verified end to end on production, and the probe created no lead and sent no alert — still exactly 1, all time. Also fixed the same day: a NUL byte in any field made the public endpoint answer 500 (report_invalid_encoding_int — Postgres text cannot hold U+0000), an input mistake reported as a server fault on the one surface a stranger can write to; it is now stripped at the entry, which covers details as well as the named fields.
P75A NUL byte stops being a 500completeFound on /v1/leads and fixed there first, which was the wrong altitude: Postgres text cannot hold U+0000, and that is true of every column the product writes. Reproduced with a control on an authenticated route — POST /v1/requests with a NUL in the title answered 500 while the identical call without it answered 201, so the write was lost and an input mistake was reported as a server fault. Stripped once in route(), the one place BOTH edges converge: serve-api.mjs and the Worker each build a body and hand it there, and a fix in either edge alone would make the suites prove something the deployed thing does not do — the rule serve-api.mjs states in its own header. The earlier copy in leads.ts is removed with a pointer left behind; route() is that function's only caller, checked rather than assumed. Binary bodies pass through untouched, because an upload is bytes and U+0000 is ordinary inside a file, and only U+0000 is removed — every other control character is storable and taking more would quietly alter what somebody wrote. Two assertions, requests-api-test 67 → 69, sabotage-tested: bypassing the strip turns them red with a 500 and an empty title. Deployed, and confirmed on production — a NUL-bearing submission now answers 400 for its missing email rather than 500. Also this run: the dev server was dropping the socket on any form body over 10 KB (req.destroy() before anything could reply, and a limit the Worker does not share) where production answered 303 at 4, 12 and 16 KB.
P76A notification cannot be rewritten by the person reading itcomplete0061 shut INSERT on notifications and left UPDATE open on the whole row. Row-level security cannot restrict columns: notifications_update governs which ROW you may touch and never which FIELD. Measured as procuvent_app_rw with rolbypassrls = false and an honest app.current_user_id, update notifications set title = 'FABRICATED' succeeded and the feed then read FABRICATED -- while the intended write, marking the row read, worked in the same run, so the probe was not passing by refusing everything. 0095 adds a BEFORE UPDATE trigger comparing to_jsonb(NEW) - 'read_at' to the old row, which covers the fourteenth column somebody adds as well as the thirteen that exist. A column-level GRANT was the obvious instrument and was rejected: it would put this table outside the privilege model privilege-audit.sh asserts. db/test/notification-integrity-test.sh 7 assertions, and dropping the trigger fails exactly the three it guards while the four RLS-guarded ones stay green. Applied and green on local; the production apply is the owner's, because a restriction is not an additive migration. D-258.
P77A tripwire on the one rule the database does not enforcecompleteThe 0095 fix generalises: row-level security cannot restrict columns anywhere. A sweep of all 63 permissive UPDATE policies, narrowed to the nine tables that are system-authored AND user-updatable, found one where the schema defers to the application ON PURPOSE. 0009 says so in as many words: a buyer "may disqualify or reopen, but not edit commercial content. That restriction is enforced in the service layer." Neither trigger closes it -- submission_status_owner_guard returns early when the status is unchanged, refuse_after_deadline exempts the buyer by design. The claim was measured and HOLDS: the only writers of submissions are the supplier path in quote.ts and place_auction_bid, which is SECURITY DEFINER and compares the invitation's supplier to current_org_id() rather than to an argument. So no migration was written -- constraining the buyer's columns wrongly would break disqualification, and the trade was made knowingly. Instead api/scripts/verify-submission-writers.mjs fails the day a new file writes that table, which is the moment a human should reconsider. Sabotaged and seen to fail; the first sabotage read exit 0 because $? after a pipe is tail's. Q-070.
P78Nothing asked whether a policy could do any workcompleteprivilege-audit.sh asks whether the GRANTS match the model. Nothing asked whether the POLICIES are shaped so they can act -- a different failure with a worse signature: a wrong grant says "permission denied" on the developer's machine, an inert policy says nothing and returns another tenant's rows. db/verify-policy-shape.sh asserts four properties, all measured true before it was written, on BOTH databases: no table carries policies with RLS switched off (Postgres accepts CREATE POLICY on an unprotected table without a murmur); every table with RLS has it FORCED, so the owner is not exempt from its own rules; all 55 permissive FOR ALL policies state an explicit WITH CHECK rather than letting Postgres silently reuse USING as the write check; and the tables with NO row level security are exactly the eleven global reference tables -- taxonomy, RBAC and the public directory. That last one is the point of the file: in a multi-tenant product a new table that forgets RLS is a silent cross-tenant leak, because every query against it works perfectly. The allowlist is deliberately a LIST and not a discovery, inverting this repository's usual rule, because here the next table somebody adds is the thing being caught and a discovered exemption set would agree with itself. The FOR ALL count is asserted as a denominator too, so the audit cannot read green on a schema with no such policies. Sabotaged four ways -- a new unprotected table, a policy with RLS off, RLS unforced, a FOR ALL with no WITH CHECK -- each caught and each naming the offender. Production audited read-only and is identical to local.
P79One request could end up holding two currenciescompleteChasing the multi-currency reports bug to its root rather than its symptom. Every money aggregate in the API is correct -- both queries in reports.ts, dashboard.ts and award.ts all group by currency or sum within one submission. The client has two sums in Compare.tsx that do not, and the question was whether one request can hold two currencies. It can. A submission takes r.currency at INSERT time, an award takes the submission's, and nothing anywhere -- no constraint, no trigger -- stops a buyer patching the request's currency afterwards through POST /v1/requests/:id/chapters. Demonstrated inside a rolled-back transaction: a request that started in EUR held "EUR, JPY". The API now refuses a currency CHANGE once the request has left draft, while still allowing the echo of the current value that every ordinary save sends. The UI had always shown the field readOnly with the hint "Set on the request, not per chapter", so the API was simply not enforcing what the product already claimed. 3 assertions; removing the guard fails two and turns the request USD. The credential guard then caught my own new file handing psql the whole prod URL, so verify-policy-shape.sh now strips the password into PGPASSWORD and asserts the endpoint fingerprint, with a negative control proving it blocks. D-259.
P80Six buttons that all said the same thingcompleteFound by opening the comparison screen rather than by reading it. The award grid renders six "Award this lot" buttons at once, one per supplier per lot, and each awards a different lot to a different company. Every one had the identical accessible name and no aria-label, aria-describedby or title. The table markup is already right -- scope="col" on the supplier headers, scope="row" on the lots -- so a screen reader exploring the GRID has the context; tabbing does not explore the grid. It lands on the button and hears "Award this lot", six times, before an action that awards real money and cannot be taken back by a click. Each now names its lot, its supplier and its price, verified through the accessibility tree rather than the DOM. The visible text is unchanged because the column it sits in is narrow. Three of my own measurements were wrong before this was right: read_page served a stale snapshot showing "Reading the quotes…" while the live DOM held the full table; a 0x0 viewport made the accessibility tree read as an empty page until it was resized; and a click that worked read as a click that did nothing, because I checked textContent in the same tick, before React re-rendered. The award flow itself was then exercised end to end -- confirm step, award recorded as proposed, "Nothing has been sent to any supplier" -- and stopped deliberately before *Issue the award*, which sends email. Fixture torn down, no residue.
P81The same fault, swept for rather than waited forcompleteP80 was found by opening one screen. Repeated controls with a fixed name are a CLASS, so the codebase was swept for the rest of it: every <button> across the screens and components whose entire child is literal text and which carries no aria-label. Two remained. States.tsx "Sign in" is a singleton and correctly needs nothing. ProseChapter.tsx renders one <li> per section, so a request document with six sections offered six buttons all called "Remove", and removal is destructive. Each now reads "Remove section N: <heading>", taking the heading from LIVE state rather than the saved value, because the name a person just typed is the one they are looking at. Re-running the sweep leaves only the singleton. Verified by type-check, the app guard battery and the sweep -- not in a browser, unlike P80: reaching a document-sections screen needs a fixture this slice did not otherwise require, and saying so is cheaper than implying a check that did not run. CORRECTION, same night. That sweep was nearly blind and this entry read as though it were comprehensive. Its regex matched a button's attributes with [^>]*, which stops at the first > it meets -- and in JSX that is the arrow of onClick={() => ...}. It therefore skipped almost every button in the codebase and reported 2 findings where a brace-aware parser finds 38. The two it did find were real and the fixes stand; the claim of coverage did not. Corrected by P83.
P82The third surface P73 measured and did not fixcompleteP73 opened with "all three public surfaces returned NO security headers" and shipped them to two. The API kept none, because the _headers file P73 used is a Workers assets feature and this Worker serves no assets -- so the fix could not reach it and the entry did not say so. Confirmed in production 2026-08-30: procurevent.com and app.procurevent.com answer with nosniff and a referrer policy, api.procurevent.com answered with neither. nosniff is not decoration on a JSON API: it is what stops a browser deciding for itself that a response is HTML, which is the difference between a reflected value being text and being script. Set in the one base object every response path spreads -- preflight, bytes and JSON alike -- rather than at the three new Response sites, because the fourth one somebody adds would not know to include it. The file-download path already set nosniff explicitly and was asserted; an ORDINARY JSON reply was not, and nothing asked. 3 assertions in requests-api-test.sh, all three seen to fail with the headers removed. Deployed and confirmed live.
P83What the blind sweep had missedcompleteP81's sweep was rewritten with a parser that tracks brace depth and quotes instead of stopping at the first >, and the number went from 2 to 38. Narrowing to what actually matters -- a fixed label on a button rendered inside a .map(), so N of them are on screen at once -- leaves 36. Three were fixed on the supplier quote screen, which was open in a browser at the time and showed the fault directly: two "Add a line to this lot" for two lots, two "Remove" for two priced lines, and a third "Remove" for exclusions that the new guard caught after the first two were done. The <select> on that same exclusion row already carried aria-label={How material is exclusion N} -- the file was following the pattern and the button had simply missed it. scripts/verify-per-item-button-names.py now holds the remaining 33 as a named allowlist, so the debt is bounded and a NEW one fails the battery. Shrinking that list is the work; growing it should be deliberate. The guard's own first version reported 0 and looked like a pass -- it returned at the innermost enclosing paren, which is almost never the .map( -- caught only by comparing it against the sweep it was ported from. Sabotaged and seen to fail. Q-071 records what is left and why each entry needs a human.
P84The same rule, asked of links, which already passed itcompleteThe per-item guard only knew about <button>. A <Link> rendered once per row with fixed text -- "Open", "View", "Details" -- is the identical fault. Measured: 15 links are rendered once per item and all 15 build their label from the row's data. The codebase was already right here; the buttons were the outlier, which is worth knowing rather than assuming. The guard now covers links with an EMPTY allowlist, so the property that holds today cannot quietly stop holding. It asserts the denominator too -- fewer than five per-item links found means the scan broke rather than the code improved, and it exits 1 saying so, because "0 offenders" from a scan that found nothing to check is the exact shape of the blind sweep P83 corrected. Sabotaged with a fixed-text link inside a real .map(): caught by file and line.
P85Q-071 answered by clearing itcompleteThe allowlist P83 left behind held 33 per-item controls that all announced the same thing as their neighbours. Q-071 asked which of them were ever simultaneous and left it to the owner. Answered by not needing the answer: naming the row a button acts on is never wrong -- for a gated confirmation it is clearer still, since "Cancel" becomes "Cancel awarding Lot 2 to Baseline Supply" -- so all 33 were labelled rather than triaged. Sixteen files: Approvals now names the tender, supplier and amount on each Approve and Reject; Invoices names the invoice reference and the sum on all three money decisions; Notifications carries the notice title; SupplierCompliance and BuyerCompliance carry the document type; StructuredChapters says which lot and which criterion; Compare names the supplier and lot on every confirm and undo; Auctions, SupplierAuctions, SupplierCatalogs, ClaimQueue, Contracts, Orders, PlatformConsole, NewRequestIntake and SupplierProfile each name their row. The allowlist is now empty and the guard enforces the property outright rather than grandfathering a backlog -- anything added back is a deliberate claim, and the guard still fails if the list names something that no longer exists. Sabotaged against the empty list: caught by file and line.
P86Q-069 answered: eight money formatters became onecompleteapp/src/lib/format.ts opens by saying these live in one place because inconsistency here "reads as sloppiness in exactly the product where it is least affordable". There were eight of them, and they disagreed three ways. The shared one was pinned to en-GB while all seven screen-local copies passed undefined, so the same sum read HUF 1,234,567 on one screen and 1 234 567 Ft on the next -- Q-069's question, and for a product sold to Hungarian buyers the pinned one was the wrong answer. Quote printed 2 decimals, Orders printed 2 by forgetting to say, everyone else printed 0, so €30,000 and €30,000.00 were the same number one click apart. Orders echoed the raw string back on a bad value, printing abc EUR where every other screen showed a dash. Decided rather than asked: the reader's own locale, because the currency is always printed beside the number so following the reader costs no clarity; whole units by default with an explicit moneyExact for the quote builder, where rounding 17 600.40 to 17 600 in the row somebody just typed reads as the product losing the number. A ninth was found by the guard, not by me: OperationalTabs had a local day() that was not a duplicate but a NAME COLLISION -- the shared day() builds local midnight from a bare date so a reader west of UTC is not shown the day before, while this one takes a timestamptz that must not have a time appended. Same name, opposite mistakes; it is now dayOf. app/scripts/verify-one-money-formatter.mjs asserts the home module still exports the four, so the check cannot read green after the thing it guards is deleted. Sabotaged and seen to fail. Verified in a browser on both screens.
P87The guard's own blind spot, and fourteen more behind itcompleteP86's guard looked for a locally DEFINED money() or date(). It passed while three screens still pinned en-GB inline through toLocaleDateString('en-GB') -- one of them printing a hard-coded € in front of a number whose currency it never checked, on the billing screen. A named-function check only sees named functions, so the guard now refuses inline toLocale* and Intl.* anywhere outside the home module, and found fourteen more: four shapes of "when did this happen" written by hand across eleven screens, plus two amounts formatted with no currency style at all. Two helpers were added rather than forcing everything into the existing three: momentShort for a dense list where the year is noise, and monthOf for the reporting endpoint's YYYY-MM. One site keeps a currency-free amount() and says why in the source: OperationalTab receives a requestId and nothing else, so putting its bid fee through money() would default it to euros and state something the screen does not know. That is recorded as a gap, not a pattern. date() now refuses an unparseable instant -- it used to hand "Invalid Date" to Intl and print it. And a correction about my own method: I had been reading npm run verify as a typecheck all night. It is the guard runner; npm run check is the typecheck, and it caught two real type errors the moment the battery ran it.
P88The gap closed instead of documentedcompleteP87 added a currency-free amount() for one screen that genuinely could not name a currency, and wrote "this is a gap, not a pattern" beside it. Leaving an unused escape hatch in a shared module invites the next person to reach for it, so the gap was closed rather than kept: GET /v1/requests/:id/invitees now returns feeCurrency, taken from the REQUEST -- which is what a bid fee is denominated in -- and the screen prints money(feeOwed, feeCurrency). amount() is deleted. Two assertions, and the control is the one that matters: the currency must be present on a row that owes NOTHING, because it comes from the request rather than from the liability, and a test that only checked the paying row would pass against a query that read it off the wrong table. Both seen to fail with the column removed.
P89HSTS, decided by measuring the thing that made it riskycompleteQ-068 held Strict-Transport-Security back, and site/public/_headers said why in its own words: a browser that has seen it refuses http:// for the whole max-age and cannot be reached to change its mind, so it is "a decision to take with eyes open, not one to add to a file while nobody is looking". The risk is conditional on something being served plaintext, and that was never measured. It is now: http://procurevent.com, http://app.procurevent.com and http://api.procurevent.com all answer 301 to https. Nothing is served over http, so the header cannot break a request that works today -- it only removes the plaintext round trip an attacker needs. Set at max-age=86400: long enough to be worth having, short enough that a mistake heals by tomorrow. No includeSubDomains, which would assert something about hosts nobody measured, and no preload, which is baked into browser binaries and removed on a timescale of months. Raising it to a year is the step that genuinely cannot be taken back and stays the owner's. Live on all three surfaces, verified with curl -I. A CSP is still not set and the reason has not changed: it breaks pages silently, and on the app a wrong one would break Clerk sign-in with no visible error. That wants report-only and a feedback loop, not one pass. Also caught here: the first edit to app/public/_headers ate its /* block and both existing headers -- it would have shipped the app with NO security headers at all. Reverted and redone with a targeted edit.
P90Every tab said the same word, and nothing announced a page changecompleteTwo things a single-page app has to do by hand because a real navigation would have done both for free, and this one did neither. document.title was never set -- every route said "Procurevent", so a buyer with three tenders open in three tabs had three identical tabs and a history that was a column of the same word. And focus never moved on a route change, so clicking a nav link replaced everything on screen while focus stayed on the link: a screen reader announced nothing and its user was still standing in the sidebar. The title now comes from the SAME navFor() the sidebar renders from, not a parallel list that would drift -- navFor's own comment warns about exactly that -- with longest-prefix matching so /settings/billing is "Billing" rather than "Settings", and a detail route keeps its section's name because the record's own title is not known in the shell. Focus moves to <main>, which was already tabIndex={-1} for the skip link, and is skipped on first render so arriving at a page does not yank focus out of wherever the browser put it. Verified in a browser: the tab read "Requests · Procurevent", clicking Invoices made it "Invoices · Procurevent" and left focus on MAIN#app-main.
P91A shared link had no picturecompleteprocurevent.com sent no og:image at all, so pasting it into Slack, LinkedIn or WhatsApp produced a bare line of text — and for a product sold to buyers who share links with colleagues, that preview is the first thing many of them see. twitter:card was summary, the small square variant, which is the right choice only when there is no wide image to show. There was no brand asset to use and no SVG converter on this machine — no rsvg-convert, no ImageMagick, no PIL. The card was drawn on a canvas in the browser, on a page that already had Archivo Expanded loaded so the wordmark is the real typeface rather than a fallback, using the three-bar mark and the exact token hexes from favicon.svg. Getting 45 KB of image out of the browser and onto disk was done by standing up a throwaway Node receiver on localhost and having the page POST the bytes to it, rather than piping base64 through the conversation — the page had to be the LOCAL app for that, because an https page may not POST to http. The copy claims nothing: "Procurement for live events", which is the title the site already carries, and §13.1 forbids the rest. Absolute URL in the tag, because several scrapers do not resolve a relative one; dimensions stated, because a crawler that has not fetched the file yet uses them to lay the card out. The explanation beside the tags is an Astro expression comment and not an HTML one: this site builds 7 021 pages and an HTML comment ships in every one. Verified in production: og.png answers 200 as image/png at 1200x630.
P92The 404 told people something that stopped being truecompleteFound by typing a wrong URL into the running app. The catch-all still said "It is in the plan -- brief §12 specifies it -- but the first slice of the application covers Home and Requests only", which was false twice over and was being said to someone who had simply mistyped. App.tsx had already noticed the underlying drift in its own words -- five screens arrived and no line was deleted, "which is how a NotBuilt route stops meaning anything" -- but the screen it pointed at was never revisited. It also offered no link at all, on the one screen whose entire audience arrived somewhere they did not mean to be. It is NotFound now, names the path that missed so somebody can spot the character their pasted link lost, and offers two ways back. The nav lookup is kept for the case it was originally written for: if an item ever ships pointing at a route that does not exist, that person gets the old accurate message rather than being told their own menu is a typo. verify:nav catches that first; this is the second line.
P93Two lines of head that decide what a phone does with the productcompletetheme-color is the navy the application header already is, so a phone's status bar continues the header rather than sitting on top of it in the browser's default grey. color-scheme is the load-bearing one: there is no prefers-color-scheme rule anywhere in this product -- it is a light interface only -- and a browser that has not been told that will force-darken form controls on a device set to dark, which is how an input ends up dark text on a dark field that the CSS never asked for and nobody testing on a light machine ever sees. Both surfaces now carry both. The explanation is an HTML comment on the app, which is one page, and an Astro expression comment on the site, which is 7 021 -- checked, and it ships zero times.
P94A home-screen bookmark was a screenshot of the logincompleteNeither surface carried an apple-touch-icon, and iOS does not read an SVG favicon -- so adding either to a home screen produced a screenshot of whatever page was open, which for an app behind a login is usually the sign-in form. 180x180, drawn from favicon.svg's own geometry scaled 32 to 180 so the mark is the same one, and deliberately opaque: iOS composites a touch icon onto white and applies its own rounding, so a transparent corner would render white and lose the shape the mark is drawn with. Same canvas-and-receiver route as the social card, since this machine still has no SVG converter. 2 942 bytes, verified serving 200 on both hosts.
P95The contact card is not the registercompleteD-254, owner-confirmed and informed, superseding D-223. A discoverable supplier's register data stays open to any authenticated buyer; its business email and telephone move behind an invitation. The instrument is none of the three the handout proposed, and each was measured first: a column GRANT cannot work at all, because app_rw is one role for every tenant and revoking a column hides the card from the supplier that owns it; a security_invoker view sees exactly what the policy already admitted (6 rows) so masking in it withholds nothing, and a DEFINER view returns every row in the table (115 of 115) because the view owner's BYPASSRLS overrides FORCE ROW LEVEL SECURITY -- correcting 0026's header, which says the opposite; and an API-layer guard would implement "nobody reads this", a freeze rather than a rule with a permitted case. So the card moved to organization_contacts, where the question becomes a ROW question that row security answers natively. Along the way: organizations_read clause three grants nothing -- it joins workspaces, which a supplier cannot read, so it can never be true (Q-072), and nothing anywhere writes a contact address, so an award notice can never reach anybody (Q-073). 19 assertions, both sabotages seen to fail by name. The privacy notice is deliberately NOT changed: the nightly workflow deploys main, so committing it would publish it. SHIPPED to production 2026-08-30, with owner permission given informed after being told the migration drops columns. It moved exactly one contact card, which is what the pre-flight predicted; production then measured clean on the privilege audit (81 tables, 5 views), the policy shape (7 of 7) and the ledger (97 of 97). The view measurement also closed a hole nothing was watching: verify-policy-shape.sh gained a fifth property, that every view is security_invoker. All five are, on both databases; a sixth that was not would hand every tenant's rows to every caller through a query that works perfectly. Proved by sabotage.
P96A browser reports what a policy would have blockedcompleteD-261's conditions, met. The marketing site sends Content-Security-Policy-Report-Only -- which enforces nothing -- and the reports land in csp_reports through POST /v1/csp-report. script-src names four sha256 hashes rather than 'unsafe-inline', which was a measurement and not a preference: across all 7 021 built pages there are four distinct inline scripts and no external script host at all. style-src stays 'unsafe-inline' because a hash cannot cover a style ATTRIBUTE and the site has 104 of them, so the alternative was report noise rather than a stricter policy. Both wire formats are read: application/csp-report with hyphenated keys, and application/reports+json with an array of camelCase envelopes -- reading one would have filled the table from Firefox while Chrome posted into a void, and an empty table reads exactly like a clean policy. The parse rule that made that possible had two homes and had drifted; it has one now. verify-csp-script-hashes.mjs fails both ways and runs in the nightly workflow before the deploy gate. 24 assertions. Enforcing it is renaming the header, and that stays the owner's. SHIPPED to production 2026-08-30: both migrations applied, the Worker deployed, the site rebuilt and the header live on procurevent.com. The deploy probe earned its keep — POST /v1/csp-report answered 500 on the first deploy while an invalid sibling answered 404, because json() built every reply with JSON.stringify(body) and a 204 may not carry one; the Workers runtime throws where Node does not, so the local suite was green against a broken deployment. Fixed in the helper, mirrored in serve-api.mjs, and verify-null-body-statuses.mjs now reproduces it. One leg is unverified and it is the important one: no browser has yet delivered a report by its own dispatch. Everything else is proved, including a page-initiated POST from a real browser that landed. Q-074 — until one arrives, an empty table means nothing.
P97HSTS at a year, and a privacy notice that matches the productcompleteD-268 and D-265, both owner-decided the same day. HSTS goes from 86400 to 31536000 on all three surfaces, ahead of the 2026-09-01 date D-260 had set. This is the irreversible one: a browser that has loaded any of these pages refuses http:// for that host for a year and cannot be told to forget, so anything ever to be served over plain http on these hosts was foreclosed today. The condition that makes it safe was re-measured first — all three hosts already 301 from http to https. Still no includeSubDomains and no preload. All three files' comments were rewritten in the same change, because two of them still described one day and a comment that contradicts the line beneath it is how the next reader gets it wrong. The privacy notice: "visible to buyers, in full" was made untrue by D-254 and is gone, verified absent from what production serves. One bullet became three — the register stays open, the contact card sits behind an invitation, and Procurevent's own staff access is stated plainly rather than left implied, which the owner chose when offered it. The notice had said nothing anywhere about staff, so caveating only the new bullet would have read as though the two beside it had no such exception. Q-006 (privacy counsel) is untouched by this and stays open.
P98A supplier can be reached at allcompleteD-266, owner-confirmed 2026-08-30, closing Q-073. Nothing in this product had ever written an organisation's contact address — every organisation-creating function (0012, 0024, 0025, 0076) omits the columns and the supplier profile route wrote only supplier_profiles — so award.ts took its if (!r.email) branch for every recipient and a supplier that won a tender was never told. The fix is one form section on the screen Q-040 built, writing to organization_contacts. No migration: 0096 already made the table, the row security and the grants. Rejected alongside it, and recorded because the reason matters: backfilling from the federated directory, which would put third-party data straight into the table D-254 had just made private. The contract is that an ABSENT key leaves the card alone and an EMPTY STRING clears it. journey-api-test.sh, provisioning-api-test.sh and the sign-up flow all POST profile bodies with no contact keys; had a missing key meant "clear it", every one of them would have silently wiped a stored address and the failure would have looked exactly like the bug being closed. Clearing cannot be a DELETE — 0096 gives this table no DELETE policy, deliberately and exactly as organizations has none, so a delete would match nothing, report success and leave the address in place. 35 new assertions, every one forced red first. One of them could not fail and a sabotage is what said so: emptying ONE field takes the upsert path and emptying BOTH takes a separate UPDATE, so the assertion written for "the telephone is gone" stayed green against a clear that did nothing. The both-empty path now has its own assertions and a refill afterwards, because a clear that leaves the row unwritable would be a worse bug than the one being tested for. The end-to-end proof lives in issue-api-test.sh, whose fixture no longer seeds the winner's card: the winner fills it in through the route before anything is issued, so "the WINNER was written to" now measures form payload → route → table → award_notice_recipients → mailer. Sabotaging the write turns 9 assertions red there. Walked in a real browser against the local API: typed, saved, reloaded, and the value read back out of organization_contacts; both branches of the empty-state hint render. The address is not published by being written — asserted against the anonymous route with the supplier opted in to the public web, so the control could actually fire. looksLikeEmail is exported from leads.ts rather than copied, because the asymmetry is identical: a false refusal leaves a supplier unreachable, a false accept costs one bounced notice that is already recorded as a delivery failure. SHIPPED to production 2026-08-30, both Workers. The route cannot be probed from outside — it is behind a session and this machine holds no Clerk credential — so the probe is in three parts and each states what it does not cover. (1) /v1/supplier/profile answers 401 beside a deliberately invalid sibling answering 404, on GET, on POST, and with a junk bearer token: the route is served and gated. (2) The served app bundle was fetched and grepped: index-BJcLy3hp.js carries sp-contact-email, How do we reach you? and the empty-state sentence, while an invalid control string matches 0 times. That is the screen itself, not a version id. (3) census.sh gained a fixed question that executes the exact projection GET /v1/supplier/profile now runs, read-only, against production — it answers yes, so no column, table or function it names is missing there. What none of the three proves is a real supplier completing the round trip on production, and that is stated rather than implied. Census also now prints cards carrying an address beside the row count, because D-270 makes an emptied card an empty row and the bare count would have drifted away from the only number Q-073 was about. Production: 1 card, 1 with an address.
P99An invited supplier may see who is askingcompleteD-267, owner-confirmed 2026-08-30, closing Q-072. A supplier holding a non-draft invitation may now read the inviting buyer's organizations row and its contact card. This is a widening of who-sees-whom, which is why it is a migration and a decision row rather than a quiet edit. The clause it replaces has been in organizations_read since 0009 and has never once been true. It joins workspaces; a policy subquery runs under the CALLER's row security; workspaces_all admits a workspace only to its owning organisation. So it could never be true for the only caller it was written for — while 0009's own comment above it and names.ts both described it as working. That is why buyer_nameplate_for_request had to exist at all. Measured as a supplier with a live invitation: its invitation 1, the buyer's request 1, the buyer's workspace 0, the buyer's organisation 0. 0098 adds inviting_buyer_org_ids() — SECURITY DEFINER, set-returning, used as IN (SELECT …) so it runs once per query rather than once per row scanned, which is the shape workspaces_all already uses for accessible_workspace_ids(). buyer_org_for_request() is the per-request sibling and deliberately returns an ID rather than a value, so the definer function resolves an identifier the caller cannot reach and row security still decides what may be read about it. What is NOT opened, and every line of it is asserted: workspaces stays shut, a draft invitation is still not a relationship, a supplier gains nothing about another supplier, and the read is not a write. The suite section that pinned the CLOSED answer was rewritten in the same commit, as D-267 required — left alone it would have failed and read as a regression. Its self-check is stronger for the change: the flip is two-way now, so an invitation that opened only one direction would be caught rather than passing quietly. 19 → 30 assertions there, and 5 sabotages fail by name (the definer function returning nothing, losing its draft filter, not keyed on the caller; the API's join made INNER; an absent key made to clear). The card had to leave /v1/supplier/profile — D-272, one day after arriving there: a buyer must be able to fill one in for this permission to mean anything, a buyer never opens that screen, and a buyer POSTing there would have acquired a draft supplier profile it never asked for. One ContactCard component with its own save now serves the supplier profile screen and Settings, which is the one screen in both navigations. D-273: the buyer's details render on the supplier's invitation queue as mailto: and tel: links, and are absent rather than dashed when there is no card. The INNER-join sabotage exposed a vacuous assertion of my own — "the queue is unchanged" was satisfied by 0 = 0 once the earlier sections broke — which now has a floor control. SHIPPED to production 2026-08-30: 0098 applied, both Workers deployed, privilege audit 81 tables and 5 views clean, policy shape 7 of 7. Probed three ways, each stating its ceiling: /v1/organisation/contact answers 401 beside an invalid sibling answering 404 on GET and POST, and the 404 body served by the deployed bundle names the new route while an invalid control appears 0 times — that is this build running, not merely a version id; the served app bundle carries oc-email, /v1/organisation/contact and buyerEmail and no longer carries sp-contact-email, so the move is measured in both directions; and census.sh gained three fixed questions that execute the shipped projections against production, including both of 0098's functions — a function the ledger finds but that no longer runs would pass the ledger and fail these. Not proved: a real supplier and buyer completing the round trip on production, which needs a session this machine has no credential for. Walked end to end in a browser locally instead. Battery 2 360.
P100The reports arrived, and said somethingcompleteQ-074 closed, Q-075 opened, and the CSP slice earned its keep on day one. The 2026-08-30 evening handover recorded csp_reports at 0 rows and said an empty table meant nothing until a browser delivered one by its own dispatch — which blocked enforcing the policy. Re-measured the next morning: 3. Three reports, from three different venue pages, between 13:41 and 15:58 UTC, dispatched by real visitors' browsers with nothing driving them. Neither candidate cause survived — not the Claude pane's request blocker, not a queue that never flushes. The reports simply had not happened yet, because nobody had visited a page that violates the policy. No browser experiment was run and none was needed, which is the honest account: the first move was to re-measure, and the answer had already changed. This is B-187's lesson in a different table — the handover's number was true when written and had stopped being true. And they said something. All three name https://static.cloudflareinsights.com/beacon.min.js, refused by script-src-elem. That is Cloudflare Web Analytics, injected at the edge after the build — which is why nothing here could have caught it: verify-csp-script-hashes.mjs measures dist/, and this script is not in dist/. Meanwhile /cookies says the site "uses no analytics" and "loads no fonts, scripts, or images from any third-party domain", and /privacy says it "runs no analytics", twice. Both are contradicted by live traffic. The obvious fix was refused — D-274. Adding the host to script-src would silence the reports, make the policy agree with reality, and make two public legal statements quietly wrong. D-275 puts that refusal in code: verify-no-third-party-assets.mjs fails if the CSP ever admits a third-party asset host while /cookies still makes the claim, under either spelling of the header so it does not go silent the moment the policy is enforced, and BLOCKS if the sentence is reworded rather than passing over nothing. Forced red four ways. It ships inside ./db/verify-all.sh. Q-075 is the owner's, both ways: turning the analytics off needs a credential, and disclosing it edits a legal page. Both remedies are drafted in full, including the subprocessor row that would otherwise disagree with the prose. /cookies already states the preference in its own voice — *"We would rather remove the tracking than ask you to dismiss a notice about it."* It blocks D-261: enforcing today would block the beacon on every page while both pages claim there is no beacon, which is the worst of the three states. One near-miss of my own, recorded because the reason is worth more than the fix. The census table truncated blocked_uri to 26 characters and the document path to 30. I read a venue slug off the cut path, probed the URL I reconstructed, got a 404, and had begun measuring a regression that does not exist — the real slug ends -exhibition-centre-adnec and answers 200, as do all three. A sample of 61 sitemap URLs is 61 × 200. A truncated identifier is not an identifier, and the column that misled me is gone: the distinct blocked URIs are now printed whole and the document path in full.
P101The directory read like a directorycompleteD-276, D-277, D-278. The federated overview is Markdown and the site put it straight into a <p> and a <meta>, which show what they are given. Measured across all 7 021 built pages: 463 of 1 500 browsable venue cards rendered ## Meeting and Conference Facilities and Location: literally, and 104 pages carried a marker into <meta name="description"> and og:description — the sentence Google prints under a search result and the one Slack shows for a shared link. A38, Akvárium Klub, Várkert Bazár, Eiffel Art Studios, Europahaus Vienna, 620 Loft & Garden: real places, named. Flattened, not rendered. Turning text this product neither wrote nor controls into markup on a page it publishes would be a dependency, a sanitiser and an injection surface, for content whose only defect is punctuation. A lone _ is left alone on purpose — performing_arts_venue and bar_cafe_pub_club appear inside sentences and eating underscores would edit real words. And the card blurb is cut to 240 characters, which changes nothing a visitor sees. .dircard__blurb is line-clamp: 3, and the first card measured 7 839px of text inside a 59px box — 99% downloaded, parsed and laid out to be hidden. Blurbs were 73% of the page. After: venues.html 1.94 MB → 750 KB raw, 478 KB → 139 KB gzipped, a 71% cut in what a visitor downloads. The client-side filter reads data-name and data-place and never the blurb, so nothing searchable is lost — checked, not assumed. This materially weakens D-256. That decision — the public directory becomes edge-rendered — was taken on a 1.93 MB page, and 71% of the compressed weight turned out to be text nobody could see. D-256's own record already asks for a cheaper option to be compared before either is built. This is a third option that was not on the menu and is already shipped, and the comparison it asks for should be re-run against 139 KB rather than 478 KB. The guard checks the function AND the built output, and runs in the nightly job — not only in verify-all.sh — because the upstream text changes every night without a line of this repository changing, which is exactly how this would come back. Forced red five ways, including one that proves the dist scan independently of the unit assertions. Its own controls found two false-positive classes before it ever ran on real data. A bare test flagged 68 European hotel star ratings — AM HOTEL WELLNESS , Centrum Hotel * Superior — which are not Markdown, and which the stripper correctly leaves alone because four asterisks in a row have nothing between them to emphasise. And a newline is a defect in a single-line <meta content> and meaningless inside an element, where it is the formatter's indentation. The rule is now "a marker is something plainText would have removed". One bug the guard found that reading had not: the fallback description path, used when a venue has no overview, never went through the stripper — so Agora,\nCiutat de les Arts i les Ciències shipped a literal newline into a content="…" attribute. The venue NAME is now flattened once and used in all three places it reaches an attribute. 697 leaking elements → 0. SHIPPED to production 2026-08-30 through the nightly rebuild, whose new gate ran and passed against the fresh build. Probed against what production actually serves: /venues is 750 KB raw and 139 KB gzipped, down from 1.94 MB and 478 KB; 0 of 1 033 blurbs carry a marker, down from 463, with a control proving the test still fires; and 7 of 7 of the named pages whose search snippet began ## or now read as prose. D-279, found on the way: site/package.json has its own verify chain and nothing anywhere invoked it** — the fourth time that sentence has applied here, after the surface audit, the ledger gate and D-198. It is in the battery now, as the npm chain rather than three paths.
P102D-256, re-measured rather than re-confirmedcompleteD-280, and it recommends reversing an owner-confirmed decision — so D-256 stands until the owner answers. Its own record asks for a cheaper option to be compared before either is built; this is that comparison, in /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/44-d256-directory-architecture-comparison.md and as a page for the owner. D-256 was taken on raw bytes. "559 KB over 1 976 cards" is the file on disk; on the wire /suppliers was always 49 KB, and the whole 4 293-company wedge the decision exists to reach is 110 KB — lighter than /venues is today. Measured with two full builds, caps actually lifted, not extrapolated. Edge rendering does not reduce page weight. A worker rendering 4 314 cards sends the same 110 KB a static file does. What it removes is a BUILD-time ceiling, and the browse listing has none: VENUE_BUDGET is 7 000 pages, LISTING_MAX is 1 500 cards, and the 7 000 pages already exist and are indexed. The cost that survives is DOM. /suppliers at 1 976 → 4 314 cards: 10 063 → 21 838 nodes, 210 → 445 ms domInteractive, for 61 KB more transfer. Edge rendering does not move that either. The filter is not the problem — 7.8 ms per keystroke over 1 500 cards live. Recommended: D measured, then B, then lift the cap — none of which needs an adapter. Not recommended: lifting COMPANY_BUDGET alone, which closes the wedge gap for 61 KB and doubles a DOM already past any audit threshold. Two things this deliberately did not do. It did not ship content-visibility: auto, though it is the obvious next move — the only cost it addresses is layout, which the 0×0-viewport harness cannot measure, so shipping it would have been a claim. And it did not leave the experiment behind: both caps restored, dist restored to the shipped build, both site guards re-run green, and git status verified clean before a word of the comparison was written.
P103The wedge fits, and the page got lighter doing itcompleteD-281's plan, all three steps, owner-confirmed. /suppliers listed 1 976 of a 4 293-company wedge — 46%. It now lists all of it, at 67 786 bytes gzipped with 48 cards and 479 DOM nodes, against 10 063 nodes and 210 ms for the 1 976-card page it replaces. No Cloudflare adapter, no change to how the site is served. Step D was measured and answered no — D-282. content-visibility: auto cuts full reflow 28.9 ms → 3.6 ms and leaves domInteractive at 96 → 90 ms, which is noise: it skips layout for off-screen elements and the DOM is still parsed and built. It also cannot be calibrated with one number — the intrinsic size that lands within 2% at 1280px is 12% out at 390px, and the first value tried made the page 23% too tall and changed rendered card heights. Not shipped. I nearly recorded a 5.4× win that was asset caching: the A/B had one side cold. An A/B where one side is cold is not an A/B. Step B — D-283. Both directory pages render 48 cards and carry the rest as JSON; the filter still searches every row, which is the property D-256 rejected pagination to keep. One <template> per page holds the card markup and the script clones it and fills text nodes, never markup. < is escaped to \u003c so an upstream blurb containing </script> cannot decide the document's structure. The bytes fell too, which I had predicted they would not — /venues 138 663 → 112 505 gzipped — because JSON carries the same text without the repeated tags. Corrected rather than left standing. Step cap — D-284. COMPANY_BUDGET 2 000 → 4 400. Its own comment had argued against exactly this, on 559 KB — the file on disk, when the wire figure was 49 KB. The reasoning was sound and the arithmetic was wrong; the comment keeps the old paragraph and says so. Q-066 asked for pagination and got something better. Two guards had to move, and both are the dangerous kind — D-285. The nightly deploy gate counted rendered cards, which step B dropped from 1 500 to 48 by design; left alone it would have failed every deploy against a good build, and the fix somebody reaches for under that pressure is to lower the floor — on a gate that exists because production once lost 2 000 venues to a build that passed. It counts records now, with the head floored at 10 rather than 1 because the card markup also sits inside a <template>, inert but identical to grep. And verify-no-markdown-in-prose.mjs would have stopped checking 96% of the blurbs the moment the tail became data, while printing the same reassuring sentence; it parses the payload now, and a payload that does not parse is reported rather than skipped. Both forced red. The CSP hash guard caught the rest. Rewriting both filter scripts changed their hashes and it failed both ways at once — two scripts the policy did not name, two dead entries naming scripts that no longer exist. Nothing else in the battery would have noticed, and the policy would have gone on looking correct while covering neither of the two busiest pages. SHIPPED to production 2026-08-30 through the nightly rebuild; all four gates ran and passed against the fresh build, including the two rewritten ones. Probed against what production serves: /suppliers lists 4 314 companies from 48 cards, 64 513 bytes brotli; /venues 1 500 from 48, 109 478 brotli. Walked live — searching audio across the full 4 314 returns 13 matches with 563 DOM nodes in the document.
P104Something watches the product nowcompleteD-286, step 3 of the roadmap. Measured 2026-08-30: nothing did. The only scheduled job watched the directory sync, /v1/health existed and nothing polled it, and no error reporter appeared in any package.json — against 104 slices, 98 migrations and three live surfaces. docs/45 records it as the thinnest area of the whole build, and the first report of a broken sign-in would have been a customer. scripts/probe-production.sh runs every 15 minutes from GitHub Actions and asks twelve questions whose wrong answers would matter, not twelve pings. /v1/health is 200 only after it has counted rows in Neon, so it proves the Worker AND the database. /v1/session must answer 401 beside a deliberately invalid sibling answering 404 — both the same means nothing was measured. The directory pages must still carry a directory, counted the way the deploy gate counts it, because that gate runs at BUILD time and cannot see a bad deploy or an upstream that emptied afterwards. HSTS must still be a year on all three, because D-268 cannot be undone and nothing else would notice it stopping. Forced red six ways — unreachable API, an auth control that matches the real route, an emptied directory, an app shell with no bundle, a host sending no HSTS, and everything unreachable, which exits 2 (BLOCKED), not 1: four surfaces failing at once is far more likely to be the prober's network than an outage, and reporting it as one would train somebody to ignore the alarm. Alerting is the failing workflow's own email. No new service, no account, no secret — three of the four things reserved to the owner. And its ceiling is stated in both files rather than implied: GitHub schedules are best-effort and can start twenty minutes late, so it catches "broken for a while" and never a blip, and they are disabled automatically after 60 days without repository activity. It is a smoke alarm. When there is a customer to wake up for, buy a real monitor. The script is proved; the SCHEDULE is not yet. Twelve of twelve green both locally and in a manual CI run — but measured at 00:45 UTC, 78 minutes and five expected slots after the push, the schedule had never fired on its own. The workflow is on main and reports active, and GitHub is slow to start a new schedule and drops firings under load, so this is very likely that. It is recorded because "something watches the product now" is a claim, and a claim that has not been observed is not a measurement. Chased to a cause the same night. Schedules DO fire here — but the nightly rebuild is set for 03:17 UTC and its last three scheduled runs started at 09:11, 10:00 and 15:18, six to seven hours late, because GitHub queues them on shared runners and drops firings under load. So the fifteen-minute cron is an upper bound on hope rather than a frequency, and the ceiling first documented — "can start twenty minutes late" — was optimistic by more than an order of magnitude. Corrected in both the script and D-286. The script is proved; the cadence cannot be, on this platform. Do not compute an uptime figure from it. The real answer is an external monitor pointed at this same script, once there is a customer to wake up for.
P105The category list reads like a listcompleteQ-028 option A — D-287. It does not close Q-028: the owner still chooses whether B and C stack on top. It was built because the question's own note says A is the floor every other option falls back to, so build it regardless. Q-028 was written against a 123-name fixture. Measured against the live 3 167-category taxonomy while building this, the flat list is worse than the question says: "cable" is 20 categories but 98 selectable rows across 8 top-level areas, "truss" 13 and 56 across 4. The taxonomy is a DAG and every filing is its own selectable row (D-038) — correct, and exactly what makes a flat list unreadable at that size. The area is the word a buyer recognises, and a row inside a group now shows only the part of its path below that area rather than repeating AV › on all 89 of AV's rows. The bug worth recording is the one the first version had. It grouped at render time and left the array in the API's relevance order — it looked right, and twelve presses of ArrowDown landed on the thirtieth row on screen, because active is an index into the flat array. That is worse than no grouping: a list that highlights somewhere other than where the eye is going cannot be used at all. Sorting the ARRAY instead means flat order is visual order, and not one line of keyboard handling had to change. Found by pressing the key twelve times and counting, not by reading the code. Two smaller ones caught the same way: the group announced itself as "AV89" because aria-labelledby pointed at a heading whose count runs into the name in textContent — the flex gap that separates them on screen means nothing to a screen reader; and a stale dev server reported 49 groups where a fresh load reports 9, which is the trap docs/ already records about long-running Vite servers. The full path still travels with the choice — a row displayed as Rigging › Cables… stores AV › Rigging › Cables / Connectors / Adapters, which is what D-038 protects.
P106A supplier can say what it does, and a buyer can search for itcompleteQ-076, closed by D-288 and D-289 — and it was found by walking the front door, not by reading code. Signing up as a stranger, publishing, and asking "can a buyer now find me?" took six interactions and surfaced a gap that 2 360 passing assertions did not, because every suite tests what the product does and none tests what the site says it does. supplier_categories has had a table, row-level security and all four grants since 0004 and zero code paths anywhere in api/src or app/src — 0 rows on local and on production. Meanwhile the public site promises *"eligible for buyer invitations in your categories"* four times and makes "Categories you work in" a required field on a form that reaches a LEAD and never a profile. A supplier taking the self-service door that same page offers had no category on file, and a buyer could only find a supplier whose name it already knew — the opposite of sourcing. Not a new decision: brief §6.2 lists categories as required MVP and D-028 already governs how one is chosen. What was missing was the code. Both halves in one slice, because either alone is decorative. The supplier adds categories as removable chips above the same closed-vocabulary picker a buyer uses on a request; the buyer's supplier search gains a category filter that is a search on its own, so "I need rigging" no longer requires knowing a rigging company's name. Walked end to end in a browser: add, save, buyer finds it by category with no name; remove, buyer no longer finds it, still found under the one kept. 0099 adds the unique index the table should always have carried — the current writer de-duplicates so it cannot produce a duplicate, but that is a property of one function and any tenant may write its own rows. It is also what ON CONFLICT can name: without it that clause is a comment that silences nothing while looking like a safeguard. Measured before writing it — production 0 rows, 0 duplicate pairs. The ledger had no index probe kind and every existing one would have lied, because the table and its policies predate this migration by ninety-five files; the kind was added and forced red by dropping the index. 25 new assertions, forced red four ways — an absent key that clears, a save that merges, an insert that trusts the payload over the vocabulary, and a filter that matches everything. Two of my own traps on the way: a backtick inside a SQL template literal, fourteen lines under the comment warning about exactly that (fourth time in this repository), and a python dict literal inside $( ) that bash brace-expanded so the request was never sent and the route answered 200 to an empty body. SHIPPED to production 2026-08-30: 0099 applied (privilege audit 81 tables and 5 views clean, policy shape 7 of 7), both Workers deployed. Probed: /v1/suppliers?category=… answers 401 beside an invalid sibling answering 404, the 404 body served by the deployed bundle names /v1/suppliers?q=&limit=&category= and no longer names the old form, and the served app bundle carries chosenlist, What do you work in? and Or the category they work in while an invalid control matches 0 times. The production probe is 12 of 12.
P107The buyer's first screen has a next stepcompleteD-290, and found the same way P106 was — by creating a buyer and looking. Its dashboard lands on seven tiles reading "0", "none" and "not enough history", with no link or button anywhere on the page. Every sentence on it was accurate and none of them was a next step, on the first screen a paying customer sees. The supplier's equivalent has pointed at "Complete your company profile" since Q-040; the buyer side never got one. Keyed on history, not on the tiles, and that distinction is the whole design. All seven read zero for a brand-new organisation AND for an established buyer having a quiet fortnight, so GET /v1/dashboard gained requestsEverCreated — the one field on that screen that is not a statistic. Drafts and cancelled requests count: somebody who started one and abandoned it has found the button and does not need it pointed out again. The assertion that makes it earn its place: a buyer with one draft request reads requestsEverCreated: 1 while every tile still sums to 0 — indistinguishable from brand-new by the screen, distinguishable by the field. A sabotage that did not fail taught more than the ones that did. Removing the explicit workspace filter from the count changed nothing, because procurement_requests is under row-level security and the policy already scopes it — so that filter is belt-and-braces, kept for 0096's stated reason, and the real gap was that a count carries no id, so the suite's tenant-boundary sweep over ids could never have caught a cross-tenant leak here. It now asserts the rival's count is its own 1 and not the buyer's 6, and that assertion fails when the number is inflated. 7 new assertions, forced red three ways. D-291, from walking the rest of it: two accounts created from nothing completed the whole loop — supplier publishes and records categories, buyer signs up, finds it by category without knowing its name, invites, issues, and the invitation lands in the supplier's queue. What it carried was the buyer's name, the deadline, and "no contact card" — because a buyer's card lives on /settings and nothing pointed at it. The first-run panel does now. Q-077 records what that does not reach: a buyer who skipped it, or an organisation older than the panel. SHIPPED to production 2026-08-31, both Workers; the served bundle carries firstrun and Create your first request while an invalid control matches 0.
P108Two sides of one screen, each told the truthcompleteD-292 closes Q-077; D-293 was found while verifying it and is the larger of the two. A buyer with an empty contact card is now told so on the invitees tab — where somebody has been invited and cannot reach them — and nowhere else, because a banner is the thing people stop reading. Its third condition is the one worth keeping: a contact read that FAILED renders nothing, since "you have no contact details" is a claim about the database and a request that never arrived is not evidence for it. Proved by changing one variable at a time on the real buyer the overnight walk created — empty card renders it, filling it through Settings removes it, clearing it again while rejecting only that one request leaves the invitee list rendering and the line absent. Then the same screen was opened as the invited supplier, and row-level security working perfectly had produced two false sentences. The supplier search is scoped to buyers, so a supplier searching there matched nothing and was told "nobody matching has registered with Procurevent yet" about a company that is registered and tender-ready. And the summary is built from the rows the reader may see: with two suppliers invited to one request, the buyer's screen said "2 invited" and the supplier's said "1 invited" — which to a bidder reads as "you are the only one", and is a number it will price against. Both measured with the two sessions open at once. The invite panel is now the buyer's alone and the supplier gets a sentence that says the list is its own AND that silence about the others is not evidence there are none. Q-078 records the one heading that stayed buyer-voiced and why it was left.
P109The supplier's half of the loop, walked by a strangercompleteD-295, D-296, D-297, D-298 — and D-299, which is the harness rather than the product. Quote, award, notice, accept: it passes in the suite and had never been walked. Walked as the invited supplier on the rig the previous session left behind, and it produced four defects a suite structurally could not find, because each surface is correct in isolation and only the PAIR is wrong. D-295 is the commercially serious one. The award notice said *The whole request — EUR 18500.00* and the app then asked *Accept €23,495 for The whole request?* — the same award, 27% apart, and neither surface named which figure it was showing. Both numbers were right and both were deliberate: a buyer compares net because VAT is recoverable, a supplier invoices gross, and SupplierHome.tsx carries a comment saying exactly that. The naive fix — show net so it matches the email — would have reverted sound reasoning and put the wrong number beside an Accept button. The defect was never the number. Migration 0100 labels the notice, two labels go on the supplier's surfaces. D-296: the tender SELECT never named summary, so a buyer describing the job in prose rather than lots sent an invitation that arrived as a title and a date. Not withheld on purpose — issue_request puts it in the issued snapshot, so it is part of the disclosed tender by the product's own definition. Verified against a request that has one and one that genuinely has none, so *nothing written* stays distinguishable from *not sent*. A tender describing nothing now says so instead of presenting a silent price form. D-297: the card offered only *I am interested* and *Decline*, and the tender was reachable only after saying yes — so a supplier had to commit to an answer to learn what it was answering. Measured, not assumed: the API serves both tender and quote to an unanswered invitation, 200 each, against 404 for another organisation's. A missing link, never a permission. D-298: after awarding a lotless request in full the screen said *Some lots are still open.* about a request with zero lots. Both branches of the ternary were wrong because the sentence did not apply, and the award notice for the same award said *The whole request* — the data was right and only the sentence was wrong. Fixed at the sentence and not in the variable, because its other consumer must stay false there. D-299 is what the walk cost and repaid. A suite failed twelve assertions with 401s, then went green on an immediate re-run at the same load. That is Q-079's unexplained failure with a second sighting and a mechanism: free_port cannot close the window between its check and the bind, and the readiness loop asked only whether ANYTHING answered /v1/health — so a suite whose server lost the race measured another product's API and reported it as this product failing. wait_for_own_server checks who holds the port and exits 2, BLOCKED, wired into all 33 suites that start one. Two suspected defects were checked and were not defects: the quote screen looked editable after submission and every control is disabled; the exclusion fields looked unlabelled and carry aria-label. Both would have been wrong to report, and innerText is what nearly reported them. Every new assertion forced red first — the summary pair by removing the column from the SELECT, the notice label by replacing the function in the database and watching the negative control flip the opposite way, the port check by handing it a pid that does not hold the port. The existing notice assertion had stopped at the figure, so a substring match could not tell EUR 1000.00 from EUR 1000.00 net and the battery stayed green without measuring the change; strengthened, and forced red. Battery 2397 assertions, nothing failed, nothing blocked. SHIPPED to production 2026-08-31: 0100 applied and content-probed present on prod, both Workers deployed, production probe 12 of 12, and the served bundle carries all four new sentences while three invalid controls match 0. Q-080 records the root cause left to the owner: issue_request requires a title and a deadline and nothing that describes the work, and 18 of 29 issued requests on local would have been refused by a rule that did. That is the cost, measured, not a hard question.
P110The claim-your-listing flow, walked by a strangercompleteD-300, and Q-082 which is the point of the slice. P49 is the roadmap's cheapest path from the 27 284 published companies to a network, zero claims had ever been made, and nobody had tested it for somebody who is not us. Walked as a genuine stranger with no account. The supplier's half is sound and honest at every step. The listing search appears once there is a name to search; an already-claimed listing is shown and marked rather than hidden, because hiding it would tell a real company its own listing does not exist; selecting one explains what happens next BEFORE the person commits — domain match links you immediately, otherwise somebody at Procurevent looks. The organisation was created, the claim recorded pending with evidence manual, and Company profile then said *WAITING FOR PROCUREVENT TO CHECK — WE COULD NOT CONFIRM IT AUTOMATICALLY*. Two things expected to be broken were not, and both were checked rather than assumed: switching the type to Agency removes the whole listing block, so the UI and the type === 'supplier' guard in the submit handler agree; and the pick survives switching away and back. A third nearly became a false report — grepping for the route string found it only in the data layer and suggested no screen rendered the queue, which is the abstraction working correctly; the component graph shows ClaimQueue under PlatformConsole. What the walk could not establish is whether the promise in that sentence is kept. A pending claim is visible only to an organisation of type platform, and on local that organisation is a fixture with 0 active members. Production was not measured — ./db/census.sh prod was refused by this session's command classifier — so the answer is unknown rather than bad, and saying so is the honest report. The decision machinery itself is well covered: db/test/claim-authority-test.sh, 66 assertions, including that only Procurevent may decide and that a rejection needs a reason. So census.sh now reports whether a platform organisation has an active member and how many claims are waiting — two literal sections, read-only, no new capability, because the instrument is smaller than the question and turns something nobody could check into one command. Q-082 is High: most real claimants will never match on domain, so most claims land in that queue, and a queue nobody opens looks exactly like a product that ignored them.
P111A pending claim reaches a personcompleteD-301, which answers Q-082 and opens Q-083. ./db/census.sh prod said the worse of the two things it was written to tell apart: production has no organisation of type platform at all, not one with no members. So ClaimQueue rendered for nobody, and the sentence a supplier reads before it commits — *somebody at Procurevent looks* — promised a person who could not sign in. Migration 0101 adds notified_at and one narrow door, record_claim_notified; a claim that lands pending now mails the alert address with both domains as compared, the claiming organisation and the claim id, so it can be acted on without a console. census.sh counts what nobody was told about. Forced red four ways — dropping the ownership check, dropping AND notified_at IS NULL, mailing on every claim, and unwiring the notifier — and each flipped a different assertion by name. The second of those exposed a tautology in this slice's own test: the baseline was read AFTER the action, so it compared a value to itself. Staffing the console is Q-083 and the owner's: it needs a real sign-in identity, and a migration naming a person's email would put personal data in an immutable file.
P112The clarification exchange, walked by a strangercompleteD-302, D-303, D-304 — and Q-084 and Q-085, which are the owner's. The one leg of the RFQ loop nobody had ever driven by hand: the supplier's *Ask the buyer a question* box, the buyer's answer, and what the other bidders then see. Walked in three browsers as three tenants. The exchange works and every rule under it is sound — the scope promotion to buyer_to_all is real, a supplier that asked nothing does receive the answer, and supplier_nameplate correctly refuses to name a rival. Three defects above it: the screen never knew questions have their own deadline, so it offered a live form on a tender whose questions shut 25 days earlier and let a whole question be typed before the server refused it; a competitor's published question was headed "Your question", on a record the same screen says can never be corrected; and nothing told anybody anything — not the buyer when asked, not one supplier when answered — while the buyer's screen promised *"every invited supplier receives it at the same moment"*. The third is Q-082's shape for the second time in one session. The walk also broke the harness open: an assertion that finally read memberships showed three suites had been seeding none since migration 0077, silently, each reporting 0 failed throughout — verify-all.sh now fails a suite that cannot seed itself.
P113The reverse auction, walked by a strangercompleteD-305 to D-309, and Q-086 which is the owner's. The last major loop nobody had ever driven by hand, walked in three browsers as a buyer and two suppliers — 34 HTTP assertions had never met a screen. The mechanism underneath is sound and was confirmed by walking it: the versioning is exact (18500 superseded → 18250 superseded → 18000 live), the decrement refusal is actionable and preserves what was typed, the anti-snipe extension fired at 2m55s remaining and did not fire at 6m, the buyer sees only live bids cheapest-first with real names, and a rival's figure and name appear nowhere in the 454 bytes a supplier receives — asserted on the raw bytes, not on a field being absent. Five defects above it. The screens rendered four auction states as two, so a round that had FINISHED told its bidder Opens 07:01 AM at 07:07 with advice about bidding in the final five minutes — 0087's own trigger takes care to distinguish "has not started" from "has closed" because they "call for opposite actions", and the screen threw that away; the buyer's side printed the literal word open at exactly the moment isOpen was false. A closed round vanished from the bidder's screen entirely, so a supplier that had just led three rounds was told *"You have no auctions to bid in."* A duplicate auction answered the buyer with duplicate key value violates unique constraint "auctions_one_live_per_lot" — because asGuardRefusal read text || fallbacks.duplicate and a Postgres 23505 message is never empty, which made all seven purpose-written fallbacks in the codebase dead code; the fix discriminates on err.constraint, measured in both directions, because eighteen migrations raise those same codes by hand with prose a person wrote. The anti-snipe extension left no audit trace at all — 0087 put closes_at in the audit saying an unreconstructable extension was the one thing worth fearing, and record_audit()'s status-unchanged early return discarded exactly those; 0103 fixes it, and the suite caught the first cut filing a status move as an extension. And the biggest one is not a defect but an unasked question: an auction accepts no bid at all once the request's own submission deadline has passed — the only time a buyer would naturally run one — because a bid IS a submission and 0087 carved its exemption into one supplier-side guard and never met the twin. Proven with a control, the deadline the only difference. Neither suite could see it: both use future deadlines, so 59 assertions all ran on the one case where the question does not arise. Q-086 is High and the owner's, because it decides who may change a price after a published closing time.
P114The bidders are told the round openedcompleteD-310 and D-311. The gap P113's walk exposed and did not close: a buyer opens a timed round and every invited supplier is told nothing. 0104 gives auctions the notify trigger, fanning out over exactly the set supplier_is_invited_to() admits — 0102's loop repeated rather than reinvented. The argument is not that this matches the other four notifications but that it is unlike them: orders, awards, reviews and clarifications all concern something that waits, and an unread award is still there tomorrow. An auction is the only event in the product whose notice carries its own expiry — the window is minutes to hours, the anti-snipe default is five minutes, and a supplier that does not look loses the round without learning it ran. What it deliberately does not do is notify on close, because 0087 says in words that "closing does not notify", and a written design position is not a gap to be quietly overturned; D-309 having just put the finished round on the bidder's own screen with its final standing is what makes leaving it cheap. The slice's real find is in the harness. notify_people() writes one row per ACTIVE MEMBER, and every fixture organisation in db/test/auction-test.sh had none — so a fan-out assertion placed there would have passed against a build that notified nobody, which is D-304 one table over. Worse, the draft exclusion turned out to be unasserted anywhere: every invitation the API can create is invited, there is no HTTP path to a draft at all, and sabotaging the status <> 'draft' clause left the HTTP suite at 49 passed, 0 failed. That clause is the one stopping a buyer's shortlist leaking to a company it has not invited yet. The suite now seeds people and a draft invitee, blocks if the memberships did not seed, and fails by name on all three sabotages — notify nobody, notify drafts, and notify on every save.
P115Both sides of a catalog trade can name the othercompleteD-313 to D-317, and Q-088 and Q-089 for the owner. The catalog-and-order loop walked by hand, both sides, in two browsers, as two organisations that signed themselves up. The mechanism is exact and was confirmed rather than assumed: three priced items, an order of twenty-four of one and three of the other, prices taken from the catalog and not from the caller, header totals summed from the lines, and PO-2026-0001 through draft, placed, confirmed and delivered with both notifications landing. And neither party was ever told who the other was. The buyer's screen read "A supplier" on every catalog; the supplier was shown a purchase order for HUF 281,940, a button reading "Confirm this order", and no buyer at all. One cause with two faces: both nameplate functions key on a TENDER relationship, which a catalog order does not have by construction — ordering without running one is the storefront's entire premise. The buyer's half read organizations.display_name off a plain join, and that table admits a buyer only to a DISCOVERABLE supplier's row; production carries ZERO supplier profiles of any status, so every catalog ever published would have been anonymous to everyone. The supplier's half had a fallback written for exactly this case in 0079's own projection, with a comment saying so, that never fired once — it reached the buyer through workspaces, which a supplier may not read. Written against the shape of the data and never run under the row security of the side that needed it. Four more sat on top: a catalog order's number linked to /requests/null and an error page, because the client declared requestId: string while a LEFT JOIN returned NULL; "Order placed as a draft" followed the buyer to the next supplier's catalog and named the wrong party; the only mode 0078 exists to make possible was unreachable, because the box asked for an organisation id that no screen in this product displays; and a buyer read "4500.0000 HUF" in the one place that is a shop window. The slice's real find is a sabotage that failed to fail. Deleting 0105's catalog clause outright left the new naming assertions green — the buyer under test had already placed an order, so the name was arriving through a different clause and BROWSING, the only state that matters for a storefront, had no coverage at all. Rewritten against a buyer that has only looked, with both preconditions asserted, it fails on that cut and on three others. 0105 was proven additive behaviourally rather than by a text diff: the old body installed under a second name and compared over every ordered pair of organisations — 0 regressions, 480 widenings, 0 unexplained. The first run of that comparison reported "0 differences" and was rejected for also reporting zero widening on a change known to widen; RLS had hidden organizations from its own loop.
P116Both sides of the invoice-and-contract loop can name the other, and reach it without a uuidcompleteD-318 to D-324, and Q-090 and Q-091 for the owner. The invoice-and-contract loop walked by hand, both sides, in two browsers, and the pattern that has now found something ten times for ten held again: six defects that 2 502 passing assertions had not. Two of them made a screen unusable, one let a supplier bill for work nobody had ordered, and one told a buyer that a second full invoice matched the order. Neither party could name the other, on either screen. contract.ts and invoice.ts were written before the nameplate convention that eight other modules follow and read both names off plain joins to organizations — a table that admits a buyer to a supplier's row only when the supplier is directory-discoverable, and a supplier to a buyer's row only through a non-draft TENDER invitation, which a contract is not and an invoice is not. Production carries zero supplier profiles of any status, so this was total there rather than occasional, exactly as it was for P115 one table over. The invoice half was worse and was not a permissions failure at all: the buyer's name was not in the projection, so a supplier reading its own invoice list saw its own name and never the party that owed it. 0106 adds buyer_nameplate_for_contract and deliberately does NOT widen supplier_nameplate — a contract clause there would let a caller manufacture the relationship it then asks about, because contracts_buyer_write admits any organisation as the buyer; the suite asserts that boundary and it fails if anyone adds the clause. Two screens asked a person to type a uuid the product displays nowhere. "Their organisation id" on Contracts is the box P115 removed from the catalogs screen, on the screen it had been copied to; "Order id" on Invoices is the same shape, and typing PO-2026-0001 — the only order identifier a supplier is ever shown — answered "orderId" is required. about a box that was full. Both are pickers now, and the invoice one carries the buyer and the value because order_number is unique per WORKSPACE, so a supplier working for two buyers gets PO-2026-0001 from each. The contracts picker's first draft was itself a find, and only walking as the SUPPLIER caught it: it offered eleven rival suppliers and one buyer, because a network catalog is published to every organisation and a supplier is a potential buyer too. Nothing leaked — those names are already on the supplier's own catalogs screen — but a catalog is not a relationship. The other two sources are acts one party directed at the other; catalogs came out, and each side's picker now holds exactly its one real counterparty. A supplier could bill an order the buyer had never placed (0107), and the product disagreed with itself about it in two places: the Orders screen says "Not placed by the buyer yet" and the invoice suite carried a comment asserting as fact that this could not happen — a belief the suite never checked, because it always placed the order first. A contract could be drafted with itself (0108), which can never reach the two assents that make one agreed. And two invoices each equal to the order both read "Matches the order" (0109), together asking for twice what was ordered; 0083 compared one document to the order and its tests asserted all three outcomes using a single invoice for each, so function and tests agreed completely about a question neither asked. Seven sabotages, every new assertion seen to fail by name, and two controls proved to defend the specific design choice behind them rather than merely passing. Battery 2 502 → 2 530.
P117A supplier states its own tax rate, its lead time and its minimumcompleteD-325 to D-329, and Q-092 for the owner. The three affordances the previous handover called "not a defect in what exists" — and the first of them is a money defect, which is the half that assessment missed. The item form had no tax box and hardcoded 27 in its initial state, and place_catalog_order computes each line as quantity × unit_price × (1 + tax_rate/100), so the form's default was a commercial figure on a purchase order: an Austrian supplier at 20 per cent was issuing orders seven points too high, in a product whose brief names Central Europe. Walked end to end — an item published at 20 per cent, four ordered at 10 000, PO-2026-0003 at net 40 000 and gross 48 000, against 50 800 under the old hardcode. Two dead controls on the buyer's screen came alive with it: the "Lead time" column had read "Not stated" for every item a form could create, and 0080's refusal for a line below the supplier's minimum had no reachable path at all because no item could carry a minimum. A tax rate above 100 answered 500 — "Something went wrong on our side", about a value the caller sent. Seven columns carry percent_rate (CHECK 0..100) and three modules validated into one three different ways, two with no upper bound; Quote.tsx has had a tax box since P30, so the same 500 was reachable there by anyone typing 150. One shared percent.ts now answers it, with document.ts deliberately keeping its own because its refusal names the criterion. The second comment-as-folklore of the day: 0080's own comment said its refusal "names the item, because below the minimum without saying which is unactionable" and the sentence it raised named nothing — read by a person for the first time the day the field shipped. 0110 makes the comment true. And the refusal still did not arrive whole: catalog.ts stripped everything before the first colon, for a driver prefix that does not exist — measured, a plpgsql RAISE arrives bare — so the buyer was shown "Austrian truss hire (you asked for 2, the least they supply is 4)" with the half saying what was WRONG deleted on the way out. Every earlier refusal happened to contain no colon, which is why it looked harmless for a month. Two traps paid for in the fixing: a comment quoting that pattern ends with a star and a slash and CLOSED THE BLOCK COMMENT, four modules stopped loading and the parse error named cors.ts — the backtick trap's sibling, same misleading blame; and six probe items added to the suite's one catalog broke three later assertions that take items[0] as THE item, so the P117 fixtures moved to their own catalog rather than the old assertions being relaxed. Five sabotages, every new assertion seen to fail by name, and one control rewritten after it was found to pass on an EMPTY measurement. Battery 2 530 → 2 548.
P118A save that fails part-way keeps the quote it hadcompleteD-330 and D-331. Q-092 raised and closed the same day. Found while forcing a P117 assertion red, which is the only reason it was found at all: the sabotage made a quote line fail validation, and the suite reported that the supplier's quote had zero lines afterwards. saveQuote sent BEGIN, its writes and COMMIT as separate tenantQuery calls — and the port gives every call its own transaction. The dev server takes a pooled connection and gives it back around each one; the Worker wraps each in its own sql.transaction. So the BEGIN committed immediately, the DELETE of the supplier's quote lines committed on its own, and the ROLLBACK in the catch had nothing to undo. The rollback was decorative and had been since the route was written. quote.ts was the only module sending BEGIN, so the blast radius was one function. tenantBatch is now on the port, implemented in both, and returns nothing on purpose: production runs the Neon HTTP driver, which is non-interactive, so no statement in a batch may branch on an earlier one's result — a signature handing back rows would invite code that cannot run in production, and the submission upsert therefore stays outside the batch because the id has to be known first. The failure the suite uses is a real one and not a sabotage: a thirteen-digit quantity passes this module's finite-and-not-negative check and overflows numeric(14,3) at the INSERT, after the DELETE. The price is zero on purpose, so the submission header's own UPDATE — which runs before the batch — cannot be what fails. Both halves are proven, and that is the part worth reading. The dev port by the suite; the Worker port by a probe against PRODUCTION that writes nothing: txid_current() is the same for two statements sent as a batch and different for two sent as separate calls, which is the control without which an implementation returning a constant would pass. "The driver documents it" is not a measurement. Battery 2 548 → 2 554.
P119A verdict on a compliance document can name who made it, and reaches the supplier it is aboutcompleteD-332 to D-336, and Q-093 and Q-094 for the owner. The compliance loop walked by hand, both sides, in two browsers, and the pattern held for the thirteenth time: five findings that 2 554 passing assertions had not. compliance.ts:151 was the last unreasoned member of the P115/P116 family — a counterparty's name read off a plain JOIN organizations, a table that forces row security — and neither database held a single compliance document, so nothing had ever exercised it. Measured before touching it, as procuvent_app_rw with rolbypassrls = false, one supplier and one document and two buyers each holding their own non-draft invitation: the verifying buyer named itself, a second invited buyer read verified and could not name the author at all, and the supplier could name it only while a request from that buyer still existed — delete the tender and the verdict stayed while its author vanished. Withdrawing the invitation does not break it, because organizations_read admits status <> 'draft'; deletion does, and deleting an old request is housekeeping rather than an edge case. The screens then made it worse than the data. Both guarded the byline on verificationStatus === 'verified' && verifiedByOrg, so a name the reader may not have did not degrade the line, it DELETED it — leaving exactly the bare "Checked" that both files forbid in their own headers, three lines above the code that does it. That is the third comment-as-folklore of the week and the sharpest of them: the specification was written directly over the contradiction. 0111 adds verifier_nameplate, entitled to the supplier the document is ABOUT (unconditionally and permanently, because the attestation is about it), to the organisation that made the verdict, and to platform — and deliberately not to every reader compliance_documents_read admits, because naming one buyer to another discloses a relationship neither is a party to. That is Q-093, and 0111's own third source assertion fails if anybody answers it by writing code. A rejection had an author nobody ever showed: 0062 writes verified_by_org_id for every verdict except under_review, and neither screen named one, so a supplier read "Sent back — the cover is too low" and could not tell which of its buyers had said it. The comparison screen rendered one compliance panel per QUOTE, and a supplier appears there once per version — submissions_one_live is unique on (invitation_id, lot) only WHERE status = 'submitted' — so Nightwalk, having superseded twice, produced three identical panels with live verdict buttons; marking the document right in the first left the other two saying NOT YET CHECKED about the document just checked, and "Send back" on either would have reversed the verdict from stale state. And the product stored a sentence a buyer typed for the supplier to read and never delivered it: no notification of any kind existed for a compliance verdict, measured from pg_trigger and from the distinct notification types, while orders, awards, auctions and reviews all had one. 0112 delivers it, names the buyer, and refuses to notify on under_review (which names nobody) or on a return to submitted (which is the supplier's own act) — the not-the-actor guard 0061's header says would be needed the day a branch could tell the acting organisation, written into the WHEN clause where it is reachable. The traps paid for: a backtick inside a template literal broke four modules again, in a comment written three lines below the warning that names that exact trap; and a shell case inside $( ) had its closing parenthesis end the command substitution, so two assertions reported the case statement itself as the measured value. Five sabotages across the two migrations, every new assertion seen to fail by name, and the one control that exists so a pair of silent no-change controls cannot mask a dead trigger proved to fail when the trigger is dropped. Battery 2 554 → 2 574.
P120The certificate is the document the buyer looked atcompleteD-339 and D-340. Found by continuing the P119 walk into the half nobody had walked: the certificate upload. 0062 had already decided this rule and applied it to the wrong half. Its own comment says a re-filing must void a verdict because otherwise "verified" means "was verified once, about a certificate that has since been replaced — the buyer looked at the OLD document", and the five columns it then lists are all METADATA. attachments arrived one migration later in 0063 and 0062 was never revisited, so the swap its comment describes was closed for the policy number and open for the policy. Measured through the running API with the control in the same run and on the same document: buyer marks it right → verified; supplier attaches a different certificate → still verified, still naming the buyer; supplier changes the reference → submitted. The buyer's own screen distinguishes "No file attached — you are checking the details only" from a named file button, so the product knows the certificate is the thing being judged, and then let that thing be replaced under a standing verdict. 0113 is two triggers sharing one function — TG_OP does not exist in a WHEN clause and OLD may not be referenced in an INSERT trigger's, which Postgres said plainly on the first attempt — scoped hard to owner_type = 'compliance_document' because attachments carries every tender pack in the product. It moves to submitted and never to rejected: the buyer has not looked at the new evidence, which is not the same as disliking it. The withdrawal branch is written for a route that does not exist — a supplier can add certificates and never remove one — and is asserted at the table, because the day that route arrives the rule must already cover it. The finding worth more than the fix is D-340: the scope control FAILED TO FAIL. Inserting a non-compliance attachment and asserting no verdict moved stayed green under a sabotage that widened the trigger to every attachment, because the widened trigger looked up a request id in compliance_documents and updated zero rows. It proved the function was harmless on other rows; it claimed the function does not run for them. A negative about scope is a schema fact and cannot be shown by a row that looks identical either way. Three sabotages, each now red by name. Battery 2 574 → 2 583.
P121What the product has told people, and by what channel, is a number rather than a sentencecompleteD-341, and Q-095 for the owner — High. The previous handover carried "No email leaves the product for a clarification, an auction or a catalog order" as prose, and prose ages with nothing to re-measure it. Measured instead: mailer.send() has exactly three callers — an award notice, a pending directory claim and a lead alert — and notifications.emailed_at has existed since 0061 and has never been written on either database. On local, 12 rows carry severity = 'action_required', the product's own word for "a person must do something", and 0 of 20 have ever been emailed. A supplier that does not sign in never learns a buyer rejected its insurance certificate and said why. The machinery is not the blocker: a daily scheduled handler already exists and already mails, and award_notice_recipients / record_notice_delivery are the exact shape a digest needs. The address is. The only business address the product holds sits behind a field labelled "Email for award notices" whose own hint says *"An award notice is sent here, and nowhere else"* — so a person who filled it in did not agree to a daily operational digest, and repurposing it is a decision about a user's data rather than a build. It was deliberately not built, and the sweep was designed down to the two function signatures so the answer costs a line and the build costs a day. Production holds one notification, an award.accepted, and zero marked as needing a person — so measuring first is also what established that building it today would have mailed nobody. Battery unchanged at 2 583; this slice adds a measurement, not an assertion.
P122A superseded quote is not an offercompleteD-342. Found on the way to the performance-review loop, which is a walk that has still not happened. The comparison screen for REQ-2026-0001 said "4 quotes" for two real offers, drew four columns headed by two supplier names, and rendered "Award the whole request" on each — Nightwalk had superseded its quote twice, and compare.ts had no status filter at all. Three of those four buttons can only fail: awarding the superseded submission was measured to answer 404 "That quote cannot be awarded", so the product renders a control against its own refusal. The half that matters is arithmetic. Compare.tsx builds its comparison set as "every quote that is not disqualified", so lowestTotal and lowestForLot run Math.min across withdrawn prices — a price the supplier has replaced can be badged LOWEST on the screen a buyer awards from. Invisible until now because the local walk data descends, 18 500 → 18 250 → 18 000, so the live quote is also the cheapest; a supplier revising UPWARD, which is what happens when scope grows, inverts it. Fixed with one clause in the API rather than in the screen, because the screen consumes the list in four places and fixing one leaves three. withdrawn deliberately stays: a supplier holding only a withdrawn submission is already absent from noResponse, whose test is "no non-draft submission exists", so filtering it would erase that supplier from the buyer's screen altogether — a supersession cannot do that, because it always leaves a newer live row. The compare suite had 29 assertions and not one superseded fixture, so it had run entirely on the case where the question does not arise; it now seeds Alpha's first version priced BELOW every live quote, which is the only shape that reveals the defect. Removing the clause reddens 13 assertions, the sharpest reading the cheapest quote is a LIVE one, not a withdrawn price (expected 30000.00, got 10000.00). Battery 2 583 → 2 586.
P123A comment cannot enforce the rule it statescompleteD-343. Noticed as three lines of stderr during an ordinary suite run — reset-fixtures.sh: line 106: orders: command not found, and the same for contract_assents and invoice_payment_events. A heredoc opened as <<SQL rather than <<'SQL' is interpolated by the shell, so a table name written in the markdown habit inside a SQL comment becomes a command substitution. That file already carried the explanation in full, with the mechanism, a worked example and the two errors it produced on 2026-08-24 — and five more had been written below it, plus a sixth in the sibling file its own comment names. The three that errored were the lucky ones: two of the six wrapped users, which is a real command here, so the shell ran it and substituted the logged-in usernames into the script with nothing on stderr at all. A sweep found 13 more across seven further files, so the hazard was six times wider than the two files documenting it. Nineteen removed, and ./db/verify-no-backticks-in-heredocs.sh now runs in the battery. The guard's first run flagged its own prose — a heredoc opener named in a shell comment is not an opener — and it deliberately ignores ESCAPED backticks, which do not execute and which several suites write on purpose; reporting those would train the next reader to ignore it. Both behaviours proved by sabotage: a bare backtick is named by file and line, the same backtick escaped is not. Battery 2 586, unchanged: this slice removes noise and adds a guard, not an assertion.
P124A review says what happened to it, and stops saying two things that were not truecompleteD-344 and D-345, with Q-096 for the owner. The last two-sided loop with no hand-walk, walked 2026-09-03 in two browsers as a stranger: Riverbend Congress awarded REQ-2026-0001 to Nightwalk, Nightwalk accepted, Riverbend opened the review from the comparison screen, scored it, sent it, corrected it, withdrew it and re-sent it. The handover's opening question is answered and the answer is no: a supplier does not lose the name of who reviewed it when the tender is deleted — awards.request_id and supplier_evaluations.award_id are both ON DELETE CASCADE, so the review goes with the tender, which is 0057's deliberate choice and not P119's defect. A compliance document is the supplier's own attestation and outlives the request; a review is derived from an award which is derived from the request. review.ts's nameplates were correct throughout, measured from both sessions. What was wrong was that the product said three things that were not so. (1) Arming *Send this to the supplier* rendered *"Once they have read it, the scores and comment cannot be changed"* — 0054's rule, which 0059 replaced when the owner answered Q4 on 2026-08-15 — three inches below the page's own hint saying the opposite and directly above a button that then reads *"Correct it"*. A false rule at the moment of deciding argues against sending at all, and supplier_evaluations holds zero rows on both databases. (2) A correction reached nobody: measured across one act, the audit trail recorded communication 3 -> 1, corrected_at was stamped, and the supplier's notification count was 10 before and 10 after — while supplier_performance() moved the figure the Suppliers screen shows every buyer to *"Communication 1.0"*. 0114 delivers it, names the buyer on 0112's reasoning, and asks 0059's corrected_at what a correction is rather than deciding again. (3) After a withdrawal /performance told the supplier *"Nothing yet. A review appears here once a buyer has sent one"* — while their own notification list still held "A buyer has sent you a performance review" at the top. The fifth belief-beside-code this week: review.ts's header said a retraction leaves the row so *"both sides can still see what was said"*, three sections above its own suite asserting *"the supplier stops seeing it"*. Whether it should is Q-096 and the owner's; every sentence is now honest under either answer. Neither review suite had one nameplate assertion in it — the P115/P116 sweep never reached this file — which is exactly why nothing would have gone red if a migration narrowed either function. Ten added to review-authority-test.sh and seven to review-api-test.sh, each forced red by name. Battery 2 586 → 2 609. And a trap the project had not paid for yet: a sabotage restore built from pg_get_triggerdef is a bare CREATE TRIGGER, which fails on the sabotaged trigger still sitting there — and under ON_ERROR_STOP the rest of the restore never runs, so the next sabotage measures a database still carrying the last one. Three assertions in the first run failed for a reason their labels did not say. The restore now drops first and verifies it restored, and the four sabotages then reddened exactly one target each.
P125The two acts the product exists for tell somebodycompleteD-346. Found by the method P124 ended with rather than by another walk: survey the whole notification vocabulary and ask which acts are missing from it. Thirteen kinds of notice existed and neither of the two the product is for. Measured on a week of real data — Nightwalk Staging, invited to REQ-2026-0001, held eleven notices and none about the invitation; Riverbend Congress, sent three quote versions, held four and none about a quote. 0115 adds invitation.issued and submission.received. The design was wrong first and the journey suite caught it. Firing on the invitation row would have told every supplier about a tender it cannot open, because workspace.ts invites while the request is still a draft — and journey-api-test.sh already carried the sentence saying so. The act is the LATER of the invitation being issued and the request leaving draft: three triggers, one function, one visibility test. The control that proves it — *the supplier is NOT told yet, because a draft has not been sent* — is the assertion that would have caught the first draft, and a sabotage restoring that draft reddens it. Severity is argued, not chosen: an invitation is action_required because refuse_after_deadline() makes it expire absolutely; a quote arriving is info, because the buyer compares after the close and twenty invitees would otherwise raise twenty marks needing nothing. The widest trigger this project has added — 38 files write invitations, 24 write submissions — so the FK shape was read before it was written: notifications cascades on both its keys and entity_id carries none, so no teardown can fail on a row these create. Seven existing assertions went red for counting unread across a whole feed, which asserts how many acts a fixture performed rather than what the code does; all now name the type under test. One of them, in the auction suite, said *the notice* and grepped the entire response — it failed about a rule it was not written to police, which is D-340's shape in a test rather than a migration. Battery 2 609 → 2 620.
P126The product explains itself, and the manual cannot drift from itcompleteD-347. Owner asked for a user manual and a help menu system. Measured before writing anything: 36 screens, 31 navigation items across the two sides, and no help page at all. /help is a menu, a search, a role filter and 29 topics in 6 sections, rendered from app/src/data/help.ts — the screen holds no prose of its own. docs/54-user-manual.md is generated from the same array, and docs/55-operating-procedures.md is the operator's runbook beside it. Generated, for B-187's reason one level up: a manual maintained beside the screens is a claim that ages, and it ages silently because nothing reads it. Three guards run in the battery. verify-help-corpus.mjs refuses a duplicate topic id, a route App.tsx does not serve, a §13.1 claim that is not being denied, and a money topic that denies nothing — and it allows the forbidden words in a sentence that DENIES them, which is how the manual says the true thing about EKR and TED. build-user-manual.mjs --check fails when the screen and the manual would tell a person different things. verify-procedures-real.mjs refuses a dead path or workflow name in the runbook and refuses a reserved-to-the-owner list that is not four items. No <details>. The obvious build is a collapsible per topic driven from the search; <details open={derived}> is uncontrolled, so a topic the reader opened shuts itself on the next render. Search REMOVES rather than collapses, which also leaves find-in-page working on the whole manual. Walked on both sides: 24 topics and 5 sections as Riverbend, 23 and 5 as Nightwalk with no buyer topic leaking, and /help#quoting from the buyer side widens the filter rather than answering a direct link with an empty page. It found three defects in itself — a section and a topic both rendering id="quoting", contents anchors pointing at ids no markdown reader uses, and a .help class that styles nothing, which the app's own class guard named. Ten sabotages across the three guards, each red by name. Battery 2 620, unchanged: guards and a screen, not rules.
P127A typo is not an outagecompleteD-348. Found by cross-checking input against output across the whole API rather than by walking a loop: every id-taking route fired with the string not-a-uuid. Twenty answered 500, "Something went wrong on our side." Nothing went wrong on our side — Postgres raised 22P02 and it reached the top uncaught — and the same 500 goes to probe-production.sh, so a person's typo reads as an outage. Fixed in one place: route() is now a wrapper mapping 22P02 to a 400 and rethrowing everything else, with dispatch() the switch that was already there. That is stripNul's argument ten lines below it — the one place both edges converge — and the alternative was twenty per-route guards, of which the ten scattered copies of the same UUID regex are the existing evidence. The sweep is extracted from router.ts, not listed, so a route added next month is covered the day it is added: 57 route forms. The control that makes it mean anything is the second pass — the same routes with a well-formed uuid naming nothing answer 30 × 404, 5 × 403, 5 × 405 and 2 × 200, and the four 400s carry their own body-validation sentences. Without it a build answering 400 to everything would pass. A sabotage that failed to fail, and what it taught. Deleting the rethrow — making every error a 400, including a genuine fault of ours — left all six behavioural assertions green, because nothing a caller can send provokes a non-22P02 error through this wrapper. D-340 again: a negative about scope is a source fact, and two source assertions now carry it. The extractor also cost three false greens of its own, the first of which reported a clean sweep over zero paths. Battery 2 620 → 2 628.
P128The audit: what three parallel readers found, and what it cost to be wrongcompleteD-349, D-350 and D-351, with Q-097 for the owner. Three read-only audits over every screen, component, stylesheet and site page — copy and UX, accessibility, performance — each finding required to carry a file:line and the code or sentence it contradicted. Every one re-verified here before it was fixed; two were wrong about their cause and are recorded as such. The worst was arithmetic. Math.ceil((deadline - now) / 86_400_000) is negative zero for a deadline up to 24 hours past, and -0 < 0 is false — so for a full day after every tender closed, the quote form stayed live, the closed banner never rendered, and the supplier's queue said "Closes today". A supplier could price an entire tender into a form the API can only refuse. A guard now forbids deriving a passed deadline from a rounded day count, and lib/format.ts was already doing it right. Two defects blocked inviting real users at all: an invited colleague landed on a screen with no router, no menu and no way out, told that everything was "in the menu", where a reload said their invitation had failed; and an ordinary expired session rendered as *"You do not have access to this — your organisation's administrator can change what your role can see"*, naming the one person who cannot help. Nine refusal sentences were painted and never announced — auctions and invoices among them — while eighteen identical sites already carried role="status". The "soon" chip on an unbuilt nav item was aria-hidden, so the only people who could not see it followed the link. Done and not-done on a handoff checklist was a hidden glyph plus a line-through, which no screen reader announces. Focus was dropped to <body> by five panels that replace their own trigger, including the one that commits money. And the two directory pages counted 30 845 and 27 284 rows to show twenty-four. Measured with EXPLAIN ANALYZE on production: 402.5 ms → 16.4 ms and 70.8 ms → 10.2 ms. /v1/health — the route this project's entire monitor asks — was cached at the edge for an hour, so it could have reported {"ok":true} for an hour after the database stopped answering. Battery 2 628 → 2 630, plus two guards.
P129Nobody could sign in, and twelve checks said everything was finecompleteD-352, and /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/56-owner-action-sign-in-is-not-configured.md for the owner. Found while diffing a deployed bundle for a string that should have been in it and was not. https://app.procurevent.com/ told the public it had no sign-in provider and offered no button. Vite inlines VITE_* at build time; the Clerk publishable key lives in two gitignored env files that no CI runner has ever had. With no provider, UnconfiguredBridge never registers a credential source, so the minifier proved currentCredentials() unreachable past its first branch and shipped the entire data layer as one line returning *"This part of the application is not connected to the service"* — from 115 call sites. This is D-338 with the next question asked. That decision already knew CI and this machine build different bundles, and already named the two files. Nobody asked what else they carried. scripts/deploy.sh built on the owner's machine until 2026-09-02; the dead wrangler credential moved deploys to the workflow and the app has been unusable since. Four deploys exited 0 and the probe passed 12 of 12, because every check it made is answerable by a shell that has not signed in — and the post-deploy bundle diff compares strings both bundles had. The build now carries its inputs, a gate reads the BUILT ARTEFACT and refuses a keyless bundle, and the probe asks the served bundle against a control. Reproduced by moving the env files aside: 642 kB and no key, refused by name; restored, 659 kB with the key, passes. The one thing between Procurevent and its first real user is a repository secret.
P130An agent that audits one dimension to exhaustion, and the strategy it followscompleteD-353. The owner asked for an autonomous agent and a strategy covering functionality, inputs, results, screens, UI, UX, mechanics, logic, execution, consistency and optimization. Both are built, and the strategy is a description of checks that exist rather than of checks that ought to. /Users/petermarik/.claude/agents/procurevent-auditor.md audits one named dimension per run, measures, reproduces, fixes the root rather than the report, forces its own checks red, ships under the standing permission, and records the rest as numbered findings. It carries the four reserved exceptions verbatim and the traps this project has paid for — the negative-zero deadline, the hidden tab's one-second timer clamp, the restore that fails to restore, git add -A, a backtick in shell prose. /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/57-test-strategy.md documents the seven layers and the blind spot in each, which is the half that matters: every defect this product has shipped got through a layer that was green. It names what is still not tested — malformed bodies, concurrency, load, mail delivery, restore, a real screen reader — rather than implying coverage. Both are guarded. verify-procedures-real.mjs now reads the strategy as well as the runbook: 37 paths, every workflow name, and the reserved list is still four items. Its first run reported three dead paths that were verify-*.mjs globs in prose — a truncated glob is not a path — and it is red by name when a guard is renamed out from under it. Battery 2 630, unchanged: this slice adds an agent, a reference and a guard, not a rule.
P131Every remaining finding, fixedcompleteD-354 and D-355. The 2026-09-05 audit's 59 findings closed out: thirty-one more fixed here, four drafted for the owner because they are public legal statements, and one found stale on re-verification. 0116 is the only new rule: a contract both parties have signed now says *agreed* whichever side signs second. The flip lived in contract.ts behind AND buyer_org_id = current_org_id(), and the policy admits only the buyer to UPDATE — so in the natural order, buyer drafts and supplier signs last, the row stayed Draft for ever on a contract both had signed. The rest are the product no longer saying things that are not so: an approvals threshold that said *over* where the database says >=; a review that claimed the supplier *had read* it; a handoff asserting a precondition whose column has no writer; an auction that said *Opens* about a time already past; a private catalog badged Live; a supplier served the buyer's uploader, answer form and internal-note box on every request it was invited to; five controls that could only fail; three empty pickers that reported a failed read as a fact about the business. On the marketing site: a heading offering 4 314 companies as invitable when none are; a security claim about short-lived access links that files.ts says do not exist; *capacities and bookable spaces* promised on four pages over data that has neither; a pricing calculator whose sliders moved freely while the price stayed hard-coded without JavaScript; and 75 policies across 46 tables where the schema now holds 143 across 70. The immutable set had drifted twice — five, then six, now eight — so CLAUDE.md is corrected and the count is gone from the site rather than restated. Battery 2 630 → 2 634.
P132The legal pages say what is true, and date themselvescompleteD-356, owner-instructed. The four corrections drafted in docs/60 are applied. The subprocessor register listed three live providers as "Planned — not yet in use" — Clerk, Cloudflare R2 and Brevo, all carrying data on every request — under a paragraph saying authentication was not live and no email was sent, and it omitted Stripe while cards were being taken through it. The draft's one open question was measured rather than guessed: api/wrangler.jsonc binds the bucket with "jurisdiction": "eu", so files are stored in the EEA. The terms described card-at-checkout as invoicing against an order form, and named five immutable tables where there are eight — understating a stated limit on erasure by three, including contract_assents, which records who agreed to what. And the dates are derived now. All three pages said *29 July 2026* while two had been substantively edited weeks later, on a page that promises *"the date at the top always reflects the current version"*. Legal.astro asks git for the last commit that touched each page; the page identifies itself, because a layout cannot know its caller; and the nightly rebuild checks out full history, because a shallow clone would date every page to the build and make an untouched page claim to be current. Battery 2 634, unchanged: this slice corrects prose and adds a derivation, not a rule.
P133Six silencescompleteD-357. The tail of the audit, and every one of them is the product failing to say something. A criterion weight of 5o counted as zero, so the screen said *"50% still to allocate"* with nothing pointing at the field. A refused section delete was discarded and the section reappeared on the next reload. A saved internal note rendered its confirmation inside the form it had just closed, so it could never be seen. *"Edited by the issuer"* could never fire, because editedNote is hard-coded null with no column behind it. A directory search returning nothing rendered nothing, on the screen that exists to decide whether a listing is there. And the claim queue named the narrower of two intake rules while its own header says the dominant case is the other one — 4 041 of 27 284 listings carry no website at all. Battery 2 634, unchanged.
P134A bare scalar is not a request bodycompleteD-358, and the largest named gap in docs/57-test-strategy.md is closed. Every POST route fired with sixteen malformed bodies: "just a string", 123 and true answered 500 on three of them, because const input = (body ?? {}) as Record<string, unknown> is a cast and not a check and 'name' in "just a string" throws. Fixed in route() — the same one place P127 used, for the same reason. Scalars only, which is what lets it need no list of exceptions: /v1/csp-report genuinely takes an array and an upload is a Uint8Array. The sweep asserts 500, not 5xx, because /v1/requests/:id/concept/draft answers 503 to every body including a good one — drafting is off unless AI_COPILOT is set, and it says so. A sweep failing on any 5xx would have called a deliberate, well-worded refusal a defect. The control that matters is the last one: without *an object body still answers in its own words*, a build refusing every body would pass everything. Battery 2 634 → 2 640.
P135Broken, but not by this deploycompleteD-359. The production probe gains a third verdict, BLOCKED ON THE OWNER, used at exactly one hand-written call site that must name the docs file carrying the owner action. Prints as loudly as a failure, repeated in the verdict under its own heading, and does not set the exit code. Prompted by run 33985573369: an API-only deploy that shipped P134 correctly, skipped the app build, and was reported failure by a check about the app bundle. Sabotaged both ways — a real failure beside it still exits 1; a present key turns it green and drops the blocked count to 0. The first sabotage of the second kind was a sed that did not match, so it changed nothing and read as a pass; it now asserts the substring before substituting.
P136Two people, one momentcompleteD-360, migration 0117, and api/test/concurrency-test.sh — the first suite in this repository that fires requests at the same instant instead of one after another. That distinction is the whole point: a sequential duplicate exercises the JS pre-check, a simultaneous one reaches the constraint handler, and only one of those had ever run. Found on the first attempt: two organisations signing the same contract at the same instant left it draft for ever with both assents recorded and no path back, because each trigger's count(DISTINCT org_id) ran under a snapshot that could not see the other's uncommitted row. Reproduced deterministically with two hand-interleaved transactions, fixed with a row lock taken in its own statement, applied to local and prod, and the racy duplicate of the same logic deleted from contract.ts. Section 0 proves the harness collides before anything below it is believed — and it failed on its first two runs for two different reasons of its own (it timed the arming sleep; then it compared six concurrent against three sequential, a built-in 2× handicap). Battery 2 640 → 2 651.
P137Can production tell anybody anything?completeD-361. /v1/health now reports mail and mailRedirected; scripts/probe-production.sh asserts both every fifteen minutes, with the field's own absence reported as *nothing was measured* rather than as an outage. Until now nothing could answer whether the product could send an invitation at all — the failure mode is a Worker that accepts everything, tells nobody, and logs one line. The first version of the redirect boolean was wrong about the empty string, which still rewrites every recipient to nowhere; caught by this module's own suite before it shipped. Battery 2 651 → 2 657.
P138Five controls a green guard could not seecompleteD-362. 829 controls measured across 35 screens — both sides — at 375 px with a coarse pointer; six below the 44 px floor, all fixed, re-measured to 0. The buyer-only first sweep reported zero and was half a measurement: the supplier's fifteen screens carried the sixth. The guard could never have found them — it only examines rules that STATE a too-small height, and these declared no height at all. It now prints that limit on every green run, and the sweep is written down as app/scripts/measure-screens-in-a-browser.md. Shipped to the repository, not to production: the app deploy is gated on the sign-in secret, so this queues behind the owner action in docs/56.
P139The first restorecompleteD-363, Q-098, runbook /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/61-restoring-the-database.md. First point-in-time restore ever performed on this project: branch cut from 18:09Z, proved by a control it must LACK (main has migration 0117, the restore does not) and by matching row counts across seven tables. Ready in seconds. Found in the doing: --timestamp is not a flag, is accepted silently, and branches from *now* — in an emergency that is a copy of the corrupted database with no error. And the recovery window is six hours, which is now Q-098 in front of the owner.
P140Nothing is namelesscompleteD-364. 829 controls across 35 screens, both sides: zero without an accessible name, zero named only by a placeholder, zero duplicate ids, zero heading skips, zero images without alt. Sabotaged twice before the zero was believed. The focus-ring sweep's first version reported 72 of 72 broken — its own defect, since Chrome does not apply :focus-visible to a programmatic .focus(); verified with a real Tab key instead. What still needs a person: whether the announcements make sense, and anything inside a dialog these sweeps never open.
P141Seven panels that opened silentlycompleteD-365. Every disclosure trigger now carries aria-expanded, enforced by app/scripts/verify-disclosures-announce.mjs, which discovers disclosures instead of listing them and so fails closed. Reading the source found four; the guard found seven — Contracts, Suppliers and Venues had the same defect unseen. The guard had two bugs of its own and its own controls caught both: a [^>]* tag match that stopped at the arrow in () => and found zero buttons while reporting green, and a first rule that counted pagination and cancel buttons as disclosures. Found while closing a gap written down twenty minutes earlier — *anything behind a dialog or a dropdown is unmeasured* — which is the first thing that gap produced.
P142The cap that nothing was watchingcompleteD-366. /suppliers is 67.9 kB gzip and /venues 110.3 kB against 6-8 kB for every other page, because both carry the rest of the directory as JSON so the DOM stops scaling. That is a deliberate, documented trade — but the payload scales one-for-one, COMPANY_BUDGET is liftable by design, and nothing measured the consequence. site/scripts/verify-page-weight.mjs states a per-page gzipped budget and fails when one is exceeded. It adds no cap, because capping would hide suppliers who signed up to be found. Sabotaged with a 6x tail: 365 kB gzip, 2.8 MB raw, red by name.
P143Nothing falls overcompleteD-367, scripts/load-probe.py, and the last named gap in docs/57-test-strategy.md is closed. 810 read-only GETs against production at up to 60 concurrent: everything answered as expected, p50 186 → 304 ms, throughput to 146 req/s, no cliff. The finding is /venues — p50 475 ms, p95 2 423 ms, and a cache HIT on all 120, so the latency is payload rather than origin. It confirms P142 in milliseconds. The probe's own first version reported 0/120 on a route whose correct answer is 401.
P144A legal date that was never truecompleteD-368. All three legal pages dated themselves to the build, every build, since the derivation was written — import.meta.url after bundling is a generated chunk in dist/ that git has never tracked, so the lookup returned nothing and a silent catch printed today. Fixed with a repo-relative literal plus a cwd for git, and it now throws rather than guessing. site/scripts/verify-legal-dates.mjs compares the built date against git log — not against a date being *present*, which is what every existing check asked and why nothing caught it. I had already 'fixed' this once, with fetch-depth: 0, verified only by the page having a date.
P145A fault nobody can see is not reportedcompleteD-369, migrations 0118/0119, suite api/test/faults-test.sh (25 assertions). An unhandled 500 is now recorded — one row per fingerprint per minute with a count, so a deploy failing at 146 req/s writes one row a minute rather than half a million an hour — and folded into the daily alert that already has an address. Carries no identifier of any kind: the route pattern, never the URL; no caller, org, IP or session; the message redacted first. The watchdog reads it through a SECURITY DEFINER aggregate rather than by widening the app role's policy, and the suite proves app_rw still cannot read a row. Closes the last item in docs/59 Gate 5 that was mine. Two of the three sabotages are visible only to source assertions — a deleted call leaves every behavioural assertion green.
P146The fault log's first catchcompleteD-370. Within an hour of shipping P145, server_faults held a real one: /v1/supplier/invitations/:id/quote answering 500 to a thirteen-digit quantity, because quantity is numeric(14,3) and is validated only as finite-and-not-negative. A supplier typing too many digits was told the server broke. 22003 now answers 400 in its own words, from the same one place 22P02 does. quote-api-test.sh had asserted the 500 — the status was taken as observed rather than intended, so the defect was written down as correct. Those assertions' real subject, that a failed save keeps the supplier's quote, is untouched.
P147The whole set, not the next onecompleteD-371. After 22003 turned up by accident, the remaining caller-data sqlstates were found deliberately: 22001 (a nine-character currency answered 500 — 22 columns are length-capped), plus 22007/22008, which were handled inside document.ts and nowhere else, so every other date-taking route 500'd on a mistyped year. All five answer 400 in their own words. Deliberately not the whole of class 22: 22012 is our division by zero, and a polite 400 would hide it. The suite asserts the set exactly, asserts 22012's absence, and asserts each has distinct wording — the last being the only thing that catches five identical sentences. Battery 2 686 → 2 690. (The commit message for this slice says 2 692; the measured number is 2 690, and this row is the one that was checked against the run.)
P148Behind the panelscompleteFour of the seven disclosures opened and measured at 375 px with a coarse pointer — Companies and Venues notes, Catalogs items (a money path: a quantity box and an Order button), Auctions bids. Zero too small, zero nameless. /contracts and /suppliers have no rows in the local fixture, so their panels never render; that is a data gap and it closes when the first real contract exists. Two traps recorded in the procedure: [aria-expanded] first matches a combobox input on /suppliers, and clicking an input opens nothing — it reported a clean screen. And the click must be split across two tool calls, because a hidden Browser pane throttles setTimeout and stops delivering requestAnimationFrame altogether.
P149An invitation to a tender that closed a month agocompleteD-372, migration 0120. A request whose submission deadline was thirty days past issued with 200, identically to a future one. Every screen behaved correctly around it — a supplier would open the invitation and be told the tender was closed — so the defect was an invitation that should never have been sent. Found by probing plausible-but-wrong values, the one thing docs/57 says no sweep can do. That probe also confirmed the money paths are sound: negatives and >100% tax refused by field name, and 7 × 1.115 = 7.81 stored and returned, so the supplier sees what was recorded.
P150The deliverables form, twicecompleteD-373, migration 0121. (a) Replacing a deliverable on a live tender answered 500 — the DELETE spares non-draft lots by design and the re-insert then collides on request_lots_key. Every lot in production is open, so this fired the first time a buyer edited a live tender. Found by the fault log, its second real catch. (b) A delivery window ending before it starts was accepted; six tables hold an ordered date pair and only one enforced it. Constraint added — with its handler in the same slice, measured: constraint alone turned a silent 200 into a 500.
P151The fault log as a gate, not a diarycompleteD-374. The battery clears server_faults before the suites and fails after if anything was provoked that nothing asserted. Threshold zero, measured rather than assumed: after the day's fixes a full run provokes none, and no suite expects a 500 any more. Turns every future battery run into a 500-detector for free — and its own justification is that the first look found two real defects while every suite passed.
P152Numbers that land on a halfcompleteD-375. The money arithmetic is correct — half-up rounding, gross as net plus tax, and a header total equal to the sum of the *rounded lines* so the document adds up. Nothing could have shown that before: every figure in the quote and compare suites was round, and round numbers pass whether the rounding is right or wrong. Twelve assertions added over numbers that land on a half. No defect found; the gap was coverage.
P153The rule was real, the reason was notcompleteD-376. approval.ts claimed the database refused self-approval. It does not: may_decide_step asks only who a step was *asked of*, never who raised it. Self-approval is unreachable only because the route is the sole writer of approval_steps and can name a user and nothing else — which the suite now asserts, so the protection cannot be removed silently. No behaviour changed. The comment now names where the check must go the day a role-named approver becomes creatable.
P154Thirty-three screens after a night of changescompleteTen screens were edited on 2026-09-05/06 — aria-expanded on seven, coarse-pointer heights on six selectors, the notifications copy — and the battery proves the API, not the rendering. Walked both sides in a browser: 20 buyer screens and 13 supplier screens, none broken, no console errors, aria-expanded present in the expected counts, and both variants of the new notifications sentence live on their screens. The sweep's own first run reported all twenty broken — the local API had stopped behind the app, which is the symptom app/scripts/measure-screens-in-a-browser.md documents and which this confirms is worth having written down.
P155Two quotes that cost the samecompleteD-377. Nothing had ever compared two quotes with equal totals — the case where a comparison product earns or loses trust. The ranking's third ORDER BY term is a deterministic tie-break and nothing asserted it. The sabotage is the finding: with the tie-break deleted, five identical requests still returned the same order and only the source assertion caught it. No finite number of calls can disprove nondeterminism.
P156The last mile of every refusalcompleteD-378. The API's chosen words only matter if the screen prints them, and nothing checked the join: API {error, hint} → client.ts reason → ErrorState. All three links are correct; a broken middle one would make every carefully worded refusal invisible while every API test still passed. Guarded, and sabotaged one link at a time. No defect.
P157Two minutes, verifiedcompleteTelling the owner an action takes two minutes is worth being certain of. Checked: the deploy workflow does pass secrets.VITE_CLERK_PUBLISHABLE_KEY into npm run build, and gh secret list shows the repository holds the other three secrets and not this one. The wiring is right; only the value is missing. verify-build-can-sign-in.mjs now asserts that workflow line too and refuses the build if it disappears — otherwise the secret could be set, the deploy could go green, and the bundle would still ship without a key, with the artefact gate noticing one step too late. Sabotaged by deleting the line: exit 1 with its own sentence.
P158The rule that only exists in productioncompleteD-379. NEVER_CACHED and s-maxage live in worker.ts alone; every suite runs serve-api.mjs, which has no cache rule. So the behaviour was exercised only in production and measured nowhere — after already going wrong once, when /v1/health was cached for an hour in front of the entire monitor. Three checks now, every fifteen minutes, and the control is the route that IS cached — without it, no-store everywhere passes. Probe 13 → 16.
P159An alarm that named the wrong subsystemcompleteD-380. A fault-only day mailed *"directory sync needs attention"* and told the reader to re-run the sync — at 6am they would look at a healthy sync while the API 500'd. Mine, from merging faults into a report that had only ever described the sync. Found by asking what production does that no test can see: the scheduled handler runs nowhere, and its healthy signal is silence. Subject, opening line and instruction now come from sources; absent means the sync, so every existing caller is unchanged. Watchdog suite 21 → 28.
P160The upload that has never happenedcompleteD-381. Production holds zero attachments; local holds fifteen. The R2 path has never moved a byte, and storage.put — the only call in the product reaching a service outside it — had no catch, so an R2 failure would have told a supplier the server broke rather than that their document was not saved. Now 503, in words, with no row left behind. Tested by making the local fake fail as R2 would; the sabotage needed three attempts to be real (a non-recursive chmod, then a filename that counted previous runs).
P161Could anybody become anybody?completeD-382. No. worker.ts has no dev-token path at all, so production cannot accept one — the code is not there, which beats a config check. But nothing asserted that: the existing guard covered the browser bundle only. Now both halves — the guard scans all 48 API files the Worker ships, and the probe asks the deployed Worker itself, because a deployed Worker is not its source. Nine malformed credentials probed on production: all 401, none 5xx, messages correctly distinct. Probe 16 → 17.
P162A loaded machine is not a defectcompleteD-383. The concurrency harness's collision check read 1.48× against a 1.5 threshold and failed the battery on a machine running batteries back to back. It now measures twice, and a genuine miss exits 2 (BLOCKED) rather than 1 — because its own message says *nothing below was measured*, which is what BLOCKED means here. It prints the load average beside the ratio so the reader can see whose fault it is.
P163Which pages may call the APIcompleteD-384. The CORS policy runs only in worker.ts against a Worker variable, so it existed only in production and nothing watched it. Measured and correct — the app's origin echoed on tenant routes, no header at all for a foreign one, * only where nothing is protected, credentials never. Now three probe checks, the third being the control: *evil is refused* passes on an API that refuses everyone, which is the outage rather than the safe state. Probe 17 → 20.
P164Nobody hits a paywall, and that is correctcompleteChecked because it changes who the owner can comfortably invite: no feature is gated on a subscription in either the API or the app, and production holds zero. Not an unfinished gate — D-029 makes the paid surface *self-served discovery of open tenders*, which does not exist yet, so there is nothing to gate. No health check added for billing, deliberately: it is not on any first user's path, and a check for something nobody depends on is noise. Recorded in docs/59 because a supplier meeting an unexpected payment screen would be the owner's problem, not the product's.
P165The watchdog says it rancompleteD-385, migration 0122. Silence was the healthy signal *and* the signal for a cron that had stopped — the handler wrote nothing to the database on a healthy run, so an unwatched product would have reported itself green everywhere. One heartbeat row per job, seeded fresh so it goes stale only if the cron genuinely stops; /v1/health publishes a boolean; the probe asserts it. The thing that watches everything else is now watched by the thing that runs most often. Watchdog suite 28 → 34.
P166A grant that reaches nobodycompleteD-386, which corrects D-369. 0118, 0119 and 0122 granted to a list of role names not including production's app_rw, so on production they granted nothing and said nothing — while their own assertions passed, because those run as the owner. The fault log had recorded nothing on production since it shipped. Found by /v1/health returning "watched": null, the third answer built in for exactly this. privilege-audit.sh was right all along; nothing ever pointed it at production, and verify-all.sh runs it against local where the roles differ. Now apply-migrations.sh audits the database it just changed, and 0123 refuses to finish if it granted to nobody.
P167An accented name belongs next to its lettercompleteD-387, Q-099. Production is C.UTF-8 and sorted every accented name after Z — 200 venues and 62 companies — while local is en_US.UTF-8 and no suite could see it. Three directory sorts now carry und-x-icu, guarded by scripts/verify-directory-sorts.mjs. The column-level fix was written and withdrawn: two views depend on those columns and rebuilding them risks the whole directory to reorder 262 rows. Whether Hungarian digraph rules should govern too is Q-099, with the measurement attached. The public site had the same defect by a different mechanism — getAllVenues never sorted at all, so procurevent.com/venues ran *taberna
P168October in, September outcompleteD-388, Q-100. to_char renders in the session's timezone; local is Budapest and production is GMT, so a buyer picking 1 October had the timeline chapter read back 30 September — on the field that governs when a tender closes. Invisible to every suite, which run on the agreeing zone. Five projections now declare their zone. The write path's own comment had already named this hazard and pinned the instant; the read path had not. Asserted in SQL with the zone forced both ways, because nothing else on this machine can see it.
P169The subrequest budget, countedcompleteQ-101. Every Neon HTTP call and every outbound fetch on a Worker is a subrequest, ceiling 1 000 — the number sync-watchdog.ts already designed around after one sync measured ~919. issueAwards spends four per recipient, so one issue can notify roughly 248 suppliers before the Worker is killed mid-loop: some told, some not, awards already marked issued, no record of where it stopped. No cap imposed. Nothing caps invitations today, the largest request has four, and the product has no users — a cap for a number nobody has approached would be a guess. The arithmetic is written into the loop where the next person to add a query will read it.
P170Yesterday's third item, and a stale questioncompleteReconciling docs/58's owner actions against docs/62 found Q-097 had been dropped — one of yesterday's three, still open, absent from today's report. A report that silently loses an item is worse than none, so docs/62 now carries every open question the owner actually needs. 33 questions are open, and one was worth re-measuring: Q-075 said the site runs analytics its own cookie page denies. Re-measured against the live site — no analytics script on any page and no Set-Cookie header anywhere — so the client-side half is now verifiably true. What remains is a Cloudflare dashboard setting only the owner can see.
P171A promise on seven thousand pagescompleteEvery venue page on the public site told a visitor *"its overall capacity is shown alongside"* and showed no capacity. The aside it points at renders one only when capacity_max_pax is not null, and that column is null for every venue in the directory — the aside's <dt> appears on 0 of 7 000 built pages. So the sentence was false on all of them, live, on every venue page a search engine has indexed, and it pointed the reader at empty space on exactly the pages where they had come looking for a capacity. The branch now depends on the same value the aside renders from. The first reading of this said 6 993 and was wrong: it grepped for the bare phrase Maximum capacity, which matched seven venues whose own description says *"White Hall: Maximum capacity of 130 persons"*. The aside is markup; verify-venue-capacity-promise.mjs matches markup, and fails four ways — neither wording, both wordings, promise-without-render, and render-without-promise, the last of which guards the fix rather than the bug. All four forced red by name. Battery 2 745, nothing failed, nothing blocked. Shipped and verified against production, cache-busted, against a 404 control. D-389.
P172Two subprocessors that have received nothingcompleteThe privacy page's table calls six providers "In use", and the paragraph under it promises that *"naming one that processes nothing would overstate what happens to your data as surely as omitting one would understate it"*. Measured on production: R2 holds 0 files, Stripe has 0 subscriptions and 0 invoices. The other four are true. A configured key is not processing — all six credentials are set, which is what made the claim easy to believe. I expected Clerk to be a third, because the served app bundle carries no publishable key; the database says one person has signed in, so the inference was wrong and the row is accurate. That is why the check reads rows and not config. ./db/census.sh prod now prints all six against the database on every run. The public page is untouched — it is a legal statement — and three wordings are drafted in docs/63 with a recommendation. Q-102, and it is in the owner report so it cannot be lost the way Q-097 was. Battery 2 745, nothing failed, nothing blocked. D-390.
P173The screen that told a visitor to run npmcompleteapp.procurevent.com ships with no publishable key, so every visitor who clicked "Sign in" in the marketing header read *"This build has no sign-in provider configured. In development, run npm run dev:demo…"* — a prospective customer told the product is broken and handed a command they cannot run. Nothing was failing: the graceful path worked as designed and the words inside it were written for the developer who wrote them. The branch now splits on import.meta.env.DEV, so the production bundle does not carry the developer text at all, and a visitor gets *"Sign-in is not open yet"* with the public directory and a pilot enquiry. Guard extended, forced red both ways: developer copy present, and visitor copy missing. I caused a production regression doing this and rolled it back. ./scripts/deploy.sh app compiled a real pk_live_ key out of a gitignored .env.production.local and the app hung at "Signing you in…" forever; the keyless CI build was strictly better. deploy.sh now refuses to bake untracked env values in without being told to, listing exactly which file and variable, and treats a shell-set variable as stated. Q-103 corrects the owner's sign-in blocker: the key was never the missing piece. Battery 2 745. D-391.
P174Nothing checked that a link went anywherecomplete7 021 pages, 66 distinct internal link targets, and nothing had ever checked that any of them resolved — astro build does not, because an href is a string. Measured: all 66 resolve and not one link is relative, so this is a floor under a clean result rather than a fix. The failure it guards is a rename, and a rename is silent. verify-internal-links-resolve.mjs forced red three ways: a broken absolute target, a relative href, and a dist with pages but no links at all — the last is what stops it passing on a build where the scan simply stopped seeing links. Script content is stripped first, and the first version did not do that: the homepage's category finder builds results with href="${c.href}" inside a template literal, interpolated in the browser and entirely correct. Reporting it would have been crying wolf on the normal case, which is how a guard's failures come to be ignored. Battery 2 745.
P175The directory spoke in database keyscomplete6 793 of the 7 000 venue pages led with the raw venue_type code under the venue's name, the listing cards did the same, and the type filter on /venues was a dropdown of fifty keys — bar_cafe_pub_club, hotel_resort, place_of_worship. The labels were never missing: getVenueTypes() was fetched on every build and read in one place only, the block that renders when rows.length === 0, which cannot execute while the directory has venues. The country filters were bare ISO codes on both pages and now say Austria, Croatia, Czechia. My first count of 2 697 was too low — it matched snake_case, and hotel, restaurant, stadium, theatre are codes that merely read as sloppy typography on another 4 096 pages. Two near-misses of my own: an uncached getVenueTypes() would have turned one request into 7 000 in a single build (the Q-101 ceiling, aimed at a sibling product), and the guard's first version swept in every <option> so the country codes joined the venue-type vocabulary and it reported AT as a leaked type. The CSP hash guard then caught the changed filter script, third time it has. Battery 2 745, deployed, verified on production against a 404 control. D-392, Q-104.
P176A card whose only detail was "SI"completeThe supplier cards' meta line is often a card's only detail and read US, SI, MX on its own — the same failure as a venue type key, a value stored for machines shown to a person. Both surfaces now spell the country out, server-side through countryName() and client-side through the browser's own Intl.DisplayNames, so the codes do not have to travel in the payload twice and a browser too old for it shows the code rather than breaking. The venue cards' *"Budapest, HU"* is deliberately left alone and is Q-104: a country after a city is ordinary writing. Guard extended and forced red against the pre-fix build, where it named all seven cards. And it found a stray file: suppliers (1).html, 507 KB, dated 5 September, had survived six rebuilds in site/dist — caught only because the CSP guard counted 7 022 pages and an unnamed script. Removed; Q-105 asks whether a deploy should refuse to ship what the build did not produce.
P177Five columns that could never be filledcompleteThe buyer's Requests table reads 13 fields per row; GET /v1/requests returned 10 and client.ts overwrote five with a hardcoded null, so Event, Category, Owner, Offers and Approval rendered an em dash on every row, for every tenant, always. All three layers had written the IOU down in comments. The route now computes all five as correlated subselects (every table behind them has RLS on, so a filtered subselect would yield NULL and look identical to the bug; a positive control on a request with an event proved RLS permits the reads) and the client maps them through. Offers counts submitted, unwithdrawn quotes, so zero means nobody replied. A sabotage caught a broken assertion of my own: "the list names the owner" passed with the field absent, because the harness's absence marker is non-empty; it now compares to users.full_name. requests api 82, journey 53, workspace 156, dashboard 43. Commit 632faac. Deployed 2026-09-13 with P178. The API answers 401 beside a 404 control; the new fields cannot be read on production until someone can sign in there (Q-103). D-393.
P178The chapter a supplier reads first, and nothing could write itcompletequote.ts selects r.summary into the supplier's tender and Quote.tsx renders it, and no route wrote that column and no screen offered a field for it — NULL on every request ever created, so the paragraph a supplier decides whether to bid from was always blank. Of 12 document chapters, 8 are structured and 5 had editors. Introduction and Confidentiality are now writable end to end (route, client, editor); Contact information is the last with no editor. Verified by hand against a live tenant: both writes reach the column, a bad confidentiality level is refused 400 and changes nothing, the supplier's tender returns the buyer's words, and the Introduction editor round-trips through the browser. Suites run 2026-09-13 after a reboot: workspace 169 and journey 56, no failures, exactly 13 and 3 more than before. Forced red by making both writes no-ops while keeping $14 and $15 referenced, so the SQL stayed valid and nothing failed for the wrong reason: six went red by name, including the cross-party "the SUPPLIER's tender carries it, word for word", and the file was restored from git. One assertion, "the column is NULL, not an empty string", stays green under that sabotage because the column was never written; it is only meaningful beside the one before it, which failed. The full battery then refused three guards on my own editors: a number formatted inline instead of through lib/format.ts, a bare radio with no radio class (13px on a touch screen instead of 24), and .choice, a class defined nowhere. The battery's chained app-guard run reported only the first of the two app failures; running each guard on its own found the second. Fixed with the app's existing checkline and radio markup. Commits fa7e6d0 and 161d1c1. Deployed 2026-09-13: production's app bundle changed from index-g6lVW43L.js to index-BkRBaxzq.js and contains both editors, with no real Clerk key and no localhost:8792 in it. D-394.
P179The supplier's screens, walkedcompleteOwner-directed 2026-09-13. Same method that found P177: what each supplier screen's types expect, against what its routes return. From source, every expected field of every supplier type is named in its own handler module; the one exception, Clarification.editedNote, is documented dead code the API says it does not return and no screen renders. Live, as a real supplier on the local API: invitations, tender, quote, catalogues and compliance each returned every expected field. Not walked live, and why: claims has zero rows on the local database; awards has one issued award, but its organisation has no user the dev login can act as, and the journey supplier's own award is proposed, which row-level security correctly hides. Issuing one honestly needs a mailer the local API lacks, and issuing one by hand was declined (D-395). No defect found on the supplier side, which is the opposite of the buyer's Requests table. One trap of my own on the way: a discovery script reported "no supplier on this database has any" compliance documents because it looked for supplier_org_id on a table keyed by organization_id; raw counts showed one row, and it compared clean. Walked live 2026-09-14, and the row is complete. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/journey-api-test.sh now starts its API with a mailer that keeps what it sends, so its award is issued through the product: the notice reaches the supplier's own card, the supplier's award list returns it issued with every field SupplierAward names — read out of /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/data/client.ts at run time rather than copied — the supplier accepts, and the buyer opens the handoff while the supplier's own attempt is refused. A claim on a listing with no website is made through POST /v1/companies/claim and read back with every field ClaimRow names, and the buyer's claims list does not carry it. Both comparisons were forced red by renaming one key in each route's select, and each failed naming the field (declineReason, decidedAt). No defect in either route. Seen in the browser as that supplier: *"You have been awarded work · Journey stage build · €250,000 gross · You accepted this."*, and the listing *"Waiting for Procurevent to check"*. Two test defects found on the way: the journey's control "an UNISSUED award is not visible to the supplier" counted items against a route that answers { awards, notices }, so it could not fail; and /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/claim-authority-test.sh counted every pending claim in the database, so the journey's real claim turned it red in the battery — now scoped to its own suppliers, and green with the journey's claim still present. Journey 77, claim authority 81, battery 2 789, nothing failed, nothing blocked. D-397.
P180The last chapter with no editor, and a hint about a mode that does not existcompleteContact information was the last of the eight structured chapters still falling through to *"a later slice of the build"*. Measured before building: procurement_requests has no contact column and no table keys a contact to a request; the only contact data in the product is organization_contacts, one card per organisation, which D-267 already opens to an invited supplier. So the chapter mounts the existing ContactCard and says beside it that the card is the organisation's and changes on every request — no migration, no new route. Building it found a gap one screen along: the supplier's tender named the buyer but carried no card, while the invitation queue had carried the card since 2026-08-30. GET /v1/supplier/invitations/:id/tender now returns buyerEmail and buyerPhone through the same two joins, under the supplier's own row security, and the supplier's tender header renders them as mailto: and tel: links, absent when the buyer has no card. And the chapter's hint described a mode that does not exist: it said the organisation "may be shown or anonymised depending on how this request is published" and told the buyer to check before issuing. Nothing publishes a request, and buyer_nameplate_for_request names the buyer to every invited supplier; the hint now says that. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/journey-api-test.sh gained 7 assertions — the buyer writes its card through the route and the SUPPLIER's tender carries it, a cleared card reads null rather than stale, and the same tender still names the buyer. Forced red two ways: the card nulled in the select turned 2 red by name; the join keyed on the reader instead of the buyer turned 3 red, one reading back the supplier's own address, which is why the fixture gives the supplier a card of its own first. Journey 63, battery 2 775, nothing failed, nothing blocked. Commit 193af92. Deployed 2026-09-14 from this machine, the local wrangler credential having answered again: API version 62032eae, and the app bundle changed from index-BkRBaxzq.js to index-BVQjpD4U.js, which carries the new chapter heading, the corrected hint and buyerEmail, does not carry the old hint, and holds no key-shaped Clerk string and no localhost:8792. The tender and contact routes answer 401 beside a 404 control; the production probe is 21 passed, 0 failed, 1 blocked on the owner (sign-in). The new tender fields cannot be read on production until someone can sign in there (Q-103). Typed contacts per request and the open-versus-invited mode are not built. D-396.
P181A buyer told its award notices would reach itcompleteSaving the organisation's contact card from the new Contact information chapter answered "Saved. Award notices will go to that address." to a buyer, measured in the browser on 2026-09-14. A buyer never receives an award notice — award.ts addresses only award_notice_recipients, and /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/ContactCard.tsx says so in its own header. Its labels and hints already branched on the organisation type; the save note did not, and P180 put a buyer in front of it. A buyer now reads *"Saved. Suppliers you invite will see that address."*, or that an invited supplier cannot reach it when the address is cleared; a supplier's wording is unchanged. Verified in the browser after the change. App typecheck and every app guard green; battery 2 789, nothing failed, nothing blocked. Commit f30d5b8. Deployed 2026-09-14: the app bundle changed from index-BVQjpD4U.js to index-aNjlLLjI.js, which carries both new buyer sentences and still carries the supplier's, with no key-shaped Clerk string and no localhost:8792; production probe 21 passed, 0 failed, 1 blocked on the owner (sign-in).
P182A deadline saved on production came back two hours latercompleteThe Timeline chapter's date-time inputs post a wall-clock string with no zone, and Postgres reads such a string in the SESSION's zone, while the chapter has read every deadline back in Europe/Budapest since 2026-09-06 — a fix that stopped at the read. Measured 2026-09-14 with a new section in /Users/petermarik/Documents/event-clinic-suite/procurevent/db/census.sh: production sessions get GMT, with no role or database override, and local sessions get Europe/Budapest. So on production a buyer who saved midnight stored midnight GMT and read back 02:00, and because the form posts back what it read, every later save moved each date two hours further — clarification deadline, submission deadline and presentation alike. No local suite could see it. The three writes now read a zone-less time as Budapest time, and a string that states its own offset keeps its instant; the expression was run in psql under both zones for a zone-less time, Z, +02:00, a date alone and empty. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/workspace-api-test.sh section 9 now starts a second API whose sessions are GMT — pg honours the connection string's options, and the suite checks that it does — and round-trips through the handler: typed 00:00, read back 00:00, stored as Budapest midnight. Forced red by restoring the naive cast: 3 red by name, reading back 02:00 and storing 00:00Z, which also proves that server's sessions really are GMT. Rows already stored are not rewritten, because a shifted value cannot be told apart from one typed that way. Workspace 176, battery 2 796, nothing failed, nothing blocked. Commit 5fdcd53. Deployed 2026-09-14: API version 9ce81e04, after the deploy's own gates confirmed all 123 migrations and the 4 system roles on production. The chapters route answers 401 beside a 404 control, and the production probe is 21 passed, 0 failed, 1 blocked on the owner (sign-in). The fixed write itself cannot be exercised on production until someone can sign in there (Q-103); on this machine it is exercised under production's measured zone. D-398.
P183Everyone invited is told, and nothing told themcompleteTwo hints in the Timeline chapter promised that extending the submission deadline is recorded beside the original and that everyone invited is told. Measured 2026-09-14, none of it was true: no route or function wrote 0017's three extension columns, submission_is_past_deadline read only the original deadline, and the one notify trigger on requests fires on issue only. Worse, the chapter patch let a buyer overwrite the published closing date of an issued tender, telling nobody. Built end to end. POST /v1/requests/:id/deadline/extend records the new date beside the original and refuses a missing reason, a date not later than the one in force, and anyone but the buyer — all asserted — and a request not yet issued, from source. Migration 0124 makes the guard read the deadline in force through 0017's own view and adds a trigger that tells every invitation still in play, including suppliers that already quoted. The timeline patch refuses a changed closing date after issue and no longer writes the original at all. The six API readers show the deadline in force, and the Timeline chapter offers "Give suppliers more time" on an issued request. Walked in the suites: a closed tender reopens under an extension and closes again without it; the supplier that already quoted is told and the buyer is not; its tender, its invitation queue and the buyer's own list all show the same instant, stored as noon Budapest time. Forced red four ways — the old guard restored, the trigger dropped, the later-than-in-force rule removed, one reader reverted — and each failed by name. The suite's own control caught a defect of mine: comparing instants exactly refused the form's unchanged save with a 409 on a deadline stored with seconds; it now compares to the minute and leaves the column alone. Submission deadline 18, workspace 189, journey 84, battery 2 818, nothing failed, nothing blocked. Commit 6bdf9ae. On production 2026-09-14, in that order: 0124 applied — the ledger read it missing, the migration's own assertion passed on production, the ledger then read all 124 present, and the privilege audit on production reported every table matching the model; then the API (version 9ef36c47, its gate confirming 124 of 124) and the app (bundle index-DYXkfbF5.js). The extend route answers 401 beside a 404 control. The served bundle carries "Give suppliers more time" and the route, does not carry the removed "does not yet notify" paragraph, and holds no key-shaped Clerk string and no localhost:8792. Production probe 21 passed, 0 failed, 1 blocked on the owner (sign-in). The extension itself cannot be exercised on production until someone can sign in there (Q-103). D-399.
P184The sync that died every night, and the mail that never stoppedcompleteThe owner asked why the "directory sync needs attention" mail kept arriving, and whether to split the sync into chunks. Measured from /Users/petermarik/Library/Logs/procurevent-sync.log: the nightly sync failed on 8 of 10 nights, 2026-09-08 to 2026-09-17, each about 5.5 minutes in — seven with terminating connection due to administrator command, one with read ETIMEDOUT. Neon's documentation names the message: a connection idle long enough for the compute to scale to zero, 5 minutes on the Free plan and not configurable. The job downloads all 30 845 venues before writing any, so its one connection sat idle exactly that long; pg then raised an unhandled error event and Node exited before the run row was closed. No reboot and no sleep in those windows. The watchdog read every open row as "killed", and mailed the newest one per resource whatever came after it — a crash from 2026-09-11 every morning, in a mail whose own table showed that resource succeeding; production held 15 such rows. Chunking was rejected: the failure is the idle gap, not the volume. Now the runner sends a SELECT 1 once a minute and listens for connection errors, and the watchdog reports an open run only while no later run of that resource has finished, naming a dropped connection. Watchdog suite 37, forced red by removing the superseded condition (2 red by name); battery 2 821, nothing failed, nothing blocked. Commit 41be4bd. Shipped 2026-09-18: the API (version 6f61906a, its gate confirming all 124 migrations on production) carries the new watchdog, which takes effect at the next 06:00 UTC check; the live copy the Mac runs was rebuilt from 41be4bd by /Users/petermarik/Documents/event-clinic-suite/procurevent/scripts/deploy-sync.sh, and /Users/petermarik/Documents/event-clinic-suite/procurevent/scripts/verify-sync-agent.sh proved launchd can start it. The run it started finished ok in 337s at 06:34:43Z, all three resources succeeded, and 122 new companies arrived. One success proves little — the 01:15Z run the same morning also succeeded without the heartbeat — so the evidence is the nightly log from 2026-09-19 on. D-401.
P185The directory sync twice a monthcompleteOwner, 2026-09-18: "We can schedule this update every 2 weeks instead of daily" — the directory barely changes; the same morning's run found 0 changed venues and categories and 122 new companies out of 27 406. launchd cannot count weeks, so the job now runs at 03:15 on the 1st and the 15th, 14 to 17 days apart. The watchdog's 36-hour staleness limit had to move with it, or it would have mailed between every pair of runs: it is now the longest normal gap plus a day, 18 days, and a failed run is still reported the next morning; ages in the mail read in days. The public venues page's "rebuilt daily" is the site's own rebuild and stays true. Watchdog 38, forced red by restoring the 36-hour limit (3 red by name); battery 2 822, nothing failed, nothing blocked. Commit 35ef692. Shipped 2026-09-18: the API (version 43a32b43) carries the new limit; the live copy was rebuilt from 35ef692, and launchd now holds two triggers — day 1 and day 15, at 03:15 — where it held one daily trigger. The first run on the new schedule is 2026-10-01. D-402.
P186Nothing here could create the database its 2 800 assertions needcompleteA cloud container was asked to build the next slice and could not. It had the Postgres binaries and no schema, and the cause was not the container: apply-migrations.sh measures before it applies, and on a virgin database the ledger's own probe for 0057 raised relation "public.orders" does not exist — reported as BLOCKED, so the applier stopped. The gate that keeps the applier honest was the reason no second machine could run the battery. Two probe kinds cast ::regclass; they now use to_regclass, so an absent object answers "missing". db/bootstrap-local.sh creates both application roles and the database and applies every migration through the committed applier, then leans on its ledger and privilege audit; it starts no server and says how to, including the LC_ALL a fresh macOS cluster needs. Proved from nothing on a throwaway cluster: 124 missing measured without raising, 124 applied, privilege audit clean, 88 tables. db/test/ledger-probe-test.sh asserts both directions and was forced red by restoring the cast — 4 red by name, the real-database checks green. The 2026-09-23 move had also left the sync plist and deploy-sync.sh naming the old folder, with install instructions pointing into ~/Documents, which launchd cannot read; both repointed. Then the production probe, run by hand because the scheduled one has not fired since 2026-09-22 (Q-106), printed a third stale path at the owner, and a grep found two more: the watchdog mail's own "run the sync by hand" recipe, the probe's owner-action pointer, and three harness commands in scripts/status.config.json. The mail no longer re-types the recipe — it names ~/procuvent-live/scripts/nightly-sync.sh, the script launchd runs, which deploy-sync.sh keeps outside the TCC-protected folders and which cannot drift with the repository. watchdog-test.sh gained the rule rather than the path — the mail must name no folder under ~/Documents, asserted that way because a path that exists on this Mac would not exist in a container — and its connection-string control moved onto the detector, since a mail that mentions no credential makes that negative vacuous. Forced red 3-by-name. Battery 2 830 — 2 829 when the bootstrap work was measured, plus the one rule assertion added with the path fixes; nothing failed, nothing blocked. Production measured 124 of 124 the same day. D-403.
P187The enquiry alert could not say which page it came fromcompleteThe owner received 23 enquiry alerts and reported that he could not tell which form or which page they came from. Measured in the code, not guessed: leads.ts reads sourcePage from the POSTED BODY, and neither site/src/pages/contact.astro nor supplier-registration.astro sends that field — each posts only a hidden form input — so nothing the site itself submits can ever populate source_page, and the mail's Page: line renders -. kind cannot answer it either: it distinguishes the two forms, never a URL, and a second contact form on another page would be indistinguishable. The page now comes from the Referer header when the field is absent, which works against the site exactly as already deployed — no rebuild, and the next enquiry says where it came from. Path and query only, and only for our own host or a subdomain of it: the header is attacker controlled and an absolute URL in the alert would be a clickable link to a host of the poster's choosing. The mail was also rebuilt as a pure function in api/src/http/lead-mail.ts — labelled qualifying answers, an unmapped details key kept under its raw name, consent stated both ways, country, device, a 12-hex same-visitor tag, Budapest time beside the instant, a link count only when non-zero, and replyTo, because pressing reply used to answer a noreply mailbox. Migration 0125 adds lead_repeats(), SECURITY DEFINER for the same reason 0086's rate check is: the API role has no read policy on leads, so an ordinary count returns 0 and every duplicate reads as a first message. The alert now names the earlier rows with their times, addresses and pages, and says which copy this is. It fails open — on a database without 0125 the lookup raises, the section disappears and the lead is unaffected, so the deploy and the apply may land in either order. Suites: lead-mail-test.mjs 42 assertions (pure builder, plus submitLead driven with a stubbed database and notifier, including the no-0125 path), leads-api-test.sh 20 to 26 through the real server and the real function. Forced red 4-by-name; one sabotage exposed a genuine bug the plan had described and the code had not — a strict host equality that dropped www. referrers. Battery 2883 (2877 on the first run, which came back with two findings of its own: replyTo turned mailer-redirect-test.mjs red exactly as D-195 designed it to — see D-405, the valve now strips it — and a new guard for suites that are not shell reported two files as unreachable when both in fact run, folded into notifications and sync. The guard now asks whether anything NAMES the file, which is the real question, and this suite is folded into leads-api-test.sh the same way rather than carrying a wrapper). Shipped 2026-10-03, two weeks after it was written. The deploy was refused at the time by this session's permission mode, and the reason it stayed invisible afterwards is P190's finding: the green Workers Builds check belonged to a different Worker. SHIPPED 2026-10-03: procuvent-api version a38351eb, deployed with npx wrangler deploy from api/ — the only way this Worker ships, as P190 found. The deploy output names api.procurevent.com (custom domain), so the routing is settled rather than inferred. Whether 0125 has reached a database is deliberately recorded nowhere, per CLAUDE.md — measure it with ./db/migration-ledger.sh prod, which is how it was measured on the day it was applied. The existing enquiries WERE classified, by the owner running db/leads-report.sh prod on 2026-09-30: 15 rows, all contact, all mailed, and none of them genuine — 8 copies of one sentence from 8 addresses and 8 address hashes, so the duplicates are a script and the per-host rate limit can never fire against them. Q-108 carries the measurement and the three options. The report script gained a section for the other half of that question: the mail is sent BEFORE the row is written, so a failed insert leaves an email with no row, and server_faults is where that shows.
P188Nothing stood between a script and the owner's inboxcompleteQ-108's measurement made the choice: 15 enquiries on production, none genuine, 8 of them one sentence from 8 addresses and 8 address hashes, and the report's same-visitor section empty — so the five-per-hour-per-hash limit cannot fire, because every submission arrives from its own host. Consent was ticked on all 15, so that column is worthless as a signal, and there was no honeypot at all in this lead path. Owner chose, in so many words, "both, honeypot first" (D-406). The honeypot ships on: contact_url, off-screen on both forms rather than display:none because some scripts skip what is hidden and fill what is merely moved; a submission that fills it is stored and flagged (details.__suspect) and nobody is mailed — never refused, because a script that learns it was caught writes a better one and a visitor whose extension filled a hidden field would lose their enquiry. notified_at keeps meaning "the mail leg failed", which is why the flag is a details key and not an inferred null. Turnstile ships off: api/src/http/challenge.ts verifies a token only when TURNSTILE_SECRET_KEY exists, and the widget renders only when PUBLIC_TURNSTILE_SITEKEY is set at build time, so today's build carries nothing third-party and verify-no-third-party-assets.mjs stays green. Three outcomes, not two: a failed challenge is refused with nothing stored, and an outage ACCEPTS and MAILS the lead with details.__turnstile recording why it could not be checked — failing open, like the rate limiter and the address check, because on this surface a lost enquiry is the expensive mistake. Turning it on needs a CSP host and a reworded cookie policy, both drafted and not applied in docs/68-owner-action-turnstile.md, because publishing legal wording is the owner's. db/leads-prune.sh deletes the fakes on the owner's own run: a narrow rule (honeypot, our own deploy probe, or 3+ identical texts from 3+ addresses — two copies are kept, because two is one person resubmitting), both lists printed before anything goes, and every row written to JSON inside the same transaction. That backup was broken on the first try — \copy writes COPY's escaped text format, so the file was unparseable and "nothing is unrecoverable" meant nothing; it now writes through \o, and a restore was measured on a backup carrying a newline, a quote and a backslash: INSERT 0 3, every character intact. Suites: lead-mail-test.mjs 51 → 77, leads-api-test.sh 86 → 112, forced red 4-by-name. CORRECTED, THEN FIXED, both on 2026-10-03. For three days only the page half was live. SHIPPED 2026-10-03: procuvent-api version a38351eb, deployed with npx wrangler deploy from api/ — the only way this Worker ships, as P190 found. The deploy output names api.procurevent.com (custom domain), so the routing is settled rather than inferred. Both halves are live now. The field was served and verified; the API that consumes it had not been deployed since 2026-09-18, so a filled honeypot was neither flagged nor silenced — see P190, which found that the Workers Builds check run trusted here belongs to a different Worker. What was verified on 2026-09-30, and still holds, is what production SERVES: both forms carry contact_url off-screen, both carry the explicit page field, and the two controls came back empty — no Turnstile widget and no third-party script, so the conditional rendering held and the cookie policy's claim is still true. The first probe read 0 bytes and was not treated as a missing field: the site 307s /contact/ to /contact and curl had not been told to follow it. A zero-byte body is a measurement that did not happen. Battery 2 927 — and the run before it was RED, which belongs here rather than in a tidier sentence: verify-no-backticks-in-heredocs.sh caught two backticks in a SQL comment inside the prune script's unquoted heredoc, where the shell would have run whatever sat between them before psql ever saw the query. A guard written for that exact hazard, doing its job on the day it was needed. D-406, D-407.
P189The audit trail was deleted with its tenantcompleteH9 of the owner's control-profiles programme (event.clinic D-1346; source chapter 4.3 and M13): accounting and public-procurement records must be retained independently of tenant deletion. Measured on local 2026-10-01: audit_events carried organization_id and workspace_id foreign keys, both ON DELETE CASCADE (0056, 0058), and audit_events_append_only fired BEFORE UPDATE only — so deleting an organisation took every audit row with it, and the owner connection could DELETE rows directly. 0126 drops both keys (the ids stay on every row) and restores BEFORE UPDATE OR DELETE, asserting both inside its own transaction. No deletion function: nothing in the repository deletes audit rows except the two cascades, so there is nothing legitimate to route yet; the expiry waits for Q-618 (D-408). The ledger gained a comment probe kind, and 0058's probe moved to it — its old probe named the constraint 0126 drops, and would have made apply-migrations.sh re-run 0058 and restore the CASCADE. audit-log-test.sh 19 → 27: the owner's DELETE refused by name, the app role's DELETE and UPDATE refused by name, a row-count control, a positive (a material action is still recorded), and the tenant section inverted — the organisation and workspace are gone, all audit rows remain with both ids, and a rival tenant reads none of them. Forced red first against the old schema: 3 named failures. Its teardown now suspends the trigger for its own rows on localhost and BLOCKS if a previous run left any. db/probe-audit-retention.sh <local|prod> is the post-apply probe, every check paired with a control; 7 of 7 on local. Production steps for the owner: /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/69-owner-action-audit-retention.md. Whether 0126 has reached a database is recorded nowhere — measure it with ./db/migration-ledger.sh prod. D-408. Reached production 2026-10-03. 0126 was one of FOUR migrations apply-migrations.sh found missing on prod that day, not the three this session expected -- it had been sitting on local only since the peer session wrote it. ./db/migration-ledger.sh prod now reports 130 of 130 and ./db/privilege-audit.sh prod 87 tables and 5 views matching the model. The row said "not on production" for long enough to be read by two sessions, which is what a state written into a document does.
P190Turnstile verified three ways, and the API had not shipped since 18 Septembercomplete — the gate is live, one caveat belowThe owner created the widget and set the secret; the integration was finished against it without recreating it (sitekey preserved). The server now makes three checks, not one: success, that the token's action is ours, and that its hostname is somewhere we serve — success alone accepts a token minted by our own sitekey on a page an attacker controls, which is what those fields are returned for. A mismatch is failed, not unverified; a replayed token (timeout-or-duplicate) is failed; Cloudflare's own internal-error stays unverified, so an outage still accepts and mails the lead. The action doubles as Cloudflare's activation marker, so it lives in a TypeScript constant and an HTML attribute, and leads-api-test.sh asserts they are equal — if the markup loses data-action, Cloudflare returns an empty action and every real enquiry is refused. The legal page moved first, as the old guard's failure message demanded: /cookies now names Cloudflare Turnstile, says what it does and does not do, says Cloudflare may set a strictly necessary cookie while it runs, and its headline reads "no cookies of its own". verify-no-third-party-assets.mjs changed from "no third-party host" to "only the hosts /cookies names" — a host is allowed by being listed AND being named on the page, checked every run, so the allowlist cannot drift from the disclosure; forced red both ways. THE FINDING THAT MATTERS MOST: procuvent-api had not been deployed since 2026-09-18. The Workers Builds check run this session trusted as evidence belongs to a DIFFERENT Worker — procuvent — so P187's and P188's new alert, honeypot server half and challenge were never live. wrangler deployments list on procuvent-api shows 2026-09-18 and then nothing but today's "Secret Change". The API ships only by wrangler deploy from api/. Collateral, and not mine: db/test/auction-test.sh asserted an absolute audit-row count that 0126 broke by design — the trail now outlives the tenant, the fixture id is fixed, so the row survives teardown; measured 3, 4, 5 on consecutive runs. Rewritten as a delta, the idiom its own neighbouring comment already recommends, and proved stable twice. Battery 2 953, nothing failed, nothing blocked. SHIPPED 2026-10-03: procuvent-api version a38351eb, deployed with npx wrangler deploy from api/ — the only way this Worker ships, as P190 found. The deploy output names api.procurevent.com (custom domain), so the routing is settled rather than inferred. Probed with three controls, not one: no token is refused (That form could not be verified); an invalid address is refused with a DIFFERENT message, proving the first refusal is the gate's and not generic validation; and a garbage token is refused too, proving the verifier really calls Cloudflare and acts on its answer. /v1/health 200, a nonsense route 404. THE CAVEAT, the owner's to clear: the zone still served a cached widget-less /contact when the gate went live — cf-cache-status: HIT, the old CSP header, a purge that did not take. A visitor served that stale page sends no token and is refused; the failure is visible (/not-sent) rather than silent, which is why the deploy went ahead on the owner's explicit instruction. The account holds two similar zones, procurevent.com and the typo-catcher procuvent.com, and a purge on the wrong one looks exactly like this. D-409, Q-109. Amended 2026-10-03 (P234): the gate shipped and was verified against the API. It was NOT verified against the page a visitor is served, and that page carried no widget for hours — so this row means "the API refuses a tokenless submission", never "the form works".
P191The public procurement programme enters the recordcompleteThe owner handed over /Users/petermarik/Downloads/69-public-procurement-module-brief.md with no accompanying words; it is filed unaltered as /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md with a header carrying only what the brief told the filing session to record. Documentation only. No code, no migration, no public file touched. Three things are worth more than the row count. (1) It is docs/70, not docs/69, which the brief calls itself throughout: 69 went hours earlier to a peer session's audit-retention action. (2) Every id in the brief was already taken — D-408 and P189 by that peer, D-409, Q-109 and P190 by the Turnstile slice the same day — so the mapping is brief D-408..D-410 -> D-410..D-412, brief Q-109..Q-151 -> Q-110..Q-152, brief P189..P231 -> P191..P233. The brief anticipated the collision and asked for exactly this mapping. (3) The companion research the brief cites, docs/69a, is absent from this repository and the owner holds it; no citation it carries has been relied on. Recorded: D-410 OWNER-INSTRUCTED (two editions, one codebase) with its provenance stated precisely — the quotation is reproduced by the brief as verbatim from the owner to the brief's author, not said to this session; D-411 and D-412 as Proposed, pending owner, because he has confirmed the structure and nothing else. 43 questions, Q-110 to Q-152, in the log's canonical ten-column order rather than the four-column shape recent rows drifted into, which is what the brief asked for. Acceptance measured, not assumed: both logs parse, the status board builds, and git diff --stat -- site app/src/data docs/54-user-manual.md is empty — no public statement moved. D-410, D-411, D-412.
P192The edition switch, the policy resolver and the copy fencecompleteStatus corrected 2026-10-09 from "partial", which commit 1bab1b5 ("P192 completed: 0129, the session's edition, and the copy fence", 2026-10-03) had left unchanged. Re-measured 2026-10-09: db/test/edition-test.sh 46 passed, 0 failed; scripts/verify-public-edition-copy-fenced.mjs clean and inside db/verify-all.sh; ./db/migration-ledger.sh prod exit 0 with 0127 and 0129 present. One part of the brief's scope is not built, deliberately: the buyer-admin screen listing optional features has nothing to list while feature_policies is empty pending Q-151, so it waits for that answer rather than shipping an empty screen. Migration 0127: organization_editions (no row means Commercial, so every existing organisation is correct without a backfill), organization_feature_settings for Commercial opt-ins, feature_policies as platform reference data shipped deliberately empty pending Q-151, and procurement_requests.edition defaulting to commercial. There is no write policy on organization_editions at all: the only writer is set_organization_edition, SECURITY DEFINER, which demands is_platform_actor() and refuses the move back to Commercial while a public request of that organisation is still open — so a tenant can neither promote nor demote itself, as a property of the database rather than of the API. Measured before designing, and the schema corrected the brief twice: requests are scoped by workspace_id, not by an organisation, so the open-request check goes through workspaces.organization_id; and a cancelled request must carry a cancel_reason, which the first version of the suite did not set — the constraint refused it, the request stayed open, and the control failed correctly. api/src/http/editions.ts resolves off/optional/required with the policy consulted FIRST, so a Commercial opt-in cannot reach a Public-only feature, and requireFeature answers 404 rather than 403 because 403 hands a Commercial organisation a map of the other edition. Suite 42 (23 against the database as the least-privileged role with rolbypassrls asserted false, 19 driving the resolver with a stubbed database, folded in). Forced red four ways by name, green twice running. One test error worth keeping: an RLS-filtered UPDATE does not raise — its USING clause matches no row, so the statement succeeds having changed nothing, and asserting "refused" was wrong while the policy was right; the assertion now checks the data. The orphan guard added this morning was extended to accept a db/test host, since db/test/edition-test.sh folds in api/test/editions-test.mjs. Not shipped and not in a battery receipt yet: two builder agents hold other files, so the combined-tree battery and the production apply come at integration. D-410, D-414.
P193Contracting authority profilecompleteShipped 2026-10-10: 0152 applied to production with its six assertions passing inside the transaction (ledger 152/152, privilege-audit.sh prod exit 0); procuvent-api f2bebeec-7dd8-4126-8402-2f9f35fd3010 (it serves the label catalogue); procuvent-app 197c4df8-7a3a-445d-a82c-fdb8fc3279a4 (keyless). Probed: /v1/authority-profile 401 beside /v1/authority-profiles 404; the live bundle carries the authority_profile gate and the "not yet described" state. Public-only, so reachable by no organisation while G1 is closed. Parked 2026-10-09 under docs/70 rule 4, with its reason, so the slices after it may proceed. Built and live: 0128, 0130 and the creation stamp (below). Not built, and must not be built until the owner answers: the /v1/authority-profile GET/PUT and the declaration form. The form must cite each Kbt. 5. § (1) point with its verification label, and Q-153 (Blocker, open) records that nobody here knows what the six points denote: R-01 is VERIFIED-PARAPHRASE naming five things for six points, and the research notes the brief cites are not in the repository. Q-154 (High, open) asks whether one organisation may hold more than one standing; it warns that building the API and form first makes the answer expensive to apply. Unparks when both are answered. Public-only. Commercial: Off. Public: Required. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P191 (every id in that brief is two lower than the ledger, see its header). Migration 0128: contracting_authority_profiles, one row per organisation, carrying authority_type, is_central_government, procurement_plan_required, procurement_policy_reference, declared_by_user_id, declared_at and valid_from; plus nullable funding_source and subsidy_share_pct on procurement_requests for the Kbt. 5. § (2) and (3) per-purchase test (R-02); plus contracting_authority_type(uuid), which coalesces an absent row to not_an_authority. PUBLIC-ONLY MEANS OFF FOR COMMERCIAL, and it is asserted three ways rather than intended: the table ships empty, both new columns are nullable with no default (assertion 5 reads attnotnull and atthasdef from the catalogue), and nothing requires the profile — no foreign key points at it, no constraint consults it, no trigger reads it, so deleting every row returns the database to its pre-0128 behaviour. Measured before designing, and the schema corrected the brief four times. (1) The brief says authority_type is an enum; it is text with a CHECK, as 0127 did for edition one migration earlier, because ALTER TYPE ... ADD VALUE cannot run inside a transaction and apply-migrations.sh applies each file as one — and this programme will reserve more values as research arrives. (2) The brief's R-01 names five things for the six points of Kbt. 5. § (1), and the companion research file it cites is not in this repository (the filing header of docs/70 records that), so the stored values are opaque letter codes kbt_5_1_a to kbt_5_1_f: the database reserves six slots and asserts nothing about what any letter means. The labels are Q-153. (3) organization_contacts was the named model but has SELECT, INSERT and UPDATE policies and no DELETE policy while DELETE is granted, so a delete there reports success and removes nothing; 0128 follows 0127's organization_feature_settings with a policy for each of the four granted verbs, and the suite's "the declaring buyer CAN delete its own" control is what proves it. (4) contracting_authority_type() is SECURITY INVOKER, diverging from 0127's DEFINER organization_edition(): a definer function would hand one tenant another tenant's declaration about its own legal standing to anyone who knew the uuid, and not_an_authority is the direction that claims less. The suite asserts both halves — the owner gets kbt_5_1_a, everyone else gets the default. No ninth append-only table (D-016, terms.astro §8, Q-141 open): the declaration carries a user id and free text and lives in an ordinary erasable table, which is where D-016 says personal detail belongs, so a correction is possible and Article 17 has a path. Migration assertion 6 and suite section 1 both discover the append-only set from pg_trigger joined to forbid_mutation and hold it at exactly eight, naming them. No trigger was added to procurement_requests; assertion 7 asserts that, because a trigger has no role exemption and would fire for every Commercial buyer and every fixture. record_audit() builds that table's blob from workspace_id and status only, measured, so the new columns enter no append-only blob at all. Suite 44 assertions, every positive paired with a negative control in the same run, as procuvent_app_rw with rolbypassrls and rolsuper both asserted false before anything else runs; every probe rolls back, so the suite leaves no fixture and writes no audit_events row. Forced red twice by name and restored exactly both times. Sabotage A, the cross-tenant read policy's USING replaced by true: 7 failures by name — the other buyer cannot read it, a supplier cannot read it, with no tenant context the table is empty, and not by the other buyer, another buyer asking about it gets the default, not the answer, a supplier asking about it gets the default, and it has declared no authority profile. Sabotage B, funding_source SET DEFAULT 'own', the exact Commercial regression the slice is forbidden to cause: 1 failure by name, and the funding answer is NULL, not a default somebody invented, and the migration's own assertion 5 predicate evaluated true under it, so a re-apply would raise. Restores were armed before each sabotage landed and verified afterwards against the original policy text and atthasdef = f. Two defects in the work itself, both caught by the tooling rather than by review, both worth recording. The probe needle was first written in a file comment above the function, where pg_get_functiondef cannot see it, so apply-migrations.sh applied the file and then refused, reporting drift against a database that had every object — the ledger working exactly as designed. The marker moved into the function body, and the four CREATE POLICY statements gained DROP POLICY IF EXISTS first, because a probe reporting MISSING causes a re-run and bare CREATE POLICY then fails on "already exists": the file was not re-runnable and the first apply proved it. Second, the suite left its fixture profile on local for ever, which would have made a re-apply of 0128 fail on its own assertion 3 — the Commercial guarantee — against a database that was perfectly correct; the suite now tears its fixtures down at the end and asserts the teardown worked, and the migration was then re-run from the file with all 11 assertions passing, which is the only evidence that it is genuinely idempotent. Third, the suite's as_org helper reads tail -1, and select set_config(...) prints a line too, so a probe returning zero rows read back as the tenant's own uuid; probes that can be empty now coalesce to a sentinel, and the helper says so. ./db/apply-migrations.sh local exit 0, both app_rw and procuvent_app_rw granted by name in the NOTICE output, all 11 in-migration assertions passed. ./db/migration-ledger.sh local exit 0, every migration present. ./db/privilege-audit.sh local exit 0, 87 tables and 5 views, contracting_authority_profiles holding all four verbs and not append-only. ./db/verify-policy-shape.sh local 7 passed 0 failed. Deliberately not built: the API, the routes and the Hungarian form. They need the feature resolver from P192, and the type labels need Q-153 answered. Verified: everything measured above. Could not check: the full battery and anything on production — one battery may run at a time and the orchestrator owns it, and this agent touched no production surface. Assumed: nothing about Kbt. 5. § (1) beyond the letters, which is why the letters are opaque. D-413; Q-153 to Q-156. CONTINUED 2026-10-03 with 0130 and the creation route (D-415, D-417). The stamp: procurement_requests.contracting_authority_type, text NOT NULL DEFAULT 'not_an_authority' with a named CHECK over the same eleven codes, so a request records the standing it was created under and a correction in 2027 cannot rewrite what a 2026 tender ran under. A trigger was the first design and was rejected on measurement. 0127 added edition one migration earlier for the same reason, with the same wording in its COMMENT, as a defaulted column the route fills; two mechanisms for one concept is the asymmetry Q-156 raised and the owner settled, and inventing a second one while answering that question would be perverse. A trigger also overwrites what a caller passed, and db/test/edition-test.sh inserts edition directly to prove the column stores what it is given — that suite is correct and a stamping trigger would have broken it, measured before writing rather than discovered after. The cost is stated in the migration header rather than hidden: an insert path that forgets the column gets a value that is WRONG for a public buyer rather than merely absent, which is the identical exposure edition already carries, and today nothing is exposed to it because organization_editions ships empty. POST /v1/requests now resolves BOTH stamps in the INSERT itself, through organization_edition() and contracting_authority_type() on the organisation behind the workspace — so there is no window in which a row exists unstamped, no second round trip, and no way for a caller to claim its own edition or its own legal standing. That also closes a gap 0127 left open and nobody had noticed: nothing filled edition at all, so the first Public organisation would have had its requests recorded as Commercial. Latent rather than live — every organisation is Commercial today — and closed before the first Public one exists. The value list is duplicated between 0128's CHECK and 0130's, and assertion 3 is what makes that safe: it reads both constraint definitions from the catalogue and compares them to EACH OTHER, not to a list written in the file, which would only have agreed with itself. A shared DOMAIN would be tidier and would mean re-typing a column already on production. Two bugs in the migration were caught before it ever ran, by reading it rather than by running it. Its first assertion 2 inserted a row carrying an invented code and expected check_violation: on a virgin database INSERT ... SELECT ... FROM workspaces LIMIT 1 inserts NO ROW and raises nothing, so it would have reported FAILED on exactly the empty database bootstrap-local.sh must apply all 130 migrations to — the failure mode P186 exists to have fixed — and under FORCE ROW LEVEL SECURITY the owner is subject to the table's own policies, so the insert could have been refused for a reason that is not the constraint. Its first assertion 3 held the trigger count on procurement_requests at four and would have failed on the next correct trigger anyone else added; CLAUDE.md records a guard deleted for exactly that, so it was deleted rather than shipped. Five catalogue-only assertions remain and behaviour is asserted where it belongs, in the suite, with fixtures, as the least-privileged role. Suites: 51 assertions in db/test/contracting-authority-test.sh (44 + 7) and 91 in api/test/requests-api-test.sh (82 + 9). It was 8 and the eighth is gone, which is the lesson of this slice. It was a database-wide no request in the database claims an authority standing, copied from the shape section 5 uses for the funding columns, and it passed alone and failed in the battery, expecting 0 and getting 1. The row was legitimate — the API suite runs earlier, declares a profile, creates a request through the route and asserts the stamp came out kbt_5_1_c. Nothing was wrong except the shape of the claim: an assertion over a whole table is stable only while nothing else writes to that table, and the moment the creating route began stamping, a CORRECT suite became a poisoner. That is Q-109's lesson about counting audit rows arriving somewhere new. Section 5's version survives only because no route sets funding_source yet, and the suite now says so in the place where the next person will look. The database section proves the stamp survives the organisation correcting itself, and carries the control that makes that claim mean anything — the live resolver must answer differently in the same transaction, because an RLS-filtered UPDATE does not raise and "the stamp did not change" is also what a correction that never happened looks like. The route section sends a body asserting BOTH edition: public and contractingAuthorityType: kbt_5_1_a and requires the columns to disagree with it, then declares a profile and requires the stamp to change — the only assertion that can tell a resolved stamp from a defaulted one, since both defaults are exactly the values a route that stamps nothing would produce. Forced red twice by name, each with its restore armed as a trap first and verified against the catalogue after: the default changed to kbt_5_1_a failed and so does one created without naming the column (control) and nothing else; the CHECK dropped failed an invented standing is refused and nothing else. One assertion each, so each is bound to the one thing it claims. ./db/apply-migrations.sh local exit 0 with all five assertions passing, re-applied from the file and passing again, ledger 130 of 130, privilege audit 87 tables and 5 views clean. SHIPPED. Battery on the combined tree: 3062 assertions, nothing failed, nothing blocked. ./db/apply-migrations.sh prod applied 0130 with all five assertions passing; ./db/migration-ledger.sh prod 130 of 130 present; ./db/privilege-audit.sh prod 87 tables and 5 views, every one matching the model. API deployed, procuvent-api version 606460d6. The route cannot be exercised on production and that is stated rather than glossed: sign-in is blocked (Q-103) and dev tokens are refused there, so the two resolvers were probed on the production database as app_rw instead, with rolbypassrls read back as f so it is genuinely the least-privileged role the Worker connects as. organization_edition() answered commercial, contracting_authority_type() answered not_an_authority, the new column is readable, and the control -- a function that does not exist -- was refused, so the probe can see a failure. That was the one real runtime risk: a function the app role may not EXECUTE would have made every request creation on production fail, and no local suite would have shown it. Deliberately not built: the Hungarian declaration form and the screens. Verified: everything above. Could not check: the creation route over HTTP on production, for the reason given. D-415, D-417. UNPARKED AND CONTINUED 2026-10-10 (D-510, D-513; 0152; D-523 to D-529; Q-211). The owner's answers unpark it: D-510 states Kbt. 5. § (1) a) to d) in Hungarian (e) and f) are placeholders in his text, so Q-153 stays Partly answered), and D-513 (Q-154 closed) allows several standings per organisation. Class Public-only: Commercial off, Public required. Measured first: ledger 151 of 151 on local; 0128's table keyed PRIMARY KEY (organization_id), 0 rows on local, no foreign key pointing at it; every reader and writer by grep was the creating route (contracting_authority_type(), which would raise 21000 with two rows), api/test/requests-api-test.sh (ON CONFLICT (organization_id)) and db/test/contracting-authority-test.sh; 0131's thresholds read no profile; 0128's probe reads contracting_authority_type's body, so that function is left byte-for-byte unchanged and only its COMMENT now says it raises with two rows. Built. Migration 0152 0152_an_organisation_may_hold_several_authority_standings_and_a_request_names_one.sql: re-keys 0128's table to a surrogate id primary key plus UNIQUE (organization_id, authority_type) (D-523), comparing every value of every row before and after inside its own block; re-creates the three write policies with caller_is_buyer_admin() (D-525); seeds feature key authority_profile Commercial off / Public required (D-528); adds contracting_authority_standing_for(org, choice), SECURITY INVOKER, granted by the 0123 pattern to app_rw and procuvent_app_rw (D-524). A request records WHICH standing through 0130's existing text stamp, which identifies the standing because a standing is unique per (organisation, type); no id column, so withdrawing or correcting a standing can neither null nor rewrite it. POST /v1/requests takes an optional authorityStanding, read only while the feature is on; several held and none named is refused 400 (D-529, Q-211). Routes GET/POST /v1/authority-profile (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/authority-profile.ts), POST replacing the whole set in one statement, buyer admin only (403 otherwise), falling through to the unknown-route 404 when the feature is off. The catalogue the route serves carries, per code, the citation, the owner's Hungarian label verbatim for a) to d) with an English equivalent, c)'s sub-points ca) to ch) as labels under one code (D-526), and the verification label: OWNER-STATED, NOT CHECKED AGAINST THE STATUTE TEXT for a) to d); e) and f) are listed as NOT YET DESCRIBED, not selectable, refused by the API (D-527); the four other reserved codes are named by citation only, VERIFIED-PARAPHRASE (R-02) or COULD NOT VERIFY with "rules not modelled" (R-03). App: AuthorityStandings panel in Settings (buyer side, only when the session's features contain authority_profile), Hungarian label first, English equivalent in the English interface, verification badge on every point; StandingPicker on the intake screen when two or more standings are held, nothing preselected. 0152 applied with ./db/apply-migrations.sh local exit 0 with all six assertions passing; ledger 152 of 152; privilege audit clean. Existing rows migrated intact, measured twice: before applying, two single-standing fixture rows were planted on local (one kbt_5_1_a with every attribute set, one not_an_authority); after the apply a diff of every column was empty and each row had its own id; the file was then re-run with the rows present (idempotent, 0 changes) and the fixtures removed. And on every battery, db/test/authority-standings-test.sh section 1 puts rows back into 0128's shape inside a rolled-back transaction, runs 0152 itself, and compares every value, with a control proving the comparison sees a changed value. Suites. New db/test/authority-standings-test.sh 42 (as procuvent_app_rw, rolbypassrls and rolsuper asserted false first): two standings in one organisation, each request stamped with the one chosen, the stamp kept after the standing is withdrawn, several-and-none refused against one-and-none accepted, an undeclared choice refused without echoing it, other-tenant isolation (B cannot read, name, write, edit or delete P's standings, while doing each to its own), requester refused against admin accepted, 0128-era writers still working. New api/test/authority-profile-api-test.sh 47: feature off for a Commercial organisation against the invalid sibling /v1/authority-profiles (same words, same shape), nothing written, authorityStanding ignored and no new key in the reply; on for a Public organisation: catalogue with a) to d) labelled OWNER-STATED, c) with eight sub-points, e) and f) undescribed and unselectable; 403 for a requester; two standings declared; e), not_an_authority and duplicates refused; requests stamped kbt_5_1_c and kbt_5_1_a as chosen; the other Public tenant sees and may name none of them; replacement and the empty list. Changed: db/test/contracting-authority-test.sh acts through buyer-admin fixtures (51, unchanged count), api/test/requests-api-test.sh upserts on the new key (91), db/test/lib/feature-seed.sh gains the key, db/test/feature-matrix-test.sh expects 16 keys / 32 rows / three Public-only keys and refuses a Commercial opt-in to authority_profile (37, was 36), api/test/organisation-features-api-test.sh expects 16 Public features. Forced red four ways, each restored by re-running 0152 (or the saved file) and re-verified green: (A) the resolver replaced by one ignoring the choice: 6 failures by name, among them a request created under c) records kbt_5_1_c, REFUSED: several held and none named, REFUSED: B names P's standing for P; (B) the insert policy without caller_is_buyer_admin(): exactly REFUSED: P's requester declares a standing; (C) the unique constraint dropped: REFUSED: the same standing twice plus the five section-1 migration checks; (D) the route's feature guard removed: 6 API failures, among them GET authority-profile is 404, with the same words and the same shape, and wrote nothing; and the matrix suite failed the code's keys are exactly the seeded keys with the key removed from feature-seed.sh. Battery: 4939 assertions passed (baseline 4849, +90 = 42 + 47 + 1); the only failures are the two known environment ones, cron-test.sh and verify-procedures-real.mjs. npm --prefix app run check and verify exit 0; copy fence and scripts/surface-audit.sh --strict exit 0. Deliberately not built: the EKR contracting-authority register import. The owner's CSV is NOT in /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/data/ (the directory does not exist, checked 2026-10-10), so the import is a follow-up slice and nothing was added for it. No audit row for a declaration (none asked). The framework call-off path sends no standing, so it is refused for an organisation holding several (D-529). P191's acceptance test ("the profile drives P192 threshold selection") is not built: nothing reads is_central_government yet; it belongs with P194. Verified: everything above, on local. Could not check: production (not touched; it holds 0001 to 0151) and the panel in a browser (not rendered; typecheck and app guards only). Assumed: nothing about Kbt. 5. § (1) beyond the owner's words; the English equivalents and the Hungarian verification-label wording are assistant-written (D-527).
P194Dated threshold and CPV reference datacomplete — both halvesShared (CPV), Public-only (thresholds). Commercial: CPV tagging optional. Public: Required. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P192 (every id in that brief is two lower than the ledger, see its header). THE TWO HALVES SHARE A SLICE NUMBER AND NOTHING ELSE, and only one of them could be built. Thresholds, built by a background builder and integrated here. Migration 0131: procurement_thresholds with 19 seeded figures, 4 citations, RLS enabled and forced, read policy USING (true) and three write policies all demanding is_platform_actor() -- one per granted verb, because feature_policies does its writes with a single FOR ALL policy and pg_policies.cmd then reads ALL, over which 0128's "every granted verb has a policy" assertion cannot be written. 16 in-migration assertions, all catalogue-only, re-run from the file twice -- once with --single-transaction as apply-migrations.sh does and once statement by statement -- passing both times. The probe is grant procurement_thresholds and the grants are the LAST statements in the file on purpose: every other probe kind is satisfied by a file that created the table and then died before seeding a figure, which reads as applied and makes the route answer "no threshold on file" for every date in history. Dated absence is the point of the slice, not a detail. No row has a null valid_to. The 2027 national figures are unknown and are ABSENT rather than estimated, so measured independently of the suite: 2025-12-31 gives 0 rows, 2026-06-01 gives 19, 2027-01-01 gives 12 -- the EU and small-lot figures and not one national figure -- and 2028-01-01 gives 0. Where the schema corrected the brief, measured rather than assumed: currency is char(3) like the nine existing currency columns, money is numeric(16,2) like the twelve existing value columns, there is no surrogate key because (regime, authority_class, contract_kind, currency, valid_from) IS the identity and a uuid beside it would let one figure be on file twice with two amounts, and authority_class values appear nowhere in the brief at all -- they were derived from the figures it does give, and every one of the five is used by a seeded row rather than reserved on speculation. All six EUR/HUF pairs convert at exactly 395.806, derived from the brief's own figures and now asserted, so a mistyped HUF digit fails in a suite instead of reaching a buyer. Verified here independently of the builder: 750 000/296 854 500, 216 000/85 494 096, 140 000/55 412 840, 5 404 000/2 138 935 624 and both small-lot pairs all give 395.806. GET /v1/thresholds?date= is NOT behind requireFeature, and that is measured, not argued (D-420): feature_policies ships empty and resolveFeature answers off for an unknown key, so gating it today returns 404 to everybody -- the sabotage that gated it produced 34 failures beginning a signed-in caller gets 200 (expected 200, got 404). The figures are public law carried with their citations; the Public-only thing is the regime determination that applies them, which is P196. The route validates the date format itself, and the reason was corrected by measurement. Not because an invalid date would 500 -- router.ts already maps 22007 and 22008 to 400 -- but because Postgres accepts yesterday, today, epoch and infinity as date literals: without the check, ?date=yesterday answers 200 for a date nobody named and ?date=infinity answers an empty list that reads as "none on file". Neither raises, so no error map could catch either. The app half was built here, because the alternative was a false exemption (Q-162). surface-audit.sh --strict reported /v1/thresholds as a route nothing calls, and its two categories are "reached" and "expected, with a reason" -- the exemption list is for routes reached where the scanner cannot look, so a route reached from NOWHERE does not belong in it. listThresholds() in the data client and app/src/screens/Thresholds.tsx render the figures with their citations, which is also the brief's own acceptance for this slice. The audit is back to exit 0 with 13 expected, the same number as before the slice. Three app guards caught real defects in that screen before it shipped: .rows and .empty were class names nothing defines, the date input carried no className="input", and the table had no tablewrap to scroll inside at 375px. A fourth apparent failure was this session running the money-formatter guard from the wrong directory. Buyer menu only -- thresholds decide which rules a PURCHASE falls under and a supplier never makes that call -- and the screen computes nothing at all, no comparison and no regime. Suites: 54 in db/test/threshold-test.sh as procuvent_app_rw with rolbypassrls and rolsuper both asserted false, 45 in api/test/thresholds-api-test.sh, and 84 app guard checks. Both database and API suites re-run here independently of the builder's report: 54/0 and 45/0. Forced red seven ways by name, each restore armed first and verified after. A national valid_to extended into 2027: 5 failures naming the 2027 absence and its two controls. The INSERT policy opened to WITH CHECK (true): 2. The DELETE policy opened: 2. The route ignoring valid_to: 3. The echoed date read off the first row instead of the question: 4. The date format check removed: 5, naming infinity and epoch specifically. And the literal guard was itself forced red four ways, which is where it earned its place: it caught a real hit on its first run -- 140 000 EUR written in prose in the route's own header, reworded rather than exempted -- and a planted-figures sabotage caught only two of three, which is how its digit-group normaliser was found wrong (joining one separator at a time left 2 138 935 624 as 2138 935624). Breaking its scan matcher exited 0 with a clean report, because the self-test carried its own copy of the regex; one shared matcherFor() later, the same sabotage exits 2 BLOCKED. Noise measured before any zero was believed: 0 hits over 115 files and 2 074 KiB. CPV: not built, and deliberately not started (Q-158, doc 72). The official CPV 2008 file is absent from the repository and from /Users/petermarik/Downloads, and the brief forbids typing codes by hand. The tables were NOT created in advance because the file decides the schema -- the shape in the brief is marked *Proposed* and was written without the file in hand, and this project does not alter applied migrations. That is not the feature_policies case, where the shape was known and only the contents were open. Verified: everything above, with the builder's counts re-measured here rather than taken on report. Could not check: whether the figures are legally correct -- they are the brief's, verbatim, with its own citations and verification labels, and docs/69a is still absent. Absent on purpose: the 2027 national figures, the KH concession figures, and four of the seven contract kinds (Q-159, Q-160, Q-161). D-419, D-420, D-421, D-422; Q-158 to Q-162. THE CPV HALF, SAME DAY, AFTER THE OWNER AUTHORISED THE DOWNLOAD (Q-158 closed). Migration 0132: cpv_codes, 9 454 codes from the official file, 152 of them flagged light-regime. Provenance travels with it -- https://ted.europa.eu/documents/d/ted/cpv_2008_xml, sha256 4129cbbce332c89ee7ce49b74aefa02f31848480d4c885f91cfb015191259146, fetched 2026-10-03, Regulation (EC) No 213/2008 -- and db/scripts/build-cpv-seed.mjs regenerates the rows from it. The XML is deliberately not committed: 12.7 MB whose only purpose is to produce the migration beside it, and the URL plus the checksum let anyone re-derive one from the other and prove they got the same bytes. The archive uses deflate64, which neither Node nor Python can decompress and the system unzip can, which is why the generator takes the extracted file. THE FILE DECIDED THE SCHEMA, WHICH IS THE WHOLE REASON NOTHING WAS BUILT BEFORE IT ARRIVED. Measured, not assumed: 9 454 codes and not the brief's "about 9 400", which it marked UNVERIFIED and asked to have measured; every code exactly NNNNNNNN-N; 23 languages with every one present for every code, of which hu and en are stored because the other 21 are ten times the data for no reader. And there is no parent column in the file at all -- the hierarchy is implicit in the digits, so the parent_code the brief proposed would have been derived data stored as though it had been read from the source. It is not in 0132, and when a picker needs a tree it is one generated column that cannot drift from the code beside it. No request_cpv_codes either: nothing in api/src or app/src can put a code on a request, and a join table nobody writes reads as a feature. The check digit is stored and NOT validated, because its algorithm is in neither the brief nor the file and a validator written from a guess would reject real codes -- the checksum is what guarantees those digits. THE FLAG IS HALF VERIFIED AND EVERY ROW THAT CARRIES IT SAYS SO. R-09's status is "Annex XIV VERIFIED (consolidated text via secondary host), 3. melléklet COULD NOT VERIFY", and its three ranges resolve -- measured against the real code list -- to 152 codes: 8 event-organisation + 39 hotel and catering + 105 cultural. A boolean alone would present a half-verified classification as settled law, so annex_xiv_basis carries R-09's own words including what it could not verify, and a CHECK makes the pairing unbreakable in both directions. docs/69a is still absent, so nothing beyond what R-09 quotes was relied on. Suite 41 assertions as procuvent_app_rw with rolbypassrls and rolsuper asserted false, every write probe rolled back, and a last section asserting the suite left all 9 454 rows and all 152 flags as 0132 shipped them. One assertion was wrong and the house rule caught it: a nine-character code was asserted to fail the CHECK, but code is char(8) so it fails on the TYPE and the CHECK never runs -- the assertion failed while the column was perfectly correct. It is now two assertions, each naming its true refuser, which is exactly what "a refusal must name what refused it" is for. Forced red four ways, each restore armed as a trap first and verified after. The cultural range unflagged: 3 failures by name including the teardown assertion. One basis rewritten to claim settled law: 1, the assertion that exists for precisely that. The Hungarian label mangled as a bad encoding would mangle it: 1 -- the assertion that catches a load every count agrees with. And the read policy narrowed to the platform: the suite BLOCKED rather than passing, because its own precondition found the table empty to that role and refused to measure anything, which is the "BLOCKED is not a pass" rule working from the inside. apply-migrations.sh local exit 0 with all 7 assertions, re-run from the file and passing again, ledger 132 of 132, privilege audit clean. Still deliberately absent: the CPV picker and any route -- no route means nothing for surface-audit.sh to report, and the picker arrives with the screen that fills request_cpv_codes. Q-158 closed.
P195Estimated value file, aggregation and market consultationcompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Optional budget estimate. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P193. Feature key estimated_value, which resolves off for every organisation because feature_policies is empty pending Q-151; nothing was seeded, and 0137 assertion 8 refuses a seeded row. Measured before designing (2026-10-09, local): no column stores a CPV code on a request or a lot (0132 deliberately shipped no request_cpv_codes) and nothing stores a budget year, so both live on the record (D-459); lots already carry request_lot_budgets.budget_estimate (0042) and requests budget_estimate - neither is read, copied or synced (D-458); saveLots replaces a draft's lots with new ids, so a per-lot value cascades away when the deliverables chapter is re-saved before issue (Q-180); request_lots uses one FOR ALL policy over accessible_workspace_ids() and both new tables copy it; every existing view is security_invoker; editionFor must run through tenantQuery because procurement_requests is FORCE RLS; requireFeature's 404 body differs from the unknown-route body (D-460). Built. Migration 0137 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0137_an_estimated_value_is_evidence_locked_at_issue.sql: estimated_value_records (request or lot via a composite FK proving the lot is the request's own, method enum, money_amount, currency_code, budget_year, optional cpv_code FK into cpv_codes, notes, computed_by_user_id, computed_at, locked_at, one row per request-or-lot), market_consultations (request, consulted organisation, date, shared attachment id), lock_estimated_values(uuid) (SECURITY INVOKER, a no-op on a draft, one audit_events row per record with status, request_id, lot_id, amount, currency only - D-016), view estimated_value_aggregates (security_invoker, plain sum per owning organisation, budget year, CPV division and currency; lot values replace the request-level value). Plus a unique index request_lots_id_request_key for the composite FK. No ninth append-only table (assertion 5) and no trigger (assertion 6). Probe viewgrant estimated_value_aggregates. Privilege audit local exit 0. Routes, all behind the feature and falling through to the unknown-route 404 when it is off: GET/POST /v1/requests/:id/estimated-values, GET/POST /v1/requests/:id/market-consultations, GET /v1/estimated-values/aggregates?year=; editing after issue answers 409 LOCKED_AT_ISSUE. issueRequest adds lock_estimated_values($1) to the issue statement's select list only when the feature is on; off, it sends the old statement unchanged. One Commercial-visible change: the unknown-route 404 now says No such route. instead of echoing the path, because the fall-through made api/test/malformed-input-test.sh fail by name (and no refusal echoes the value back); D-460. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/EstimatedValuePanel.tsx in the request workspace ("Estimated value", in the "Around it" group), rendered only when the session's features contains estimated_value (session now carries features); it lists records, edits the whole-request figure until issue, records consultations and lists the year's plain sums. Per-lot figures are API-only (Q-180). npm --prefix app run check and verify exit 0; the copy fence is clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/estimated-value-test.sh 34/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: two requests in 2026 division 55 sum to 16m, a third in division 45 does not join it, another tenant's 8m in 55 never appears in A's sums and B sees only its own, supplier and no-context reads are empty, writes refused across tenants, lock audit carries ids and money only and never the notes. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/estimated-value-api-test.sh 55/0: feature off, every route is 404 with the unknown-route body and the invalid sibling estimated-valuez is 404 in both states; with the feature off a request issues 200 with exactly requestNumber,versionNo, its pre-seeded estimated value is NOT locked and no lock is audited; feature on (one feature_policies row inserted and removed by the trap), sums, RLS negative control, consultation, issue then 409 LOCKED_AT_ISSUE. Wired into db/verify-all.sh (API list, after thresholds). db/test/cpv-test.sh's control "no foreign key points at the classification yet" now names 0137's one FK. Forced red five ways, each restored and re-run green. (A) record policy USING (true): 3 failures - B cannot read A's records, a supplier reads no record, B's update of A's record changes nothing. (B) view security_invoker = false: 6 - A reads NO row of B's organisation in the view, A's whole view is A's, CONTROL: B sees its own 8m in division 55, not A's 16m (got 24m), a supplier reads no sum, with no tenant context the view is empty, the aggregate view is security_invoker. (C) issue always locks: 2 - NEGATIVE: the estimated value was NOT locked, NEGATIVE: and no lock was audited. (D) save ignores the draft state and locked_at: 4 - editing after issue is 409, with the named reason, and the figure did not move, the second-edit refusal. (E) feature gate forced on: 12, beginning GET estimated-values is 404. Battery: ./db/verify-all.sh 3531 assertions passed (baseline 3442); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. Deliberately left out: any threshold comparison, warning wording or acceptance-test figure against the 20m HUF threshold (R-08 UNVERIFIED, Q-117 open); the event/project grouping key (Proposed in the brief, counsel's under Q-117); call-offs in the sum (no call-off registry yet, P205); the mixed-contract prompt (R-12 UNVERIFIED). Not checked: production (nothing applied or deployed). Assumed: a cancelled request still counts in the sum, as a plain sum would. D-458, D-459, D-460; Q-180.
P196Regime determination and statutory modecompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Public-only. Commercial: Off, requests behave as outside_kbt. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P194. THE STATUTORY MODE MECHANISM ONLY; the regime half is not built (D-462). Feature key statutory_mode, off for every organisation because feature_policies is empty pending Q-151; nothing seeded. Measured before designing (2026-10-09, local): the only writers of submissions are api/src/http/quote.ts (save, send) and place_auction_bid (0087), which INSERTs as the bidder; /tender is GET only; every write reaches 0036's three triggers. 0036's refuse_after_deadline(NEW.id) cannot see a header INSERT -- the row does not exist in a BEFORE INSERT trigger, so submission_is_mine is false and it returns -- and an auction bid is exactly a header INSERT, so the check was keyed on NEW.invitation_id inside the two trigger functions instead (D-461). The same gap leaves the DEADLINE unenforced on a header INSERT: measured, a supplier inserted a submitted header an hour after close (INSERT 0 1); recorded as Q-183, not changed, because it would change Commercial. 26 owner-run scripts insert submissions; none can name the new column, so all write outside_kbt requests and the check never fires for them; the platform is exempt anyway, as in 0036. Built. Migration 0138 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0138_an_ekr_parallel_request_takes_no_native_tender.sql: procurement_requests.statutory_mode (outside_kbt/ekr_parallel, NOT NULL DEFAULT outside_kbt, so no row changes mode by migration), CHECK procurement_requests_statutory_mode_public_only (only a public-stamped request may be ekr_parallel, so the refusal can never reach a Commercial request), refuse_native_submission(invitation) (SECURITY DEFINER, 42501 EKR_PARALLEL: ..., binds only the supplier on the invitation), and submissions_deadline_guard/submission_children_deadline_guard replaced to call it before 0036's deadline check. No table, no grant, no trigger added, append-only set still eight (assertion 5). Probe functiondef submission_children_deadline_guard:0138 marker. apply-migrations.sh local exit 0, ledger 138/138, privilege audit local exit 0. Routes GET/POST /v1/requests/:id/statutory-mode (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/statutory-mode.ts), resolved against the request's own edition and falling through to the unknown-route 404 when off (D-460's pattern); a change after issue is 409 STATUTORY_MODE_FIXED_AT_ISSUE from one conditional UPDATE, not a trigger. Quote save, quote send and auction bid answer 403 EKR_PARALLEL on an ekr_parallel request. featureOnFor moved into editions.ts and estimatedValueOn now delegates to it; the app's estimatedValueCall is renamed gatedCall and shared. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/StatutoryModePanel.tsx, "Where tenders are received" in the request workspace, rendered only when session features contains statutory_mode; a select while a draft, read-only after issue; neutral labels ("Here, in Procurevent" / "In EKR. Suppliers cannot send a tender here."). App check and verify exit 0, copy fence clean, surface audit exit 0 (13 expected, unchanged). Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/statutory-mode-test.sh 33/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: every existing request outside_kbt; an unnamed insert defaults outside_kbt; Commercial ekr_parallel and an unknown value refused by named CHECK; A cannot read or update B's mode (B reads its own); on the outside_kbt request the supplier edits, prices, deletes, excludes, inserts a header, sends and bids; on the ekr_parallel request the same eight writes are refused EKR_PARALLEL; the buyer's write to a sent quote is not refused; flipping the mode lets the same edit through and back refuses it. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/statutory-mode-api-test.sh 38/0: off, GET/POST and a non-uuid id are 404 No such route. with the same shape as the invalid sibling statutory-modez, nothing written, no statutory key in the request reply; on (one public policy row, removed by the trap), the sibling still 404, the same organisation's Commercial request still 404, set on a draft 200, other tenant 404 both ways, issue 200 with the same two keys, change after issue 409 by name; supplier quote 200/403, send 200/403, bid 201/403 Commercial vs ekr_parallel in the same run, nothing written on the refused side, the tender still readable. Wired into db/verify-all.sh after estimated-value. Forced red four ways, each restored and re-run green. (A) refuse_native_submission made a no-op: 9 failures, the eight REFUSED: ... writes of section 4 and and flipping it back refuses once more. (B) public-only CHECK dropped: 1, REFUSED: a Commercial request cannot be ekr_parallel. (C) API feature gate forced on: 9, beginning GET statutory-mode is 404 and including CONTROL: the same organisation's Commercial request is still 404. (D) draft condition removed from the UPDATE: 3, changing the mode after issue is 409, with the named reason, and the mode did not move. Battery: ./db/verify-all.sh 3602 assertions passed (baseline 3531, plus 33 and 38); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. Deliberately left out (D-462): regime_assessments, regime_obligations, /v1/requests/:id/regime, threshold-based determination and its boundary tests, the buyer banner wording and any legal text -- they depend on R-08 UNVERIFIED, R-11 rendering SUSPECT, R-04 PARAPHRASE, R-09 COULD NOT VERIFY and open Q-110 (D-412 pending owner; the brief allows building with it pending -- rework risk recorded in D-462), Q-112 and Q-116. Invitation responses and clarification questions are NOT refused on ekr_parallel (Q-182). Not checked: production (nothing applied or deployed). Assumed: a supplier may still read an ekr_parallel tender. D-461, D-462; Q-182, Q-183.
P197Procurement plan registercompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Optional sourcing plan. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P195. Feature key procurement_plan, resolved for the ORGANISATION (no request in hand), off for every organisation because feature_policies is empty pending Q-151; nothing seeded. Measured before designing (2026-10-09, local): no policy anywhere in the schema reads a role (pg_policies has no qual naming roles) and the API never refuses on roleKey; the only role checks are inside 0025/0065/0074 functions, which rank only SYSTEM roles (is_system AND organization_id IS NULL, Q-062). memberships is FORCE RLS on current_org_id() and roles has no RLS, so an INVOKER function can read the caller's own role. accessible_workspace_ids() includes DELEGATED workspaces of another organisation, so a visible request is not necessarily this organisation's. No API route deletes a request. No CSV helper existed anywhere in the repository. Built. Migration 0139 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0139_a_plan_item_is_written_by_a_buyer_admin_and_launched_by_its_own_request.sql: caller_is_buyer_admin() (SECURITY INVOKER, system role only) and procurement_plan_items (organisation, plan_year, subject, optional CPV foreign key into cpv_codes, optional amount+currency paired by CHECK, optional quarter 1-4, status planned/launched/dropped, optional request), CHECK procurement_plan_items_launched_is_linked (status = 'launched') = (request_id IS NOT NULL), RLS enabled and forced with one policy per verb: read for the organisation, INSERT/UPDATE/DELETE only with caller_is_buyer_admin(), and the INSERT/UPDATE WITH CHECK demanding the linked request's workspace belongs to the item's own organisation. Not append-only, no trigger; 8 in-migration assertions (append-only set still eight, no trigger, every write policy checks the role, no feature policy). Probe grant procurement_plan_items. apply-migrations.sh local exit 0, ledger 139/139, privilege audit local exit 0. Routes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/procurement-plan.ts), falling through to the unknown-route 404 when off (D-460's pattern): GET /v1/procurement-plan?year=, POST /v1/procurement-plan (201), GET /v1/procurement-plan/export?year= (CSV attachment), POST /v1/procurement-plan/:id (edit, drop, restore), POST /v1/procurement-plan/:id/link ({requestId} launches, null returns to planned). Non-admin writes 403 by asking the same database function; a status change on a linked item 409 PLAN_ITEM_LAUNCHED, a link on a dropped item 409 PLAN_ITEM_DROPPED, each from one conditional UPDATE that writes nothing when refused. CSV built by hand: RFC 4180 quoting, CRLF, UTF-8 BOM, a leading = + - @ (or tab, CR) prefixed with an apostrophe. cpvCodeOf moved out of estimated-value.ts and shared. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/screens/ProcurementPlan.tsx at /procurement-plan; navigation items now carry an optional feature and navFor filters on session features (memoised, because nav drives the focus effect), so "Procurement plan" appears only when the session lists procurement_plan, and the screen renders NotFound otherwise. Lists a year, CSV download for every member, add/edit/drop/restore/link/unlink for a buyer admin only, per-row buttons named by subject. downloadRequestFile generalised into downloadAuthed for the CSV. App check and verify exit 0, copy fence clean, surface audit exit 0 (13 expected, unchanged). Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/procurement-plan-test.sh 29/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: the role check true for A's admin, false for A's requester, for B's admin acting as A and for nobody; the requester's insert refused by RLS, edit and delete match nothing while the admin's match one, the requester reads; B sees none of A's items (reads its own), edits nothing, cannot insert into A's plan; linking A's own request launches, B's request refused by RLS, launched without a request and linked-but-planned refused by the named CHECK even for the platform, unlink accepted; unknown CPV, amount without currency, a fifth quarter and status amended refused, each beside its control. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/procurement-plan-api-test.sh 47/0: off, list/add/export 404 No such route. with the same shape as the invalid sibling procurement-plans, nothing written, no key in the session; on (one Commercial optional row plus A's opt-in, removed by the trap), the sibling still 404, B without opt-in still 404; admin add 201, requester add/edit/link 403 with nothing written, requester reads; B (opted in) lists nothing of A's, edit and link of A's item 404; A linking B's request 400 and nothing written, own request 200 launched with its number, drop of a launched item 409 with nothing of the edit written, unlink to planned, drop, link of a dropped item 409; CSV served text/csv as procurement-plan-2027.csv, header the fixed column set, and a subject holding a leading =, a comma, double quotes and a newline round-trips through Python's csv reader with the apostrophe prefix; another year and B's export carry only the header. Wired into db/verify-all.sh after statutory-mode; /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/cpv-test.sh updated to name the second foreign key into cpv_codes (it asserts the set by name, and failed on the first battery run exactly as written to). Forced red six ways, each restored and re-run green. (A) caller_is_buyer_admin() ignoring the role key: 4, A's requester is not and the three requester write refusals. (B) the launched-is-linked CHECK dropped: 2, REFUSED: even the platform cannot make launched without a request and REFUSED: a linked item that says planned. (C) the link condition removed from the UPDATE policy: DB 1, REFUSED: linking B's request to A's item; API 2, REFUSED: A links B's request: 400 and and the item is still planned and unlinked (the foreign key alone accepted another tenant's request). (D) API feature gate forced on: 12, beginning GET procurement-plan is 404 and including CONTROL: B, which did not opt in, is still 404. (E) apostrophe neutralisation removed: 1, the round-trip assertion. (F) RFC 4180 quoting removed: 3, one header and one item, the round-trip and the other cells read back. Battery: ./db/verify-all.sh 3678 assertions passed (baseline 3602, plus 29 and 47; cpv-test unchanged at 41); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. The first run also failed cpv-test.sh (the second foreign key, now named) and verify-per-item-button-names.py (five per-row buttons, now labelled by subject); both fixed and re-run. Deliberately left out: XLSX (no library, no new dependency) and Hungarian headers labelled for EKR entry (EKR's field labels not in hand, P198 unbuilt, G2) -- D-464, Q-185; the planned procedure type, the amended status and amendment reason, the February notification and any 31 March or 42. § wording (Q-127, R-14 paraphrase only, D-465); the procurement lead role (P201 unbuilt -- buyer_admin only, P201 may widen it, D-463). A cancelled request does not change its item by itself (Q-184). Not checked: production (nothing applied or deployed); the screen was not opened in a browser. Assumed: a plan item belongs to an organisation, not a workspace. D-463, D-464, D-465; Q-184, Q-185.
P198Bilingual foundationcompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Hungarian interface opt-in. Public: Hungarian default (NOT built, see below). Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P196. Feature key hungarian_interface, resolved for the ORGANISATION, off for every organisation because feature_policies is empty pending Q-151; nothing seeded. Measured before designing (2026-10-09, local): users.locale text NOT NULL DEFAULT 'en' already exists since 0002 and nothing in api/src, db, app/src or scripts reads or writes it (local: en on 105 rows); users_self (0010) already limits writes to the caller's own row; shared/ is imported by relative path from app (shared/brand) and api (shared/pricing/grid.ts); Node 26 imports .ts directly, so a guard can read the catalogue itself. Built. Migration 0140 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0140_a_user_s_interface_language_is_english_or_hungarian.sql: the existing column is the preference (D-467, not the brief's preferred_locale), a CHECK users_locale_en_or_hu limits it to en/hu, a COMMENT; no table, no view, no policy, no grant; 4 catalogue assertions (constraint present and naming both, default still en, no second locale column). Probe check users.users_locale_en_or_hu. apply-migrations.sh local exit 0, ledger 140/140, privilege audit local exit 0. Catalogue /Users/petermarik/Documents/event-clinic-suite/procurevent/shared/i18n/en.ts (102 keys, defines MessageKey), /Users/petermarik/Documents/event-clinic-suite/procurevent/shared/i18n/hu.ts (Partial, falls back to English), /Users/petermarik/Documents/event-clinic-suite/procurevent/shared/i18n/index.ts (t, activeLocale, LOCALES), no library (D-466). Routes GET/POST /v1/me/locale (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/locale.ts), no user id in the path, falling through to the unknown-route 404 when off (D-460); /v1/session gains no key. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/auth/locale.tsx (LocaleProvider mounted in main.tsx, useT(), writes <html lang> from activeLocale: hu only with the feature on AND the user's choice hu); /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/LanguageSetting.tsx on Settings, rendered only with the feature on; EstimatedValuePanel.tsx, StatutoryModePanel.tsx and screens/ProcurementPlan.tsx moved onto the catalogue. Hungarian wording is the assistant's (D-468, Q-186). Every other Commercial screen keeps its English literals. Guard /Users/petermarik/Documents/event-clinic-suite/procurevent/app/scripts/verify-i18n-catalogue.mjs, in the app verify chain (so in db/verify-all.sh): every key in both languages, no extra key, identical placeholders, no empty string, no raw UI literal in the four migrated files, the activeLocale rule, and <html lang> written from it; four planted-fault self-controls exit 2 if the detector goes blind. scripts/verify-public-edition-copy-fenced.mjs now also scans shared/i18n and compares hu.ts against the site (6480 comparisons, clean). Suites. db/test/interface-language-test.sh 18 (as procuvent_app_rw, rolbypassrls = f first; default en; I set hu/en; de and HU refused by the CHECK; a colleague who SEES me updates 0 rows, CONTROL their own 1; another tenant sees 0 and updates 0; nobody signed in updates 0; no feature policy). api/test/interface-language-api-test.sh 32, port 8843 (off: 404 with the unknown-route body, invalid sibling /v1/me/localez same words and shape, POST writes nothing, session lists no feature and no locale key; on for A via Commercial optional + A's opt-in: sibling still 404, B without opt-in still 404 and its row unmoved, default en with exactly one key, de 400 named, {} 400, I set hu and read it back, my colleague still en, a body naming my userId changes only the colleague's row, 401 without a token). Wired after procurement-plan in API_SUITES. Forced red. Guard: deleting plan.notSet from hu -> MISSING hu has no 'plan.notSet' (tsc still exit 0, as designed: it renders English); hu plan.editItem {subject}->{targy} -> PLACEHOLDER 'plan.editItem'; an extra hu key -> EXTRA and TS2353; t('sm.fixHintz') -> TS2345; a raw Fixed at issue. in StatutoryModePanel -> LITERAL; activeLocale ignoring the feature -> RULE activeLocale(false, hu) is hu. DB: dropping the CHECK -> the constraint names exactly en and hu, REFUSED: de, REFUSED: HU in capitals (15/3); a permissive FOR UPDATE USING (true) policy -> REFUSED: my colleague sets my language, REFUSED: nobody signed in sets it (16/2). API: route ignoring the feature -> 11 failures led by GET /v1/me/locale is 404; validation removed -> an unknown language is 400 (got 500) and named; the UPDATE keyed on a body userId -> a body naming my id is ignored (404: row security refused it, and mine is STILL hu held). All restored and green. ./db/verify-all.sh: 3728 assertions passed (baseline 3678 + 18 + 32); failures exactly the two environment ones, cron-test.sh and verify-procedures-real.mjs. App check and verify exit 0; verify-logs-agree.mjs and build-status.py --check pass. Left out, and why. Hungarian as the Public default (brief: UNVERIFIED, Kbt. 47. § area). Dates and money: P86's one formatter (app/src/lib/format.ts) is unchanged and verify-one-money-formatter.mjs passes; whether they follow the user is Q-069, left open. Collation: Q-099, left open. A repo-wide no-literals guard: it would fire on every Commercial screen. API refusal sentences stay English. organizations.default_locale (0002, unread) untouched. <html lang="hu"> over mostly English screens is Q-187.
P199Terminology and template enginecompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared engine. Commercial: Commercial templates. Public: Public templates added (neither seeded, see below). Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P197. Feature key document_templates, resolved for the caller's ORGANISATION, off for every organisation because feature_policies is empty pending Q-151; nothing seeded. Measured before designing (2026-10-09, local): ledger 140/140; document_templates absent; pg_policies shows procurement_thresholds and cpv_codes read true and write is_platform_actor(), which reads only the app.is_platform GUC that auth.ts never sets from a request, so those tables have no API writer; acting_for_platform() (0070) is the existing definition of platform staff (GUC or a membership in a platform organisation); no API module writes audit_events. Built. Migration 0141 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0141_a_document_template_is_read_only_once_approved_and_never_edited_after.sql: document_templates (template_key lower_snake_case, locale en
P200Generated working documentsblockedParked 2026-10-09 under docs/70 rule 4, with its reason, so P201 may proceed. Every document this slice generates renders through a P199 template, and the brief makes a template go live only when the owner approves each version in words (brief ~L841), with G1 and log Q-138 before a real customer; none is approved and none is seeded (P199). It also needs P203's structured scoring content (brief ~L859), R-29 is PARAPHRASE and R-51 UNVERIFIED, and no DOCX or PDF library is installed, so output format is a dependency decision for the owner. Building it now would produce a generator with nothing it is allowed to generate. Unparks when the owner approves the first template version (Q-188) and answers Q-138. Public-only for statutory documents. Commercial: Optional award summary. Public: Required. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P198 (every id in that brief is two lower than the ledger, see its header).
P201Procurement rolescompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Optional evaluator and finance roles. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P199. Feature key procurement_roles, resolved for the ORGANISATION through organization_features() (0129), off for every organisation because feature_policies is empty pending Q-151; nothing seeded. Measured before designing (2026-10-09, local): 0024 seeds four system roles and none of the five new keys existed, fixture-minted or otherwise; the only path that assigns a role is invite_member() (0025/0065/0074), no route changes a membership's role and no route lists roles; the app's role picker is a hard-coded list in app/src/screens/Settings.tsx; an unknown key is refused 22023 there is no role called ... (API 400); issue_request() checks no role, and a viewer who sees a draft issues it (Q-190); the live invite_member differs from 0074's file only in one comment, the live issue_request is identical to 0120's file. Built. Migration 0142 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0142_a_procurement_role_exists_only_where_procurement_roles_is_on_and_only_an_admin_hands_one_out.sql: seeds procurement_lead, committee_chair, committee_member, finance_reviewer, procurement_consultant as system roles (labels only, like 0024's four); invite_member() derived from 0074's text with marked blocks: with the feature off every new key ranks 0 and is not found, so each refusal is word for word an unknown key's (D-475), with it on the brief's ranks apply as inviter ranks (lead and chair 2, the rest 1) and granting any of the five needs rank 3, admin only (D-472); caller_writes_procurement_plan() (INVOKER: admin, or a system lead while the feature is on) and the three plan write policies re-created on it, caller_is_buyer_admin() unchanged (D-474, the brief's P195 asks for it); caller_may_issue_requests() (INVOKER) and issue_request() derived from its live body, refusing the three rank-1 roles with 42501 after the visibility check (D-473); grants by the 0123 pattern; 6 in-migration assertions (grants and least privilege, nine roles, three plan policies on the new function, INVOKER, append-only set still eight, no feature policy). Probe functiondef issue_request:0142 marker. apply-migrations.sh local exit 0, ledger 142/142, privilege audit local exit 0. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/verify-system-roles.sh now states the nine keys and the eight ranked ones (on production it fails until 0142 is applied there, by design). No route added. API: the plan's 403 check asks caller_writes_procurement_plan() with its refusal words unchanged. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/shared/roles.ts (offeredProcurementRoles), the Settings role picker adds the five with i18n labels (11 role.* keys, en + hu, Hungarian flagged under Q-186) only when the session lists procurement_roles and never on the supplier side, otherwise it renders ROLES itself; BuyerRole widened; the plan screen shows write controls to a lead only with the feature on. App check and verify exit 0, copy fence clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/procurement-roles-test.sh 52/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: the exact nine keys and verify-system-roles.sh local exit 0; off, the admin's invite of each new key refused with the unknown key's words (and emperor as the control), viewer/requester/admin behaviour of the four unchanged, a lead held while off ranks nothing and cannot write the plan, the admin can; on (Commercial optional row plus A's opt-in, removed by the trap), the admin hands out each of the five, a requester and a lead cannot hand out a lead, a lead invites a requester, a committee member cannot invite, B (no opt-in) refuses the key, A's admin cannot invite into B; the lead writes the plan, a member and B's lead do not, A's lead cannot write into B's plan, and caller_is_buyer_admin() is false for the lead and true for the admin; the three reviewing roles cannot issue A's draft while a requester and the lead can, B cannot see it (all rolled back); no role, membership or user column holds a registration number. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/procurement-roles-api-test.sh 40/0: the picker function offers nothing with no features or every other feature on, the five in order with procurement_roles on, nothing on the supplier side; off, POST /v1/invitations for each new key is 400 with a body identical to the unknown key's after the key is substituted, nothing written, a requester invite 201 with the same keys as ever, the session lists no procurement_roles; on, the admin invites a lead and a member (201, listed in /v1/members), the requester, the lead and a member are refused 403 with nothing written, B is 400 in the unknown key's words; the lead adds a plan item 201, a member 403; a member's issue 403 leaves the draft a draft, the requester's 200 issues it. Wired into db/verify-all.sh after document-templates. Forced red five ways, each restored from the migration's own text and re-run green. (A) invite_member ignoring the feature: DB 7 (the five off-refusals, a lead held while OFF ranks nothing: cannot invite, REFUSED: B's admin invites a procurement_lead into B (B is off)), API 13 (each off-refusal and its body, and nothing was written, B's 400). (B) the lead's grant rank 2 instead of 3: DB 2 (REFUSED: a requester hands out a procurement_lead (granting needs rank 3), REFUSED: a procurement lead hands out a procurement lead), API 4. (C) caller_may_issue_requests() always true: DB 3 (the three reviewing roles), API 3 (REFUSED: the committee member issues A's draft: 403, and it is still a draft, and the requester control then 409). (D) caller_writes_procurement_plan() ignoring the feature: DB 3 (a lead held while OFF does not write the plan, its insert, REFUSED: B's lead (B is off) does not). (E) offeredProcurementRoles ignoring the feature: API 2 (no features: nothing beside the four, every OTHER feature on: still nothing). Battery: ./db/verify-all.sh 3916 assertions passed (baseline 3824, plus 52 and 40); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. The first run (3915) also failed verify-negative-only-assertions.sh: the suite asked caller_is_buyer_admin() only for a false answer; a true control for A's admin was added and the battery re-run. Deliberately left out: any permission for the new roles beyond inviting, the plan and the issue refusal (they are labels like 0024's four until P202 builds the committee); a consultant registration number (no consuming feature, D-475); a role-listing route (none existed); changing viewer issuing (Q-190). Not checked: production (nothing applied or deployed); the screens were not opened in a browser. Assumed: a supplier organisation is never offered the procurement roles in the picker. D-472, D-473, D-474, D-475; Q-190; Q-186 extended.
P202Evaluation committee, conflict-of-interest declarations and beneficial ownerscompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Optional. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P200. Feature key evaluation_committee, resolved against the REQUEST (its stamped edition, its organisation's opt-in), off for every organisation because feature_policies is empty pending Q-151; nothing seeded. Measured before designing (2026-10-09, local): submissions is FORCE RLS with three PERMISSIVE policies (submissions_buyer_read, submissions_buyer_update, submissions_supplier) and no restrictive one; submission_line_items, submission_options and submission_exclusions read their buyer rows through a subquery on submissions, evaluations through the DEFINER submission_workspace_id(); no view reads submissions; 14 functions do, all DEFINER but one guard; 36 files in db/test, api/test, api/src, db and scripts touch the table and every owner-role writer carries BYPASSRLS, so a policy reaches none of them (no trigger added); audit_events takes an INSERT only under app.audit_write (0056). Built. Migration 0143 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0143_an_evaluation_committee_member_reads_no_tender_before_declaring.sql: request_feature_mode(request, key) (DEFINER, off outside the caller's organisation, D-479); evaluation_committees (one per request, optional chair bound to a seat by composite foreign key, constituted_at) and committee_members (active organisation members by user id, no name), read by managers and seated members only, written by caller_manages_evaluation_committee() (0142's plan writers: admin, or lead while procurement_roles is on) while the feature is on and the request is before under_evaluation, frozen once constituted (D-477); activate_evaluation_committee() (INVOKER) refusing COMMITTEE_TOO_SMALL below three only where the feature is required, with the UPDATE policy as the backstop (D-476), plus NO_COMMITTEE, COMMITTEE_ALREADY_ACTIVE, COMMITTEE_NOT_YOURS; coi_declarations (one per seat, boolean no_conflict, no update or delete policy) and the ERASABLE coi_declaration_statements (author or manager deletes); declare_conflict_of_interest() (INVOKER) with NOT_A_COMMITTEE_MEMBER, ALREADY_DECLARED, DECLARATION_INCOMPLETE; one audit_events row each for activation and declaration with ids and a status only; the gate, RESTRICTIVE SELECT policy submissions_committee_declaration_gate on committee_declaration_allows_read(invitation_id) (D-478). Ordinary tables, all four verbs, the 0123 grant pattern; 8 in-migration assertions (grants, least privilege, RLS forced on four, append-only set still eight, no trigger, gate restrictive with the three permissive untouched, INVOKER writers, no feature policy). Probe grant coi_declaration_statements. apply-migrations.sh local exit 0, ledger 143/143, privilege audit local exit 0. Routes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/evaluation-committee.ts), falling through to the unknown-route 404 when off: GET /v1/requests/:id/committee, POST .../committee/members (201), POST .../committee/members/:userId/remove, POST .../committee/chair, POST .../committee/activate, POST .../committee/declaration; named refusals mapped to 400/403/404/409. GET /v1/requests/:id/quotes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/compare.ts) answers 403 DECLARATION_REQUIRED to a gated member instead of listing every bidder as "no response"; always passes while the feature is off. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/EvaluationCommitteePanel.tsx at /requests/:id/evaluation-committee, nav item only when the session lists evaluation_committee: seats, chair, activation state and the minimum note, who has declared (as far as the caller may see), add/remove/make-chair per row named by member, activate; the member's declaration prompt (two radios with neutral wording, optional statement). 41 ec.* catalogue keys en + hu, Hungarian flagged under Q-186. App check and verify exit 0, copy fence clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/evaluation-committee-test.sh 91/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: off, no committee can be created and the admin and a future member read the tender; on, resolution optional/required/off-for-another-tenant; creation refused to a requester, to B and after evaluation starts, seats refused to a requester, for a non-member and from B; a chair who is not a seat refused by the foreign key; committee and seats seen by members and the admin, not by a non-member requester, not across committees, not by B; Public with two members refused by name, the direct column write refused by the policy, three activates; Commercial with one activates (rule 4); a chair who manages nothing cannot activate, a requester cannot see one to activate; frozen after activation; an undeclared member reads 0 submissions and 0 line items, the same member declared reads 1, a second undeclared member still 0, a declaration on one request does not open another; admin, non-member requester, supplier and B read exactly as before, and a request with no committee is unchanged for the same member (negative control); declaration refusals by name; any answer opens; declarations seen by the declarant, the chair and the admin only; no update, no delete, no declaring for another seat; the audit row's keys are ids and a status and the statement appears nowhere in the audit log; erasing the statement leaves the declaration and its audit row; the gate follows the opt-in off and back on; the three permissive policies are the measured ones. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/evaluation-committee-api-test.sh 59/0: off, every committee route 404 with the invalid sibling /committees' body word for word, nothing written, no key in the session, the quote comparison as before; on (Commercial optional + A's opt-in, Public required, removed by the trap), sibling and an invalid part still 404, B (no opt-in) 404; requester add 403 with nothing written; non-member's 400; chair not a seat 400; a non-member requester sees no committee; Public two 409 COMMITTEE_TOO_SMALL and nothing constituted, three 200; Commercial one 200; frozen 409 COMMITTEE_ALREADY_ACTIVE; the undeclared member's quote comparison 403 DECLARATION_REQUIRED, the admin's 1 quote, the same member on a request with no committee 1 quote, after declaring 1 quote; declaration refusals 403/400/409; the admin sees who declared, a fellow member does not; off again, an undeclared member reads the quote and the routes are 404. Wired into db/verify-all.sh after procurement-roles. Forced red five ways, each restored from the migration's own text (or the file copy) and re-run green. (A) the gate function always true: DB 7 (REFUSED: One (undeclared) reads RC's submission, REFUSED: nor its line items, REFUSED: P One (undeclared) reads RP's submission, REFUSED: Two, still undeclared, reads nothing, REFUSED: One's declaration on RC does not open RD, and the two in part 9), API 3 (REFUSED: One (undeclared) opens RC's quotes: 403, by name, REFUSED: Two, undeclared, still 403). (B) the minimum removed from the function: DB 1 (REFUSED: RP (Public, required) with two members, by name, got rls: the backstop held), API 2 (409 became 500, and by name). (C) the policy backstop removed: DB 1 (REFUSED: writing constituted_at directly with two (the policy backstop)). (D) the committee readable by the whole organisation: DB 3 (REFUSED: A's requester (not on it) sees no committee, REFUSED: Two (on RC only) does not see RD's committee, the requester's activation), API 1 (REFUSED: the requester, on no committee, sees none). (E) the API feature gate forced on: API 8, beginning GET committee is 404 and including CONTROL: B, which did not opt in, is 404 on its own request; it also showed a 500 where the route and the database disagree, now answered 403 for the delegated-workspace case (D-479). Battery: ./db/verify-all.sh 4066 assertions passed (baseline 3916, plus 91 and 59); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. The first run also failed verify-one-money-formatter.mjs (the panel formatted the activation date itself; it now uses date() from app/src/lib/format.ts) and was re-run. Deliberately left out: a beneficial owner register (data, DPA and erasure against retention are Q-145, open); the text of Kbt. 25. § (5) b) and the 25. § (6) question (not quoted in the brief, research notes absent, R-20 PARAPHRASE; Q-148, Q-192); the declaration stages before_names/after_names, the chair's notification and decision on a declared conflict (Q-191); assent through the contract_assents pattern (P216); expertise and left_at (D-477); the 5 % sample-check export. Not checked: production (nothing applied or deployed); the panel was not opened in a browser. Assumed: "pre-evaluation" is every status before under_evaluation; any active member of the organisation may sit on a committee. D-476, D-477, D-478, D-479; Q-191, Q-192; Q-186 extended.
P203Scoring that the schema already holdscompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Optional method lock (NOT built, see below). Public: Method locked at issue (NOT built). Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P201. Feature key committee_scoring, resolved against the REQUEST, off for every organisation because feature_policies is empty pending Q-151; nothing seeded. Measured before designing (2026-10-10, local): the brief's "zero references" is wrong for evaluation_criteria: api/src/http/document.ts lists and REPLACES a request's criteria (DELETE then INSERT, any status) and issue_request() copies them into the request_versions snapshot, so criteria already land in the issued document (R-28 measured, nothing added); a replacement after scoring cascades to evaluation_scores (Q-195). evaluations (one per submission and evaluator user id, evaluation_status, submitted_at) and evaluation_scores (score XOR passed, nullable rationale) had 0 rows, one permissive ALL policy each, and no reader or writer anywhere in api/, app/, db/test, db/scripts or scripts/, so no fixture is reached and no trigger was added; evaluation_scores reads through evaluations as the caller. The buyer's expected quantity: none on requirements, submission_line_items.quantity is the supplier's, request_lots.quantity is the buyer's per lot; only mandatory lines make the headline total. Built. Migration 0144 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0144_a_committee_member_scores_alone_with_a_reason_and_the_chair_compiles_once.sql: no column added to the 0007 tables; DEFINER predicates scoring_request_of, committee_scoring_applies, committee_scoring_seat, evaluation_independence_allows_read, committee_evaluation_writable, committee_score_writable, committee_rationale_given, each answering only about the caller's organisation; seven RESTRICTIVE policies on evaluations and evaluation_scores (the two permissive ones untouched) that answer true wherever committee scoring does not govern a submission; record_committee_score() and submit_committee_evaluation() (INVOKER) with named refusals RATIONALE_REQUIRED, NO_SUCH_SUBMISSION, NO_ACTIVE_COMMITTEE, NOT_A_COMMITTEE_MEMBER, DECLARATION_REQUIRED, COMPILATION_LOCKED, NO_SUCH_CRITERION, SCORE_INVALID, EVALUATION_SUBMITTED, SCORES_INCOMPLETE (D-480); independence as the restrictive SELECT evaluations_committee_independence (D-481); evaluation_compilations (ordinary, FORCE RLS, read by the committee's members and managers, no write policy, locked_at) written once by compile_committee_scores() (DEFINER, explicit checks, NOT_THE_CHAIR, NOTHING_TO_COMPILE, COMPILATION_LOCKED), method mean_of_member_weighted_totals, and audit_events rows of ids, status and numbers for submission and compilation (D-482); quantity_weighted_prices() (INVOKER, read-only, D-483). 0123 grant pattern; 7 in-migration assertions (grant, least privilege, RLS forced and no write policy on the compilation, append-only set still eight and no trigger, two permissive and seven restrictive policies, INVOKER writers and calculation, no feature policy). Probe grant evaluation_compilations. apply-migrations.sh local exit 0, ledger 144/144, privilege audit local exit 0. Routes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/committee-scoring.ts, D-484), falling through to the unknown-route 404 when off: GET /v1/requests/:id/scoring, POST .../scoring/scores, POST .../scoring/submit, POST .../scoring/compile (201), GET .../scoring/weighted-price (basis: calculation); 409 NO_ACTIVE_COMMITTEE without a constituted committee. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/CommitteeScoringPanel.tsx at /requests/:id/scoring, nav item only when the session lists committee_scoring: per tender, a declared member's score form per criterion (points or pass/fail, required reason), submit, own scores once submitted, other members' scores only as far as the database returns them with a hint that they stay hidden until submitting; the chair's compile-and-lock and the compiled result; the weighted price table labelled a calculation, not a legal rule. 37 sc.* catalogue keys en + hu, Hungarian flagged under Q-186. App check and verify exit 0, copy fence clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/committee-scoring-test.sh 75/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: off, scoring refused by name and today's direct writes unchanged; on, a request with no committee refused by name and unchanged for direct writes; a score with no or blank reason refused by name, a direct no-reason row refused by the policy backstop beside the same row with a reason; points out of range, points on a gate and another request's criterion refused by name; a non-member requester and admin refused by name, a direct own evaluation refused, B refused; the chair cannot rewrite or insert a member's score; independence paired: One and Two see only their own (1 evaluation, 3 scores), the chair 0, the admin 2; One submits and sees 2 and Two's reasons, Two still 1 and none of One's; one tender's submission does not open another; submitted scores frozen by name and directly; B sees nothing; non-chair, admin and B cannot compile, nothing to compile refused; the chair compiles 71.00 and 79.33 to 75.17 (75.165 on a half, half-up), locked, visible to members and not to a requester or B, refused twice by name, no update, delete or insert; audit rows carry ids, status and numbers and no reason; the reason is erasable (no trigger); weighted price 15.06 (two lines of 1.5050 x 5 = 7.525, rounded per line), 2 counted, 3 flagged; ' DB ' matches 'db' 10.00; B reads nothing; off again, independence lifts and scoring is refused by name; permissive policies unchanged, append-only set eight. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/committee-scoring-api-test.sh 57/0 (port 8855): off, every scoring route 404 with the invalid sibling /scorings' body word for word, nothing written, no key in the session, quotes as before; on, sibling and an invalid part 404, B on A's request 404, no committee 409 NO_ACTIVE_COMMITTEE, malformed id 400, no reason 400 RATIONALE_REQUIRED with nothing written, non-member 403 NOT_A_COMMITTEE_MEMBER; independence paired over HTTP; incomplete submit 409 SCORES_INCOMPLETE; submitted edit 409 EVALUATION_SUBMITTED; non-chair 403 NOT_THE_CHAIR; chair 201 with 75.17; second compile and a later score 409 COMPILATION_LOCKED; weighted price calculation 15.06/2/3 and 10.00/1/0; off again 404. Wired into db/verify-all.sh after evaluation-committee. Forced red five ways, each restored by re-running the migration file and re-run green. (A) evaluations_committee_independence dropped: DB 8 (REFUSED: One, not submitted, sees only its own evaluation of the tender, REFUSED: and only its own three scores, REFUSED: Two likewise, REFUSED: the chair, who has not scored, sees none, REFUSED: Two, not submitted, still sees only its own, REFUSED: and no reason of One's, REFUSED: One's submission on the first tender does not open the second, seven restrictive policies, all P203's), API 3 (REFUSED: One, not submitted, sees no other member's evaluation, REFUSED: the chair, before compiling, sees none, REFUSED: Two, not submitted, still sees none). (B) committee_rationale_given always true: DB 1 (REFUSED (policy backstop): One writes a score row directly with no reason). (C) the mean truncated instead of rounded: DB 2 (consolidated: the mean of 71.00 and 79.33 = 75.165, half-up 75.17, the audit row: locked, with the numbers). (D) the brief's own: the expected quantity of lot 1 removed in the fixture: DB 2 (the first tender: 15.06, two lines counted, three flagged got 0.00
P204Abnormally low price, hiánypótlás and material clarificationscompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared (re-versioning is a Core fix), ALP and hiánypótlás Public-only. Commercial: Re-versioning fix applies (behind its key, off until Q-151). Public: Required (NOT built as a block, see below). Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P202. Feature keys material_clarification and deficiency_rounds, both resolved against the REQUEST, off for every organisation because feature_policies is empty pending Q-151; nothing seeded. Measured before designing (2026-10-10, local): answerClarification (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/workspace.ts) stores is_material and nothing acts on it; 0102 only raises the published answer's notice to action_required. The ONLY writer of request_versions is issue_request() (live body identical to 0142's file, diffed), which refuses anything past draft with "a revision ... does not exist yet": there was no re-issue path, only its snapshot. requires_acknowledgement was false on every row; request_version_acknowledgements had 0 rows and no reader or writer, and 0010's rva_supplier let a supplier acknowledge any version for its own organisation under any user id. notify_people() is DEFINER and not executable by the application role. Nothing in a submission path reads any of it. Built. Migration 0145 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0145_a_material_answer_issues_a_new_version_that_each_bidder_acknowledges_without_being_blocked.sql: issue_request()'s snapshot moved VERBATIM into request_content_snapshot() and issue_request() calls it (0145 marker, D-486); nullable clarifications.material_version_id; revise_request_for_material_clarification() (INVOKER) writes ONE version with requires_acknowledgement and the clarification's id in the snapshot, never its text, refusing NO_SUCH_CLARIFICATION, FEATURE_OFF, NOT_PERMITTED, NOT_PUBLISHED, ALREADY_VERSIONED, REQUEST_NOT_OPEN; notify_bidders_of_revision() AFTER INSERT trigger on request_versions WHEN it asks for acknowledgement (one request.revised notice per invited supplier, no title); restrictive INSERT policy rva_acknowledges_a_visible_revision (D-487); request_feature_mode_for_party() so a supplier's routes read the BUYER's opt-in; deficiency_rounds and deficiency_round_items (ordinary, erasable, FORCE RLS, buyer read only, no write policy) written by open_deficiency_round() and close_deficiency_round() (DEFINER, explicit checks), the round counted per invitation (D-488). 0123 grant pattern; 6 in-migration assertions (grants and least privilege, append-only set still eight, RLS forced and no write policy, who runs as whom, issue_request uses the shared snapshot, nothing seeded). Probe grant deficiency_round_items. apply-migrations.sh local exit 0, ledger 145/145, privilege audit local exit 0. Routes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/material-clarification.ts, D-485), each falling through to the unknown-route 404 when off: POST /v1/requests/:id/clarifications/:cid/material (201), GET /v1/requests/:id/versions (buyer or invited supplier), POST /v1/requests/:id/versions/:vid/acknowledge (201), GET and POST /v1/requests/:id/deficiency-rounds (201), POST .../deficiency-rounds/:rid/close; with the feature on, the existing answer route publishes a material answer and issues its version in one transaction. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/MaterialClarificationPanel.tsx: the buyer's Versions page (/requests/:id/versions, nav only when the session lists material_clarification) with who acknowledged each version and who has not; the buyer's Deficiency rounds page (/requests/:id/deficiency-rounds, nav only with deficiency_rounds) listing rounds and opening and closing them; on the Questions tab, with the feature on, a material answer's hint says what now happens and a published answer offers "issue a new version" or shows the version it issued; the supplier's acknowledgement notice on the quote screen and the Questions tab, which asks the route and renders nothing on a 404, and says acknowledging does not stop a quote. 42 mc.*/dr.* catalogue keys en + hu, Hungarian flagged under Q-186. App check and verify exit 0, copy fence clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/material-clarification-test.sh 68/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: issue_request()'s version 1 IS request_content_snapshot() (and not another request's); off, the revision and a round refused by name and today's direct is_material write unchanged; on, a committee member, an unanswered question, an awarded request, B and the supplier refused by name with nothing written; the admin's revision makes exactly one version that asks for acknowledgement, whose snapshot is the shared one plus the clarification id and carries no answer text; a second refused ALREADY_VERSIONED; S and S2 told once, S3 not; the party function answers S optional where 0143's says off, S3 and B off; S acknowledges as itself, twice refused, S2 on S's behalf refused, S2 naming S's user refused, S's second user allowed, S3, version 1 and the buyer refused, B and S2 read none of it; the negative control: S2, unacknowledged, submits its draft and it is submitted; rounds: no items, an empty item, B's requirement, a committee member and B refused by name; rounds 1 and 2, a direct insert skipping to 5 refused, a direct close changes nothing, close then ROUND_CLOSED, S's revised tender gets round 3 (per bidder), buyer reads 3 rounds and 4 items, B and S none, an item's text erasable; off again refused; append-only set eight; no submissions trigger reads acknowledgements. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/material-clarification-api-test.sh 70/0 (port 8857): off, every new route 404 with the invalid sibling /versionz's body word for word, a material answer published exactly as today with no version and no new key in the reply, no key in the session; on, sibling and an invalid part 404, B and S3 404, malformed id 400, the answer route issues exactly one version naming Q1, a second 409 ALREADY_VERSIONED, a published answer marked 201 version 3, an open one 409 NOT_PUBLISHED, B 404; the buyer reads three versions with both suppliers pending, S reads its own side and the answer, acknowledges 201, again 409 ALREADY_ACKNOWLEDGED, version 1 404, the buyer 403 NOT_A_BIDDER, S3 404, the buyer sees S done and S2 pending, S2 learns nothing of S; the negative control: S2, unacknowledged, sends its quote through the real submit route, 200, submitted; rounds 404 while only the first key is on, then rounds 1 and 2 (201), close 200, again 409 ROUND_CLOSED, no items 400 ITEMS_REQUIRED, malformed 400, B and S 404; off again 404 and a material answer issues nothing. Wired into db/verify-all.sh after committee-scoring. Forced red four ways, each restored by re-running the migration file (C by dropping its trigger) and re-run green. (A) rva_acknowledges_a_visible_revision dropped: DB 4 (REFUSED: S2 records S's user as its acknowledger, REFUSED: S3, not invited, acknowledges for itself, REFUSED: S acknowledges version 1, which asks for none, REFUSED: the buyer acknowledges in its own name), API 3 (REFUSED: the buyer acknowledges: 403 got 201, by name, and only S's acknowledgement exists got 2). (B) the ALREADY_VERSIONED check removed: DB 1 (REFUSED: a second revision of the same answer, by name), API 6 (REFUSED: marking Q1 material again: 409 got 201, by name, the admin marks the published Q2 material: 201, version 3 got 4, and still three versions, the buyer reads three versions, and no version was issued: still three). (C) a submissions trigger refusing a draft-to-submitted move while a version is unacknowledged, i.e. the block this slice must not build: DB 3 (S2 submits its draft anyway got ACK_REQUIRED, and it is submitted got draft, nothing in a submission path reads an acknowledgement got 1), API 2 (NEGATIVE CONTROL: S2, unacknowledged, sends its quote: 200 got 500, and it is submitted). (D) the round counter + 2: DB 6 (the admin opens round 1 for S ... got 2, and round 2 got 4, the admin closes round 1, REFUSED: closing it again, by name, S's revised tender gets round 3 ... got 6, the buyer reads three rounds ...), API 6 (the buyer opens round 1 ... got 201/2, and round 2 got 4, the close and its refusal). Battery: ./db/verify-all.sh 4336 assertions passed (baseline 4198, plus 68 and 70); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. Deliberately left out: the abnormally low price trigger, price_justification_requests and any wording about it (R-24 PARAPHRASE; Q-120 open); any statutory hiánypótlás rule, a deficiency type, a user-set deadline, an EKR reference and the equal-treatment check (R-24 PARAPHRASE; Q-198); the brief's test "acknowledgement required before a supplier can submit" — deliberately NOT built, even under required, because R-24/R-25 are PARAPHRASE, not VERIFIED (brief §1A rule 4; Q-197); a buyer-written change summary on the version (prose on an append-only table, Q-060); a link from the request.revised notice (no screen maps request_versions). Not checked: production (nothing applied or deployed); the panels were not opened in a browser. Assumed: a revision is allowed only while the request is issued, clarification or reopened; the roles 0142 stops from issuing also may not revise or open a round; an invited supplier may learn whether the buyer turned the feature on. D-485 to D-488; Q-197, Q-198; Q-186 extended.
P205Framework agreements and call-off registrycompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared registry, NKOH block Public-only (NOT built). Commercial: Optional registry. Public: Required with NKOH block (the block is not built, see below). Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P203. Feature key framework_registry, resolved for the ORGANISATION for the registry and additionally against the REQUEST for a call-off link; off for every organisation because feature_policies is empty pending Q-151; nothing seeded (0146 assertion 8). Measured before designing (2026-10-10, local): no table held a framework or a call-off; procurement_plan_items (0139/0142) is the nearest kind (organisation-owned, FORCE RLS, one policy per verb, writes through caller_writes_procurement_plan()); accessible_workspace_ids() includes delegated workspaces, so every link check demands the request's workspace belongs to the organisation; supplier_invitations accepts only is_active_supplier_org(); a buyer reads a supplier's name only when it is discoverable or invited (organizations_read_discoverable_suppliers, supplier_nameplate()); row security cannot narrow columns; a STORED generated column over date + interval is accepted. The brief marks R-36 VERIFIED (advisory) and R-37 VERIFIED, but R-37's rule text is not quoted in the brief. Built. Migration 0146 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0146_a_call_off_is_registered_under_its_own_organisation_s_framework_and_a_long_term_is_only_flagged.sql: framework_agreements (title, terms label all_terms_set/not_all_terms_set/mixed, optional central_body stored and read by nothing, external reference, maximum value with currency, dates with end not before start, optional term_justification, generated term_over_four_years, optional originating request of the same organisation), framework_parties (framework, active supplier organisation), call_offs (framework and request of the same organisation, request UNIQUE, mode in the brief's four values, justification, value, event date, call-off date); all three ordinary and erasable, FORCE RLS, one policy per verb, every write policy on the EXISTING caller_writes_procurement_plan() (D-489); frameworks_party_to() (DEFINER, five columns, only where the owner has the feature on, D-490). 0123 grant pattern; 8 in-migration assertions (grants, least privilege, RLS forced on all three, all nine write policies check the role, append-only set eight, no trigger, no CHECK refuses by duration, nothing seeded). Probe grant call_offs. apply-migrations.sh local exit 0, ledger 146/146, privilege audit local exit 0. Routes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/framework-registry.ts), each falling through to the unknown-route 404 when off: GET/POST /v1/frameworks, POST /v1/frameworks/:id, .../delete, .../parties, .../parties/:org/remove, .../call-offs (also gated on the request's edition). A supplier party reads its frameworks only through frameworks_party_to(); a supplier route was built and then REMOVED, because scripts/surface-audit.sh failed it by name (UNREACHED /v1/supplier/frameworks): no app screen would call it (D-490, Q-201). Advisories, never refusals: TERM_OVER_FOUR_YEARS_WITHOUT_JUSTIFICATION on a framework (D-491) and invitedOutsideFramework per call-off (D-492). App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/screens/Frameworks.tsx at /frameworks, nav item "Frameworks" only when the session lists framework_registry; lists each agreement with its terms, dates, value, the term note, parties (supplier search to add, remove) and call-offs (request link, mode, date, value, the invited-outside note); add/edit form for an admin or lead with a live hint over four years; "Create call-off" creates the request through createRequest (the ordinary POST /v1/requests) and then links it (D-493). 50 fw.* catalogue keys en + hu, Hungarian flagged under Q-186; the screen added to the i18n raw-text guard. App check and verify exit 0, copy fence clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/framework-registry-test.sh 52/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: the admin writes and the requester is refused (insert rls, update 0, delete 0) with the admin's control; the negative control: a five-year term with no justification is ACCEPTED and flagged, exactly four years is not flagged, an end before the start IS refused; parties: a buyer organisation, the requester, B and the party itself refused; the party reads A's framework through the function (five columns) only once A's feature is on, the non-party S2 reads none, the party reads no framework, party or call-off row directly, no tenant context reads nothing; call-offs: B's request under A's framework, A's request under B's framework, the requester, B's admin and a second registration refused, all four modes accepted; B reads none of A's frameworks, parties or call-offs and edits nothing; the originating request must be A's; no CHECK by duration, no trigger, append-only set eight. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/framework-registry-api-test.sh 67/0 (port 8859): off, every route 404 with the invalid sibling /v1/frameworkz's body word for word, a POST writes nothing, no key in the session; on, sibling and an invalid part still 404, B (no opt-in) 404; admin 201, requester 403 with nothing written, edits 200/403, bad dates, terms, ids and a foreign origin 400 with nothing written; the negative control: a 5.5-year term with no justification is saved 201 with the advisory, with a justification the advisory goes; parties 201/409/400/403, unnamed until invited; the party's own organisation gets 404 on the registry and on A's framework; a call-off request created through POST /v1/requests, S2 (not a party) invited 201 and listed under invitedOutsideFramework, link 201, again 409 ALREADY_A_CALL_OFF, B's request 400, requester 403, bad mode and id 400; a Public-stamped request falls through 404 (the request-level gate); the call-off reads with exactly the keys a plain request has; B sees and edits nothing of A's; removing a party lists S outside too; off again 404 and the request still reads. Wired into db/verify-all.sh after material-clarification. Forced red five ways, each restored (the migration file re-run as owner, or the file restored) and re-run green. (A) framework_agreements_read USING (true): DB 2 (the party reads NO framework row directly got 2, B's admin sees none of A's frameworks got 1); API 0, because every API read also filters by the caller's organisation. (B) a CHECK NOT term_over_four_years, i.e. the block this slice must not build: DB 3 (NEGATIVE CONTROL: a five-year term with no justification is accepted got check:fr_no_long, and it carries the flag, a five-year term WITH a justification is accepted too), API 7 (NEGATIVE CONTROL: a 5.5-year term with no justification is saved: 201 got 500, and the six that follow from it). (C) call_offs_insert without the request check: DB 2 (REFUSED: B's request under A's framework, REFUSED: A's request under B's framework), API 3 (REFUSED: B's request: 400 got 201, and only the one call-off exists got 2, now S is listed outside the framework too). (D) frameworks_party_to() without the party filter: DB 1 (the NON-party S2 reads none of A's ... got 1); API 1 (the NON-party is 404 got 200) while the supplier route existed. (E) the feature gate forced on in frameworkRegistryOn: API 15 (re-run after the supplier route was removed), beginning GET frameworks is 404 got 200 and including REQUEST-LEVEL GATE: a Public-stamped request ... falls through: 404 got 201. Battery: ./db/verify-all.sh **4455 assertions passed (baseline 4336, plus 52 and 67); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. Deliberately left out: the NKOH / DPS hard block and any transitional rule text (R-37: text not quoted in the brief, research notes absent, scope turns on Q-130; Q-199); any rule tying a call-off mode to the framework's terms, a maximum-value check and any refusal of a long term (R-36 advisory, D-491); a refusal of a non-party invitation (the brief states no such rule; Q-200); a supplier screen (Q-201); call-offs in P195's estimated value sums. First battery run failed surface-audit.sh on the supplier route, removed as above. Not checked: production (nothing applied or deployed); the screen was not opened in a browser. Assumed:** a call-off may link a request in any status; a framework may be deleted with its call-offs (cascade, registry rows only, the requests remain). D-489 to D-493; Q-199 to Q-201; Q-186 extended.
P206Integrity indicatorscompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Optional. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P204. Feature key integrity_indicators, resolved for the ORGANISATION; off for every organisation because feature_policies is empty pending Q-151; nothing seeded (0147 assertion 9). R-68 is SECONDARY, not a legal duty: every indicator is information "for review", the screen calls none a breach, violation, irregularity or score, and nothing refuses or blocks anything. Measured before designing (2026-10-10, local): bids are submissions per supplier_invitations (status draft, submitted, superseded, withdrawn, disqualified); the period is issued_at to request_effective_deadlines.effective_deadline_at; NO lot carries a CPV code (request_lots has none, estimated_value_records holds one optional code per request-or-lot) and nothing records a lot justification; submission_line_items.item_code and requirement_id are never written (0 of 31 local rows, quote.ts names neither) and description is supplier free text, so quote lines of different tenders are not comparable, while the lot's category_id, quantity and quantity_unit are buyer-defined; awards carry supplier_org_id, status and issued_at; call_offs (0146) carries mode, called_off_on, event_date; no table records a contract amendment with a value delta or a reference requirement's value; awards_supplier_read, submissions_supplier and submission_line_items_supplier let a SUPPLIER read its own rows of every source, so security_invoker alone is not the supplier boundary. Built. Migration 0147 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0147_an_integrity_indicator_is_read_only_shown_to_its_own_buyer_and_names_no_supplier.sql: integrity_indicator_floors (one ordinary row per organisation, FORCE RLS, read by members, written by caller_is_buyer_admin(), every floor NULL with no default, CHECKs 1-365 days and a ratio above 1 up to 100; D-495) and five security_invoker views each restricted to requests whose workspace belongs to current_org_id() (D-494): integrity_single_bid_requests (closed requests, live bids counted, CPV division; D-498), integrity_submission_periods (days against the floor, NULL below_floor with no floor), integrity_unit_price_outliers (awarded lot value per unit against the median of the organisation's own awarded lots of the same category, unit and currency, groups of three or more, above/below/within, NULL with no ratio; D-496), integrity_supplier_concentration (award count, supplier count, total, top-1 share, HHI; NO supplier column; D-497), integrity_call_offs (lead days against the floor, without reopened competition). 9 in-migration assertions (grants, least privilege, RLS forced, all five views invoker, no supplier column on concentration, no floor row or default, append-only set eight, no trigger, nothing seeded). Probe viewgrant integrity_call_offs. apply-migrations.sh local exit 0, ledger 147/147, privilege audit local exit 0. Routes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/integrity-indicators.ts), each falling through to the unknown-route 404 when off: GET /v1/integrity-indicators?year= (all five, flagged items only, floors, counts measured) and POST /v1/integrity-indicators/floors (buyer_admin, 403 otherwise, 400 on a bad value, empty clears). App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/screens/IntegrityIndicators.tsx at /integrity-indicators, nav item "Integrity indicators" only when the session lists integrity_indicators; a year selector, five read-only cards each with its definition, "No floor set" where a floor is unset, concentration without supplier names, and the floors form for a buyer_admin ("Your organisation's own choices. None is a legal limit."). 40 ii.* catalogue keys en + hu, Hungarian flagged under Q-186; the screen added to the i18n raw-text guard. App check and verify exit 0, copy fence clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/integrity-indicators-test.sh 41/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: each indicator with a firing and a non-firing fixture (R1 one live bid plus one withdrawn fires, R2 two bids and R3 still open do not; R1 3 days under a 10-day floor fires, R2 30 days does not; lot 4 at 5x the median is above, lots 1-3 within, a group of one, a proposed and a partial award absent; concentration 6 awards, 3 suppliers, 17300, top share 0.5780, HHI 4353, B's award and the proposed one not counted; the 5-day call-off under a 14-day floor fires, the 59-day reopened one does not); floors unset: every floor-based column NULL, nothing flagged; no supplier id or name in the concentration JSON and no supplier column; supplier S1, whose own bids and awards sit in every source table (control: it reads its 4 awards), reads 0 rows of all five views and the floors and cannot write floors; B reads none of A's rows and sees its own; no context reads nothing; floors written by the admin only, the requester and B refused, ratio 1 refused, no trigger, append-only set eight. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/integrity-indicators-api-test.sh 40/0 (port 8861): off, both routes 404 with the invalid sibling /v1/integrity-indicatorz's body word for word, a POST writes nothing, no key in the session; on, sibling and /floorz still 404, B (no opt-in) 404; floors unset reported as null with nothing listed; single bid, concentration (0.7500, HHI 6250); no supplier id or name anywhere in the response; malformed year 400; a supplier with the route opened to it reads zero rows of every indicator and gets 403 on floors; requester 403 with nothing written, bad values 400; admin sets floors and R1 and the 5-day call-off appear; clearing returns every floor to null; off again 404. Wired into db/verify-all.sh after framework-registry. Forced red five ways, each restored (the view re-created from the migration file as owner, or the file restored) and re-run green. (A0, recorded because it surprised) concentration view WITHOUT the w.organization_id = current_org_id() filter: still green, because the workspaces join under the supplier's own row security already empties it; so (A) the view built from awards and requests with no workspace join and no filter: DB 1 (S1 reads no row of integrity_supplier_concentration got 2), API 1 (with zero rows in every indicator got 0 0 0 1 0). (B) an invented default floor of 10 days in the period view: DB 2 (NO FLOOR SET: R1's period is measured and below_floor is NULL got 3.0|10|true, no request is flagged without a floor got 4), API 2 (NO FLOOR SET: two periods measured, none listed got 2 1, and nothing is listed again). (C) a top_supplier_org_id column on the concentration view: DB 2 (NO supplier id appears in the output got leaked, the view has no supplier column got 1); API 0, because the API names its columns. (D) integrityIndicatorsOn forced true: API 14, beginning GET integrity-indicators is 404 got 200 and including CONTROL: B, which did not opt in, is still 404. (E) withdrawn bids counted: DB 2 (R1 (one submitted, one withdrawn) is a single bid got 2|false|55, A's single bids in 2026: R1 only). Battery: ./db/verify-all.sh 4536 assertions passed (baseline 4455, plus 41 and 40); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. Deliberately left out (D-498): a lot spanning several CPV divisions (no lot CPV list, no lot justification; Q-202); contract amendments raising value (R-39; no amendment record with a value delta); reference requirements against estimated value (no field); framework spend per supplier (names suppliers, log Q-147 open; D-497); platform default floors (UNVERIFIED; Q-203); Q-204 asks which data to model. Not checked: production (nothing applied or deployed); the screen was not opened in a browser. Assumed:** every member of the buyer organisation may read the indicators (row security narrows them to the workspaces the member can see, and an undeclared committee member counts fewer bids); a single bid is counted per request, not per lot; partial awards count in concentration but not in unit prices. D-494 to D-498; Q-202 to Q-204; Q-186 and Q-147 extended.
P207Exclusion evidence, subcontractors and declarationscompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Optional supplier vetting. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P205 (every id in that brief is two lower than the ledger, see its header). Two feature keys (D-499), both off for every organisation because feature_policies is empty pending Q-151; nothing seeded (0148 assertion 7): supplier_vetting resolved for the ORGANISATION, and subcontractor_register resolved against the REQUEST, for the supplier through 0145's request_feature_mode_for_party() so the buyer decides. Advisory: nothing added refuses a submission or an award (§1A rule 4). Measured before designing (2026-10-10, local): 0037's "exclusions" are the supplier's PRICE carve-outs (submission_exclusions) and submission_exclusion_verdicts (0051, append-only) keeps the buyer's verdict on them; nothing in the schema records a check against any list or register, and neither table is touched. Submission children reach the buyer through one predicate (pg_policies on submission_line_items): submission not draft and its workspace accessible, asked through a subquery on submissions so 0143's committee gate still applies; the supplier side is FOR ALL over its own invitations. A supplier's sent line items are refused only by quote.ts (409), not the database. attachments already has owner type request, visibility buyer_internal and a read policy under which a supplier reads none of a buyer's internal files. Built. Migration 0148 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0148_a_vetting_record_is_the_buyer_s_alone_and_a_subcontractor_list_is_the_supplier_s_until_it_submits.sql: supplier_vetting_checks (per tender; neutral source codes register_check, self_declaration, document, other; result clear, issue_found, not_checked; checked_at; checked_by_user_id must be the caller; optional evidence attachment, which must be the caller organisation's own buyer_internal file on the same request; optional notes, ordinary and erasable; FORCE RLS; buyer SELECT and INSERT, insert only while the organisation has the feature; platform-only correction and erasure; NO supplier policy; D-500, D-501) and subcontractor_declarations (per tender; company name, optional company_org_id, optional share above 0 to 100, optional role, declared_by_user_id the caller; supplier FOR ALL over its own tenders, narrowed by three RESTRICTIVE policies to a DRAFT tender on a request whose register is on; buyer reads sent tenders only; no trigger; D-502). 7 in-migration assertions (grants and least privilege, RLS forced on both, no policy on the vetting table reaches a supplier, append-only set eight, no trigger on either table, no function or other table's policy reads either, nothing seeded). Probe grant subcontractor_declarations. apply-migrations.sh local exit 0, ledger 148/148, privilege audit local exit 0. Routes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/supplier-vetting.ts), each falling through to the unknown-route 404 when off: GET/POST /v1/requests/:id/vetting (buyer; 400 on an unknown source or result, a future date, a file that is not an internal file of the request; 404 on a draft or another request's tender), GET /v1/requests/:id/subcontractors (buyer, sent tenders only; POST 405), GET/POST /v1/supplier/invitations/:id/subcontractors (the supplier's own; replace in full in one batch; 409 once sent or before a quote exists; 400 on a bad share, a missing name, an unknown organisation id; 404 for another supplier's invitation even if the gate widened). App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/SupplierVettingPanel.tsx: on the buyer's quote comparison (/Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/screens/Compare.tsx) a Subcontractors section when the session lists subcontractor_register and a Supplier vetting panel (table and record form, evidence chosen from the request's internal files, "It is a record only: it does not stop a tender being sent or awarded.") when it lists supplier_vetting; on the supplier's quote screen (/Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/screens/Quote.tsx) a Subcontractors section that asks the route and renders nothing on a 404, editable while the quote is a draft and read-only once sent. 48 sv.* and sub.* catalogue keys en + hu, Hungarian flagged under Q-186; the component added to the i18n raw-text guard. App check and verify exit 0, copy fence clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/supplier-vetting-test.sh 51/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first: S1 declares two on its draft and may change them; before submission the buyer reads none, the rival S2 none; S1 cannot declare under another user's name; a share of 150 refused; the buyer cannot write a supplier's register; with A's opt-in off S1 cannot declare; after submission the buyer reads both, S2, tenant B and no context read none; S1 can no longer add (refused), change (0 rows) or remove (0 rows), and the buyer cannot remove; A records issue_found with its internal file and a clear check without one; control: S1 reads its own submission, but none of the vetting of it; S2, B and no context read none; A reads the evidence file, S1 and S2 cannot; evidence refused when shared with invited suppliers, on another request or another tenant's; a check under another user's name, on an invisible draft, by S1 on its own tender, by B, with an unknown source code, and with the feature off are all refused; the buyer cannot rewrite a check (0 rows); control: an award naming the wrong supplier is refused, then A awards S1's tender despite issue_found; S2 sends its draft; no function, trigger or other table's policy reads either table; append-only set eight; the source codes are exactly the four neutral ones. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/supplier-vetting-api-test.sh 45/0 (port 8863): off, all four routes 404 with the invalid sibling /vettinq's body word for word and nothing written, no key in the session; on, /vettinq and /subcontractorz still 404, B (no opt-in) 404 on its own request, S1 on B's request 404; S1 reads an empty editable list and declares two (share 30.00); 101, a missing name and an unknown organisation 400 with the two kept; S2 404 on S1's invitation; before submission the buyer lists no tender of S1's; A records issue_found with its evidence file (201, checked by the admin); a shared file, a statutory list name as source and a future date 400, S1's draft 404, one check only; S2 and S1 with the route opened to them 404 on A's request and read nothing naming the check; S2 cannot download the evidence (404); A awards the vetted tender (201) and S1 sends its quote (200); after sending S1's list is read-only and a change 409 with both kept, the buyer reads S1's two, POST 405, B opted in still 404; off again 404. Wired into db/verify-all.sh after integrity-indicators (the DB suite by its glob). Forced red, each restored (policies re-created by re-running the migration file as owner, or the file restored) and re-run green. (A) a SELECT policy giving a supplier its own tenders' vetting: DB 2 (but NONE of the buyer's vetting of it got 1, the rival S2 reads none got 1). (B) the three RESTRICTIVE draft-only policies dropped: DB 7 (S1 cannot declare under another user's name got OK, FEATURE OFF for the buyer: S1 cannot declare got OK, AFTER SUBMISSION the buyer reads both got 4, S1 can no longer add one got OK, ... change one got 5, ... remove one got 5, and the two are unchanged). (C) an award trigger refusing a tender with issue_found: DB 2 (A awards S1's tender DESPITE issue_found got the refusal, no function, trigger or other table's policy reads either table got 1), API 1 (A awards S2's tender DESPITE issue_found: 201 got 500). (D) both gates forced true in the API: 10 failures beginning GET vetting is 404 got 200 and including CONTROL: S1 on B's request (B did not opt in) is 404; this showed S2 got 200-and-empty on S1's invitation with the gate gone, so the supplier routes now 404 another supplier's invitation themselves, and the supplier gate alone forced true then failed 4 (GET supplier subcontractors is 404 No such route. got 200, POST ... got 409, the B control, ... 404 again). (E) the buyer's subcontractor read without the draft filter: DB 1 (BEFORE SUBMISSION the buyer reads NONE of them got 2). Battery: ./db/verify-all.sh 4632 assertions passed (baseline 4536, plus 51 and 45); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. Deliberately left out (D-503): Art. 5k and FSR declaration fields (R-67 UNVERIFIED; Q-206); any statutory exclusion ground or named list (R-41 SECONDARY; log Q-149 open); subcontractor notification or approval rules (R-40 UNVERIFIED; Q-124); choosing a known organisation as subcontractor in the app (the API accepts companyOrgId, the screen takes a name only); carrying a list forward to a revised tender and summing shares (Q-207); vetting per supplier organisation and buyer correction of a check (Q-205). Not checked: production (nothing applied or deployed); the screens were not opened in a browser. Assumed: any member of the buyer's workspaces who can read a sent tender may record and read checks on it (no role narrower than that); the subcontractor list belongs to the tender the quote screen shows (a sent one wins over a draft, as getQuote). D-499 to D-503; Q-205 to Q-207; Q-186 extended.
P208EKR action mirror and bid data importblockedParked 2026-10-09 under docs/70 rule 4, with its reason. It exists only for ekr_parallel requests (P196 built the mode; brief ~L1078, L1096), and whether imported bid data may live outside EKR at all is Q-112 (open); whether the statutory mode is wanted at all is Q-110 (D-412, open). R-30 is garbled in the brief and R-38/R-50 are advisory or UNVERIFIED. Building an importer for data the owner may not be allowed to hold is the wrong order. Unparks on Q-110 and Q-112. Public-only. Commercial: Off. Public: ekr_parallel requests. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P206 (every id in that brief is two lower than the ledger, see its header).
P209EKR export packageblockedParked 2026-10-09 under docs/70 rule 4, with its reason. Its contents are P200 documents (parked: no approved template), P195 values and the P208 template (parked) (brief ~L1105); what EKR will accept is part of Q-111 (open); R-32 is PARAPHRASE and R-44 SECONDARY; no XLSX library is installed. A JSON package of the parts that exist would be a format nobody has said EKR reads. Unparks with P200 and P208. Public-only. Commercial: Off. Public: Available. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P207 (every id in that brief is two lower than the ledger, see its header).
P210eForms-compatible data modelblockedParked 2026-10-09 under docs/70 rule 4, with its reason. The mapping needs the official eForms SDK, and fetching an official dataset needed the owner's explicit authorisation the last time (Q-158, the CPV file, docs/72); none has been given for the SDK. It maps fields P195 and P196 only partly created, the relation between the two decrees is Q-129 (open), and G3 governs any XML output (brief ~L1128). Unparks when the owner authorises the SDK download and answers Q-129. Public-only. Commercial: Off. Public: Available. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P208 (every id in that brief is two lower than the ledger, see its header).
P211ESPD-EDM importblockedParked 2026-10-09 under docs/70 rule 4, with its reason. Whether the EEKD is filled only inside EKR, whether EKR exports ESPD-EDM XML and which version applies is Q-128 (open); R-42 is UNVERIFIED; the brief itself says this slice "may be parked" (~L1144). A parser written against a guessed version and fixtures would have no input to read. Unparks on Q-128. Public-only. Commercial: Off. Public: Available. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P209 (every id in that brief is two lower than the ledger, see its header).
P212Retention independent of tenant deletioncompleteShipped 2026-10-10 (D-508): migrations 0137 to 0149 applied to production with apply-migrations.sh prod (ledger 149/149, privilege-audit.sh prod exit 0), procuvent-api version 2abc6a92-9cba-48b8-b97d-48379342a517, procuvent-app version e6204d0b-7469-4d1a-8690-ae3a7e3a56a1 (keyless, API base measured), main fast-forwarded to f78a5e9. Probed: /v1/session 401 beside /v1/sessionz 404; the gated routes 401 unauthenticated beside an invalid sibling 404; the app bundle carries the feature keys and no pk_live_. Dark in production until a policy row exists. Shared. Commercial: Today's deletion behaviour unchanged, retention opt-in. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P210 (every id in that brief is two lower than the ledger, see its header). Feature key retention_holds, resolved for the ORGANISATION that set the hold (D-505); off for every organisation because feature_policies is empty pending Q-151; nothing seeded (0149 assertion 8). Measured before designing (2026-10-10, local), the deletion inventory: (1) API routes: every DELETE FROM in api/src was read (frameworks and parties, supplier categories, draft document sections, lots and criteria, committee members, subcontractor declarations, handoff records, compliance documents, draft quote line items and exclusions, catalog buyers, category parents in directory-sync); none deletes a request, workspace, organisation or attachment, and no route soft-deletes an attachment (deleted_at is written only by two API test suites as owner). (2) Row security nevertheless lets the app role delete three of the four: requests_buyer_all, workspaces_all and attachments_write are FOR ALL; organizations has no DELETE policy, so only the owner deletes one. (3) Database functions: none deletes any of the four. (4) Owner scripts: db/purge-csp-reports.sh (csp_reports), db/leads-prune.sh (leads), db/verify-all.sh (server_faults), directory-sync (category_parents) touch none; there are no cron jobs in api/src/jobs that delete them. Test teardowns delete organisations, workspaces and requests as owner in ~30 suites plus db/test/lib/reset-fixtures.sh. (5) Cascades: organizations -> workspaces -> procurement_requests -> ~25 child tables; attachments cascade from organizations and workspaces; supplier_invitations cascades from the SUPPLIER organisation, so deleting a supplier removes its tenders from a buyer's request. (6) The append-only tables already block part of it: deleting an issued request fails with Table request_versions is append-only. DELETE is not permitted., and so does deleting its workspace or organisation through the cascade (Q-210). Unissued requests, files and organisations with nothing issued are deletable today. 0126 already keeps audit_events after its tenant; untouched. Built. Migration 0149 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0149_a_held_procurement_file_refuses_deletion_only_where_its_organisation_turned_holds_on.sql: retention_holds (ordinary, organisation-owned, FORCE RLS; one request or the whole organisation when request_id is NULL; neutral basis the user picks: legal_obligation, dispute, audit, other; erasable note; held_from default today, held_until NULL = until released; set_by_user_id must be the caller; released_at/released_by_user_id; members read, buyer_admin inserts (only while the feature is on) and updates through caller_is_buyer_admin(), no tenant DELETE policy, platform only; D-506); assert_not_held(kind, id) raising RETENTION_HOLD_ACTIVE (SQLSTATE 23001) when an active hold covers the row and the holding organisation has the feature on, SECURITY DEFINER, EXECUTE granted to nobody; and one BEFORE DELETE trigger retention_hold_guard on organizations (own holds, or a held request it is invited on as supplier), workspaces, procurement_requests and attachments (request-owned files, or a whole-organisation hold) (D-504). request_id CASCADEs so with the feature off nothing changes (D-505). 8 in-migration assertions (grants and least privilege, refusal not callable by the app role, RLS forced, no tenant delete policy, both write policies ask the admin role, guard on exactly four tables, append-only set eight, nothing seeded). Probe grant retention_holds. apply-migrations.sh local exit 0, ledger 149/149, privilege audit local exit 0. Routes (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/retention-holds.ts), each falling through to the unknown-route 404 when off: GET /v1/retention-holds (members), POST /v1/retention-holds (buyer_admin; 400 on an unknown basis, a malformed date, an end before the start, a malformed or another tenant's request id; 403 for a non-admin), POST /v1/retention-holds/:id/release (buyer_admin; 404 for another tenant's or an already released hold; GET 405). No route deletes anything. App: /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/screens/RetentionHolds.tsx at /retention-holds, nav item Retention holds gated on retention_holds; list for every member, set and release for buyer_admin; 31 rh.* catalogue keys en + hu, Hungarian flagged under Q-186; screen added to the i18n raw-text guard. App check and verify exit 0, copy fence clean. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/retention-holds-test.sh 68/0 as procuvent_app_rw, rolbypassrls and rolsuper asserted false first; every delete runs in a rolled-back transaction: the admin sets a hold; the requester, a hold under another user's name, another tenant's request, B for A, a kbt_46 basis (retention_holds_basis_check), an end before the start (retention_holds_until_after_from), a pre-released hold and the feature off are all refused; C holds its whole organisation; members read, B, the supplier and no context read none; held: the buyer deleting R1, its file and its workspace, and the platform deleting R1, organisation A, supplier S and whole-held C (and C's request and workspace) all get RETENTION_HOLD_ACTIVE, each paired with an unheld control that deletes 1 row (R2, R2's file, the other workspace, organisation B); the app role cannot call assert_not_held; the admin cannot delete a hold, the requester and B cannot release it, it cannot move to another tenant's request, the note erases and the hold still refuses; feature OFF with both hold rows unreleased: all six deletes succeed, and with no policy at all; on again it refuses, decided by the organisation even with R1 stamped public; an expired hold and a not-yet-started one refuse nothing, an open-ended one refuses; released: R1, its file, its workspace and S delete, A is still refused by R3's hold, C deletes after release, the released hold is kept; catalogue: guard on exactly the four tables, append-only set eight, basis codes exactly the neutral four. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/retention-holds-api-test.sh 40/0 (port 8865): off, both routes 404 with the invalid sibling /retention-holdz's body word for word, nothing written, no key in the session; on, the sibling and /relaese still 404, C (no opt-in) 404; R1 deletes before any hold; requester 403, bad basis, date, order, id and B's request 400 with nothing written; the admin holds R1 (201) and the whole organisation; R1 now refuses deletion; the requester lists both, B lists none and nothing naming A's hold; release GET 405, requester 403, B 404, bad id 400; released twice 404; still held by the organisation hold, then released and R1 deletes; both released holds still listed; off again 404. Wired into db/verify-all.sh after supplier-vetting (the DB suite by its glob). Forced red, each restored (re-running the migration file as owner, the policy dropped, or the file restored) and re-run green. (A) guard dropped from attachments: DB 2 (the buyer deletes R1's file: RETENTION_HOLD_ACTIVE got 1, the guard is on exactly the four tables). (B) feature condition removed from assert_not_held: DB 7 (every OFF: ... assertion and NO POLICY AT ALL ... got RETENTION_HOLD_ACTIVE). (C) a tenant DELETE policy for the admin on retention_holds: DB 10, beginning REFUSED: the admin deletes its hold got 1 and including ON AGAIN: R1 refuses again got 1. (D) the held_until condition removed: DB 2 (EXPIRED: the buyer deletes R2 and RELEASED: the buyer deletes R1's workspace got RETENTION_HOLD_ACTIVE). (E) the API gate forced true: API 7 (GET retention-holds is 404 got 200, POST retention-holds is 404 got 500, the C control, both ... 404 again). (F) the API admin check skipped on release: API 1 (REFUSED: the requester releases: 403 got 404; the database still refused it). Battery: ./db/verify-all.sh 4740 assertions passed (baseline 4632, plus 68 and 40); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. Deliberately left out (D-507): an automatic Kbt. 46. § hold or period (R-35 PARAPHRASE; log Q-115 open, when the period starts); the archive bundle and its hash in audit_events (personal data in it is log Q-145, open), so the brief's bundle test is not built; R2 object lock (bucket setting, owner-reserved); Dir. Art. 84(2) (UNVERIFIED); guarding child rows deleted on their own and the soft-delete of a file (Q-208); auditing holds (Q-209); what happens to an issued file that is undeletable today (Q-210). The brief's statutory basis codes (kbt_46, litigation, customer_policy) became neutral ones (D-506). Not checked: production (nothing applied or deployed); the screen was not opened in a browser. Assumed: every member may read the organisation's holds; the platform releases a hold before deleting what it covers rather than overriding it. D-504 to D-507; Q-208 to Q-210; Q-186 extended.
P213Backups and point-in-time recoverycompleteNothing to deploy (scripts, a suite and a document only; no migration, route or screen). Re-run 2026-10-10: db/test/backup-restore-test.sh 37/0, no gpg-agent left behind. Not done, and the owner's: a production dump and drill, which need the backup key (Q-213) and a bucket (Q-212); step 1 of /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/77-backup-and-recovery-options.md. Built 2026-10-10, local only. Nothing to deploy: no migration, no route, no Worker or app change, no feature key (Core, no Commercial behaviour change). The scripts become useful in production only once the owner creates the bucket and key (Q-212, Q-213). Core. Commercial: Benefits, no behaviour change. Public: Benefits. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P211 (every id in that brief is two lower than the ledger, see its header). Measured first (2026-10-10): pg_dump on PATH is 16.14 while the local server is 18.6, and pg_dump refuses a newer server (aborting because of server version mismatch), so the script looks for a pg_dump at least as new as the server (Homebrew postgresql@18, or PROCUVENT_PG_BIN). age is absent and gpg 2.5.21 is present. A flipped byte in a gpg file fails MDC check failed (exit 2), but only AFTER gpg has printed partial plaintext. Symmetric gpg started a gpg-agent daemon in the user's home that outlived the command; it was stopped. Local auth is trust, so an invented password in a local URL is ignored by the server and can be looked for. Built: (1) /Users/petermarik/Documents/event-clinic-suite/procurevent/db/backup.sh <local|prod> <out> [db]. It runs pg_dump -Fc with --snapshot exported by a REPEATABLE READ psql session that reads every table's row count in the same snapshot (D-531), then tars both and encrypts with gpg --symmetric AES256, the key on fd 3 from PROCUVENT_BACKUP_KEY (D-530). The file is written as .partial, moved into place, and left mode 600. It is BLOCKED (exit 2, nothing written) on an empty connection string, an unset or short key, a local target off localhost, a prod target off the ep-blue-firefly fingerprint, or an existing output file. It clears inherited PG* variables, splits the password into PGPASSWORD in the house manner, and prints the host only. Prod reads DIRECT_URL via LEDGER_OWNER_ENV. Never run against production. (2) /Users/petermarik/Documents/event-clinic-suite/procurevent/db/restore-drill.sh <file> decrypts fully before restoring, restores into procuvent_restore_drill_<epoch>_<pid> with --exit-on-error --no-owner, grants kept (D-532), compares every table's count with the file's own, runs migration-ledger.sh local <scratch>, and drops the scratch database on every exit. Local drill: 110/110 tables matched, ledger clean, about 45 s. (3) /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/backup-restore-test.sh, 37 assertions, picked up by the db/test/*.sh glob in verify-all.sh. It BLOCKS rather than skips when a tool is missing (D-533). It covers the round trip, file mode and encryption, and no password, key or postgresql:// in the output. ps is sampled throughout the backup, with a control that the sample SAW pg_dump. Empty URL BLOCKED with no file, on local and on the prod path through a throwaway owner env holding no URL. Missing key, off-machine local target and existing output are each refused. The drill refuses a tampered file, a wrong key, and a re-encrypted bundle whose counts.tsv was raised by one, naming the table. The scratch database is gone after a pass and after a failure, and no gpg-agent is left. db/verify-no-credential-on-argv.sh now examines db/backup.sh (ok). (4) /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/77-backup-and-recovery-options.md covers the options, what the scripts give, the runbook and the owner decisions. Neon prices and plan limits were NOT fetched and are marked owner to confirm. /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/61-restoring-the-database.md links it. Forced red, each restored and re-run green: (a) the empty-connection-string guard deleted: FAIL "and says the connection string is EMPTY" ×2 (no file was written even so, because the empty-host guard still refused); (b) the drill's mismatch branch made if false: FAIL "a COUNT MISMATCH fails the drill (exit 1)" and "and the drill names the table (public.ai_drafts)"; (c) the URL echoed after the host line: FAIL "backup output never shows the password" and "backup output never shows a postgresql:// URL"; (d) the full URL handed to pg_dump's argv: FAIL "ps never shows the password". The suite's first run also found its own defect: printf | grep -q under pipefail reported a found match as absent, which would have passed every lacks check wrongly. It now uses here-strings. Battery: ./db/verify-all.sh 2026-10-10: 4976 assertions passed (baseline 4939, plus this suite's 37), and only the two known environment failures remain, cron-test.sh and verify-procedures-real.mjs. Left out: the nightly schedule, the off-site copy and lifecycle rules, which need the owner's bucket and credential (Q-212); key custody (Q-213); the window (Q-098, Q-143, extended); the brief's "a restore passes verify-all.sh", replaced by the count comparison plus the ledger, because the battery is bound to procuvent_dev and its suites write fixtures; a production dump and drill, which are the owner's runbook step 1. D-530 to D-533; Q-212, Q-213.
P214Integration with the customer's certified records systemblockedParked 2026-10-10 under docs/70 rule 4, with its reason. It exports generated documents and EKR receipts (brief ~L1202): generated documents are P200 (parked, no approved template) and receipts come from P208 (parked on Q-110/Q-112). Which records system and which metadata (Annex 1 list, not read; brief ~L1210) is Q-138 (open). A signed webhook with no payload to send would be an integration with nothing. Unparks with P200 and P208. Public-only. Commercial: Off. Public: Available. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P212 (every id in that brief is two lower than the ledger, see its header).
P215Publication exports and business secretsblockedParked 2026-10-10 under docs/70 rule 4, with its reason. The slice's value is the legal rule itself: R-33 is PARAPHRASE, R-34 UNVERIFIED or SECONDARY, R-66 SECONDARY, and the "cannot flag a business secret later" refusal rests on a SECONDARY source (brief ~L1229, L1234), which the brief's own rule says may not block (only VERIFIED rules block, ~L351). What may be published is Q-126 (open). Unparks on Q-126 and a verified source. Public-only. Commercial: Off, nothing becomes public by default. Public: Required. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P213 (every id in that brief is two lower than the ledger, see its header).
P216Enforce multi-factor authenticationcompleteShipped 2026-10-10, switched off for everyone (D-535): 0153 applied to production (ledger 153/153 including the new feature probe, privilege-audit.sh prod exit 0); procuvent-api 0b9ade11-2285-46e1-91d7-bee4687cb974; app unchanged. Probed: /v1/session and /v1/members 401 beside /v1/sessionz and /v1/memberz 404, /v1/health 200. Re-run before shipping: mfa-enforcement api 40/0, feature-matrix 39/0, ledger-probe 7/0, requests api 91/0, workspace api 191/0, supplier api 138/0. Enforcement waits on Q-214 (measure fva on a real sign-in after Q-103). Shared. Commercial: Opt-in. Public: Required (brief 1A.4), but seeded off in both editions until Q-214, D-535. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P214. Measured before designing (2026-10-10, local): no factor or MFA claim was read anywhere in api/src or app/src; the Worker (api/src/worker.ts) and api/scripts/serve-api.mjs passed only sub out of @clerk/backend verifyToken. The installed @clerk/shared 4.25.9 types Clerk's session-token claim fva ("factor verification age", [firstFactorAge, secondFactorAge] in minutes) in dist/types/jwtv2.d.ts as OPTIONAL and @experimental; dist/authorization.mjs (checkReverificationAuthorization) reads -1 as "not verified". So the claim is documented but UNVERIFIED in production tokens: production sign-in is blocked (Q-103) and no real token was seen. No internet fetch was made. Built. subjectFromClaims in /Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/auth.ts, used by both edges on the verified claims only: second factor iff fva is a pair of ages >= -1 and fva[1] >= 0; absent or malformed reads as none. requireSession refuses 403 MFA_REQUIRED (hint: turn on two-step verification, sign in again) when the token shows no second factor and mfa_enforcement is on for the chosen organisation through 0129's organization_features(); the lookup runs only for tokens without one. Every tenant-scoped route goes through it (79 call sites, all in router.ts). GET /v1/session still answers and lists mfa_enforcement, so the app can tell the user why (D-534). Dev auth: dev:<subject> has a second factor, dev1fa:<subject> has none (D-536). Migration 0153 /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0153_a_session_without_a_second_factor_acts_for_no_organisation_that_requires_one.sql seeds mfa_enforcement Commercial off, Public off (D-535), with 2 assertions (both off; append-only set still eight). No table, function or grant. Probe: a new feature kind in db/migration-ledger.sh (feature mfa_enforcement:public=off), because a seed-only migration creates nothing the other kinds can see. apply-migrations.sh local exit 0, ledger 153/153, privilege audit local exit 0. Key added to db/test/lib/feature-seed.sh and db/test/feature-matrix-test.sh (34 rows, 17 keys; Commercial admin's opt-in to it refused while off). Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/mfa-enforcement-api-test.sh 40/0 (29 HTTP + the 11 of /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/mfa-claim-test.mjs, which it runs): the seeded state blocks nobody; with the intended modes upserted for the run (trap restores the seed), Public without a second factor 403 by name on GET /v1/members and on POST /v1/organisation/contact with nothing written, beside the invalid sibling /v1/memberz 404 and no token 401; with one 200 and written; Commercial opted in 403 / 200; Commercial not opted in 200 without a second factor (scope control); one person in P and B with one token: 403 acting for P, 200 for B; session 200 and lists the key for P, not for B; opting out lifts the refusal while Public stays 403. The claim test signs RS256 tokens with a generated key and runs them through Clerk's own verifyToken (jwtKey): [3,3]/[0,0] true; [3,-1], absent, one element, strings, -2, object all false; a tampered token and one from another key yield nothing. feature-matrix-test.sh 39/0. Wired into db/verify-all.sh after authority-profile. Forced red five ways, each restored and re-run green. (A) enforcement removed: API 11 fail, beginning REFUSED: Public, no second factor, GET /v1/members: 403 and including and nothing was written. (B) claim reader accepts age -1: claim test REFUSED: first factor only (second age -1): false, API mfa-claim-test.mjs passes. (C) dev auth ignores dev1fa: API the same 11. (D) refusal ignores the feature: API 6, including SCOPE CONTROL: Commercial that did NOT opt in, no second factor: 200 and CONTROL: the same token acting for B: 200. (E) Public row set to required in the database: matrix 2 (every seeded key carries exactly its two rows and modes, mfa_enforcement is off in Public too). Battery: ./db/verify-all.sh 5018 assertions passed (baseline 4976, plus 40 and the matrix's 2); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. The first run also failed ledger-probe-test.sh (4): the new feature probe used a plain FROM feature_policies, which fails to parse on a virgin database and BLOCKED the ledger there; it now runs through query_to_xml behind a to_regclass check, and the suite passes 7/0. Deliberately left out: switching it on anywhere (Q-214, D-535); Clerk instance MFA settings and enrolment (an account setting, owner-reserved, Q-214); a freshness window (Clerk reverification, not this slice); an app screen for MFA_REQUIRED (the brief asks for none; the API's hint is the message, and Clerk's own profile UI enrols factors); a secondFactor field on /v1/session (nothing reads it yet); security.astro still says "Committed" (G2, untouched). Not checked: production (nothing applied or deployed); a real Clerk token. Assumed: Clerk's fva keeps the shape and -1 meaning its installed types and code give it. D-534, D-535, D-536; Q-214.
P217Single sign-on and electronic identity readinesscompleteShipped 2026-10-10: procuvent-api 53833278-5c1b-4c94-be03-be2b38970cc3 (no migration, no app change; production remains Clerk only through identityPort(makeVerify(env)) with no second provider). Probed: /v1/session 401 beside /v1/sessionz 404, /v1/health 200, and a forged unsigned token claiming issuer test-sso 401. Re-run before shipping: identity-port api 33/0, mfa-enforcement api 40/0, verify-fake-sso-cannot-ship.mjs PASSED, app/scripts/verify-dev-auth-cannot-ship.mjs passed. Engineering readiness only: an authentication port and a test-only second provider. No migration, no feature key, no route, no screen, nothing user-visible. Shared (SSO), Public-only (DÁP, wallet). Commercial: SSO opt-in. Public: Available. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P215 (every id in that brief is two lower than the ledger, see its header). Triage. The Clerk enterprise SSO plan is owner-reserved (brief P215 scope) and was not measured or costed: no account access (Q-215, new). A DÁP/KAÜ connection and an EU wallet relying party are Public-only and wait on Q-135 and Q-136 (brief Q-134, Q-135) and gate G1; neither is buildable without a provider. Measured before designing (2026-10-10, local): auth.ts already took verification as a port (VerifyPort), built by the Worker's makeVerify (Clerk verifyToken) and by serve-api.mjs (Clerk or dev auth), both reading claims through P216's subjectFromClaims; no route reads a provider. users.auth_subject is one nullable text column, unique (users_auth_subject_key); no identities table exists; accept_invitation (0024) refuses to rebind a user to a second subject; 101 local users. Built. identityPort(primary, others) and IdentityProvider (id, exact issuers, verify) in /Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/auth.ts: a token whose unverified iss a secondary provider names goes to it alone, every other token to the primary unchanged; with no secondary provider the port returns the primary ITSELF (D-537). A secondary subject is stored as <id>|<sub>, prefixed by the port, so no provider can mint a Clerk user's subject; no schema change (D-538). The Worker now passes identityPort(makeVerify(env)) (no others: the same function, so production is Clerk only and unwrapped) and exports makeVerify for tests. The fake provider /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/lib/fake-sso-provider.mjs (RS256, issuer test-sso, generated key, alg/signature/issuer/expiry then subjectFromClaims), loaded by serve-api.mjs from api/test/ only when PROCUVENT_TEST_SSO_PUBLIC_KEY is set (D-539). Guard /Users/petermarik/Documents/event-clinic-suite/procurevent/api/scripts/verify-fake-sso-cannot-ship.mjs, modelled on app/scripts/verify-dev-auth-cannot-ship.mjs: bundles src/worker.ts with the esbuild under api/ (no wrangler), refuses on the fake's marker in the bundle beside the positive control No such route., and on any api/src reference to the fake, its marker or its env var; BLOCKED (2) when the bundle fails or the control is missing. Wired into db/verify-all.sh's guard list. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/identity-port-api-test.sh 33/0 (14 HTTP + the 19 of /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/identity-port-test.mjs, which it runs), port 8873, tokens minted up front and the run BLOCKS unless each is a JWT: a user provisioned as test-sso|<sub> signs in end to end (/v1/session 200 resolving A, /v1/members 200 listing A's members, invalid sibling /v1/memberz 404); dev auth (the primary here) still 200; a test-sso token naming the dev user's bare subject is a different, unprovisioned person (403), and dev auth naming the bare SSO subject likewise; unknown issuer evil-sso signed with the fake key 401, test-sso signed by another key 401, expired 401, no token 401. In process: identityPort(primary) === primary and identityPort(primary, []) === primary, identityPort(null) null; the Worker's own makeVerify configured with a Clerk key accepts its token (control) and REFUSES a fake-provider token, with and without fva (negative control); with the fake beside it: namespaced subject, Clerk token's bare subject unchanged, second factor through P216's reader, refusals for unknown issuer, iss test-sso signed with the Clerk key, another key, tampered, expired, alg none, a provider that throws, garbage. Existing suites unmodified and green: mfa-enforcement api 40/0 (with mfa-claim-test.mjs 11/0), and every API suite through the battery. Wired after mfa-enforcement. Forced red five ways, each restored and re-run green. (A) the port stops namespacing: API 7 fail, beginning GET /v1/session with a test-sso token: 200 (403) and including REFUSED: a test-sso token naming the dev user's bare subject is NOT that user: 403 (200); in-process 2 (a fake-provider token yields its subject NAMESPACED, the fake provider cannot yield a Clerk user's bare subject). (B) the issuer list ignored (any iss to the first secondary): in-process a Clerk token still yields its bare subject (null), API identity-port-test.mjs passes. (C) the port wraps a lone primary: in-process identityPort(primary) IS primary and identityPort(primary, []) IS primary. (D) the guard, fake provider imported into src/worker.ts: FAILED — the fake identity provider is IN the Worker bundle, exit 1. (E) the guard, process.env.PROCUVENT_TEST_SSO_PUBLIC_KEY planted in auth.ts: FAILED — an api/src file references the fake identity provider: api/src/http/auth.ts, exit 1. The first draft of the suite passed its refusal checks vacuously (nested quoting failed to mint the tokens, and an empty token answers 401 too); the up-front mint check is why it now BLOCKS instead. Battery: ./db/verify-all.sh 5051 assertions passed (baseline 5018, plus 33); failures only cron-test.sh and verify-procedures-real.mjs, the two environment failures the baseline names. Deliberately left out: any real SSO or eID configuration, and any Clerk account or plan change (owner-reserved, Q-215); DÁP/KAÜ and wallet integrations (Q-135, Q-136, G1); account linking (one person, several provider subjects) and an identities table (D-538, Q-215); a feature key (nothing user-visible). Not checked: production (nothing deployed); a real Clerk token (Q-103, Q-214); whether a real enterprise connection or eID broker issues a JWT the port can route by iss (assumed for the routing design, D-537 revisit trigger). D-537, D-538, D-539; Q-215; Q-135 and Q-136 extended.
P218Qualified trust servicesblockedParked 2026-10-10 under docs/70 rule 4, with its reason. Qualified electronic signatures, seals and timestamps come from a qualified trust service provider under contract, which is owner-reserved (brief ~L1287), and the provider supplies the test fixtures; which provider and for which records is Q-137 (open); R-61 is SECONDARY. There is nothing to integrate against until a provider exists. It also blocks P219's daily timestamp (brief ~L1317). Unparks when the owner contracts a provider and answers Q-137. Shared. Commercial: Opt-in. Public: Required for generated records. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P216 (every id in that brief is two lower than the ledger, see its header).
P219Audit coverage, tamper evidence and SIEM exportcompleteShipped 2026-10-10: 0154 applied to production with its four assertions passing (ledger 154/154, privilege-audit.sh prod exit 0, now 111 tables); procuvent-api d72c2a44-d6b4-49ff-88e6-28cfd674d573; app unchanged. Probed: /v1/audit/export 401 beside /v1/audit/exports 404, /v1/health 200. ./db/verify-audit-chain.sh prod exit 0: intact, 7 pre-chain rows, 0 chained (nothing audited since the migration). Checked first that nothing in api/src, api/scripts or any migration runs at REPEATABLE READ or SERIALIZABLE, where the chain lock would fail. Re-run: audit-chain 47/0, audit-export api 29/0, immutable-personal-data 20/20, audit-log 27/0, feature-matrix 39/0. Built 2026-10-10, local only; migration 0154 not on production, API not deployed. Core (coverage), Public-only (SIEM export). Commercial: more audit rows, no visible change. Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P217 (every id in that brief is two lower than the ledger, see its header). Measured before designing (local, PG 18.6): six record_audit() triggers and six functions write audit_events; EDITION SWITCHES were already audited by 0127 (organizations.edition_changed); opt-ins and downloads were not; the only script deleting audit rows is audit-log-test.sh (its own fixture organisations, wholesale, trigger suspended by name, Q-109); source_ip/user_agent/request_id_header NULL on all 22 055 rows; sha256 built in. Built. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0154_an_audit_row_carries_the_hash_of_the_one_before_it.sql: chain_seq/prev_hash/row_hash (bigint, bytea, bytea) via ALTER TABLE ADD COLUMN, filled by BEFORE INSERT trigger audit_events_chain under a FOR UPDATE lock on the organisation's audit_chain_heads row, partial unique index on (organization_id, chain_seq); per-organisation chain (D-540); pre-0154 rows stay unchained (D-541); the eight-table set and the UPDATE/DELETE refusal unchanged and asserted. Coverage: opt-in trigger on organization_feature_settings and record_file_download() called by downloadFile before the bytes go out (D-543). /Users/petermarik/Documents/event-clinic-suite/procurevent/db/verify-audit-chain.sh <local|prod> [org], read-only, own statement of the canonical form, names the first break (D-542); not run against prod. GET /v1/audit/export?since= in /Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/audit-export.ts, behind siem_export (Commercial off, Public required; seed, feature-seed.sh, feature-matrix-test.sh updated), fall-through 404, buyer admin only, JSON lines with canonical (D-544); listed as expected in scripts/surface-audit.sh. audit-log-test.sh teardown now also removes its heads. Suites. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/audit-chain-test.sh 47/0 (coverage IDs-only with an email/name scan and its positive control; 63-row chain including 8 concurrent transactions; app role cannot rewrite, read or move heads; a supplied chain_seq is overwritten; edited row, deleted middle row and deleted tail each named by the verifier after a committed tamper of the suite's own rows with audit_events_append_only suspended by name inside one transaction, then torn down and the whole local chain re-verified intact). /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/audit-export-api-test.sh 29/0. feature-matrix 39/0, organisation-features api count 16 to 17. Forced red (each restored, green after): (1) FOR UPDATE removed: 'eight concurrent transactions all committed, no error' got 6 (unique-index violations) plus count assertions; (2) verifier format version 1 to 2: 'verify-audit-chain.sh finds A's chain intact (exit 0)' got 1; (3) admin email added to the opt-in blob: 'no blob in A's trail holds an email-shaped string' got 2; (4) verifier gap rule disabled: 'a DELETED middle row ... named gap' got prev_hash; (5) feature guard forced on: 'C's admin (Commercial): the same 404' got 200; (6) admin check removed: 'REFUSED: P's requester: 403' got 200; (7) record_file_download call removed: 'one attachments.downloaded row' got 0. Battery: db/verify-all.sh 5127 assertions passed (baseline 5051 + 47 + 29), failing only the two known environment suites cron-test.sh and verify-procedures-real.mjs; immutable-personal-data-test.sh 20/20 with the exact eight; privilege-audit and policy-shape local exit 0. Left out: sign-ins (Clerk signs in; no event source in the API, Q-216); the daily qualified timestamp over the chain head (needs P218, parked on Q-137); imports/scores/declarations coverage beyond what P202 to P204 already write; the app role can raise app.audit_write itself and forge a (correctly chained) row, pre-existing, not changed here (Q-217). D-540 to D-544, Q-216, Q-217.
P220Control mapping and the NBSZ NKI support packblockedParked 2026-10-10 under docs/70 rule 4, with its reason. The slice maps Procurevent's controls against the 7/2024 MK catalogue, whose text nobody here has: R-55 is COULD NOT VERIFY and the owner must obtain the text (brief ~L1332); scope is Q-133 (open). A mapping against an unread catalogue would be a fabricated compliance document, which CLAUDE.md's copy discipline forbids. Unparks when the owner supplies the catalogue text. Public-only (documentation). Commercial: No change. Public: Required. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P218 (every id in that brief is two lower than the ledger, see its header).
P221Incident response supportcompleteNothing to deploy (a runbook, a link from docs/55 and a one-line guard extension). The brief's customer templates and committed timings are deliberately absent and wait on Q-140, so this is complete as engineering, not as the contractual commitment. Built 2026-10-10, documentation and one guard line; nothing to deploy (no migration, no API, no app change). Built. /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/78-incident-response-runbook.md: roles and a blank owner-held roster; severity S1 to S4 by impact with no response time; first steps; evidence that must not be deleted (the eight append-only tables, audit_events with the 0154 chain and audit_chain_heads read by db/verify-audit-chain.sh, server_faults from 0118 read through 0119's recent_server_faults(interval), job_heartbeats from 0122, overwritten each run, published as /v1/health watched, jobs in api/src/jobs); the encrypted snapshot before remediation (P213 db/backup.sh and db/restore-drill.sh, pointing at docs/77 section 4); Worker rollback in three paths (D-548); secret rotation by NAME only, twelve names measured from api/src/worker.ts Env, api/wrangler.jsonc comments and the workflows' secrets.* (no value read; .owner.env not opened); customer communication is the owner's. Linked from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/55-operating-procedures.md section 6 (D-545). scripts/verify-procedures-real.mjs now scans docs/78 too (D-546). Tabletop, local only (runbook section 10): migration-ledger.sh local exit 0 (154/154); verify-audit-chain.sh local exit 0, 636 chained rows in 110 chains, 22 055 pre-chain, 0 breaks, with a not-a-uuid control exiting 2; backup.sh local with a throwaway key exit 0 (111 tables, COMPLETE), backup.sh with no arguments exit 2; restore-drill.sh exit 0, 111 of 111 counts matched, DRILL PASSED; recent_server_faults('24 hours') 0 rows; job_heartbeats 2 healthy rows; census.sh local exit 0. Forced red: a planted ./db/rollback-everything.sh failed the guard by name (names db/rollback-everything.sh, which does not exist); a planted gh workflow run "Roll back production" failed it by name (runs the workflow ... which .github/workflows does not define); control: the guard at HEAD did not see the planted path. Guard after restore: only the two known gitignored env-file failures (app/.env.local, app/.env.production.local), no new ones. Left out, on purpose: response times, notification deadlines and customer templates in Hungarian and English (owner commitments and counsel, Q-140 extended; D-547); the wrangler rollback path was measured from the installed wrangler 4.116.0 source, not executed; a read-only production fault-report script (Q-218); a production tabletop (owner). GDPR timing UNVERIFIED, R-57 SECONDARY, stated only as to be confirmed by counsel. Core process, Public commitments. Commercial: No change. Public: Contractual commitments. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P219 (every id in that brief is two lower than the ledger, see its header).
P222Exit plan and full tenant exportcompleteShipped 2026-10-10: 0155 applied to production (ledger 155/155, privilege-audit.sh prod exit 0); procuvent-api 4a30fd22-e19a-4f3d-adeb-e5e8b5cd2880; procuvent-app 8eac70ec-3389-4e23-b804-188d4d40c1f7 (keyless). Probed: /v1/organisation/export 401 beside /v1/organisation/exportz 404; the live bundle carries tenant_export and not a control. Re-run: tenant-export 34/0, tenant-export api 24/0, feature-matrix 39/0, organisation-features api 36/0, no scratch database left. db/export-tenant.sh prod was not run (needs APP_RW_URL in the owner env, unmeasured; delivery channel is Q-219). Built 2026-10-10, local only; migration 0155 not on production, API and app not deployed. Shared. Commercial: Export available (tenant_export optional, a buyer admin opts in). Public: Required. Filed from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/70-public-procurement-edition-brief.md, where this slice is numbered P220 (every id in that brief is two lower than the ledger, see its header). Measured before designing (local, PG 18.6): 111 tables, 251 foreign keys (two composite); 36 tables carry organization_id, 12 only workspace_id, most others belong to a tenant only through a chain; the only fk-less organization_id/workspace_id columns are on audit_events and audit_chain_heads (0126); every trigger ENABLE ORIGIN; one generated column (framework_agreements.term_over_four_years); file bytes in R2 or a /tmp directory the database cannot reach; no zip or tar package in api/node_modules; audit_chain_heads readable only inside the chain trigger (0154 policy). Built. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0155_an_organisation_can_take_every_row_it_owns_with_it.sql: tenant_export seeded (commercial optional, public required); organisation_export() SECURITY INVOKER, timezone UTC, discovers the linked tables from the catalogue on every call and walks foreign keys from the organisation's row to a fixpoint, then adds its members' users rows (D-549, D-551); returns format procurevent-export/1, one JSON document with every linked table (97 today, empty ones included), a manifest, outOfScope platform tables and attachment records without bytes (D-552); granted with the 0123 pattern; no table created. api/src/http/tenant-export.ts + router: GET /v1/organisation/export, buyer admin only (403 by name), POST 405, falls through to No such route. when the feature is off. /Users/petermarik/Documents/event-clinic-suite/procurevent/db/export-tenant.sh <local|prod> <org-uuid> <out>: APP_RW_URL via LEDGER_OWNER_ENV in production, password never on argv, host only printed, refuses an empty URL, a superuser or BYPASSRLS role, an existing file; reads in the organisation's tenant context as its earliest active buyer admin; file mode 600 (D-550). App: app/src/components/OrganisationExport.tsx in Settings, only with tenant_export in the session's features; EN and HU keys. Test-only importer db/test/lib/import-tenant-export.sh (D-553). Draft exit plan /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/79-exit-plan-draft.md, marked draft, no public copy, no Data Act claim. Feature key added to db/test/lib/feature-seed.sh, feature-matrix-test.sh (19 keys, 38 rows, 14 optional, Public 18 on) and organisation-features-api-test.sh (fourteen shared keys, 18 on). Suites. db/test/tenant-export-test.sh 34/0: role not BYPASSRLS; format and organisation; every linked table present against a set the suite states separately; A's rows by id (request, lot, invitation, attachment with storage key, framework agreement with generated column, two members); every audit row with its hashes, chain links from seq 1, ending at A's head (head itself absent: RLS); B's id, request, attachment and email absent; supplier's submitted quote present, its DRAFT absent, CONTROL as owner the draft present; ROUND TRIP into a scratch database built by apply-migrations.sh from the manifest: all tables and rows byte-identical, zero rows mentioning B, scratch dropped and asserted gone; refused without tenant context; SECURITY INVOKER. api/test/tenant-export-api-test.sh 24/0: 401, invalid sibling 404, Commercial not opted in 404 fall-through, self-service opt-in, requester 403, admin 200 JSON attachment, nothing of the other tenants, POST 405, the command's tables equal the route's, mode 600, no overwrite, owner connection refused, empty URL refused, Public 200 without opt-in. Forced red: (1) the suite's export run as the OWNER: S's DRAFT quote is not: linked to A, hidden from A by row-level security failed (got 1), with S's SUBMITTED quote ... and audit_chain_heads is listed and empty also failing; (2) the function dropping request_lots from its output: the file carries every linked table, and only those failed naming missing:request_lots, and A's request, A's lot, A's invitation failed; (3) format changed to procurevent-export/2: the format is procurevent-export/1, for A failed in the DB suite, and in the API suite format procurevent-export/1, for C plus db/export-tenant.sh local <C> exits 0 and says COMPLETE (the command refuses an unknown format); (4) the importer comparing in Europe/Budapest: every table came back byte-identical failed naming attachments, audit_events, framework_agreements and the rest. Each restored (function re-created from the migration's own text) and green again. Battery: ./db/verify-all.sh 5185 assertions passed (baseline 5127, +58); only the two known environment failures, cron-test.sh (api/.dev.vars) and verify-procedures-real.mjs (app/.env.local, app/.env.production.local). privilege-audit.sh local exit 0, ledger 155/155, app check and verify 0, copy fence clean, surface audit clean (the app calls the route). Left out, on purpose: file contents in the export, the delivery channel for an owner-run production export, an audit row per export, and any Data Act statement, all Q-219; a customer-facing importer (D-553); supplier-side export from the app (the route is buyer admin only; the command can export any organisation with an active member). Nothing here blocks a user.
P223Data residency reviewcompleteNothing to deploy (a measured document). Its four findings against the public privacy page (D-554 to D-557) are drafted for the owner as wording to approve; the page itself is untouched (G2, owner-reserved public legal statement). Nothing to deploy (documentation only: one numbered doc, one link, log rows; no migration, no API, no app, no site change). Core. Commercial: Any provider change needs the owner. Public: Same. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P221 (every id in that brief is two lower than the ledger, see its header). Built 2026-10-10. /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/80-data-residency-review.md: 21 flows, each with data categories, personal or tender, provider, location and the file and line it was measured from. Measured: all four wrangler.jsonc files read in full (no placement, no KV, D1, Durable Object, Queue or Hyperdrive; R2 procuvent-files with "jurisdiction": "eu"; ai binding; crons 0 6 * * * and 23 * * * *; observability on); outbound hosts grepped from api/src, site/src, app/src (Brevo, Stripe, Turnstile siteverify, api.event.clinic hub and directory, Workers AI model @cf/meta/llama-3.3-70b-instruct-fp8-fast); what each payload carries read from mailer.ts, notification-mail.ts, award.ts (award mail carries request and lot titles and the buyer note), stripe.ts (metadata only from the API), hub-charge.ts (buyer billing identity), hub-delivery.ts (buyer name, request title, dates), challenge.ts (no IP), copilot.ts and worker.ts (classify is a public route sending anonymous text to the model; the API pulls email, verification and full name from Clerk once at sign-up); the CI workflows (no database credential). Not measured: .owner.env was not opened (slice rule), so the Neon region is the repository's record (README.md line 43, aws-eu-central-1), owner to confirm with ./db/migration-ledger.sh prod; every third party's processing location and every sub-processor agreement is recorded as unknown or owner to confirm, because the repo cannot show a contract and no DPA or register was found in docs/. Findings against site/src/pages/privacy.astro (read, NOT edited, G2): Workers AI not named as a purpose (D-554); tender-invitation flow to event.clinic not stated (D-555); Brevo, Stripe, Clerk regions and the "subprocessor register" not confirmable from the repo (D-556); Turnstile omitted from the table (D-557). Options for strict EU-only residency listed without a recommendation (doc section 4). Q-134 extended with five owner decisions; no new question. Linked from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/55-operating-procedures.md section 8. Checks: verify-logs-agree.mjs exit 0 (12 claims checked); build-status.py --check exit 0 (248 slices, one verified awaiting production); verify-procedures-real.mjs fails only on the two known gitignored files app/.env.local and app/.env.production.local. No forced red: no code or guard changed.
P224CI restoration and software supply chaincompleteShipped to main 2026-10-10; it RUNS only once GitHub Actions starts again (Q-106). Re-run locally: supply-chain 28/0; secret scan clean over 749 tracked files (11 allowlisted fixtures); 5 workflows parse with 12 action references pinned by SHA; cron 71/0 and verify-procedures-real.mjs ok (the two former environment failures, D-562). The supply-chain job will fail by design until the site's astro advisory is fixed (Q-220, 1 critical and 7 high). Nothing deploys, and nothing can run where it is meant to: GitHub Actions has started no run since 2026-09-22 (Q-106, owner-reserved, extended). Every piece was proved LOCALLY first. Core. Commercial: Benefits. Public: Benefits. No behaviour change, no feature key, no migration, no route, no screen. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P222 (every id in that brief is two lower than the ledger, see its header). Built 2026-10-10. Measured first: local server server_version 18.6 (client 16.14), node 26.5.0, npm 11.17.0; the four existing workflows used actions/checkout@v4 and actions/setup-node@v4, unpinned; 139 test and db files hardcode localhost:5432; site/scripts/verify-no-database-keys-on-screen.mjs is about venue-type codes, not credentials, and db/verify-no-credential-on-argv.sh checks argv handling, so neither pattern set fitted (its git ls-files scope and worktree exclusion were reused). Built: /Users/petermarik/Documents/event-clinic-suite/procurevent/.github/workflows/battery.yml ("Battery and supply chain", D-558): on push, pull request and dispatch, a postgres:18.6 service pinned by digest with trust auth, npm ci x3, ./db/bootstrap-local.sh (applies through ./db/apply-migrations.sh local), the site build, ./db/verify-all.sh; a second job runs ./scripts/supply-chain-check.sh and uploads dist/sbom/. permissions: contents: read, no secrets. reference. /Users/petermarik/Documents/event-clinic-suite/procurevent/scripts/supply-chain-check.sh: npm audit --omit=dev per api, app, site (D-559: in the script and workflow, NOT the battery), CycloneDX SBOM per deployable via npm sbom --package-lock-only --omit=dev into gitignored dist/sbom/ (D-560; api 24, app 17, site 294 components), and the secret scan; exit 0/1/2. /Users/petermarik/Documents/event-clinic-suite/procurevent/scripts/secret-scan.mjs + scripts/secret-scan-allowlist.txt (D-561): six shapes over git ls-files, prints path:line, pattern and fingerprint, never the match; 11 invented fixtures allowlisted by fingerprint and path. /Users/petermarik/Documents/event-clinic-suite/procurevent/scripts/verify-workflows-pinned.sh (D-563): every workflow parses (Ruby Psych), every uses: is a 40-hex SHA, battery.yml has permissions: and no secret. All five workflows pinned by git ls-remote to what v4 resolved to (checkout v4.4.0, setup-node v4.4.0; upload-artifact v4.6.2), no SHA invented. Secret scan and pin guard wired into db/verify-all.sh guards. The two standing environment failures are corrected, not excused (D-562): api/test/cron-test.sh's .dev.vars control counted an absent file as '', and scripts/verify-procedures-real.mjs reported gitignored app/.env.local as fiction; both keep their teeth (a .dev.vars with DATABASE_URL= still reads 1; a doc naming a non-ignored missing path still fails, measured). Proved locally: throwaway PostgreSQL 18.6 cluster on port 5499, -U postgres --auth=trust, TCP, as the service container runs it: bootstrap applied 155 migrations, ledger exit 0, privilege audit exit 0, isolation-test.sh 18/18, immutable-personal-data-test.sh 20/20; cluster removed. Supply-chain script: api 0 and app 0 advisories; site 1 critical (astro 7.1.6, direct) and 7 high, transitive -> exit 1 naming each, which is the brief's forced red with a real rather than fixture dependency; registry pointed at a dead port -> exit 2 BLOCKED for all three audits. Not fixed: astro needs a minor bump, outside the patch-only rule (Q-220). Suite db/test/supply-chain-test.sh 28 assertions, no database: real tree scans clean over 749 files; in a throwaway git repo each of the six shapes planted on a known line and named by file:line; the secret never echoed; allowlist passes its own file and CONTROLS fail the same fingerprint in another file and a different key in an allowlisted file; $VAR password, pk_live_... prose and an untracked key are not findings; outside git exit 2; the workflow guard refuses an @v4 (named by line), a secrets. in battery.yml and broken YAML; the api SBOM parses with bomFormat: CycloneDX. Forced red, five ways, each restored green: (1) AWS pattern changed to AKIB -> the AWS key id is named; (2) allowlist matched by fingerprint alone -> CONTROL: the same fingerprint in ANOTHER file still fails and CONTROL: and is named; (3) finding echoes the match -> the output never echoes the password and ... the sk_live_ value; (4) pin guard accepts any ref -> an action pinned by tag fails the guard and and is named by file:line; (5) YAML parse removed -> a workflow that is not valid YAML fails the guard and and is named. Battery: 5214 assertions, exit 0, nothing failed, nothing blocked (baseline 5185 + two known failures; +28 suite, +1 cron control now passing; load 36). Not proved, said plainly: the full battery on a FRESH cluster (the hardcoded port collides with the local server), node 22 in CI (local is 26.5), and anything about GitHub's runner. The supply-chain job will fail until Q-220 is fixed, by design. Who moves pinned SHAs: Q-221. Postgres image pinned by Docker Hub digest for tag 18.6.
P225Cyber Resilience Act readinesscompleteNothing to deploy (two documents and a guard extension). The disclosure policy is a draft for the owner (docs/83, not published, G2); scope, triage target, mailbox and the production PostgreSQL version are Q-141. Nothing to deploy (documentation only: two numbered docs, two links, one guard extended, log rows; no migration, no API, no app, no site change). Core. Commercial: Benefits. Public: Benefits. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P223 (every id in that brief is two lower than the ledger, see its header). Built 2026-10-10. /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/82-cra-readiness.md: (1) what ships and how: API, app, site and redirect are Cloudflare Workers (four wrangler.jsonc read; the app is static assets, no main), the directory sync agent is internal on the owner's Mac; git ls-files finds no mobile app, extension, desktop build, service worker, bin or published package, so nothing is installed by a customer (D-564); (2) component inventory from ./scripts/supply-chain-check.sh SBOMs (CycloneDX 1.5, --omit=dev --package-lock-only): api 24, app 17, site 294 components; 9 direct runtime dependencies with range, resolved version and licence (all MIT); licence census per package (site includes LGPL-3.0-or-later sharp libvips and MPL-2.0 lightningcss, build-time); platforms: Workers compatibility_date 2026-07-30, CI Node 22 and postgres:18.6, local PostgreSQL 18.6 measured, production Neon PostgreSQL 17 by record only (not re-measured, no production; Q-141 item 5); (3) vulnerability status line as re-measured: api 0, app 0, site 1 critical (astro direct) + 7 high + 1 moderate, unfixed (Q-220); (4) proposed workstream rule (D-565), triage target left as an owner placeholder; (5) what the CRA would require if in scope, citing only docs/70 with its labels (R-65 VERIFIED (Commission summary), the #### P223 workstream list, #### P219 Art. 14 line, the sync-agent inference), marked not legal advice. /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/83-vulnerability-disclosure-policy-draft.md: DRAFT, NOT PUBLISHED; reports to security@procurevent.com, the address /terms already publishes (lines 76, 191); every timing an owner placeholder; safe harbour for counsel; finding: /terms section 5 (lines 79-87) conflicts with a safe harbour (D-566). No security.txt, nothing under site/ (G2). Both linked from /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/55-operating-procedures.md section 8. scripts/verify-procedures-real.mjs now also checks doc 82 (64 paths). Forced red twice: a short docs/70 citation in doc 82 failed it (names docs/70, which does not exist, fixed to prose); an appended api/wrangler-gone.jsonc failed it (names api/wrangler-gone.jsonc, which does not exist); restored, ok. Not done, deliberately: scope not decided (Q-141 item 1); no dependency changed (Q-220); nothing published (Q-141 items 3, 4); mailbox delivery not checked (owner). Q-141 extended with five items; D-564 to D-566; no new question. Checks: verify-logs-agree.mjs exit 0 (12 claims); build-status.py --check exit 0 (248 slices); verify-procedures-real.mjs ok (4 documents, 64 paths); secret-scan.mjs clean over 751 tracked files (11 allowlisted); supply-chain-check.sh findings audit:site only (Q-220), SBOMs written. Full battery not re-run: no code changed (baseline 5214, exit 0).
P226Accessibility conformance and statementcompleteNothing to deploy (a guard in the app verify chain, a procedure, a draft statement; the guard found no real finding, so no app source changed). Keyboard walk-through and screen-reader pass need a person (procedure in app/scripts/measure-screens-in-a-browser.md section 5); the statement is a draft (docs/84, G2, Q-139). Nothing in the app bundle changed, so nothing needs deploying: the slice adds a battery guard, a procedure, a draft and log rows; no migration, no API, no app source, no site change. The orchestrator may mark it complete after merging. Core (conformance), Public-only (statement). Commercial: Benefits. Public: Statement required. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P224 (every id in that brief is two lower than the ledger, see its header). Built 2026-10-10. Measured first (D-567): the statically decidable WCAG 2.1 AA criteria were mapped against the guards already running; covered and not duplicated: 1.3.1 headings (verify-screen-has-h1), 1.4.3 (verify-token-contrast), 1.4.10 (verify-tables-scroll), 2.5.8 (verify-touch-targets), 3.1.1 (verify-i18n-catalogue), 3.3.1 (verify-forms-mark-invalid), 4.1.2 expanded state (verify-disclosures-announce), 2.4.6 (verify-per-item-button-names.py). Built /Users/petermarik/Documents/event-clinic-suite/procurevent/app/scripts/verify-a11y-static.mjs (no new dependency, no axe-core) for the rest: 1.1.1 NONTEXT, 1.3.1 LABEL / TABLE / IDREF, 2.1.1 KEYBOARD, 2.4.2 TITLE, 2.4.3 TABORDER, 2.4.7 FOCUS (CSS in app/src and shared/tokens), 4.1.2 NAME / ARIA; empty ALLOW; a floor fails a scan that saw nothing. Wired as verify:a11y at the end of app/package.json verify, which db/verify-all.sh runs as "app guards". Noise on the current tree: first run 9 findings, all false positives (tags inside code comments); comments now blanked; second run 0 findings over 69 files, 219 form controls, 210 buttons, 64 links, 608 CSS rules, so no app fix was needed (D-568; agrees with the 2026-09-05 browser sweep, 829 controls, 0 nameless). Forced red: (1) a planted temp screen and stylesheet with 11 violations, each named by file:line: NONTEXT img, LABEL input, KEYBOARD div onClick, NAME icon-only button, ARIA aria-labeledby, ARIA role="buton", TABORDER tabIndex={3}, IDREF missing-hint, TABLE no th, KEYBOARD <a> without href, FOCUS .zz-plant:focus; (2) real AppShell.tsx broken (organisation select unwrapped from its label, document.title removed): AppShell.tsx:339 LABEL and TITLE both named; (3) doc 84's evidence table pointed at a renamed guard: verify-procedures-real.mjs failed names app/scripts/verify-token-contrast-gone.mjs, which does not exist; all restored, green. Keyboard walk-through: NOT DONE, pending a person (D-569): procedure written as section 5 of /Users/petermarik/Documents/event-clinic-suite/procurevent/app/scripts/measure-screens-in-a-browser.md; not run because the launch.json dev servers serve the main checkout on ports other sessions held. Screen-reader pass: not done, needs a person (docs/57 still lists it untested). Statement: /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/84-accessibility-statement-draft.md, DRAFT, NOT PUBLISHED (G2), English and Hungarian (Hungarian needs native review), feedback to hello@procurevent.com (published in site/src/lib/site.ts line 16, /imprint, /terms), no conformance claim, compliance status, publisher, EN 301 549 version and complaint route left to owner and counsel; known gaps listed, including untranslated screens under <html lang="hu"> (D-466). Doc 84 joins scripts/verify-procedures-real.mjs (75 paths). Left out, deliberately: the complaint route and authority (R-59 is paraphrase, Q-139); any publishing (G2); a fix for the lang gap (it ends as screens are translated). D-567 to D-569; Q-139 extended (five items); no new question. Checks: db/verify-all.sh exit 0, 5214 assertions, nothing failed (guards add no assertions); app check and verify ok; verify-logs-agree.mjs exit 0; build-status.py --check exit 0.
P227Record the legal routenot startedPublic-only. Commercial: Off. Public: Gated. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P225 (every id in that brief is two lower than the ledger, see its header). Gated on G3 — an owner decision in words, a written legal opinion on 424/2017 2. § (2)-(4) and Kbt. 40. § (1), 41. § (6) and 41/A-41/C, and an answer from the EKR operator.
P228Organisational prerequisites of an "other IT system"not startedPublic-only. Commercial: Off. Public: Gated. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P226 (every id in that brief is two lower than the ledger, see its header). Gated on G3 — an owner decision in words, a written legal opinion on 424/2017 2. § (2)-(4) and Kbt. 40. § (1), 41. § (6) and 41/A-41/C, and an answer from the EKR operator.
P229Sealed tender vault and receiptnot startedPublic-only. Commercial: Off. Public: Gated. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P227 (every id in that brief is two lower than the ledger, see its header). Gated on G3 — an owner decision in words, a written legal opinion on 424/2017 2. § (2)-(4) and Kbt. 40. § (1), 41. § (6) and 41/A-41/C, and an answer from the EKR operator.
P230Opening and the opening recordnot startedPublic-only. Commercial: Off. Public: Gated. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P228 (every id in that brief is two lower than the ledger, see its header). Gated on G3 — an owner decision in words, a written legal opinion on 424/2017 2. § (2)-(4) and Kbt. 40. § (1), 41. § (6) and 41/A-41/C, and an answer from the EKR operator.
P231Outage and malfunction regimenot startedPublic-only. Commercial: Off. Public: Gated. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P229 (every id in that brief is two lower than the ledger, see its header). Gated on G3 — an owner decision in words, a written legal opinion on 424/2017 2. § (2)-(4) and Kbt. 40. § (1), 41. § (6) and 41/A-41/C, and an answer from the EKR operator.
P232Notices and EKR interoperabilitynot startedPublic-only. Commercial: Off. Public: Gated. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P230 (every id in that brief is two lower than the ledger, see its header). Gated on G3 — an owner decision in words, a written legal opinion on 424/2017 2. § (2)-(4) and Kbt. 40. § (1), 41. § (6) and 41/A-41/C, and an answer from the EKR operator.
P233Conformance testing and independent reviewnot startedPublic-only. Commercial: Off. Public: Gated. Filed from docs/70-public-procurement-edition-brief.md, where this slice is numbered P231 (every id in that brief is two lower than the ledger, see its header). Gated on G3 — an owner decision in words, a written legal opinion on 424/2017 2. § (2)-(4) and Kbt. 40. § (1), 41. § (6) and 41/A-41/C, and an answer from the EKR operator.
P234The page and the API must agree about the challengecompleteThe production probe reported 21 passed, 0 failed while the public contact form could not be sent by anybody. P190 shipped the Turnstile gate on the API and verified it three ways; what nobody measured was whether the page a visitor is actually served can satisfy it. It cannot: the procurevent.com edge is handing out an older build of /contact with no widget, so every real submission arrives with no token and is refused. A visitor is not lost silently — the API answers a browser form POST with 303 to /not-sent, which says so and offers hello@procurevent.com — which is the only reason this is a morning job. The origin is correct, and that took three measurements to establish rather than one, because a stale cache and a failed deploy look identical from a browser. procuvent-site.marikpeter.workers.dev/contact serves the widget; wrangler deploy compared 7 031 files and had none to upload; and the new probe passes against the origin host and fails against the zone with the same API and the same code in both runs. Two wrong turns on the way, both worth keeping. First, curl without -L measured the body of a 307 and found no widget — a probe that reads a redirect stub has measured nothing, the same class of error as the status board answering 200 to every path. Second, the asset-hash comparison that seemed to prove both hosts ran the same build proved nothing: the CSS had not changed between the two builds, so identical hashes were consistent with two different deployments. The control that actually discriminated was a page whose content had changed — /cookies, amended in the same slice to name Turnstile — and it differs between the hosts too. The cache key ignores the query string: /contact?bust=589410460, a URL never requested before, answered cf-cache-status: HIT. So no reload, no cache-buster and no deploy can clear it. A dashboard purge can, and that is the owner's: doc 71. What shipped here is the assertion that makes this class of fault impossible to miss, in scripts/probe-production.sh: the page must carry a widget whenever the API demands a token, with two controls of its own — that the body being read really is the contact form (the honeypot field, which lives on that page and no other, because a 404 or a redirect stub would also show no widget and be right by accident), and that the refusal really is about the challenge rather than a blanket 400 (a differently invalid body must be refused differently). The probe POST carries the honeypot on purpose: while the gate is on the challenge refuses it before anything is written, and if the gate is ever off the honeypot suppresses the alert, so a probe reporting a missing gate cannot mail the owner about itself. Forced both ways rather than sabotaged: FAIL against procurevent.com, ok against the origin host, same run of the same file minutes apart. The first version of the assertion posted form-encoded and read the 303 as an absent gate — it failed, correctly, for the wrong reason, and reported "no widget and no gate" while the gate was demonstrably on. Verified: everything above. Could not check: whether the purge clears it, which needs the dashboard. D-416; Q-157. AMENDED THE SAME DAY, AND THE AMENDMENT IS THE MORE USEFUL HALF (D-418). The assertion named /contact, and grepping for siblings found /supplier-registration posting to the same PUBLIC_FORM_ENDPOINT, carrying the widget in source, and serving a cached build without it: a second public form nobody could send, which the original assertion would never have reported. The gate is on the endpoint, so a check naming one page is a guard on one caller of a shared function. The probe now derives the list from action={FORM_ENDPOINT} in site/src/pages/*.astro -- discovered, not listed, for the reason the battery's orphan check exists -- and asserts each path, with a control that the discovered list is non-empty and prints what it found. Measured both ways again: 2 FAILED against the zone, both ok against the origin host. Doc 71 now names both paths to purge and /cookies.
P235A suite that does not own its port measures somebody elsecompleteThe battery lost 25 of categories-api-test.sh's 34 assertions to a wall of 401s where it expected 400 and 404, at load average 277, and passed 34/34 alone on the same tree minutes later. No code was wrong. The suite was measuring a server that was not its own. The mechanism to prevent this already existed and let it through. api/test/lib/wait_for_own_server asks lsof who holds the port and refuses to measure anything if it is not us -- and it accepted our pid being ANYWHERE in the holder list. Two processes can hold one port at once: one bound to 127.0.0.1 and one to [::1], or either with SO_REUSEPORT. lsof lists both, our pid is present, the check passed, and whichever the kernel hands the connection to answers. It now demands sole ownership, which is correct because serve-api.mjs is one process and binds dual-stack as one pid (verified 2026-08-31). Forced red by arranging the exact condition, two listeners on port 8951, one per stack: the new branch BLOCKS and names it -- "Ours is among them but NOT ALONE" -- where the old code would have proceeded. The pre-existing branch still blocks when our pid is absent entirely. Both return 2, BLOCKED, not 1 -- nothing was measured is a different fact from a failure, which is Q-044's rule. This is the third time this symptom has been measured: Q-079 (catalog, one assertion), 2026-08-31 (issue, twelve assertions, load 27), and this one -- the first with the check already in place, which is why the check itself was the defect. And a new guard stops a suite skipping it at all, db/verify-own-server-check.sh, wired into the battery: 36 suites start a server and all 36 assert ownership. Its rule is "BACKGROUNDS the server", not "mentions one" -- the first version reported faults-test.sh, which greps serve-api.mjs as a SOURCE file to assert both servers record a fault and starts nothing. Forced red by name, exit 1 sabotaged and 0 restored. Verified: the two branches, the guard both ways, and categories-api-test.sh 34/34 after the change. Could not check: that the original failure cannot recur under a different mechanism -- sole ownership closes the holder-list hole, not every race a loaded machine can invent.
P236The apex pointed at a Worker nobody deployed tocompleteBoth public forms were unusable for most of a day and the cause was that site/wrangler.jsonc declared no route. api, app and redirect each name their custom domains in config; the site named none. So four wrangler deploy runs all landed on procuvent-site, which no hostname pointed at, while procurevent.com served an older build of the same site -- identical but for the Turnstile widget -- and the API refused every tokenless submission. Visitors were told: a browser form POST answers 303 to /not-sent, which offers hello@procurevent.com. Ruled out first, each by measurement, not by reasoning: no Pages project serves this site (14 exist, none of them it); the procuvent Worker that Cloudflare Workers Builds deploys within the same minute as every push -- 12:03Z and 14:21Z against pushes at 12:03Z and 14:21Z -- is the stray API build this repository already recorded, not the site; and the apex serves only static pages, /v1/* answering the site's own 404, so nothing was proxying an API through it and nothing would be lost by moving it. THREE CONFOUNDED CONTROLS CAME FIRST, AND THEY ARE WORTH MORE THAN THE FIX. Each one looked decisive and each sent this session down a wrong path, one of which cost the owner two pointless cache purges. (1) cf-cache-status: HIT on a never-requested query string read as a zone cache rule ignoring the query -- but Workers static assets report HIT from their own store, for correct and stale content alike, which the CSS asset proved by reporting HIT while being current. (2) Every page's md5 differing between the apex and the workers.dev hostname read as a different build -- but the zone injects Cloudflare's bot-detection script into every HTML response, so the two could never have matched. (3) An identical etag on the shared CSS read as "the same asset store, so it must be the cache" -- but an etag is an md5 OF THE CONTENT, so unchanged bytes give the same etag from any store on earth. The rule the three of them teach: only content that DIFFERS between builds can discriminate between builds. /cookies, amended the same day to name Turnstile, was the control that finally held, and the diff of /contact between the hosts showed exactly two differences -- Cloudflare's injected script and the Turnstile markup -- which is what named the cause. The fix is two lines of config and one that is easy to lose: the apex is declared, and workers_dev is declared back ON, because declaring routes turns it off by default and that hostname is the only way to read this Worker from outside the zone. The apex cannot be its own control. Verified against what production serves, not against a deploy exiting 0: both forms carry the widget and the sitekey, /cookies names Turnstile twice, /suppliers still serves 695 796 bytes unchanged, and scripts/probe-production.sh reads 25 passed, 0 failed, 1 blocked where it had read 23 passed, 2 failed. The two form assertions that failed all afternoon now pass, and they were proved both ways earlier in the day against the two hostnames. Could not check: which Worker held the apex before, which only the dashboard shows -- it is simply no longer holding it.
P237The decisive events reach a person who is not looking at the screencompleteQ-095 answered. Four events are emailed hourly -- an invitation received, a quote or submission received, a clarification answered, and a submission deadline inside 24 hours -- on the owner's instruction, in his words, "Email the decisive events only". Migration 0133 creates NO table: two SECURITY DEFINER functions, one partial unique index, four function grants through the 0123 counter, 14 catalogue-only assertions. Where the schema corrected the brief, and two corrections changed the slice. notifications.emailed_at has existed since 0061 and had never been written on either database, so nothing was added -- the claim is an UPDATE of it. And award.issued was already emailed by api/src/http/award.ts through the same mailer with its own send-once state, so the brief's five events are four: including it would have double-mailed a supplier, which is the one thing the slice forbids, and 0133 assertion 7 now fails if anyone re-adds it. NOTHING IS SENT TWICE AS A DATABASE GUARANTEE, not as care in the code: one UPDATE ... SET emailed_at = now() ... WHERE emailed_at IS NULL RETURNING, raced by six concurrent processes in the suite. The finding that changed the design (D-427) is the most valuable thing here. The first version took a pg_try_advisory_xact_lock to make the daily cap exact. Deleting the stated guarantee AND t.emailed_at IS NULL then left the suite green at 50 passed, 0 failed -- the lock returned the second pass empty-handed before it ever reached the UPDATE, so the send-once guarantee was unreachable and untestable: dead code with a test standing in front of it. The lock is gone, the race is in the suite, and the same sabotage now fails by name. The cost is stated rather than hidden: the cap can be exceeded under two SIMULTANEOUS passes, and one hourly cron is one pass. Suites: 53 against the database as procuvent_app_rw with rolbypassrls asserted false, and 56 driving the sender with no psql, no DATABASE_URL and no server at all. Forced red 13 ways, each restore armed first and verified -- the database restores by re-running the migration whose md5 was recorded first, the API by a byte-exact copy re-verified after each. Two sabotages found gaps rather than confirming the work: a fault detail carrying an address stayed green because redactErrorText removed it, which was correct behaviour and an accident until it was asserted; and the copy-discipline scanner fired on its own email because "TED" matched "invited", so it now matches acronyms as words. Two guards caught real defects in the test file itself: six backticks inside an unquoted heredoc, which the shell would have executed, and is_platform_actor() asserted only false. Integration, all mine. notify-mail registered in the battery's ordered list -- it was a confirmed orphan, which fails the battery. The pass hangs off the hourly cron rather than getting one of its own, and sequentially after the self-check, which is load-bearing: 0133 drops the cap's exactness under simultaneous passes, so one pass at a time is what keeps both properties, and a failing self-check must not stop the mail. And the screen stated a falsehood the moment this shipped. app/src/screens/Notifications.tsx said "Procurevent does not email them, including anything marked Needs you". It now names what is emailed and says the rest is here only -- narrow on purpose, because four types are emailed and the feed carries more, so "everything here is emailed" would be the same falsehood in the direction a person discovers by missing something. It claims no digest, no preference and no choice of address, because none of that is true: the address is the person's own sign-in address and Q-164 is open on whether an opt-out should exist. A guard tying that paragraph to the claimed set is NOT built, and should be -- the copy went stale because a real feature landed, and it will again. Verified: everything above, re-measured here. Could not check: a real provider send (the stub path and the redirect valve were used instead), and two concurrent passes from two Workers. D-423 to D-427; Q-163 to Q-166. Receipt: battery on the combined tree of all three slices -- 3382 assertions, nothing failed, nothing blocked -- then 0133 and 0134 applied to production, ./db/migration-ledger.sh prod 134 of 134 present, ./db/privilege-audit.sh prod every table matching the model, API deployed as version 9e370a94 carrying both cron triggers, and scripts/probe-production.sh 28 passed, 0 failed, 1 blocked on sign-in.
P238The scheduled work runs on Cloudflare, and says what it cannot seecompleteGitHub Actions has started no run since 2026-09-22 -- 41 consecutive startup failures with no jobs -- so the production probe, the nightly rebuild and both deploy workflows have been dead for eleven days and nothing raised an alarm, because a run that never starts has no failing job to notify about. The owner chose, in his words, "Move the schedules onto Cloudflare". A new hourly cron 23 * * * * runs a self-check beside the untouched daily 0 6 * * *: the database and its row counts, whether a mailer can be constructed, whether every recipient is being rewritten, whether the app's own origin may call a tenant route while a foreign one may not, whether its own previous firing happened, and whether the daily watchdog is still firing. It reports through the path that already works -- 0122's heartbeat and SYNC_ALERT_EMAIL -- so no migration was needed. WHAT IT CANNOT SEE IS NAMED IN EVERY MAIL IT SENDS, so the owner cannot read it as a clean bill of health: the marketing site, the app bundle, whether anybody can sign in, the status board, anything the edge adds or caches, and -- structurally -- that the Worker is down. A monitor inside the thing it monitors reports nothing when that thing stops, which is the same shape as 41 GitHub runs failing unseen. It is not a replacement for probe-production.sh. The honest "cannot": the directory rebuild does not move. A Worker cannot run Astro, site/ is assets-only with no main so there is no Pages deploy hook, Workers Builds fires on a git push a Worker cannot make, and workflow_dispatch needs the dead Actions plus a new credential. But "it cannot be scheduled" would have been wrong by one measurement: launchd already runs com.procurevent.sync on this machine, and with the apex now declared on procuvent-site (P236) this machine has a proven path for work that needs a real one. D-431. Q-167 is the hole that matters more: five gates exist only inside the dead workflow file -- the empty-directory refusal, the CSP script-hash check, the third-party-asset check, the Markdown-in-prose check and the lead-form check -- and the documented hand-run path runs none of them, so the next rebuild can publish two empty directory pages exactly as 2026-08-28 did. Mail is capped at one per six hours by a second heartbeat row, because an hourly check turns one alarm into ninety-six ignored emails. Two deliberate oddities: job_ran_recently coalesces a missing row to false, so two calls are what tell "never ran" from "stopped" -- without it the first firing after every deploy mails a false alarm; and the "production cannot send email" finding cannot be mailed, says so in its own text, and lives in the heartbeat instead. Suite 71 assertions, driven through wrangler dev --test-scheduled rather than a clock. A sabotage proved its own behavioural section worthless: with the cron constant drifted, every behavioural row still passed because the suite asked /__scheduled with the constant's own value and the handler agreed with itself. It now drives the crons wrangler.jsonc declares and asserts the set. The dispatch was mine and it was urgent. With the hourly trigger declared and scheduled() ignoring event.cron, the DAILY watchdog would have run hourly and mailed the owner up to 24 times a day -- caught before it ever deployed. An unrecognised cron now runs NOTHING and records a fault, which reverses an assertion this suite originally made the other way round: it required a fall-through to the watchdog on the reasoning that the safe default mails least, but that is still a default and the thing it defaults to sends mail. 0118 supplies the other half -- the unwired trigger is written where recent_server_faults() will carry it, because silence is not the alternative to a wrong default. Forced red twice by name with md5-verified inverse-edit restores, and the reversal carries a control proving a recognised cron still runs its job in the same session, without which both new rows would pass against a handler that runs nothing at all. Verified: everything above. Could not check: that the cron fires on Cloudflare -- the handler was driven, not the scheduler -- and the zero row-count threshold is uncalibrated against production (Q-169). D-428 to D-431; Q-167 to Q-169. Receipt: battery on the combined tree of all three slices -- 3382 assertions, nothing failed, nothing blocked -- then 0133 and 0134 applied to production, ./db/migration-ledger.sh prod 134 of 134 present, ./db/privilege-audit.sh prod every table matching the model, API deployed as version 9e370a94 carrying both cron triggers, and scripts/probe-production.sh 28 passed, 0 failed, 1 blocked on sign-in. THE CRON FIRES — CONFIRMED 2026-10-04, and the first reading was wrong for a reason worth keeping. wrangler deploy printed both schedules, 0 6 * * * and 23 * * * *, at 17:17Z. Measured at 17:25Z: job_ran_recently('worker-self-check', '36500 days') is false -- it has never run -- while sync-watchdog is true ever and false within 95 minutes, which is exactly right for a daily 06:00 job read at 17:25. server_faults holds zero rows ever, so nothing failed either. That reading was correct: a cron registered at 17:17 does not fire at 17:23. Re-measured 2026-10-04: job_ran_recently('worker-self-check','95 minutes') is t on production, and worker-self-check-alert has NEVER fired — so the job is running hourly and finding nothing wrong. The alert heartbeat being absent is the evidence that matters: it is written only when something is wrong, so its absence and the job's presence together say healthy, where either alone would not. HOW TO CHECK IT, AND THE TRAP THAT COST FOUR MEASUREMENTS HERE. job_heartbeats has row-level security enabled and forced, so selecting it as app_rw returns nothing at all whether or not rows exist -- which is what first led this session to conclude the watchdog had never written one. job_ran_recently() is SECURITY DEFINER and is the only way that role can see them: it returned t for sync-watchdog in the same breath as the direct select returned nothing. Ask the function, never the table. The right question is select job_ran_recently('worker-self-check','95 minutes') through APP_RW_URL. So production has not yet mailed anything either, and that was checked before the first firing rather than after: production holds zero notification rows, so the mail pass can mail nobody on its first run, and 0133's 48-hour news floor would exclude old rows in any case.
P239An account records which terms its owner acceptedcompleteMeasured 2026-10-03: nothing anywhere recorded terms acceptance -- no column, no table, no code path -- while /terms is published and names Event Clinic Kft as the counterparty. The product was about to be sold self-serve on a contract no record proved anyone agreed to. Migration 0134: terms_acceptances with the person, the organisation, the document, its version, its sha256 and the moment; RLS forced, four named policies one per granted verb, three named CHECKs, a unique index, 13 catalogue-only assertions. Update and delete are is_platform_actor() only -- a tenant can neither rewrite nor destroy its own acceptance, which is the side of a dispute the product must not help. How the text is pinned, and the finding about the terms page. site/src/pages/terms.astro publishes no version string at all; its only identifier is a "Last updated" line derived from git log -1 --format=%cs, and that layout's own header admits the date tracks the last commit to TOUCH the file, not the last to change the wording -- all three legal pages moved to 2026-09-06 when an attribute was edited and no term changed. The page nevertheless promises that the date reflects the current version. So the date cannot produce the text, and the record carries a sha256 of the file, which names exactly one blob in git history and needs no archive. Both the hash and the label are server-held: a version the caller chooses is a version an attacker chooses. Verified here independently -- the server's constant equals shasum -a 256 of the real file. Q-170. Where the sign-up path corrected the brief, and it decided the schema. "The one place a new account comes into being" is two: POST /v1/invitations/accept also brings an account into being, and it is how every colleague after the first arrives. A record written only at sign-up would have held every invited colleague to the founder's click, made in a screen that named only themselves. So the subject is the person, one row per person per organisation, and both routes record their own -- probed live, a founder and an invited colleague leave two rows. No router.ts change was needed, and no SECURITY DEFINER function either: both paths write under the same INSERT policy, where a definer would have had the owner insert it and the owner carries BYPASSRLS, so the policy would never run on the path that matters most. Suite 42 assertions, every write probe rolled back. Forced red five ways by name, including a sabotage that added a forbid_mutation trigger to make a ninth append-only table: six failures, the last of them erasing the person erases their acceptance, which is D-016's whole claim measured rather than asserted. Two real defects found by running things rather than by review. Its section 8 counted the WHOLE table and expected zero: it passed alone and failed in the battery on three legitimate rows written by provisioning-api-test.sh founding organisations through the product -- the assertion was the poisoner, now scoped to its own fixtures with a control. That is Q-109's lesson arriving in a third place, after contracting-authority-test.sh. And both screens carried <span className="req">*</span> where .req is styled only as .label .req, so inside a .checkline the asterisk would have rendered unstyled black instead of the danger colour -- the 20 app guards did not catch it, because the class name resolves; they do not check selector scope. The gate fails closed, and that cost 19 call sites across 9 suites (D-435, Q-171). Integration was mine: measured at 400 POST /v1/signup and provisioning-api-test.sh at 40 passed 5 failed, then the acceptance field added to seven body VARIABLES and ten inline bodies -- variables where a second key would otherwise sit inside $( ), which bash brace-expansion tears in half and verify-no-inline-json-bodies.sh forbids. All nine suites green afterwards: provisioning 45, journey 87, catalog 81, auction 49, contract 43, invoice 36, copilot 25, dashboard 43, claims 31. The guard still passes. Verified: everything above, re-measured. Could not check: the two screens in a browser -- both render only for an authenticated-but-unprovisioned session or a live invitation token, and sign-in is blocked on Q-103. D-432 to D-436; Q-170 to Q-173. Receipt: battery on the combined tree of all three slices -- 3382 assertions, nothing failed, nothing blocked -- then 0133 and 0134 applied to production, ./db/migration-ledger.sh prod 134 of 134 present, ./db/privilege-audit.sh prod every table matching the model, API deployed as version 9e370a94 carrying both cron triggers, and scripts/probe-production.sh 28 passed, 0 failed, 1 blocked on sign-in.
P240A screen may not deny something the database sendscompleteP237 made a sentence false in one commit and nothing in the repository noticed. app/src/screens/Notifications.tsx had said "Procurevent does not email them, including anything marked Needs you" for months, and it was true for all of them -- notifications.emailed_at existed from 0061 and was never written. The migration, the sender and all three suites were correct and green; the only thing wrong was a sentence a user reads and acts on. db/verify-email-claim-is-true.sh now reads the notification types out of 0133 and fails if the screen denies email while any of them is sent. THE RULE IS ONE DIRECTION ONLY, ON PURPOSE. It checks for a NEGATIVE claim, because that is the error a person discovers by missing something they were told would not arrive. The opposite drift -- promising email for a type that is not sent -- is real and is NOT checked, because it would need a phrase-to-type mapping, which is a third copy to keep in step, and CLAUDE.md records a guard deleted for crying wolf. The guard is not "the copy is accurate"; it is "the copy does not deny something that happens". Its own first run accused the code of the defect it was written to prevent. It grepped the whole file, so it fired on the COMMENT that explains the fix, which quotes the old sentence verbatim. The natural response to that failure would have been to delete the guard. It now strips /* */ blocks and // lines first and reads only rendered copy -- a detail worth more than the guard, because a false positive on the comment explaining a fix is how a correct guard gets removed. Forced red both ways, and the two exits mean different things. The old sentence restored as rendered copy: exit 1, naming the phrase. The copy moved so no email sentence can be found: exit 2, BLOCKED -- because the absence of a denial in a file the guard cannot read proves nothing, and a renamed file or copy moved into a component would otherwise read as a pass. Restores verified by git status returning clean. Verified: both branches and the control. Could not check: that the sentence a reader actually sees is the one in this file, since the screen renders only for a signed-in session (Q-103).
P241The deploy gates that only existed in a dead workflowcompleteFive gates lived only inside .github/workflows/nightly-site-rebuild.yml, which has not run since 2026-09-22 (Q-106, 41 startup failures with no jobs), and the documented hand path cd site && npm run deploy is astro build && npx wrangler deploy, which ran none of them. This session deployed the site three times today by that path and got away with it. Q-167, raised by the P238 builder, which is how it was found. Three of the five were already scripts in site/scripts/ and already in the battery -- the CSP script-hash check, the third-party-asset check and the Markdown-in-prose check -- so they are not repeated. Two were only ever workflow steps, and they are the two that inspect dist/, which is the only place their faults are visible: every one of them is a build that SUCCEEDED and produced the wrong pages. site/scripts/verify-built-site-is-publishable.sh now carries them and sits between the build and the deploy in package.json, so the gate cannot be skipped by using the documented path. The floors are not decoration. On 2026-08-28 a deploy published two EMPTY directory pages over pages that had thousands of rows the day before, because an upstream change made the sync return nothing and every other gate passed. Counted two ways -- server-rendered dircard elements and the records in the page's own filtering JSON -- because either alone would miss a build that rendered one and not the other. Measured on the current build: 1 501 venue entries and 4 314 supplier entries, which match what the production probe reads off the live pages. The form gate is NOT "a form exists", and the distinction is the whole point. A build with no endpoint renders a mailto: instead, and that is a legitimate build -- it is what a local npm run build produces on purpose. The rule is that whatever the build decided, the two halves must agree: a form that posts to the API while carrying no widget is refused for every visitor, which is exactly what shipped this morning and broke both public forms for most of a day. A page with neither a form nor a mailto also fails, because then a visitor has no way to make contact at all. Forced red on the two faults that really happened. The widget stripped from a page that posts to the API: refused, naming the page. The venue directory emptied: two failures, the no-cards check and the floor. Restores verified by re-running the gate green. Verified: both branches, and the gate passing on the build currently live. Could not check: the three gates already in the battery were not re-proved here. Still open: Q-167's other half -- the rebuild has no schedule at all, so an opting-in supplier still never reaches the live directory, and launchd on this machine is the path P238 identified for it.
P242An invitation reaches the supplier's own workspacecompleteP4-C8, owner P3-S (2026-10-07), work items 1 and 2. Built 2026-10-07 in a cloud container that could run no suite; finished and shipped the same day on a machine that could. Two defects the untested build carried, both found by the first real run of api/test/hub-delivery-test.sh and both in 0135: (1) ON CONFLICT (invitation_id) inside hub_deliveries_due() is ambiguous against the implicit OUT variable of the same name from its own RETURNS TABLE, so the function installed cleanly, passed all three of its in-migration assertions, and threw on the first call that had work to do — fixed with #variable_conflict use_column, which settles all ten OUT names at once; (2) the retry backoff was gating new work as well as retries, so an award made minutes after a successful invite was not offered to the hub for fifty more — D-442. Verified, on this machine: ./api/test/hub-delivery-test.sh 50 assertions, 0 failed. Forced red by name: the EXISTS approved-claim clause was removed from hub_company_key on the database and LINKED was NOT sent (the claim check, by name) failed, with five siblings; the clause was restored by dropping the objects and re-applying 0135 from the file, and the suite returned to 50/0 — so what passes is the file, not a hand-patched database. ./db/verify-all.sh 3432 assertions, nothing failed, nothing blocked. ./db/apply-migrations.sh prod applied 0135 and re-measured: ledger 135 of 135 present on prod, grant loop reported granted the hub delivery to app_rw (the production role, not local's procuvent_app_rw), all three assertions passed. ./db/privilege-audit.sh prod 91 tables and 5 views, every one matches the model; hub_invitation_deliveries carries all four verbs under RLS. ./scripts/deploy.sh api deployed procuvent-api with HUB_BASE=https://api.event.clinic bound and both cron schedules registered, and the probe answered 401 on /v1/session beside 404 on /v1/sessionz, 200 on /v1/health beside 404 on /v1/healthz — the controls differ, so the routes were measured. PROCUREVENT_HUB_TOKEN is present on the procuvent-api Worker (name and type only; no value was read). The hourly cron was observed to fire, 2026-10-07 21:23:20 UTC: hub: ran, due 0, invited 0, decided 0, failed 0. ran is true only when the token and a usable https base are both present, so that line is the evidence the secret is set. Could not check: that the token's VALUE matches the sha256 event.clinic registered. With due 0 nothing left the Worker, so the hub was never asked to judge it — Q-176 stays open and the first real invitation is what settles it. Nothing on production is due because production holds one request and no supplier with an approved event.clinic listing claim. Three repairs outside the slice, all forced by running the battery for the first time since the slice was written: api/test/documents-api-test.sh installed a fixture-teardown trap ... EXIT and then replaced it with a second trap for the file-store sabotage — bash does not stack them, so every run past that point leaked its whole fixture. 141 orphaned organisations, 144 users and 48 roles had accumulated since 2026-09-30, and they surfaced only on 2026-10-07, when ten orphaned tenders' now()+5 days deadlines drifted into the reminder clock's 24-hour window and db/test/notification-mail-test.sh began counting eleven where its control expects one. Both traps now call one fixture_teardown function; the residue was cleared from local; a run after the fix left zero rows where the run forty minutes before it left seven. db/verify-all.sh never ran the new suite — it was an orphan — and hub-delivery is now in API_SUITES. db/verify-unasserted-tables-are-empty.sh read api/test/*.mjs but not api/test/lib/*.mjs, where every assertion of this slice lives, so it called hub_invitation_deliveries a table nobody asserts; the glob now includes it. A fourth, found by running the battery once more after the merge: db/test/ai-drafts-test.sh pre-cleaned by slug (aid-%) but seeded by hardcoded ids of the form f1111111-1111-1111-1111-111111111111. Several API suites mint ids as f<n>...-$RUN-<n>... with $RUN four random hex, so any of them can draw exactly those. One did: compare-api-test.sh drew RUN=2222, left its fixture set for its own next run to reset (D-241, the designed state, because an organisation that has an exclusion verdict cannot be deleted at all — the cascade reaches an append-only table), and ai-drafts-test.sh reported BLOCKED in a battery that had nothing to do with quote comparison. Its fixtures now live in an a1d namespace no $RUN can produce. Proved by planting a decoy organisation on the old id: the old file BLOCKED, the new one passed 18 of 18. Assumed: that the hub answers as platform.tender.invite and platform.tender.status in event-clinic-ecosystem/catalogue/ describe — the suite's stub is built to that contract and the real hub has still never been called. D-437 to D-442, Q-175 answered, Q-176 open. Files: db/migrations/0135_an_invitation_reaches_the_supplier_s_own_workspace.sql, api/src/jobs/hub-delivery.ts, api/test/hub-delivery-test.sh, api/test/lib/hub-delivery-driver.mjs, api/test/documents-api-test.sh, db/verify-all.sh, db/verify-unasserted-tables-are-empty.sh.
P243A paid Stripe invoice is issued by the hubpartialShipped; the first real charge is outstanding, which is the only proof this slice still lacks (word changed from "shipped, first real charge outstanding" on 2026-10-09 because the status board filed it as Unrecorded). P4-C10 steps 1 and 2, owner P3-V and C10-D4 (2026-10-07). Built 2026-10-08 in a cloud container on branch claude/great-mayer-d6bo9q; merged into the Mac's main the same day (merge 02f4987). Numbering checked on merge: main ended at P242, D-442, Q-176, 0135 and docs/74, so P243, D-443 to D-447, Q-177, Q-178, 0136 and docs/75 stood unchanged; only the ledger and question-log rows conflicted textually, resolved by keeping main's P242 and Q-176. Step 1, measured 2026-10-08: ./db/census.sh prod, section "Stripe subscribers": live (active, trialing, past_due, unpaid) 0, customers linked but never subscribed 0. That is what the webhook recorded; a subscription whose webhook never landed is visible only in the Stripe dashboard, which was not checked (Q-177). Step 2, built in the container: checkout drops automatic_tax and tax_id_collection and stamps issuer=hub (D-443); invoice.paid for an issuer=hub subscription POSTs to {HUB_BASE}/billing/v1/charges with ref = the Stripe invoice id; legacy subscriptions skipped (D-444), zero invoices too (D-445), lines per D-446, retries per D-447; 0136 records the hub's id and number, platform-only. api/test/hub-charge-test.mjs 38 passed, forced red four ways in the container. On the Mac, verified 2026-10-08: ./db/test/hub-billing-charges-test.sh ran for the first time and failed one assertion that was the test's own fault: it expected 1|t|... but a boolean concatenated to text renders true (psql's t is display only). Fixed in 7e5475b; 11 passed. Forced red by breaking 0136 on local twice, both caught by name: hub_charge_record overwriting the first issued number (MP-999999 for MP-000001), and EXECUTE on hub_charge_buyer granted to PUBLIC; restored, 11 passed. ./db/verify-all.sh exit 0, 3443 assertions, the new suite included. ./db/apply-migrations.sh prod applied 0136 to ep-blue-firefly-as0s6qll: ledger 136 of 136, then ./db/privilege-audit.sh prod exit 0, 92 tables (was 91) and 5 views match the model. ./scripts/deploy.sh api exit 0, procuvent-api version b9252eed-a98c-4e48-bd39-3b67001e3076, HUB_BASE = https://api.event.clinic, and wrangler secret list shows PROCUREVENT_HUB_TOKEN set (Q-176: set, yes; whether its sha256 matches event.clinic's registration, not measured). Probe against controls: POST /v1/billing/webhook {"id":"evt_doesnotexist000"} 400 "Stripe does not have that event." (the Worker asked live Stripe), {"id":"nope"} 400 "No event id.", the misspelt /v1/billing/webhookz 404 for both. The hub door, wrong token: a well-formed charge body answers 401 EP491, the PDF route 401; an empty body answers 400 "a JSON object with ref is required", because the hub checks shape before the credential, so a wrong-token control must send a valid body. Not done, and why: one real charge whose PDF is opened. The only credential is PROCUREVENT_HUB_TOKEN, which by design exists only inside the Worker (/Users/petermarik/Documents/event-clinic-suite/ecosystem/scripts/mint-hub-token.sh never writes it out), and the only path that uses it is a real invoice.paid on an issuer=hub subscription, i.e. a real card payment by a new subscriber. Either the owner pays one real checkout on procurevent.com (the webhook then issues a real NAV-reported invoice, readable in hub_billing_charges and as GET https://api.event.clinic/billing/v1/invoices/<id>.pdf), or the owner hands the token over for one direct POST; both are the owner's (secret handling, and a real legal invoice). Not done, the owner's: the public wording (/Users/petermarik/Documents/event-clinic-suite/procurevent/docs/75-seller-facts-wording-to-approve.md), and Stripe's invoice e-mails and account entity (Q-178). Second Mac pass, 2026-10-08 (merge 3b7a953): D-448 (only livemode: true reaches the hub, checked on the event and again on the invoice) and D-449 (daily 06:00 UTC incomplete-charge token check) merged; no ID collisions. Re-measured: ./db/census.sh prod live subscribers 0, linked customers 0, invoices handed to the hub 0; Stripe itself not checked (no Stripe key on this Mac). ./db/migration-ledger.sh local and prod exit 0, 136 of 136. ./db/test/hub-billing-charges-test.sh exit 0: hub charge 44/0, hub probe 16/0, app-role part 11/0. Forced red: the event-level livemode check removed from handleWebhook; two assertions failed by name (and is decided before the subscription is even read, and leaves no row), while the invoice-level check still kept the charge from being sent; restored, no diff. ./db/verify-all.sh exit 0, 3443 assertions. ./db/privilege-audit.sh prod exit 0, 92 tables and 5 views. NOT deployed: ./scripts/deploy.sh api was refused by the session's permission guard, so production still runs b9252eed without D-448 and D-449. The daily token check therefore does not run yet, and the event-level livemode check is not live (the invoice-level one is not live either; b9252eed predates both). Deployed, 2026-10-08 (owner: "Deploy it"): ./scripts/deploy.sh api exit 0, procuvent-api version 46accb41-3db5-40d3-97bd-a51b96779e33, crons 0 6 * * * (the D-449 hub token check) and 23 * * * * bound, HUB_BASE = https://api.event.clinic. Probes: POST /v1/billing/webhook {"id":"evt_doesnotexist000"} 400 "Stripe does not have that event.", {"id":"nope"} 400 "No event id.", control /v1/billing/webhookz 404. The first hub token check runs at 06:00 UTC on 2026-10-09; its log line has not yet been read. Q-177 closed as moot and Q-178 closed: see the question log.
P244The P4-C10 integration review's Procurevent itemscompleteRequested 2026-10-08 by the ecosystem session, from /Users/petermarik/Documents/event-clinic-suite/ecosystem/phase4/P4-C10-INTEGRATION-REVIEW-2026-10-08.md. D-452 (four corrections), D-453 (private_person not sent, pending owner), D-454 (the Stripe webhook). Item 1, customer_creation: removed for new buyers. Evidence is Stripe's API reference ("Can only be set in payment and setup mode"); the refusal was not reproduced, because no Stripe test key is on this Mac and handling one is the owner's. Found while checking it, and bigger: no Stripe account had a webhook for Procurevent, so no payment could have unlocked a plan or issued an invoice; created with the owner's yes as we_1UOOyBQTXYbZeJLOnN74UPSb (D-454). Verified: api/test/hub-charge-test.mjs 60 passed, 0 failed (was 44): an e-mail-less buyer is sent; a bare adószám is normalised; a new buyer's checkout carries no customer_creation; a full live refund credits by ref, once, also when the charge names no invoice; a partial refund is held; a test-mode refund is not sent; a refused token is 502. Forced red five ways, each by name: customer_creation put back; e-mail required again; the bare-adószám rule removed; a partial refund treated as full (3 failures); both refund livemode checks removed (4 failures); each restored, 60/0. ./db/test/hub-billing-charges-test.sh exit 0 (60, 16, 11). ./db/verify-all.sh: 3443 assertions passed and site guards FAILED: verify-venue-capacity-promise.mjs refused 105 of 7000 venue pages in the 2026-10-08 site build that say "The space list could not be read when this page was built", a directory read that failed during a build on a loaded machine (load average 17), not this slice; the site was rebuilt to clear it, see below. ./scripts/deploy.sh api exit 0, procuvent-api version 86accb62-b4be-4166-a39d-9ccd0a4934da; probes: webhook evt_doesnotexist000 400 "Stripe does not have that event.", nope 400 "No event id.", control /v1/billing/webhookz 404. Not measured: that the Worker's Stripe key belongs to acct_1T453OQTXYbZeJLO (the first real event will show it); the credit door against the real hub (only a real refund of a real issued invoice can exercise it).
P245Q-179: venue detail reads no longer exceed event.clinic's directory rate limit, and the capacity guard gates the deploycompleteMeasured before fixing. The 93 venue pages that said "The space list could not be read" in the 2026-10-08 build were mapped back to their ids and each asked once, sequentially: 93 of 93 answered 200 (113 to 701 ms, median 242), control id 404. Reproducing the build's pattern (8 in flight, one attempt each) the upstream answered HTTP 429 {"code":"EC783","reason":"rate_limit"} with retry-after: 60, from ~20 s in. The limit is event.clinic's RL_DIRECTORY, 600 a minute per address (/Users/petermarik/Documents/event-clinic-suite/event-clinic/app/api/wrangler.jsonc, W805, live 2026-10-03). The 6 072 refusals in that reproduction are inflated by another session's site build running from the same address at the time; the status, header and limit are not. Fix in site/src/lib/public-directory.ts getJson, which every directory read routes through: request starts to api.event.clinic/directory/v1 are spaced 110 ms (545 a minute), and a 429 waits the retry-after it names (capped 120 s) instead of 0.4/1.2/3.6 s. The detail log now counts failure reasons. getVenueDetail (no other caller) folded into getVenueDetailsUncached. ./concurrency imported as ./concurrency.ts so Node can load the module for the test. D-457: verify-venue-capacity-promise.mjs now refuses unread pages by name and runs as section 3 of site/scripts/verify-built-site-is-publishable.sh. Verified: site/scripts/verify-directory-rate-limit.mjs 7 passed, 0 failed, five consecutive runs, wired into npm --prefix site run verify; forced red three ways, each by name: pacer removed (2 failures), retry-after ignored (1), pacer applied to every host (the control, 1); each restored. A first version asserted every gap >= 105 ms and failed on a natural 102 ms gap; it now asserts the span, since rate is the contract. Rebuild and deploy with npm --prefix site run deploy, from 59ea122 (origin/main merged first so D-455/D-456 Terms wording stays live): "public directory: 7000 venue detail(s)", 0 missing, gate "fit to replace the live site" with "all 7000 pages carry exactly one wording", 15 min 15 s end to end; procuvent-site version 3fa5aedc-aedd-42fd-bcae-e63cc32ca350. Gate forced red on the real dist/: the unread sentence planted in /venues/messe-leipzig → REFUSED naming that page, exit 1; restored, exit 0. npm --prefix site run verify exit 0. Production probed: all 93 previously failing https://procurevent.com/venues/<slug> pages 200 with no unread notice; /venues/no-such-venue-q179-control 404; /terms carries "not to consumers", "receive our invoices electronically" and "businesses and other organisations only". ./db/verify-all.sh in this worktree: 3442 assertions passed, exit 1 on two suites that fail for the worktree, not the change: cron-test.sh needs api/.dev.vars and verify-procedures-real.mjs needs app/.env.local and app/.env.production.local, all gitignored and present only in the main checkout; the latter fails identically on origin/main (af6e0c2) without this branch. This branch touches nothing under api/, app/ or db/. Not explained: wrangler uploaded only 3 changed assets, so the version live before this deploy was not the 2026-10-08 23:58 dist/ inspected here; which build it was was not measured.
P246D-511 and D-512: a viewer does not issue a request, and a request's criteria are fixed at issuecompleteShipped 2026-10-10: 0150 applied to production (ledger 150/150, privilege-audit.sh prod exit 0); procuvent-api 483de867-b41d-4d1b-83b6-14fd3d39bd91; procuvent-app c05ab482-7f23-4369-9123-010d359f246c (keyless). Probed: /v1/session 401 beside /v1/sessionz 404; the live bundle carries "These criteria were fixed when the request was issued" and not a one-word-changed control. Re-run before shipping: procurement-roles 54/0 and 46/0, committee-scoring api 67/0, workspace api 191/0, issue api 45/0. Two owner-confirmed Commercial behaviour changes (D-511 / Q-190, D-512 / Q-195); no feature key, on purpose. Built 2026-10-10 on local only. Measured first: the live body of caller_may_issue_requests() (pg_get_functiondef) is 0142's file token for token, refusing committee_member, finance_reviewer and procurement_consultant; issue_request() raises 42501 "your role does not issue requests" from it and reads no other role; the API mapped every 42501 to the generic 403 "You cannot issue that request."; no owner-role script or fixture issues a request as a viewer (every issue_request( in db/test and /issue in api/test acts as an admin, requester, lead or a user with no membership). saveCriteria replaced criteria at any status, and evaluation_scores.criterion_id cascades. Built: migration /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0150_a_viewer_does_not_issue_a_request.sql re-creates caller_may_issue_requests() from the live body with viewer added; issue_request() untouched, so chair, lead, requester, approver and admin issue as before. Manifest and probe (functiondef caller_may_issue_requests:0150 marker) added; applied with ./db/apply-migrations.sh local; ./db/privilege-audit.sh local exit 0. API: translateIssueError (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/requests.ts) answers 0142's refusal as 403 ROLE_DOES_NOT_ISSUE with the database's hint (D-514); saveCriteria (/Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/document.ts) refuses outside P195's DRAFT_STATES with 409 CRITERIA_FIXED_AT_ISSUE (D-515). App: CriteriaFields in /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/StructuredChapters.tsx is read-only after issue (no add, remove or save; a status line says why), English like the rest of the screen, which uses no catalogue. Suites: procurement-roles-test.sh 54 (+2: viewer refused by name beside the requester; admin issues), procurement-roles-api-test.sh 46 (+5: committee member and viewer 403 ROLE_DOES_NOT_ISSUE with the hint; admin issues a second draft 200), committee-scoring-api-test.sh 67 (+10, section 8: replacing RC's criteria after issue 409 by name, all scores and the three criteria survive, an empty list is refused too; the draft saves 200 and stores; B 404), workspace-api-test.sh 191 (its criteria rules now run on a seeded draft, since D-512 makes the issued fixture refuse; +2 for the refusal by name). Forced red, each restored: (1) 0142's body re-installed: DB "REFUSED: a viewer issues A's draft (P246, D-511)" failed (got ok), API viewer 403 failed (got 200) with its by-name and hint checks; apply-migrations.sh local restored it, 54/54. (2) the saveCriteria guard removed: 6 failures in section 8, including "and every score survives" (expected 6, got 0) and the criteria ids replaced, so the cascade is real. (3) the API naming removed: both "by name" checks failed with "You cannot issue that request." and the hint check. ./db/verify-all.sh: 4760 assertions passed (baseline 4740; +19 from the suites above, 1 not attributed), failing only cron-test.sh and verify-procedures-real.mjs, the two known environment failures. npm --prefix app run check and verify exit 0; copy fence clean. Left out: hiding the app's Issue button from a viewer (the API names the refusal; not asked); the window between the criteria status check and the replace (ponytail: comment; D-515). Q-190 and Q-195 were already closed. Production untouched.
P247D-509: the edition matrix is seeded, and a buyer admin opts in from Settings (P192's deferred screen)completeShipped 2026-10-10: full battery re-run before shipping, 4849 passed with only the two known environment failures; 0151 renamed with the owner's approval (D-522) after the production demo-data guard matched "seeded", then applied (ledger 151/151, privilege-audit.sh prod exit 0); procuvent-api 800a7a31-f888-448f-9fc2-a025675fbc76; procuvent-app 592dc4b0-ed19-44f5-be51-9d5bb7217271 (keyless). Probed: /v1/organisation/features 401 beside /v1/organisation/featurez 404; the live bundle carries "Optional features" and not a control. Commercial buyer admins can now opt in to the 13 shared features on production; nothing is on until one does. Built 2026-10-10 on local only; production untouched (holds 0001-0150). Measured first: the code asks for exactly fifteen feature keys (thirteen *_FEATURE constants, procurement_roles in 0142's SQL, the same set in features.includes(..)), none misspelled; feature_policies held 0 rows locally; 0127 let ANY member write ANY opt-in key; 0127's policies on feature_policies (read true, write is_platform_actor()) are kept. Migration /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0151_the_edition_matrix_is_set_and_only_a_buyer_admin_opts_in.sql: seeds 15 keys x 2 editions with ON CONFLICT DO UPDATE (13 Shared Commercial optional / Public required; statutory_mode and deficiency_rounds Commercial off / Public required; D-516), material_clarification Commercial optional not required (D-518), and re-creates organization_feature_settings' insert/update/delete policies so only caller_is_buyer_admin() writes, and only a key optional for the organisation's own edition (D-517). In-file assertions: 30 rows, both editions per key, nothing required in Commercial. Manifest + probe comment feature_policies.mode:0151 seeded the matrix; applied with ./db/apply-migrations.sh local, ledger 151/151, privilege-audit.sh local exit 0. API /Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/http/organisation-features.ts: GET/POST /v1/organisation/features (D-519) — every member reads { edition, canChange, items }; POST { key, enabled }; a non-optional key (unknown, required or Public-only) is 404 "Not found."; a non-admin's write is 403 named. App /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/components/OptionalFeatures.tsx in Settings, buyer side only, switches for the admin, read-only for others, session reload() after a toggle so features follows (D-520); 18 catalogue strings en + hu (of.*, feature.*, Hungarian under Q-186). Existing suites (D-521): 28 suites assumed an empty table; each now upserts and restores the seed through /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/lib/feature-seed.sh (matrix stated separately from 0151), asserts its keys' seed intact before its first cleanup, and takes its off path from a missing opt-in (statutory-mode-api: the Commercial request; framework-registry-api's request-level gate sets Public off for one check; both retention-holds suites delete opt-ins before the reset; edition-test section 5 writes as an admin). Applied migrations 0137-0150 untouched. New suites: /Users/petermarik/Documents/event-clinic-suite/procurevent/db/test/feature-matrix-test.sh 36 (rolbypassrls false; the seed exactly and the table holding nothing else; the code's keys re-derived by grep equal the seeded keys, with a non-empty-extraction control; Commercial no opt-in has nothing on beside Public with all 15; one opt-in turns on one key; statutory_mode, deficiency_rounds, an unknown key and a Public org's opt-in refused by RLS beside a shared key accepted; requester refused beside admin; B refused beside its own) and /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/organisation-features-api-test.sh 36 (invalid sibling 404; off path; one key on in the session and its route 200; 404 for non-optional keys; requester 403; B isolated; Public empty list; off again), wired into /Users/petermarik/Documents/event-clinic-suite/procurevent/db/verify-all.sh. Forced red, each restored: (1) the restore skipped in estimated-value-api-test.sh: the next suite, estimated-value-test.sh, failed "estimated_value carries exactly its seeded policy" (drift +commercial required) and feature-matrix-test.sh failed "every seeded key carries exactly its two rows" and "nothing is required of a Commercial buyer"; (2) statutory_mode seeded Commercial optional: matrix failed the seed check and "the Public-only pair is off in Commercial"; the API suite failed 10, including "REFUSED: statutory_mode (Public-only): 404" (got 200) and "exactly the thirteen shared keys"; (3) caller_is_buyer_admin() dropped from the three policies: matrix failed "REFUSED: A's requester opts into a shared key" (got ok), the UPDATE and the DELETE (got 1); API failed "REFUSED: the requester switches it off: 403" (got 200); restored by re-running 0151 (idempotent), ledger 151/151, matrix 36/0. ./db/verify-all.sh: 4849 assertions passed (baseline 4760), failing cron-test.sh and verify-procedures-real.mjs (the two known environment failures) and verify-no-backticks-in-heredocs.sh, which caught backticks in a comment this slice wrote inside a heredoc in material-clarification-api-test.sh; fixed, guard exit 0, that suite 71/0. npm --prefix app run check and verify exit 0; copy fence clean; i18n catalogue clean. Left out: an audit row per toggle (0127 writes none; D-519 revisit) [since built: 0154's organization_feature_settings_audit, a SECURITY DEFINER trigger, P219, D-543, tested in audit-chain-test.sh section 2 with a no-change control; measured live and enabled on production 2026-10-10 beside an absent misspelled control]; a browser screenshot of the panel (no app env in this worktree; the app guards ran). No Q opened; Q-151 already closed.
P248The public site's dependencies carry no known critical or high advisorycompleteQ-220, 2026-10-10. P224's supply-chain check measured 1 critical (astro 7.1.6: remote code execution through AVIF image optimisation, below 7.2.8; an authorisation bypass in path stripping, up to 7.2.3) and 7 high (devalue, http-cache-semantics, js-yaml, nanoid, sharp, source-map-js, svgo) in site's production dependencies. The site is output: 'static' (site/astro.config.* line 17), so the path bypass never applied at runtime and the AVIF path runs only at build time over our own images; fixed anyway. npm audit fix --omit=dev in site/ moved only site/package-lock.json (package.json unchanged; ^7.1.6 already admits the fix): astro 7.3.8, sharp 0.35.5, svgo 4.1.0, devalue 5.9.4. npm audit --omit=dev: found 0 vulnerabilities. Built and deployed with npm --prefix site run deploy: 7000 venue details, 0 missing (P245 holds on a second build), gate "fit to replace the live site", procuvent-site version e9b1f03f-aa26-4ac6-bb2f-dbd7f69f6090. npm --prefix site run verify ok on the built output. Probed: /, /venues, /venues/messe-leipzig, /suppliers, /terms, /privacy, /imprint 200 beside /no-such-page-p248 404; the live generator meta reads Astro v7.3.8; a previously unread venue page carries no unread notice.
P249D-511 remainder: the app does not offer Issue to a viewer or the three reviewing rolescompleteShipped 2026-10-10. RequestWorkspace.tsx renders "Issue this request" only when roleIssuesRequests(session.role); the refused roles see "Still a draft. Your role reads it; a requester or an admin issues it." The list is ROLES_THAT_DO_NOT_ISSUE in /Users/petermarik/Documents/event-clinic-suite/procurevent/shared/roles.ts (D-570). Test /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/issue-role-test.mjs 11/0: the list equals the refused set parsed from the latest migration defining caller_may_issue_requests() (0150); requester, buyer_admin and procurement_lead issue beside viewer, committee_member, finance_reviewer, procurement_consultant and no role refused; the screen computes the gate from the session role and the button sits inside it. Folded into procurement-roles-api-test.sh (48/0). Forced red, each restored: finance_reviewer dropped from the list (2 failures by name: the migration comparison and the role); the mayIssue gate removed from the block ("the Issue button sits inside the mayIssue block"). Probed: the live bundle carries the hint sentence and not a one-word-changed control ("a supplier or an admin"). Commit 74d9856 on main. procuvent-app daa96508-f9ea-4a01-8782-7c59301c93da (keyless, VITE_API_BASE=https://api.procurevent.com); no migration and no API change, so production stays at 0001-0155 (measured before the slice, local and prod ledgers exit 0). ./db/verify-all.sh on the main checkout: 5216 assertions passed, failing only verify-csp-script-hashes.mjs, verify-no-markdown-in-prose.mjs and the site guards, all three BLOCKED because site/dist holds a partial 2026-10-09 build with no pages (nothing measured; this slice changes nothing under site/). Then closed: a local site build (production env, not deployed) wrote 7022 pages, "public directory: 7000 venue detail(s)", gate "fit to replace the live site"; verify-csp-script-hashes.mjs exit 0 (4 scripts), verify-no-markdown-in-prose.mjs exit 0, npm --prefix site run verify exit 0. npm --prefix app run verify exit 0; tsc --noEmit clean; app build clean.
P250D-513 remainder: framework call-offs are created under a chosen standingcompleteShipped 2026-10-10. /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/screens/Frameworks.tsx renders one StandingPicker for the page (writers, frameworks present; the picker itself renders nothing below two standings) and createCallOff passes authorityStanding (D-571). Test /Users/petermarik/Documents/event-clinic-suite/procurevent/api/test/standing-picker-test.mjs 5/0: discovers every createRequest( caller under app/src (2, with a non-empty control) and requires the picker and the standing in each. Folded into authority-profile-api-test.sh (48/0). Forced red: the pre-slice Frameworks.tsx from HEAD failed both its checks by name; restored. Probed: the live bundle passes {authorityStanding:..} at 2 sites (intake and call-off; 1 before). Driven in a browser 2026-10-10 (evening session): a throwaway local Public tenant (prefix csdrive-, one buyer admin, standings kbt_5_1_a and kbt_5_1_c and one framework declared through the API), app on dev auth at 1024x768. The picker rendered above the frameworks with both standings and an empty prompt. (1) Create call-off with no standing chosen: POST /v1/requests 400 "This organisation holds 2 standings; say which one this request is created under.", shown as the page note directly above the picker; the typed title was kept; no request row was written (measured, 0 rows). (2) Standing c) chosen, Create call-off: the request was written with contracting_authority_type = kbt_5_1_c, and GET /v1/frameworks lists it as the agreement's call-off (mode direct_terms). Teardown reset-fixtures.sh csdrive-: 1 organisation, 1 user; 0 rows left by slug, title or email; .claude/launch.json reverted. Commit 74d9856 on main. procuvent-app daa96508-f9ea-4a01-8782-7c59301c93da (keyless, VITE_API_BASE=https://api.procurevent.com); no migration and no API change, so production stays at 0001-0155 (measured before the slice, local and prod ledgers exit 0). ./db/verify-all.sh on the main checkout: 5216 assertions passed, failing only verify-csp-script-hashes.mjs, verify-no-markdown-in-prose.mjs and the site guards, all three BLOCKED because site/dist holds a partial 2026-10-09 build with no pages (nothing measured; this slice changes nothing under site/). Then closed: a local site build (production env, not deployed) wrote 7022 pages, "public directory: 7000 venue detail(s)", gate "fit to replace the live site"; verify-csp-script-hashes.mjs exit 0 (4 scripts), verify-no-markdown-in-prose.mjs exit 0, npm --prefix site run verify exit 0. npm --prefix app run verify exit 0; tsc --noEmit clean; app build clean.
P251The procurement plan's request picker keeps its prompt at 1024 pxcompleteShipped 2026-10-10. Reproduced first on a throwaway local tenant (seeded, viewed through the app at 1024x768, removed with reset-fixtures.sh lookpp-: 1 organisation, 1 user): the Actions-column select was 144 px and read "Choose a requ". Cause: .select { width: 100% } in an auto-layout cell. Fix .table td .select { min-width: 12rem; } in /Users/petermarik/Documents/event-clinic-suite/procurevent/app/src/styles/app.css, at the shared selector because 14 files put a select in a table cell (D-572). Measured after: 192 px wide, content 190 px, prompt whole; the plan table is 777 px in a 744 px .tablewrap and scrolls inside it, the page itself 1024 px (no sideways page scroll). Probed: the live stylesheet carries the rule and not a 13rem control. No automated test: a CSS width is measured in a browser, and was. Commit 74d9856 on main. procuvent-app daa96508-f9ea-4a01-8782-7c59301c93da (keyless, VITE_API_BASE=https://api.procurevent.com); no migration and no API change, so production stays at 0001-0155 (measured before the slice, local and prod ledgers exit 0). ./db/verify-all.sh on the main checkout: 5216 assertions passed, failing only verify-csp-script-hashes.mjs, verify-no-markdown-in-prose.mjs and the site guards, all three BLOCKED because site/dist holds a partial 2026-10-09 build with no pages (nothing measured; this slice changes nothing under site/). Then closed: a local site build (production env, not deployed) wrote 7022 pages, "public directory: 7000 venue detail(s)", gate "fit to replace the live site"; verify-csp-script-hashes.mjs exit 0 (4 scripts), verify-no-markdown-in-prose.mjs exit 0, npm --prefix site run verify exit 0. npm --prefix app run verify exit 0; tsc --noEmit clean; app build clean.
P252Q-217: only definer code writes the audit trailcompleteShipped 2026-10-10 (D-573, owner "Yes, lock it"). /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0156_only_definer_code_writes_the_audit_trail.sql: five invoker writers measured (the question named four; record_file_download is the fifth). The four state-changing ones keep their RLS authorisation as SECURITY INVOKER and their audit rows move to definer AFTER triggers on the changed row (estimated_value_locked_audit, committee_constituted_audit, coi_declared_audit, committee_evaluation_submitted_audit); the download writer becomes definer and restates attachments_read; INSERT on audit_events revoked from the app role, the loop failing if it matches nobody. privilege-audit.sh lists audit_events in NARROW_ON_PURPOSE; probe-audit-retention.sh now asserts NO insert with SELECT as the control. Tests: audit-chain-test.sh 49/0 (section 4: the app role's forged insert is permission denied, control: it still reads 63 rows); red before 0156 (4 failed, the forgery went in), and forced red twice after (INSERT re-granted: privilege audit DRIFT INSERT=1 want 0; predicate stripped from the download writer: B's forged download landed in A's trail, 11 failed). audit-log-test.sh now names permission denied. The committee, scoring and estimated-value suites (db and API) all pass with the triggers. Production: applied with 0157 and 0158; ledger 158/158; privilege audit matches the model; probe-audit-retention.sh prod 8/0 (app_rw holds no INSERT, holds SELECT); the four triggers present beside an absent misspelled control; record_file_download definer; verify-audit-chain.sh prod intact.
P253Q-183: a quote header inserted after the deadline is refusedcompleteShipped 2026-10-10 (D-574). /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0157_a_quote_header_inserted_after_the_deadline_is_refused.sql: on INSERT submissions_deadline_guard checks invitation_is_past_deadline_for_me(NEW.invitation_id). Test db/test/submission-deadline-test.sh section 6, 22/0: an on-time header is permitted, a sent and a draft header after close are refused, the platform may still write one (control). Red before 0157 (both late headers answered ok). Production: the guard carries the 0157 marker and not a 0159 marker control.
P254Q-060 remainder: approval comments and change summaries are erasablecompleteShipped 2026-10-10 (D-575). Production held 0 rows in approval_actions, clarification_messages and request_versions (measured before). /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0158_the_last_two_prose_columns_leave_the_permanent_record.sql: approval_action_comments and request_version_summaries (RLS inherited from the parent, erasure platform-only), comment_sha256 and change_summary_sha256 on the permanent rows, rejection_has_comment accepts the hash, and a NOT VALID IS NULL CHECK closes all three prose columns to new rows. decide_approval_step and issue_request rewritten from their live definitions. Two fixtures moved to 0073's shape. Tests: immutable-personal-data-test.sh 27/27 (each retirement asserted from the catalogue, two refused writes named by constraint; 7 failed before 0158); issue-request-test.sh 43/0 and approval-authority-test.sh 24/0 each prove the words land in the side table with a matching hash; workspace-api-test.sh 191/0. Production: the three retirement constraints present beside an absent misspelled control.
P255Privacy corrections, accessibility statement and disclosure policy publishedcompleteShipped 2026-10-10 (D-577, docs/88 rows 1, 18, 20, 28). site/src/pages/privacy.astro (Workers AI and Turnstile rows, invitation flow re-read from hub-delivery.ts, R2 and Stripe "Connected, holds nothing yet" after census.sh prod measured 0, 0, 0), new accessibility.astro and vulnerability-disclosure.astro, footer links. Placeholder resolutions: /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/89-published-statements-placeholder-resolutions.md. Site version 6237693b-050c-4bce-aa44-505222caa009, 7025 files. Probed live: /accessibility and /vulnerability-disclosure 200 beside /accessibilityz 404; the privacy page carries the four new phrases and not the old "Every provider listed above is connected and" sentence; all three show "updated: 10 October 2026"; the footer links both pages.
P256The app at procurevent.event.clinic, with a per-host Clerk key gatecompleteShipped keyless 2026-10-10 (D-576). Route added to app/wrangler.jsonc; https://procurevent.event.clinic added to the API's ALLOWED_ORIGINS (API bc021dcb-d2d7-4ff4-8687-ac794f954689: /v1/session 401 beside /v1/sessionz 404; the origin is allowed, procurevent.event.clinic.evil.com is not). shared/clerk-host.ts uses a key only on its instance's root domain; api/test/clerk-host-test.mjs 9/0, red on the unwired session first, run by mfa-enforcement-api-test.sh. Deployed with the live key, then rolled back: the key on this machine is for clerk.procurevent.com, so app.procurevent.com hung at "Signing you in..." (seen in a browser); keyless again within about three minutes, procuvent-app c1ffb0ac-d129-40f1-bd60-5990d355b5a6, bundle measured to hold no key. Both hosts show "Sign-in is not open yet". Owner action: /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/91-owner-action-sign-in-at-procurevent-event-clinic.md.
P257Two copy fixes: what is emailed, and the supplier's invitees tabcompleteShipped 2026-10-10 with the app (D-578, Q-078). app/src/data/help.ts (two topics) names what is emailed per side, matching the Notifications screen; chapters.ts supplierPurpose, rendered in RequestWorkspace.tsx. docs/54-user-manual.md regenerated. Probed live: the bundle holds both new sentences and not "Procurevent does not email these".
P258Q-218: a read-only incident report for productioncompleteShipped 2026-10-10 (D-579). /Users/petermarik/Documents/event-clinic-suite/procurevent/db/incident.sh and db/test/incident-script-test.sh 10/0, forced red. Run on production: no faults in 24 hours, jobs healthy, chain intact. The first run read the alert suppressor row as unhealthy; fixed and asserted.
P259P-ETA-1: a verified compliance document is attested to the hub, never copied (NV-05, S0-99)completeShipped 2026-10-11, sender OFF (D-580, contract Proposed: /Users/petermarik/Documents/event-clinic-suite/procurevent/docs/92-p-eta-1-supplier-document-attestation-contract.md). /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0159_a_verified_document_is_attested_to_the_hub_never_copied.sql (platform-only hub_document_attestations, no foreign key so a deletion is attested as a revocation; hub_attestations_due() and hub_attestation_record(), definer, closed to PUBLIC, granted with the 0123 counter), /Users/petermarik/Documents/event-clinic-suite/procurevent/api/src/jobs/hub-attest.ts, fourth step of the hourly chain in api/src/worker.ts behind HUB_ATTEST. Measured before designing (local): verification is one buyer's judgement (0062, verified_by_org_id); suppliers can delete their own documents; 0135's hub_company_key is the company key. api/test/hub-attest-test.sh 31/0, forced red twice (self-verification guard removed: 5 named failures; revocation branch removed: 4). Full battery 5273 passed, nothing failed. 0159 applied to production (ledger 159/159, privilege audit prod clean); procuvent-api 6e8a129d-4bf7-47a7-8335-217bd838273f, probed /v1/health 200 beside /v1/healthz 404. Production's sender state is measured under P260.
P260P-ETA-2: Procurevent's document types map to event.clinic's gate typescompleteShipped 2026-10-11 (D-581, vocabulary Proposed, docs/92 section 4; Q-222 open to the hub). /Users/petermarik/Documents/event-clinic-suite/procurevent/db/migrations/0160_a_document_type_names_the_gate_type_it_satisfies.sql: compliance_document_types.gate_type (CHECK rams, liability_insurance or certificate), with 7 of the 14 types mapped. The attestation gains required_type, an unmapped type is never attested, and unmapping an attested type revokes it. Suite 38/0, forced red twice (unmapped filter removed; professional_indemnity mapped: 3 named failures each). Defect found and fixed before production: a re-run of 0160 on local failed partway, and before failing it had recreated hub_attestations_due executable by PUBLIC, which privilege-audit.sh does not see because it audits tables only (follow-up task offered). Both signatures are now dropped, and the file re-runs cleanly twice. Full battery 5280 passed, nothing failed. 0160 applied to production, where its 7-mapped assertion passed (ledger 160/160, privilege audit prod clean). procuvent-api 32285a3a-79c3-4ba5-bbcd-5c34845a44da, probed /v1/health 200 beside /v1/healthz 404. The production hourly pass at 09:23 UTC, read with wrangler tail: hub: ran, due 0 (the control: token and base present) beside attest: did not run … HUB_ATTEST is off, so nothing was sent.

What “done” means here

Done means a verification script exited zero on the committed tree. Not that somebody opened the screen and it looked right, and not that an agent reported success. Every slice marked complete above has a script in scripts/ that exits 0 against the code as committed; a slice whose script has not exited 0 in a single run is not complete here, whatever else was built. Exit 2 means BLOCKED — a suite could not measure, which is not a pass. 2 392 assertions across 68 suites and 27 guards, measured 2026-08-31. All 99 migrations are on production. scripts/probe-production.sh makes twelve behavioural checks against production and is 12 of 12 (D-286). Its GitHub schedule is NOT proved and cannot be on that platform — the nightly rebuild set for 03:17 UTC last ran at 09:11, 10:00 and 15:18, so treat the probe as 'somebody looked today' and do not compute an uptime figure from it. Overnight, working the roadmap in docs/45: the category list groups by area (Q-028 option A); a supplier can finally record what it works in and a buyer can search by it (Q-076 — the table had row security and grants since 0004 and zero code paths, while the site promised exactly that four times); and a brand-new buyer's dashboard now has a next step instead of seven empty tiles and no link. TWO THINGS WAIT ON THE OWNER: Q-075, the site runs Cloudflare Web Analytics while /cookies and /privacy both say it runs none, which blocks enforcing the CSP; and Q-006, privacy counsel on the legal pages. docs/45 is the honest state: the software is not what is missing. Production still has 1 buyer, 0 published supplier profiles and 0 paid subscriptions.

Run every gate at once:
./db/verify-all.sh

Run it locally

# 1 · seed a tender you can award and hand off
cd ~/Documents/event-clinic-suite/procurevent && ./api/test/fixtures/stage10-browser.sh
# 2 · the API, against local Postgres
cd ~/Documents/event-clinic-suite/procurevent && PROCUVENT_API_DATABASE_URL=postgresql://procuvent_app_rw@localhost:5432/procuvent_dev PORT=8802 PROCUVENT_DEV_AUTH=1 PROCUVENT_DEV_MAIL=1 node api/scripts/serve-api.mjs
# 3 · the app, signed in as the buyer
cd ~/Documents/event-clinic-suite/procurevent/app && VITE_DEV_AUTH=1 VITE_DEV_AUTH_SUBJECT=stage10-buyer VITE_API_BASE=http://localhost:8802 npm run dev -- --port 5186

Screens with data

Screen
Open at
What is on it