Skip to content

CI-001B1 — Run frontend Jest in hosted CI #124

Closed

Description

@daliu

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.md and docs/officers/PUBLISH_AND_CHECK.md with 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

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

  1. self-assigned this
    on Jul 13, 2026
  2. added
    priority:P0Launch blocker or urgent security risk
    area:webWeb application and hosting
    area:ciContinuous integration and deployment
    size:SSmall focused issue
    status:in-progressClaimed and actively being implemented
    type:testingTest infrastructure and quality gates
    on Jul 13, 2026
  3. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    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.

  4. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    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.

  5. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    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:

    • Lockfile install completed with npm ci --legacy-peer-deps.
    • Exact complete frontend suite passed: 2 suites, 16 tests.
    • A temporary intentional failing assertion made the same Jest command exit 1; the probe was removed and is not in the diff.
    • Diagnostic production build compiled successfully.
    • Workflow YAML parsed and git diff --check passed.
    • Two independent read-only agent reviews approve the corrected final diff.

    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 tests step green before this issue closes.

  6. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    Completed and merged through PR #125 as f04b89af3039d494ac2eb75f924d7646cd65c6e2.

    Acceptance evidence

    • Pull-request CI run 29232008242 passed on exact PR commit a6b85664f33ca8bf4bf83a6196f7a64958634e13.
    • Its frontend job shows the named Run frontend Jest tests step before the legacy lint command; 2/2 suites and 16/16 tests passed.
    • Post-merge CI run 29232117801 passed on exact merge commit f04b89af3039d494ac2eb75f924d7646cd65c6e2.
    • Its frontend job again shows the named step before lint; 2/2 suites and 16/16 tests passed. Hosted Functions and Firestore Rules jobs also passed.
    • A local intentional-failure probe had made the same Jest command exit 1 and was removed before commit.
    • Two independent read-only Codex reviews approved the final diff.

    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, and docs/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_ACCOUNT secret and skipped Firebase deployment. Netlify's PR preview passed, and runmprc.com returned 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:ciContinuous integration and deploymentarea:webWeb application and hostingpriority:P0Launch blocker or urgent security risksize:SSmall focused issuetype:reliabilityReliability and recoverytype:testingTest infrastructure and quality gates

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions