Skip to content

CI-001D3 — Guard staging-only profile Functions deployment #674

Closed

Description

@daliu

Outcome

Add a fail-closed source contract for deploying only the two reviewed profile Functions, createMemberOnSignUp and ensureMemberProfile, to the isolated run-mprc-staging project. Prove the contract in CI and document the current billing prerequisite without enabling APIs, linking billing, or deploying a Function.

This is a source-only dependency child of #136, #133, and #105. It does not satisfy the staged Function deployment, App Check, synthetic E2E, production authority, or production release portions of those issues.

Invariants

  • The only allowed cloud target is run-mprc-staging and the only allowed operator account is runmprc@gmail.com.
  • The only allowed deploy scope is functions:createMemberOnSignUp,functions:ensureMemberProfile.
  • The repository default alias remains demo-mprc-local.
  • Missing or mismatched project, quota project, account, deploy scope, short-lived token, source exports, or lockfile CLI must fail before Firebase CLI.
  • A credentials file, broad functions target, Firestore, Auth, Hosting, Storage, production project, or extra Function must be rejected.
  • Failure output is fixed and cannot echo supplied context.
  • This issue performs no provider mutation, API enablement, billing action, deployment, data write, synthetic account creation, or production action.
  • Record billing as a separate financial authorization gate. Do not create or link a Cloud Billing account in this issue.

Acceptance criteria

  • A small contract validates the exact source exports, demo-only default alias, staging project/account/quota context, exact two-Function scope, and short-lived in-memory token requirement.
  • Package scripts pin the focused contract test, predeploy check, lockfile Firebase CLI, exact Function names, exact staging project, and non-interactive mode.
  • Negative tests reject every broader Function scope, production target, wrong account/project/quota project, credentials file, missing token, unexpected arguments, and changed source export.
  • CI runs the focused contract test without any cloud credential or deployment.
  • Current provider preflight records only redacted facts: the club account has project authority, billing is disabled, and zero open billing accounts are visible.
  • Engineering and officer documentation distinguish guard merged, billing not authorized, Functions not deployed, App Check not configured, website unchanged, and production unchanged.
  • Focused checks and the applicable full local suites pass; pull-request and post-merge CI pass before closure.

Officer impact: The repository gains a safe staging-only command shape, but officers still cannot publish the profile backend. Billing approval and the protected provider release remain NOT AVAILABLE YET.

Officer documentation: Update OFFICER_START_HERE.md, docs/officers/README.md, docs/officers/PUBLISH_AND_CHECK.md, and the matching engineering runbook/security/status records.

Deployment evidence: Source and test evidence only. Explicitly record that Firebase Functions, APIs, billing, Firestore, Auth, Hosting, outside providers, production Firebase, and runmprc.com are unchanged.

Stop conditions

Stop if work would create or link billing, enable a cloud API, grant IAM, deploy any Function, alter data, use a real user, expose provider locators or tokens, require a broad Functions target, or touch production.

Claim protocol

Assign one agent and post CLAIMED by Codex at UTC timestamp; branch codex/issue-number-staging-profile-functions-guard before editing.

Activity

  1. self-assigned this
    on Aug 26, 2026
  2. added
    priority:P0Launch blocker or urgent security risk
    type:securitySecurity or privacy boundary
    area:firebaseFirebase services and data
    area:ciContinuous integration and deployment
    size:SSmall focused issue
    status:in-progressClaimed and actively being implemented
    on Aug 26, 2026
  3. daliu commented on Aug 26, 2026

    @daliu
    ContributorAuthor

    CLAIMED by Codex at 2026-08-26T21:18:20Z; branch codex/issue-674-staging-profile-functions-guard

  4. daliu commented on Aug 26, 2026

    @daliu
    ContributorAuthor

    Completion evidence — 2026-08-26

    • Source PR: CI-001D3: guard staging profile Functions deployment #675, reviewed head 43ffa6c.
    • Merge: 4b8ed83 at 2026-08-26T21:35:44Z.
    • Pull-request CI: run 33015854644; all five required jobs passed.
    • Post-merge exact-main CI: run 33016096438; all five required jobs passed.
    • Focused source contract: 8/8 passed. Protected source/release tests: 121/121 passed. Frontend: 1,346/1,346. Functions: 7,569/7,569 with the standard two emulator-only suites skipped. Firestore Rules: 418/418. Diagnostic build and artifact verifier passed.
    • Self-review found no authorization, target-widening, credential-file, argument-injection, logging, PII, schema, migration, App Check truth, or production-fallback defect.
    • The merged wrapper validates exact staging project/quota/account context, both profile Functions together, the demo default alias, exact source exports/scripts, and lockfile Firebase CLI 15.24.0. It rejects appended arguments, broad/partial targets, extra services, production, alternate codebases, and credential-file overrides.
    • Final provider containment readback: billing false; zero visible billing accounts; zero open billing accounts; zero relevant Function service APIs enabled. runmprc.com remains HTTP 200 from Netlify.
    • No Function, API, billing, IAM, App Check, Auth, Firestore, Hosting, outside-provider, production Firebase, data, email, SMS, or live website change occurred.

    Officer impact: no officer publish action is available.

    Officer documentation: OFFICER_START_HERE.md, docs/officers/README.md, docs/officers/PUBLISH_AND_CHECK.md.

    Deployment evidence: source/test/merge evidence only. Firebase Functions remain NOT AVAILABLE YET.

    Residual gate: a separately approved Cloud Billing account and spending controls are required before Firebase Functions can be deployed. The provider release must then enable only required APIs, deploy/read back both exact Functions, record App Check policy, run disposable staging E2E, and leave production untouched.

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:firebaseFirebase services and datapriority:P0Launch blocker or urgent security risksize:SSmall focused issuestatus:in-progressClaimed and actively being implementedtype:operationsOperational setup or runbooktype:securitySecurity or privacy boundary

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions