Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / docs/evidence/phase2/functional/gate-a-phase2-close.txt |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | docs/evidence/phase2/functional/gate-a-phase2-close.txt |
| Original SHA-256 | 7d0f49ecb0a5ef3dccc7d92cba452526f9d596f546e78a95ab9ae52c3c8e5479 |
| Git blob SHA | 729492d37981d056d01c4dd1aba2e367082d77c6 |
| Reading-copy SHA-256 | 7d0f49ecb0a5ef3dccc7d92cba452526f9d596f546e78a95ab9ae52c3c8e5479 |
Recovered source transcript
Download complete source text ↓136 lines · 9.3 KB
GATE A, FUNCTIONAL. Phase 2 close, 29 July 2026. Re run after the scope completion work.
Everything below was verified against missionmatch_staging on M4:5432 and the live staging API at
missionmatch-staging.thatwebhostingguy.com, using the REAL Package A and Package B documents already stored
there from the July trial.
================================================================================
1. GATE 2, THE DIRECTIVE'S OWN CRITERIA, ALL SIX NOW PROVEN
================================================================================
every extracted scope item carries a source citation schema enforced, ck_scope_items_cited
uncited model output is rejected, proven by test ValidateScopeCandidates, 6 tests
a candidate row fixture fails the scrub suite anywhere scrub/fixtures_test.go, start middle and end
a tenant document fixture fails it anywhere same file, and it is private by PROVENANCE
eight racing promotions elect exactly one requirement race n=8 and n=32, both winners=1
an ingest run during promotion corrupts nothing RAN FOR THE FIRST TIME, passes
approved requirements are never rewritten by ingest RAN FOR THE FIRST TIME, survived 20 rounds
byte for byte, md5 6acbad7d5a24cb161b141e1d5a99e717
THE LAST TWO HAD NEVER BEEN EXECUTED. internal/integration/ingest_during_promotion_test.go sits behind
//go:build integration and skips without pools, so the 53 package unit suite never touched it. It carried two
of Gate 2's six clauses and its own positive control, and all three now run and pass.
================================================================================
2. PHASE 2 SCOPE THAT WAS MISSING, NOT MERELY UNVERIFIED
================================================================================
Reading the directive against the code found four items that were never built. Each is now built and tested.
Section 5.1 TABLES listed among the required deterministic extraction targets. Nothing read
tables at all. ExtractTables plus ExtractRateRows added, structural rather
than prose based, with the prose gate left exactly as strict.
item 4 SPLIT and MERGE screen 4 names six review actions and four existed. 'merged' was a status
value nothing ever wrote and split had no representation. Migration 0084
adds the split status.
item 5 DRAFT GENERATION nothing derived a draft from reviewed scope, so the review to requirement
path had a hole in the middle of it. Generation plus manual completion.
Section 6 SCREENS 3, 4, 5 no UI existed for upload, scope review, or requirement building, and none
for the amendment view, while Gate C names every one of them.
================================================================================
3. THE REAL DOCUMENTS, AND WHAT THEY SAID ABOUT MY OWN WORK
================================================================================
THE WAGE DETERMINATION IS NOT RECOVERABLE BY THIS BUILD, AND IT NOW SAYS SO.
before this session extraction_status done, 1 chunk stored
after extraction_status FAILED, no_text_layer, 0 chunks stored
That is an improvement, not a regression. The one stored chunk was mojibake: this PDF's text layer decodes to
character soup because its embedded font carries no usable character map. Reporting done over a garbage chunk
is worse than failing, because a reviewer cites it and the pipeline's one promise is the citation.
MY TABLE READER MADE IT WORSE FIRST. Run against the real document it recovered "tables" of content like
"(0 CC" and "CC A3", because mojibake contains tabs and therefore satisfied every structural test. A
structural reader that bypasses the prose gate must carry its own quality bar or it becomes the hole in it.
Added: somewhere in a table block there must be a run of four letters containing a vowel.
THE SAME BAR CLOSED A PRE EXISTING HOLE. That mojibake span had been passing the PROSE gate all along. It
is now refused there too, which is why the document reports no_text_layer rather than done.
AND IT COST THE LEGITIMATE CASE NOTHING, measured on the same run:
04_PWS_original_10JUL26.pdf 54 chunks before, 55 after, GAINING one table of 3 rows
TABLE EXTRACTION IS PROVEN, just not on this document: 7 unit tests on a real shaped wage determination, and
the volume profile parses a 200 page PWS into 400 chunks, 200 tables and 1600 rate rows in 19ms.
FINDING F6 FIXED AND VERIFIED ON THE REAL PACKAGE, where the first fix would have failed.
baseline 04_PWS_original_10JUL26.pdf (pws)
amendment 05_PWS_amended_23JUL26.pdf (amendment)
pairing cross_type, labelled, with the note that differences include differences between documents
result 1 MATERIAL CHANGE, quantity "1" to "7"
1 approved requirement derived from this opportunity, would flag Elevator Mechanic, PM
DRY RUN, nothing written
WHY THE FIRST FIX WOULD HAVE FAILED. Pairing purely within a document type looked correct against a fixture
I wrote where both PWS documents were typed pws. The intake actually classified the amended PWS as an
AMENDMENT, so pws held one document and the pairing fell straight through to the old wrong answer, the
solicitation against the amended PWS. It now matches the amendment to the baseline whose FILE NAME it most
resembles, with version words stripped. Previously this reported five changes that were partly artifacts of
comparing unlike documents; it now reports the one change that is real, and a headcount going from 1 to 7 is
the most important number on the page for a staffing product.
================================================================================
4. THE NEW CODE AGAINST A REAL DATABASE, BECAUSE OF F3
================================================================================
F3 was the upload path being committed, reviewed and reported as built while never having written a row,
because every test it had was pure. Split, merge and generation shipped with pure validation tests only, which
is the same shape. Database touching tests were added and found TWO REAL BUGS within seconds:
MERGE USED FOR UPDATE WITH AN AGGREGATE. Postgres refuses it outright, "FOR UPDATE is not allowed with
aggregate functions", so the locking count was invalid SQL. The lock is the point, so the lock stayed and
the counting moved into Go.
A NIL GO SLICE IS NULL, NOT AN EMPTY ARRAY. required_certifications is text[] NOT NULL, so generation failed
on every document that named no certifications. The struct field looked correct either way.
Both were invisible to pure tests. Six integration tests now cover split, merge, generation and manual
completion, and they assert the properties that matter rather than the happy path:
split children INHERIT the parent's citation, quote hash and section label, parent retired to 'split'
splitting an already retired item is refused, which would otherwise orphan the first children
merge keeps the SURVIVOR's citation, absorbed rows retired to 'merged' pointing at the survivor
merging a nonexistent item is refused rather than silently retiring the survivor for nothing
generation from UNREVIEWED scope yields NOTHING, which is the human gate holding
generation is idempotent, second run created 0 skipped 1
a field the document never states arrives as unknown and is REPORTED missing, not guessed
================================================================================
5. THE AUTHENTICATED LEG, END TO END ON STAGING
================================================================================
New API sha 0fb3629d44d7b18a with the FIPS stamp, new bundle index-g1gTV6We.js. index.html was EDITED in
place, only the two asset hashes rewritten, so all 22 lines and all 6 injected SEO lines survived, verified.
all four new screens serve 200 over HTTPS: documents, scope, requirements, amendments
the shipped bundle contains every new screen's strings, proven by grep against the served asset
A DEDICATED PROBE ACCOUNT, password set through cmd/rotate-credential so it goes through the real pepper
and PBKDF2 path rather than a hand written hash. Its tool grants were restored afterwards.
login 200, session 200
GET scope 200, GET requirement-drafts 200, GET amendments 200, GET documents 200
POST requirement-drafts/generate 200, {"created":0,"skipped_existing":0}, correct because Package B's scope
items are not in an accepted state
the amendment view returns the affected approved requirement, Elevator Mechanic, which is the same
requirement the diff independently flagged
TWO 403s AND A 404 WERE BOTH CORRECT AND WORTH RECORDING. The first 403 was the CSRF middleware refusing a
request with NO Origin header, which curl does not send: a hard Origin allowlist working as designed. The
404s that followed were the TOOL ENTITLEMENT gate failing closed on an account with no slateMATCH grant,
answering 404 rather than 403 so a surface is indistinguishable from a path that was never built. Neither
was a defect, and mistaking either for one would have sent me chasing the wrong thing.