Skip to content

OBS-001A3 — Remove raw frontend error objects from browser logs #142

Closed

Description

@daliu

Officer impact: None — this removes private diagnostic payloads without changing an officer or member task.

Officer documentation: None — no navigation, permission, collected field, or officer procedure changes. Engineering security/operations evidence must distinguish source containment from publication and live behavior.

Deployment evidence: Closure must record source/tests/merge, website publication, exact runmprc.com revision, Firebase deployment, outside-provider configuration, and live behavior separately.

Problem

The completed #118, #134, and #139 slices fail closed inside signup, Sentry, and Analytics, but #111's closure audit found four remaining browser console sinks that pass raw caught error objects to console; ErrorBoundary also passes the React component stack. Firebase/Auth/Firestore/App Check errors and rendering errors can contain email, token, provider-response, URL, form, or member-context values. The current tests do not inspect those console payloads.

Invariant

Application runtime console diagnostics may contain only fixed, low-cardinality outcome identifiers selected by source code. A caught error, message, stack, component stack, response, request, URL, form value, account/member value, or provider object must never be passed to a browser console method. Removing raw logging must not change the affected user flow or bypass #134's Sentry sanitizer.

Atomic outcome

Route the four raw frontend error-console paths through one fail-closed diagnostic helper with a closed outcome set. Add synthetic canary and whole-runtime-source tests proving raw console calls cannot recur. Preserve existing failure UI/state, promise behavior, and ErrorBoundary Sentry capture.

Exact implementation boundary

Excluded: Sentry sanitizer/config, Analytics, signup/profile/Auth Functions, Stripe/webhooks, Strava/OAuth, Firestore Rules, provider consoles, cookies/history, production data, and public/sitemap.xml.

Acceptance criteria

  • The render, verification-email, members-only fetch, and App Check initialization failure paths never pass a caught error or component stack to console.
  • The existing constant App Check-not-configured diagnostic also uses the same closed helper; no application/public runtime path calls console directly outside that helper.
  • Unknown, object, coercing, getter-backed, and sensitive-string diagnostic inputs fail closed without throwing or logging.
  • Synthetic email, phone, address, DOB, emergency-contact, token, request/response, URL/query/fragment, form, stack, and provider canaries are absent from serialized console arguments.
  • ErrorBoundary still passes the original error to OBS-001A1 — Disable Sentry replay and fail closed for personal data #134's Sentry wrapper, while its console output is one fixed identifier.
  • Identity registration, members-only loading/error state, Firebase resource initialization, local emulator isolation, and callback isolation remain unchanged.
  • Focused tests, the complete frontend suite, callback/release gates, strict changed-file lint, and diagnostic build pass on Node 20 with no production/provider traffic.
  • Engineering evidence states that source/merge do not prove website publication, exact runmprc.com, Firebase/provider configuration, console history, or live behavior.

Dependencies and coordination

Claim protocol

Creation is not a claim. Before editing, assign the issue, add status:in-progress, post CLAIMED by <canonical agent> at <UTC>; branch <branch>, and re-read comments. Earliest valid claim wins.

