Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / docs/BUILD_CONTINUATION_PROTOCOL.md |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | docs/BUILD_CONTINUATION_PROTOCOL.md |
| Original SHA-256 | e13d45cd85096e693d1fedb9e3c53d40bdfe87c11f7d4a958a75a87b52220283 |
| Git blob SHA | 1d1b1ce8f7401ec61680497019b70605c4fa8bfb |
| Reading-copy SHA-256 | e13d45cd85096e693d1fedb9e3c53d40bdfe87c11f7d4a958a75a87b52220283 |
Recovered source transcript
Download complete source text ↓422 lines · 24.1 KB
# BUILD CONTINUATION PROTOCOL: PHASES, STRESS, VISUAL PROOF, AND DRIFT
Companion to docs/CLAUDE_CODE_BUILD_DIRECTIVE.md and the amendments.
Generated 28 July 2026 against commit e9ff911, schema v80, Phases 0 and 1
complete, Phase 2 current, Track U complete, Tasks T1 and T2 done. This
protocol governs every remaining phase. It changes how phases END, not
what they build.
--------------------------------------------------------------------------------
0. HOW TO APPLY
--------------------------------------------------------------------------------
1. Record "continuation protocol accepted" in BUILD_STATE with the date.
2. The Phase Completion Protocol in Section 2 becomes mandatory for
Phase 2 and every phase after it. No phase closes without all five
gates, in order, with evidence.
3. Track H (Section 1) begins immediately, in parallel, production
eligible under the same four guardrails as Track U: staging verified
first, Joseph approves each deploy explicitly and it is recorded,
the deploy is recorded with commit hash and evidence, and build
routes are re proven dark after every deploy. The directive's "Track
U is the only production eligible work before Gate 6" now reads
"Track U and Track H."
4. Allowed new things, exhaustive additions to the directive's list:
tools/verify/visual-sweep (Node, Puppeteer, pixelmatch),
tools/verify/stress (Go load profiles and drill scripts),
docs/evidence/ (per phase evidence bundles), docs/IMPROVEMENTS.md
(the betterment backlog), and the Track H backup scripts. Nothing
else new is licensed by this document.
5. Every rule stands: frozen engine, forced RLS, extend never build
beside, fail closed, staging only outside Tracks U and H, no
Python, no dashes in written output.
--------------------------------------------------------------------------------
1. TRACK H: HARDENING NOW, NOT AT GATE 6
--------------------------------------------------------------------------------
Scope is exactly these six items:
1. BACKUPS, the largest recorded risk. Nightly pg_dump of the control
plane and every tenant database, compressed, encrypted, shipped off
machine to a second host, 14 daily and 8 weekly retained, failure of
the job itself alerting. Then the drill: restore last night's dumps
onto staging, run the migration version check and a row count
reconciliation, and record the restore TIME. An untested backup is a
hope, not a backup. The drill repeats at every phase close from now
on.
2. KEY HYGIENE. Confirm in the OpenAI dashboard that the exposed key is
revoked, record the confirmation, remove the key line from every
copy of the architecture document, and if any document carrying it
was ever committed, purge it from history. The replacement lives
only in the secrets store.
3. MINIMAL ALERTING. An uptime check on the public site and /healthz on
both nodes, plus a journal watch that alerts on any 5xx and on
backup job failure, delivered to Joseph by email. Dashboards can
wait; a phone that buzzes cannot.
4. IDENTITY SYNC. sync-tenant-identity on a schedule with a positive
control proving it moves a record, closing the stale tenant copy
risk.
5. LAST LOGIN INSTRUMENT. One real login on staging, confirm
last_login records, because a design partner reported a login the
control plane does not show, and an identity instrument that lies
is not an instrument.
6. OPERATOR MFA DECISION, Joseph's call queued for him: enroll TOTP
with printed backup codes, then lift the production stand down. The
protocol only keeps the decision visible; it does not decide.
TRACK H GATE: a restore drill has succeeded with its time recorded, an
induced failure proves each alert fires (positive control), the sync
moves a planted record, and the ledger holds the key confirmation.
--------------------------------------------------------------------------------
2. THE PHASE COMPLETION PROTOCOL, FIVE GATES IN ORDER
--------------------------------------------------------------------------------
A phase is CLOSED only when all five pass, in this order, with evidence
filed under docs/evidence/phaseN/ and summarized in BUILD_STATE.
GATE A, FUNCTIONAL. The phase's own gate from the directive and
amendments, unchanged. Every item verified against staging, reproduced
before fixed, recorded with the command and the observation.
GATE B, STRESS. Strict means numbers. Run on staging, which carries
2,766 organizations and is the right place to hurt things.
Concurrency Every lock guarded transition in the phase raced at 8
and at 32 concurrent attempts. Exactly one winner,
counts reconcile, nothing corrupts. The existing
racing style, widened.
Load Go load tooling (vegeta or hey) drives the phase's
hot routes with authenticated sessions at a mixed
profile. Targets, measured on staging hardware:
sustained 50 requests per second for 10 minutes, p95
under 300 milliseconds, p99 under 800, ZERO 5xx.
Soak 30 minutes at half load. RSS stable within 10 percent
after warmup on both nodes, database pool gauges
never saturate, no goroutine growth trend.
Failure drill Stop one API node mid load: nginx failover carries it
with zero client visible 5xx. Kill the phase's worker
binary mid batch and rerun: completes without
duplicates. Saturate the rate limited routes and
observe 429, never 500.
Volume The phase's data heavy path at its documented cap,
memory bounded by streaming, completion time
recorded.
Every stress instrument gets a positive control first: a deliberate
overload or planted defect must FAIL the check before the passing
run counts. Numbers land in the evidence bundle. Regressions
against the prior phase's numbers are called out, not smoothed.
GATE C, VISUAL. How Claude verifies with its eyes, made mechanical.
The sweep tools/verify/visual-sweep logs in through the real
login flow as EACH role the phase touches (seeded
fixture accounts per role), walks the phase's route
manifest, and renders at five viewports: 320, 390,
768, 1024, 1440.
Assertions Zero console errors, zero failed network requests,
zero horizontal overflow (document scrollWidth must
not exceed clientWidth), every stat tile navigates
when clicked, and no screen renders a raw error or an
empty state where fixture data should be.
Capture Full page screenshots into docs/evidence/phaseN/
visual/ plus a generated contact sheet HTML so Joseph
reviews a whole phase in one scroll.
Regression Screens the phase did NOT touch are pixel diffed
against their approved baselines with pixelmatch, the
same technique that proved T2 left desktop unchanged.
A diff above threshold on an untouched screen is a
failure, not a curiosity.
Baselines New or changed screens become new baselines only after
Joseph approves the contact sheet, and the approval is
recorded. Baselines are the visual ledger.
Eyes The sweep does not replace looking. Claude reviews the
captures, lists anything odd even if assertions
passed, and the sweep itself has a positive control: a
deliberately broken fixture page must fail the run
before the real run counts.
Public Where a phase touches fg-talent.com, add the live
checks over HTTPS: widths 320 through 1440, curl
proving real HTML in the initial response, and the
Rich Results test on one live posting.
GATE D, DRIFT. The freeze proven, every phase, no exceptions.
The scoring engine diff against e74fd2e is empty, path
internal/modules/matching/engine. THE ANCHOR AND THE PATH ARE BOTH
ASSERTED TO EXIST FIRST, because this check has now failed open twice,
once on a commit that ceased to exist after a history rewrite and once
on a path that never existed. git diff against either prints nothing
and exits zero, which is indistinguishable from no drift. Corrected
29 July 2026, finding D8: the previous anchor 9e77f65 is the 24 June
PROJECT baseline, not the pre build baseline, and the engine was
legitimately developed after it through ModelVersion v1.4.0, so a diff
against it is 1476 lines and can never be empty. e74fd2e is this
build's own first commit, is code identical to the true pre build
baseline 2178e72 of 21 July, and states the claim the gate actually
wants, that THIS BUILD changed nothing.
rg proves zero Python and zero dashes in written docs, each with a
planted positive control.
Migration versions match across control plane, tenant, and staging,
each queried directly, never summarized.
Build feature routes beyond the released set are re proven dark in
production, unauthenticated AND authenticated legs.
A secrets sweep of repo and docs finds nothing, positive control
planted and removed, values never echoed.
New tenant tables spot checked for organization_id, forced RLS, and
the leading composite index.
Endpoint catalogue, table index, runbooks, and the Owner's Manual
reflect what shipped. BUILD_STATE, the task list, and reality
agree, exactly one current phase named.
EVERY MEASURING INSTRUMENT IS CALIBRATED ONCE AT THE LARGEST INPUT THIS
PROTOCOL CAN DEMAND OF IT. Added as a standing rule 29 July 2026 from
finding D16. Before an instrument's number is quoted anywhere, it must
have been run once at the FULL scale the protocol specifies, not at a
convenient fraction of it, and that calibration run must be recorded.
CONVENIENCE SCALE VALIDATION PROVES NOTHING. D16: the stress tool's
percentile function used an insertion sort behind a comment reasoning
that "sorting a few thousand durations is not the bottleneck here". The
reasoning was sound and the premise was false. This protocol asks for a
THIRTY MINUTE soak, which is roughly 1.8 million samples, and O(n
squared) on 1.8 million is a trillion operations run twice. The only
soak ever executed was SIXTY SECONDS, 60,000 samples, which completes in
seconds. So the soak this protocol requires had never once been
reportable, every number was collected correctly, none of it was
printable, and the gap was invisible because the input was always thirty
times smaller than the requirement.
A MEASURING INSTRUMENT THAT CANNOT REPORT THE MEASUREMENT ASKED OF IT IS
NOT A SLOW INSTRUMENT, IT IS A MISSING ONE. Two long soaks were lost
before this was diagnosed, and the first loss was WRONGLY BLAMED on the
D14 credential rotation that happened to land at the same moment. A
wrong attribution is worse than no attribution, because it closes the
question.
THE CHECK: for every instrument, name the largest input the protocol can
demand, and state where it was run at that size. An instrument with no
such run is uncalibrated and its numbers are provisional.
A COMMENT JUSTIFYING A SIMPLIFICATION IS A CLAIM ABOUT THE INPUT, and it
must be checked against the input the protocol specifies rather than the
input the author had in mind.
NO CHANGE TO A RESOURCE LIMIT OR A RUNTIME CONSTRAINT COUNTS UNTIL A
RECORDED KNOWN GOOD FIXTURE HAS BEEN RERUN AND MATCHED ITS WRITTEN
NUMBERS. Added as a standing rule 29 July 2026 from finding D18. The rule
covers rlimits, memory caps, worker and concurrency counts, pool sizes,
and timeouts.
D18: the PDF library was moved into a child process, correctly, and that
child was given an RLIMIT_AS of 1 GiB. RLIMIT_AS bounds VIRTUAL address
space and the Go runtime reserves large virtual arenas at startup, so
every worker died instantly with "fatal error: runtime: out of memory"
before reading a byte. Every worker failure falls back to the weaker
reader, which is right for an unreadable document and WRONG for a
readable one, so a fix aimed at ONE pathological file silently degraded
extraction for ALL of them. The original PWS went from 55 chunks to 3 and
the run reported ok=1.
THIS CLASS OF DEFECT DOES NOT FAIL, IT DEGRADES, and a degraded pipeline
reports success. No test failed. Nothing in the output was red. The only
reason it did not ship is that 55 had been written down in an evidence
file and 3 did not match it.
THE COROLLARY IS THE HABIT: record the number before changing the thing
that produces it. A limit change with no fixture to compare against is
unproven no matter how green the suite looks.
THE CHECK: name the fixture, name its written numbers, and state where
the matching rerun is recorded. A limit change with none of those three
is provisional.
THE POSITIVE CONTROL LIBRARY IS A FILE, NOT AN INTENTION. Section 4 item 2
said the library only grows; it had no home, so it did not exist. It is
now docs/POSITIVE_CONTROL_LIBRARY.md and every entry names the
instrument, the lie it told, and the control that catches it.
ARCHITECTURE DOCUMENT CURRENT, MEASURED, AND SECRET FREE. Added as a
standing rule 28 July 2026. docs/ARCHITECTURE.txt is canonical in
the repository and nowhere else; any copy outside it is stale by
definition. Its volatile facts are RE MEASURED at every revision,
never hand edited: schema versions queried per database, binary
hashes, account and data counts, environment flags, task and track
statuses, the risk register, and the current state section. The
header takes a new date, commit, and supersedes line. A claim that
cannot be re measured is labeled inferred in the sentence.
Corrections are withdrawn by name, never silently edited. Nothing
aspirational enters it. SECRETS NEVER APPEAR IN IT regardless of
anyone's direction, INCLUDING THE OWNER'S, which is the point of
writing the rule down rather than relying on judgement each time.
It revises at exactly four moments: every phase close as this line
item, every production deploy, every incident closed, and every
recorded decision.
GATE E, HUMAN. The evidence bundle goes to Joseph: contact sheet,
stress numbers against targets, drift checklist, restore drill time,
and the ledger extract. Joseph says go. The phase closes on his word
and not before, recorded.
--------------------------------------------------------------------------------
3. THE REMAINING PHASES UNDER THIS PROTOCOL
--------------------------------------------------------------------------------
PHASE 2, CURRENT: SCOPE AND REQUIREMENTS
Objective Close the extraction loop on REAL documents: upload,
deterministic extraction, cited scope, review, drafts,
promotion, amendment impact. Includes the two deferred
Phase 1 items, intake uploads and sam-attachment-sync,
which unblock the moment Joseph's solicitation package
lands.
Stress 32 way promotion race on one draft. Concurrent extraction
of 25 documents memory bounded. A 200 page PWS parses
within cap. Amendment ingest during promotion corrupts
nothing. Scrub gate flooded with mixed payloads misroutes
zero private items, positive control planted.
Visual Roles recruiter and manager. Screens: capture list and
detail, upload with progress and failure states, scope
review with accept, edit, reject, split, merge, draft
builder, promotion confirmation, amendment diff view.
Drift External boundary: a tenant document fixture anywhere in
an external bound payload fails the suite. Engine diff
empty. Blocked on Joseph: the real RFP or combined
synopsis with PWS and at least one amendment.
PHASE 3: PROPOSAL OPERATIONS
Objective Proposal workspace, compliance matrix, sections,
milestones, risks, staffing links, the deterministic
readiness engine, submission with hard blockers, outcomes
into bidoutcomes, plus the slate approval lifecycle with
withdrawal.
Stress 32 way approve and withdraw races reconcile counts. A
readiness recompute storm across 100 proposals is bit
stable run to run. Submission raced against a blocker
appearing loses to the blocker. Snapshot job killed mid
run reruns clean.
Visual Roles recruiter, manager, admin. Every workspace tab with
fixture data, blocker states rendered, readiness drivers
legible, approve and withdraw with the reason modal, audit
trail visible in Activity.
Drift Readiness engine is pure, versioned, and shares zero code
with the candidate engine, proven by import graph.
PHASE 4: INTELLIGENCE TIER A
Objective oews-metro-sync, sca-wd-sync, usajobs-sync, awards task
order depth, O*NET bump, the eleven cited knowledge cards,
five closed TAG intents, evidence pack stub.
Stress Every sync run twice at full volume: identical counts, no
duplicates, manifests reconcile. Rate limit budgets
respected under a deliberate over ask, backoff observed.
Intent storm: 100 concurrent TAG calls, all parameterized,
zero model authored SQL by construction.
Visual Cards render with citations in the knowledge feed, Ask
answers cite them, each new intent demonstrated in the
console with its provenance.
Drift ingest_manifest rows for every source, licenses recorded,
CC BY 4.0 attribution present, external flag state
re proven.
PHASE 5: THE DESK, HEAVIEST PHASE IN THE PLAN
Objective Everything amendments 2 through 5 assign here: recruit
desk completion and metrics, requisition to requirement
bridge, resume pipeline, Import Center, screenMATCH
uploads, Candidates page with fusion search, reverse
match, add to job order, job order self updates, and
publishing to fg-talent.com with same origin apply.
Stress A 5,000 row import commits within cap, killed and rerun
without twins. 32 way add to order races produce one
application. Seat fill raced at the last opening flips
filled exactly once and moves the rest to
filled_by_another. Publish and unpublish churned 50 times
leaves site, sitemap, and cache consistent. The apply
endpoint flooded answers 429 and the honeypot swallows
the bots. Fusion search under load holds the p95 target.
Visual Roles viewer through superuser, because this phase is
where role differences become visible. Candidates page,
pipeline board with aging, Import Center all four flows
including the protected class rejection message, job
order detail with live counts, and the public side: the
careers index and a detail page on fg-talent.com at all
five widths, apply form success and duplicate paths, Rich
Results pass, Patricia and Brian only, the excluded names
asserted absent from render and schema.
Drift One candidate spine: the shared components serve both
surfaces, proven by import graph, and the public surface
hygiene checks rerun in full.
PHASE 5A: IDENTITY AND ACCESS
Objective The matrix rebuild with ownership scopes, rate field
sensitivity, impersonation, organizations provisioning,
regenerated exhaustive tests.
Stress The full matrix suite at the new shape. A grant ceiling
fuzz attempts every illegal mint at every rung. 100
concurrent sessions across mixed roles hold targets.
Impersonation expiry raced against writes. Provisioning
run end to end twice is idempotent on the second attempt.
Visual One contact sheet PER ROLE across the same route set, so
the differences between viewer, member, recruiter,
manager, admin, owner, and superuser are visible side by
side, plus the impersonation banner on screen, plus proof
by payload inspection AND by eye that rates above pay are
absent below manager.
Drift The nineteen legacy capability aliases still resolve,
404 not 403 holds everywhere, EEO grant remains outside
the ladder.
PHASE 6: HARDENING AND CUTOVER
Objective MFA on everywhere, MM_ENV production with every gate
live, monitoring beyond minimal, the Gate 6 checklist,
and the production release of the whole build.
Stress The full system run: 100 concurrent authenticated users
mixed across all four products for 30 minutes on staging
at production data shape, targets held, then the failover
drill under that load, then the timed restore drill one
more time. These numbers become the baseline the live
system is judged against.
Visual The complete route manifest, every role, every viewport,
fresh baselines approved as the production visual ledger.
Drift The full Section 11 acceptance list, items 1 through 40
plus this protocol's additions, every line with evidence.
--------------------------------------------------------------------------------
4. THE IMPROVEMENT LOOP, MAKING IT BETTER WITHOUT DRIFTING
--------------------------------------------------------------------------------
1. RETRO. Closing any phase writes a retro block into BUILD_STATE:
what broke, what instrument lied, what took longest, what surprised.
2. POSITIVE CONTROL LIBRARY. Every time an instrument is caught lying,
the control that would have caught it joins the permanent library
and runs at every subsequent Gate D. The library only grows.
3. BACKLOG. Improvement ideas go to docs/IMPROVEMENTS.md with a one
line rationale, never straight into code. Joseph triages at each
Gate E.
4. ONE PER PHASE. Each phase may carry at most ONE approved
improvement item alongside its scoped work. That is the entire
licensed channel for unscoped betterment; anything more is drift by
definition.
5. TARGETS RATCHET. Stress targets may tighten between phases and may
never quietly loosen. Loosening requires a recorded decision.
--------------------------------------------------------------------------------
5. EVIDENCE CONVENTION
--------------------------------------------------------------------------------
docs/evidence/phaseN/
functional/ gate item transcripts and observations
stress/ load outputs, race results, drill timings
visual/ screenshots, contact sheet, pixel diffs
drift/ sweep outputs and their positive controls
GATE_E.md the bundle summary Joseph approves
BUILD_STATE references the bundle path at every phase close. Evidence
is append only like everything else: superseded bundles are kept, never
deleted.
--------------------------------------------------------------------------------
6. ACCEPTANCE ADDITIONS TO SECTION 11
--------------------------------------------------------------------------------
41. Every phase from 2 onward closed through all five gates in order,
with an evidence bundle on disk and Joseph's recorded approval.
42. Stress targets met at every phase and never loosened without a
recorded decision; Gate 6 numbers stand as the production baseline.
43. Visual baselines exist for every screen, updated only through
approved contact sheets, and untouched screens pixel diff clean at
every phase close.
44. A timed, successful restore drill exists no older than the most
recent phase close.