Repository navigation
CI-001B1 — Run frontend Jest in hosted CI #124
Description
Officer impact: Officers gain clearer proof that a reviewed website change passed the frontend behavior tests before merge. No member-facing workflow, permission, payment, or content changes.
Officer documentation: Update OFFICER_START_HERE.md and docs/officers/PUBLISH_AND_CHECK.md so the checklist distinguishes the hosted Jest result from build, website, Firebase, and provider evidence.
Deployment evidence: None at issue creation. Closure requires the exact pull-request and post-merge commits to pass the hosted frontend job including Jest. Website, Netlify, GitHub Pages, Firebase, and provider states must be reported separately; this ticket does not authorize direct Firebase/provider changes.
Problem
CI-001A #103 established a deterministic Node 20 frontend Jest baseline, currently 2 suites / 16 tests, but .github/workflows/ci.yml still runs only frontend lint/build. A green hosted frontend job therefore does not prove the committed Jest suite ran.
Atomic outcome
Run the existing frontend Jest suite inside the hosted frontend CI job as a blocking, non-watch, in-band step before the production build. Update the minimum engineering and officer truth documentation that currently says the hosted Jest gate is unavailable.
Invariant
A failing frontend Jest test must make the hosted frontend job fail before build completion or merge evidence can be treated as green. The tests must remain deterministic, synthetic, and unable to initialize production Firebase or outside monitoring.
Scope
.github/workflows/ci.yml: add a named Node 20 frontend Jest step using the existing lockfile install and committed CRA/Jest baseline.- Update only documentation statements whose current truth changes from “local baseline only” to “hosted CI frontend job runs Jest.”
- Update
OFFICER_START_HERE.mdanddocs/officers/PUBLISH_AND_CHECK.mdwith plain-language proof and stop conditions. - No package, lockfile, deployment-workflow, Firebase, Functions, Rules, Stripe, provider-console, branch-protection, or production-data changes.
Acceptance criteria
- The hosted frontend CI job invokes the complete committed frontend Jest suite with
CI=true, no watch mode, and deterministic serial execution. - Any Jest failure returns a nonzero job result; no
|| true, ignored exit, snapshot rewrite, retry masking, or production-network fallback is introduced. - The existing Node 20 frontend suite passes locally from a lockfile install.
- The diagnostic production build still succeeds.
- Pull-request and post-merge hosted evidence show the named Jest step passing on the exact commits.
- Documentation does not claim branch protection, Firebase deployment, website publication, or provider configuration from the Jest result.
- Officer guidance names the check, expected result, stop condition, proof, undo path, and escalation role without asking officers to use a terminal.
Dependencies and coordination
- Depends only on merged/closed CI-001A — Repair the deterministic frontend test baseline #103.
- Child of tracker CI-001 — Establish trustworthy quality gates and protected deployment #105; this closes only the hosted frontend-Jest slice, not the full fail-closed CI/deployment program.
- SAFETY-001 — Preserve callbacks and fail closed on local Firebase isolation #99, SEC-001 — Replace the Firestore admin catch-all with resource-specific rules #100, PAY-003A — Harden Stripe webhook ingress and monotonic event reduction #101, and PROMO-001 — Disable unmodeled Stripe price adjustments #102 retain their existing owners. This ticket must not edit their files.
- The permissive mutating lint step, exact-commit deployment ordering, missing-authority behavior, OIDC/WIF, protected environments/branches, and staging rollback remain separate CI-001 children.
Failure cases
- CRA enters watch mode or hangs in CI.
- A test failure is ignored while build stays green.
- Tests initialize production Firebase, Sentry, Analytics, or another external service.
- Documentation collapses test, merge, website, Firebase, and provider states into one “deployed” claim.
Migration/compatibility
No schema or runtime migration. Existing application output should remain byte-equivalent because only workflow and documentation files change.
Claim protocol
Creation is not a claim. Before editing, assign the issue, post CLAIMED by <canonical agent> at <UTC>; branch <branch>, and re-read all comments. Earliest valid claim wins.
Activity
daliu commentedon Jul 13, 2026
CLAIMED by Codex agent /root/membership-access at 2026-07-13T07:13:39Z; branch codex/issue-124-frontend-jest-ci-gate.
Dependency #103 is merged and closed. Scope is limited to the hosted frontend Jest step plus the exact engineering/officer truth documentation named in the issue. Existing #99/#100/#101/#102 claims and deploy/Firebase/provider surfaces remain untouched.
daliu commentedon Jul 13, 2026
SCOPE AMENDMENT by Codex agent /root/membership-access at 2026-07-13T07:22:40Z: docs/officers/GLOSSARY.md is added to the #124 documentation scope solely to define the unavoidable term Jest for the officer procedure. No other glossary or runtime changes are authorized.
daliu commentedon Jul 13, 2026
Implementation ready for hosted verification.
Invariant: the complete committed frontend Jest suite runs immediately after the lockfile install and before any source-mutating workflow command; a Jest failure returns a nonzero status and fails the frontend CI job.
Local evidence on Node 20.20.2:
npm ci --legacy-peer-deps.git diff --checkpassed.Scope remains one workflow step plus exact engineering/officer documentation. No package, lockfile, deploy workflow, Firebase, Functions, Rules, provider configuration, application source, or public asset changed. Pull-request and post-merge runs must still show the named
Run frontend Jest testsstep green before this issue closes.ci: run frontend Jest in hosted checks (#124)
daliu commentedon Jul 13, 2026
Completed and merged through PR #125 as
f04b89af3039d494ac2eb75f924d7646cd65c6e2.Acceptance evidence
a6b85664f33ca8bf4bf83a6196f7a64958634e13.Run frontend Jest testsstep before the legacy lint command; 2/2 suites and 16/16 tests passed.f04b89af3039d494ac2eb75f924d7646cd65c6e2.Officer and deployment truth
Officer impact: Officers can verify one exact named frontend-test step before and after merge, with explicit warnings that it is not lint proof, branch-protection proof, or live-surface proof.
Officer documentation:
OFFICER_START_HERE.md,docs/officers/PUBLISH_AND_CHECK.md, anddocs/officers/GLOSSARY.md.Deployment evidence: GitHub Pages workflow 29232117822 built and published the merge commit. Firebase did not deploy: the job explicitly reported no
FIREBASE_SERVICE_ACCOUNTsecret and skipped Firebase deployment. Netlify's PR preview passed, andrunmprc.comreturned HTTP 200 from Netlify at 2026-07-13T07:29:54Z with the unchanged application asset hashes; Netlify's exact production commit remains unverified. No Firebase, provider configuration, application source, public asset, package, lockfile, or deploy workflow changed in this issue.Residual work remains under #105/CI-001B2: non-mutating fail-closed lint, proven required branch checks, protected deployment authority and ordering, dependency/secret checks, and exact provider deployment evidence.