Activity

  1. added
    priority:P1High-priority follow-up
    type:securitySecurity or privacy boundary
    area:firebaseFirebase services and data
    area:webWeb application and hosting
    size:SSmall focused issue
    status:proposedDesigned but dependencies or decisions remain
    area:privacyPersonal data, consent, minimization, retention, and privacy operations
    status:in-progressClaimed and actively being implemented
    and removed
    status:proposedDesigned but dependencies or decisions remain
    on Jul 13, 2026
  2. self-assigned this
    on Jul 13, 2026
  3. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    CLAIMED by Codex agent /root at 2026-07-13T10:54:03Z; branch codex/issue-142-console-privacy.

    Exact runtime/test ownership: new src/services/monitoring/clientDiagnostics.ts and .test.ts; src/components/ErrorBoundary.tsx; src/services/identity/Identity.ts; src/components/MembersOnly.jsx; src/services/firebase/FirebaseResources.ts; and only the minimum #142 status hunks in SECURITY.md and OPERATIONS_RUNBOOK.md.

    STOP boundaries: #134 Sentry sanitizer/config, #139 Analytics, #118 signup/profile/Auth Functions, #101 Stripe/webhook, #88 Strava/OAuth, Firestore Rules, provider consoles, production data, cookies/history, and public/sitemap.xml are immutable/excluded. Tests use synthetic canaries and make no provider call. Any overlap discovered after this marker is a stop-and-coordinate condition.

  4. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    Implementation complete; claim retained for exact-head review.

    • Draft PR: OBS-001A3: remove raw frontend console error payloads #143
    • Branch: codex/issue-142-console-privacy
    • Exact local head: 4aa7e941a550d6fdf4439f8ed661aaa7bf226169
    • Base: 36b531c8e741442af7c688c23a780d2dcd4ed374
    • Diff SHA-256: c3405313f2e9410b9adaca73e5e56385fc48d35c2d903c469afd38636fa3239e
    • Deliberate pre-fix proof: the new guard identified all four raw-console paths and failed 1/4 assertions.
    • Node 20 local proof after the fix: focused 49/49, complete frontend 94/94, callback/release gates 23/23, strict changed-file lint, diagnostic build, and diff check passed.

    The PR will remain draft while exact-head hosted CI and independent privacy/regression reviews run. No website, runmprc.com, Firebase deployment, outside-provider setting, production record, or live console history was changed or inspected.

  5. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    REVIEW-DRIVEN TEST SCOPE AMENDMENT at 2026-07-13T11:02Z — claim retained.

    Two exact-head reviewers found that the first recurrence guard missed valid JavaScript console access forms and that three caller failure paths were only statically inspected. I am adding only existing src/services/firebase/FirebaseResources.test.ts to the claimed test boundary; Identity and MembersOnly caller canaries remain inside the already claimed clientDiagnostics.test.ts. No additional runtime or documentation file is claimed.

    The new proof will use TypeScript syntax-tree inspection plus optional-chain, parenthesized/commented, alias/destructure, computed-global, and escaped-identifier fixtures, and will execute Identity registration, members-only fetch failure, and both App Check failure cases. All original STOP boundaries remain unchanged.

  6. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    Review blockers resolved; claim retained.

    • Exact pushed head: 299ed2c493f3f02245900850b57db24acb24c712
    • Base: 36b531c8e741442af7c688c23a780d2dcd4ed374
    • Diff SHA-256: e48d44c2c3177d8b5beb0276559d0a4cf19b44662bfd4585f9896c767331930f
    • The regex recurrence guard is replaced by TypeScript syntax-tree inspection, static computed-string detection, and conservative public-HTML scanning. Fifteen fixtures cover dot/optional/parenthesized/commented access, alias/destructure, computed global/window, escaped identifier, concatenated property, and evaluated source.
    • Runtime canaries now prove Identity registration still resolves its credential, MembersOnly finishes loading in the same error state, and Firebase resources continue with either a missing App Check key or a throwing App Check initializer. Only fixed outcome identifiers reach console.
    • Node 20 final proof: focused diagnostics/Sentry/Firebase 64/64; complete frontend 8 suites / 108 tests; callback/release 23/23; strict changed-file lint, diagnostic build, and diff check passed.

    Independent exact-head re-review and hosted CI are running. Deployment/provider states remain unchanged and unverified.

  7. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    Completed in PR #143 and merged to main as f2caaae3b3f25adfd4fc552008871408f18e5931.

    Acceptance evidence:

    • Exact reviewed source head: bcb8b353f60b34f874371da5ee94826439fc615b
    • Exact base: 2e3228acc7be649e0b154b450f7bac362e8dfb83
    • Diff SHA-256: 4d0f4aeba1e32fb708991611eee9a3621206b7c2b329c7749815091e86dff28c
    • Two independent exact-head reviews approved the range, confirmed the same two OBS-001A3 — Remove raw frontend error objects from browser logs #142 patches after rebase, and verified that merged PROMO-001: disable unmodeled Stripe adjustments #144 Stripe code/tests/documentation remained preserved.
    • Node 20 local evidence: focused diagnostics/Sentry/Firebase 64/64; complete frontend 8 suites / 108 tests; callback/release/Firebase gates 23/23; strict changed-file lint, diagnostic build, and diff check passed.
    • Exact-head hosted CI 29245243743 passed frontend, Functions, and Firestore Rules.
    • Exact-merge post-merge CI 29245372365 passed frontend, Functions, and Firestore Rules.
    • The review fixture count is 13; the earlier progress comment's “fifteen” was a metadata error and did not describe a missing test or source change.

    Deployment truth:

    • Source changed: yes; the fixed-identifier diagnostic boundary, AST recurrence guard, regression tests, and engineering evidence are in main.
    • Tests passed: yes, locally and in exact-head plus exact-merge hosted CI.
    • Code merged: yes, exact merge f2caaae3b3f25adfd4fc552008871408f18e5931.
    • Website published: no. Production Git-triggered publication remains paused by CI-001B2 — Make releases protected, backend-first, and fail-closed #135; a Netlify PR preview is review evidence only.
    • runmprc.com verified: no exact revision was checked live.
    • Firebase deployed: not required and not performed; this outcome changes frontend source/tests/docs only.
    • Outside provider configured: no Sentry, Analytics, Firebase, or other provider setting was inspected or changed.
    • Production behavior verified: no; production traffic and live console history were not inspected or altered.

    Officer impact: None — member and officer tasks/screens are unchanged; only diagnostic payload handling changed.

    Officer documentation: None — no officer procedure, navigation, permission, deployment duty, or collected field changed. SECURITY.md and OPERATIONS_RUNBOOK.md contain the engineering evidence.

  8. daliu commented on Jul 13, 2026

    @daliu
    ContributorAuthor

    COMPLETE / CLAIM RELEASED — 2026-07-13

    • PR OBS-001A3: remove raw frontend console error payloads #143 reviewed head: bcb8b353f60b34f874371da5ee94826439fc615b
    • Squash merge: f2caaae3b3f25adfd4fc552008871408f18e5931
    • Exact-head CI 29245243743: frontend, Functions, and Rules passed; Netlify preview passed
    • Post-merge CI 29245372365: frontend, Functions, and Rules passed
    • Source/test outcome: fixed diagnostic identifiers replace raw caught browser objects/stacks on the four claimed paths; the syntax-tree recurrence guard and runtime canaries are merged

    Deployment evidence: no production website publication was requested or verified; runmprc.com revision, Firebase/provider settings, historical console data, and live behavior remain unproven. This source claim, including Identity.ts, SECURITY.md, and OPERATIONS_RUNBOOK.md, is released at merge f2caaae3b3f25adfd4fc552008871408f18e5931.

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

Metadata

Metadata

Assignees

Labels

area:firebaseFirebase services and dataarea:privacyPersonal data, consent, minimization, retention, and privacy operationsarea:webWeb application and hostingpriority:P1High-priority follow-upsize:SSmall focused issuetype:securitySecurity or privacy boundary

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions