Skip to content

Codex/cloud mcp parity 20260804 - #1613

Closed
BigSimmo wants to merge 19 commits into
mainfrom
codex/cloud-mcp-parity-20260804
Closed

Codex/cloud mcp parity 20260804#1613
BigSimmo wants to merge 19 commits into
mainfrom
codex/cloud-mcp-parity-20260804

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keep connected Codex Cloud baseline access limited to Railway plus project-scoped, read-only Supabase.
  • Make Figma, Frontend Checklist, and Sentry explicit task opt-ins through CODEX_CLOUD_ENABLE_*=1, with prompt-gated tool approval.
  • Preserve the Cloud proxy path for npm/Node subprocesses (setup + generated agent profile) while scrubbing provider and credential-bearing variables from ordinary agent shells.
  • Pin blank SENTRY_DSN in the shared offline-test scrub so Next/Vite cannot reload a live DSN from .env.local; coerce blank optional Sentry URLs to unset via z.preprocess while keeping env-parity name collection.
  • Resolve connected MCP URLs from the audited .codex/config.toml template instead of hardcoding them in setup.
  • Harden the managed Codex configuration write against interrupted or conflicting shell-policy blocks.
  • Align AGENTS.md, docs/codex-cloud.md, setup diagnostics, and focused setup contracts with the implemented boundary.

Verification

  • Focused Vitest for review-fix surfaces — PASS
  • npm run verify:pr-local on prior head 79c4672e — PASS (5098 tests, build)
  • Env-parity Sentry name contract restored on c35f61400078ded68bf34e96a882e8a3711061c8
  • GitHub CI at exact current head c35f61400078ded68bf34e96a882e8a3711061c8
  • Fresh connected Codex Cloud acceptance at the exact current head

Risk and rollout

  • Risk: a connected Cloud task could initialise a provider that the task did not authorise, expose provider environment values to ordinary shell commands, or leak provider credentials into an allegedly offline child process.
  • Mitigations: Railway and read-only project-scoped Supabase are the only connected baseline. Figma, Frontend Checklist, and Sentry remain disabled unless individually opted in with prompt approval. Offline wrappers pin blank SENTRY_DSN so Next cannot reload a live DSN. Provider variables, including Sentry DSN/auth values, are excluded from inherited offline shells.
  • Rollback: revert this PR. The checked-in MCP registrations remain disabled by default, so reverting does not require provider data rollback.
  • Provider or production effects: none from merging alone. Runtime provider reads occur only in an explicitly connected task. No OpenAI, Supabase, Railway, Figma, Frontend Checklist, or Sentry writes are authorised by this PR.

Clinical Governance Preflight

  • No clinical content, retrieval, ranking, ingestion, citation, or answer-generation behaviour changes
  • Supabase remains scoped to Clinical KB Database (sjrfecxgysukkwxsowpy) and read_only=true
  • No patient-identifiable row-content workflow is introduced
  • Service-role keys and provider credentials remain outside the repository and ordinary shell
  • No deployment or TGA SaMD behaviour change

Merge gate

Do not merge until fresh exact-head CI is green and a fresh Codex Cloud task confirms CODEX_CLOUD_ACCESS_PROFILE=connected, checks the raw shell before sourcing profiles or invoking npm/Node, and proves the expected read-only/provider boundary at c35f61400078ded68bf34e96a882e8a3711061c8.

Activate the audited Figma, Frontend Checklist, Railway, read-only Supabase, and Sentry MCP endpoints in connected Cloud profiles while preserving offline defaults and host-managed OAuth. Verified with the focused Cloud setup suite and static Cloud contract check.
@supabase

supabaseBot commented Aug 4, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitaiBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in:32 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 42dde80b-9668-4b96-82b5-cc3fef832223

📥 Commits

Reviewing files that changed from the base of the PR and between fffd301 and e9d2a82.

📒 Files selected for processing (15)
  • .codex/config.toml
  • AGENTS.md
  • docs/branch-review-ledger.md
  • docs/codebase-index.md
  • docs/codex-cloud.md
  • scripts/check-codex-cloud-raw-env.sh
  • scripts/check-codex-cloud-setup.mjs
  • scripts/setup-codex-cloud.sh
  • scripts/test-environment.mjs
  • src/lib/env.ts
  • tests/codex-cloud-setup.test.ts
  • tests/env-sentry.test.ts
  • tests/repo-hygiene.test.ts
  • tests/sentry-logging.test.ts
  • tests/test-runner-safety.test.ts
📝 Walkthrough

Walkthrough

The change adds Frontend Checklist, Figma, and Sentry hosted MCP support to Codex Cloud. It updates setup scripts, safety checks, tests, and documentation to handle proxy export, credential scrubbing, opt-in server enablement, and approval-mode rules.

Changes

Codex Cloud MCP integration

Layer / File(s)Summary
Provider registration and checks
.codex/config.toml, scripts/check-codex-cloud-raw-env.sh, scripts/check-codex-cloud-setup.mjs
Registers frontendchecklist_cloud. Adds Sentry credentials to provider inventory and raw-env checks. Updates approval validation and setup contract checks for external read tools and optional hosted MCP opt-ins.
Connected setup wiring
scripts/setup-codex-cloud.sh
Exports NODE_USE_ENV_PROXY=1, scrubs Sentry credentials, and conditionally enables Figma, Frontend Checklist, and Sentry MCP servers with prompt approval.
Offline environment and Sentry controls
scripts/test-environment.mjs, tests/sentry-logging.test.ts, tests/test-runner-safety.test.ts
Adds Sentry keys and offline control flags. Offline setup now removes SENTRY_DSN. Tests assert Sentry logging controls, provider key inventory, and safe environment values.
Setup validation and documentation
tests/codex-cloud-setup.test.ts, docs/codex-cloud.md, AGENTS.md
Validates proxy export, default and opt-in MCP server states, approval counts, and Supabase approval scoping. Docs and AGENTS.md describe hosted MCP mappings, opt-in rules, and provider verification checks.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels:codex, skip-branch-sync

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Title check✅ PassedThe title identifies the Codex Cloud MCP parity change and includes a date-based identifier.
Description check✅ PassedThe description covers the summary, verification status, risks, rollback, provider effects, governance, and exact-head merge conditions.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@cursoragent Unblock the current open PR. Confirm the PR number and GitHub head first from context. If more than one open PR could apply, stop and say which one you would use and why.

Fetch and start from the remote tip that matches that GitHub head. If the named branch ref is missing or stale, use the PR head ref. Preserve unrelated local WIP; do not discard dirty work; do not treat a local-ahead commit as the reviewed tip. Do not merge the PR, force-push, rebase, or arm auto-merge. No provider-backed gates without approval. If you cannot push or resolve threads, diagnose and comment only; if inline replies fail, resolve when possible and put blocker dispositions in the summary comment. If auto-merge is already armed, push only for a real blocker and avoid cancelling in-flight required CI unless the push clears that blocker.

If the PR is already merged or closed: confirm outcome, post one summary, and stop.

Primary job: clear mergeability and required-CI blockers on this tip. Do a full product review only if needed to explain or fix a blocker. Stay light otherwise—no broad verification suites or Playwright unless needed to prove one concrete unblock fix.

Snapshot the GitHub head: tip, behind/ahead, mergeable state, merge-tree versus origin/main (real conflict versus behind-but-clean), required checks on that tip including Production UI when selected, and unresolved threads that block merge or required CI. Missing checks while dirty are not green. Tip moved → re-snapshot.

Ledger-lookup against that GitHub head under an unblock/fix scope for this PR. If already handled at this head for unblock work, merge-tree clean, required checks green, and no blocking threads: summarize, comment, stop.

Unblock once: real conflict → merge origin/main with the smallest correct resolution (prefer main’s shared queues; keep this PR’s notes); behind-but-clean → one sync, late if required CI is in flight; clean → leave. skip-branch-sync and similar labels do not block a manual sync needed to clear a real blocker. No sync thrash. After any sync or push, re-snapshot tip, merge-tree, and required checks before declaring done. Dedupe the ledger if a merge touched it.

Fix only what blocks required checks or mergeability on this tip. Ignore advisory red unless it reveals a real required failure. Prefer the smallest safe fix; if a bot/autofix commit caused the break, prefer revert. Prove with the smallest targeted check only. Format and commit before push.

Push only blocker-fix commits. Append ledger for the final GitHub head under the unblock scope. Never push a ledger-only tip.

One PR comment: tip, sync/merge-tree, what blocked and what you fixed or dispositioned, required CI status, residual risks; merge left to me.

Stop when merge-tree is clean on the current GitHub tip, no blocking threads remain for merge/required CI, and required checks are green or clearly in progress.

@cursor

cursorBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR #1613 unblocked on tip 0e4035fe (codex/cloud-mcp-parity-20260804).

Snapshot: merge-tree clean vs main (0 behind), MERGEABLE, auto-merge off. All 4 review threads resolved. Required CI in progress (Static PR checks, Safety and config checks, Unit coverage); Production UI correctly skipped.

Blockers fixed (pushed 0e4035fe):

  • Connected MCP baseline = Railway + Supabase only; Figma / Frontend Checklist / Sentry need CODEX_CLOUD_ENABLE_*=1 and use prompt
  • Scrubbed SENTRY_AUTH_TOKEN / SENTRY_DSN
  • Aligned AGENTS.md + docs/codex-cloud.md

Proof:vitest 21/21 on tests/codex-cloud-setup.test.ts; check:codex-cloud PASS.

Notes: Inline thread replies were FORBIDDEN (dispositions in the PR summary comment). Ledger recorded locally only — not pushed (avoids ledger-only tip). Merge left to you.

Open in WebOpen in Cursor

Connected setup now enables only Railway and constrained Supabase by
default. Figma, Frontend Checklist, and Sentry require explicit
CODEX_CLOUD_ENABLE_*=1 opt-ins and use prompt approval when enabled.
Scrub SENTRY_AUTH_TOKEN and SENTRY_DSN from the agent shell inventory,
and align AGENTS.md plus Cloud docs with the narrowed contract.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursorBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Unblock summary — PR #1613

Tip:0e4035fe31bca11f73934ca7d914c467d00a239a on codex/cloud-mcp-parity-20260804
Sync / merge-tree: 0 behind origin/main, merge-tree clean, mergeable: MERGEABLE
Auto-merge: not armed

What blocked

  1. Required conversation resolution (required_review_thread_resolution: true) — 4 unresolved review threads.
  2. Codex P1 / Devin SEC / Devin docs drift / CodeRabbit scrub — connected setup unconditionally enabled Figma + Frontend Checklist + Sentry (with writes auto-approving Figma/Sentry reads), AGENTS.md still described only Railway+Supabase, and SENTRY_AUTH_TOKEN / SENTRY_DSN were missing from the offline scrub inventory.

What was fixed (0e4035fe)

  • Connected baseline is Railway (writes) + constrained Supabase (prompt) only.
  • Optional providers require CODEX_CLOUD_ENABLE_FIGMA=1, CODEX_CLOUD_ENABLE_FRONTENDCHECKLIST=1, or CODEX_CLOUD_ENABLE_SENTRY=1; when enabled they use prompt.
  • Scrubbed SENTRY_AUTH_TOKEN / SENTRY_DSN across setup, shell policy, raw-env probe, and credential inventory.
  • Updated AGENTS.md + docs/codex-cloud.md to match.

Thread dispositions

Inline replies were FORBIDDEN for this token; threads were resolved after the fix. Dispositions:

ThreadDisposition
Devin AGENTS.md driftfixed-head:0e4035fe — rulebook updated
Devin Figma/Sentry writes readsfixed-head:0e4035fe — opt-in + prompt
Codex P1 optional MCP gatefixed-head:0e4035fe — provider-specific opt-ins + tests
CodeRabbit Sentry scrubfixed-head:0e4035fe — inventory/scrub/assertions

Required CI

Re-queued on the new tip (Change scope in progress; PR policy / mergeability / GitGuardian already green). Prior in-flight CI was superseded by this blocker-fix push.

Proof

  • npx vitest run tests/codex-cloud-setup.test.ts21 passed
  • npm run check:codex-cloudPASS: static Cloud contracts match.

Residual risks

  • Host OAuth still required before optional MCP tools are callable in a connected task.
  • Ledger row recorded locally for this head under scope PR #1613 unblock (not pushed — ledger-only tip avoided).

Merge left to you.

@BigSimmoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

@codex Run a fresh read-only connected Codex Cloud acceptance for PR #1613 at exact head 0e4035fe31bca11f73934ca7d914c467d00a239a.

Safety and scope:

  • Read AGENTS.md and docs/codex-cloud.md first.
  • Do not modify files, commit, push, merge, deploy, rerun hosted CI, query clinical row contents, or perform provider writes.
  • Never print tokens, credentials, headers, database URLs, or private content.
  • Keep Supabase project-scoped and read-only.
  • If the host is not CODEX_CLOUD_ACCESS_PROFILE=connected, report that exact host-environment blocker rather than changing secrets or profiles.

Acceptance:

  1. Before sourcing profiles or invoking npm/Node, run bash --noprofile --norc scripts/check-codex-cloud-raw-env.sh.
  2. Confirm HEAD is exactly 0e4035fe31bca11f73934ca7d914c467d00a239a.
  3. Run the repository static and runtime Cloud checks and diagnosis documented in docs/codex-cloud.md.
  4. Prove the connected boundary for the baseline Railway and read-only Supabase registrations.
  5. For Figma, Frontend Checklist, and Sentry, verify that each is absent by default and appears only when its documented CODEX_CLOUD_ENABLE_*=1 opt-in is explicitly present. Use metadata/capability reads only.
  6. Report exact pass/fail evidence, every diagnose ISSUE/FIX line, and any host limitation.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@BigSimmoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

@codex Run a fresh read-only connected Codex Cloud acceptance for PR #1613 at exact head 8a4ad8ff53072bc796c81c0039006222bca6c068.

Safety and scope:

  • Read AGENTS.md and docs/codex-cloud.md first.
  • Do not modify files, commit, push, merge, deploy, rerun hosted CI, query clinical row contents, or perform provider writes.
  • Never print tokens, credentials, headers, database URLs, private content, Sentry events, or Figma file contents.
  • Keep Supabase project-scoped and read-only.
  • If the host is not CODEX_CLOUD_ACCESS_PROFILE=connected, report that exact host-environment blocker rather than changing secrets or profiles.

Acceptance:

  1. Before sourcing profiles or invoking npm/Node, run bash --noprofile --norc scripts/check-codex-cloud-raw-env.sh.
  2. Confirm HEAD is exactly 8a4ad8ff53072bc796c81c0039006222bca6c068.
  3. Run the repository static and runtime Cloud checks and diagnosis documented in docs/codex-cloud.md.
  4. Prove the connected boundary for baseline Railway and project-scoped read-only Supabase registration using metadata-only/read-only operations.
  5. Confirm Figma, Frontend Checklist, and Sentry are absent from the baseline unless their individual CODEX_CLOUD_ENABLE_*=1 opt-in is present; do not opt them in just for this acceptance.
  6. Confirm ordinary/offline child environments scrub SENTRY_AUTH_TOKEN and SENTRY_DSN without displaying values.
  7. Report commands, pass/fail, exact head, access profile, and any blocker. Do not make changes.

@chatgpt-codex-connector

Copy link
Copy Markdown

Acceptance Result

Blocked — this host is not the requested connected Codex Cloud profile. The exact host-environment blocker is:

CODEX_CLOUD_ACCESS_PROFILE=offline

I also ran the required raw-shell probe before any npm/Node command. It failed because a provider variable name is inherited by the top-level task environment:

[Codex Cloud Raw Env] FAIL: inherited provider variable names: OPENAI_BASE_URL

Per the repository Cloud contract, the raw probe must be run before sourcing profiles or invoking Node/npm, and a failure is a launcher/environment defect that requires starting another fresh task after removing the inherited variable from host settings. docs/codex-cloud.mdL250-L259 The connected acceptance also requires CODEX_CLOUD_ACCESS_PROFILE=connected, no provider variables reported present, and the Cloud/runtime checks before trusting the environment. docs/codex-cloud.mdL359-L365

Exact Head

Confirmed the checkout HEAD is exactly the requested PR head:

8a4ad8ff53072bc796c81c0039006222bca6c068

Scope Followed

  • Read AGENTS.md and docs/codex-cloud.md first, as requested.
  • Did not modify files, commit, push, merge, deploy, rerun hosted CI, query clinical row contents, or perform provider writes.
  • Did not print tokens, credentials, headers, database URLs, private content, Sentry events, or Figma file contents.
  • Did not run npm/Node commands after the raw-environment failure and offline-profile blocker.
  • Did not attempt to opt in Figma, Frontend Checklist, or Sentry.

The repo instructions say connected setup enables Railway and constrained Supabase by default, while optional Figma, Frontend Checklist, and Sentry remain off unless their task-specific CODEX_CLOUD_ENABLE_*=1 flags are set. AGENTS.mdL879-L886 The provider acceptance section further requires Railway/Supabase metadata-only verification through the fresh host’s callable tool inventory, not shell tokens or static config alone. docs/codex-cloud.mdL325-L328

Commands Run

Testing / Checks

  • bash --noprofile --norc scripts/check-codex-cloud-raw-env.sh
    Result: failed with [Codex Cloud Raw Env] FAIL: inherited provider variable names: OPENAI_BASE_URL.

  • git rev-parse HEAD
    Result:8a4ad8ff53072bc796c81c0039006222bca6c068.

  • ⚠️printf 'CODEX_CLOUD_ACCESS_PROFILE=%s\n' "${CODEX_CLOUD_ACCESS_PROFILE-}"
    Result:CODEX_CLOUD_ACCESS_PROFILE=offline; this is the exact host-environment blocker for the requested connected acceptance.

  • git status --short --branch
    Result:## work; no file changes were made.

Checks Not Run

  • ⚠️npm run check:codex-cloud — not run because the required raw-environment probe failed before npm/Node use, and the host profile is offline, not connected.
  • ⚠️npm run check:codex-cloud -- --runtime — not run for the same blocker.
  • ⚠️npm run check:runtime — not run for the same blocker.
  • ⚠️npm run check:installed-lock-parity — not run for the same blocker.
  • ⚠️ Railway and Supabase provider metadata checks — not run because the host is not CODEX_CLOUD_ACCESS_PROFILE=connected and connected MCP inventory cannot be trusted/proven from this offline task.
  • ⚠️ Figma, Frontend Checklist, and Sentry absence/opt-in callable-inventory checks — not run because connected host inventory is unavailable in this offline task; I did not opt them in.

Blocker Summary

Fresh connected Codex Cloud acceptance for PR #1613 at 8a4ad8ff53072bc796c81c0039006222bca6c068 cannot be completed in this task because:

  1. CODEX_CLOUD_ACCESS_PROFILE=offline, not connected.
  2. The raw shell already inherits OPENAI_BASE_URL, and the raw probe requires provider variables to be absent before profiles or npm/Node are used.

View task →

@github-actions

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Unit coverageneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #8028 (cancelled).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@cursoragent Work the current open PR end-to-end. Confirm the PR number and GitHub head first from context. If more than one open PR could apply, stop and say which one you would use and why.

Fetch and start from the remote tip that matches that GitHub head. If the named branch ref is missing or stale, use the PR head ref. Preserve unrelated local WIP, including any local-only ledger commits; do not discard dirty work, and do not treat a local-ahead commit as the reviewed tip. Do not merge the PR, force-push, rebase, or arm auto-merge unless I explicitly ask. No provider-backed gates without separate approval. If you cannot push or resolve threads, diagnose and comment only; if inline replies fail, resolve when possible and put dispositions in the summary comment. If auto-merge is already armed, push only for a real blocker, and avoid pushes that would cancel in-flight required CI unless the push itself clears that blocker.

If the PR is already merged or closed: confirm the head and merge commit, note required-CI outcome, post one summary, and stop.

Goal: deep review plus Bugbot, fix actionable issues with the smallest correct changes, clear merge / required-CI / thread blockers, run strong local offline verification, push fixes, append the review ledger, and post one PR summary. Prefer thoroughness over speed. Regenerate large assets only when a fix requires it; then run the asset check and keep compatibility aliases byte-identical where the repo uses them.

Snapshot the GitHub head SHA: tip, base, behind/ahead, mergeable state, merge-tree versus origin/main (real conflict versus behind-but-clean), required checks on that tip including Production UI when selected, advisory separately, unresolved actionable threads. Missing checks while dirty are not green. If the tip moves mid-work, re-snapshot and continue from the new head.

Ledger-lookup against that GitHub head under the heavy review-and-fix scope for this PR. Already reviewed at this head with clean merge-tree, green required checks, and no new actionable threads → summarize, comment, stop unless I asked for a fresh superseding pass. Follow the repo review protocol.

Unblock once: real conflict → merge origin/main (prefer main’s shared queues; keep this PR’s notes); behind-but-clean → one sync, late if required CI is in flight; clean → leave. Labels like skip-branch-sync do not block a manual sync needed to clear a real blocker. No sync thrash. After any sync or push, re-snapshot tip, merge-tree, and required checks before declaring done. Dedupe the ledger if a merge touched it.

Review high-confidence delta risks only. Separate PR-introduced defects from pre-existing re-emitted debt. For generated assets, review contracts, aliases, cache, and manifests—not every generated line. If protected RAG or ranking surfaces are touched, say so before editing; fix PR-body policy text only when wrong or missing. Ignore bot noise. No nit spam or broad rewrites. Escalate verification by touched risk: clinical / RAG / privacy / migrations / auth → domain check plus production-readiness when warranted; UI / phone-chrome / routing / styling → ensure plus phone-chrome or UI gates when warranted; generated assets or docs inventory/links → asset or docs checks when warranted.

Fix P0/P1 always; clear scoped P2 when locally provable; else disposition and resolve. Required-check failures on this tip only; ignore advisory. Prefer reverting a bad autofix commit. After fixes: format and commit before push; smallest targeted proof; repo cheap gate; repo PR-local gate. No release, lighthouse, live eval, or live provider gates without approval.

Push only this PR’s fix commits. Append ledger for the final GitHub head under the heavy scope. Never push a ledger-only tip—include ledger in a real fix push, or leave a no-change ledger append local and unpushed.

One PR comment: tip, sync/merge-tree, fixed versus dispositioned, threads, required CI, decisive local gate lines, residual risks; merge left to me. Inline only for remaining human-needed P0/P1.

Stop when merge-tree is clean on the current GitHub tip, actionable threads are clear, required checks are green or clearly in progress, heavy gates for scope passed, summary posted, merge left to me.

REMEMBER TO GROUND YOUR RESPONSES AGAINST THE CURRENT REPO AND ENSURE THAT THE EDITS DO NOT CAUSE REGRESSION AND ADDITIONALLY, the edits make sense and take the entire repo and branch into account.

@cursor

cursorBot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

PR #1613 worked end-to-end at tip fffd3011 (was 68c1f179).

Blockers cleared

  • Unit coverage / PR required failed because offline Sentry scrub put feature flags in the credential inventory and used a truthy fake DSN.
  • Fix: delete SENTRY_DSN offline; keep only auth token/DSN as credentials; leave enable/test-log flags outside inventory; assert unset logging with "".
  • Synced origin/main (merge-tree clean, 0 behind).

Review

  • Bugbot: no extra P0/P1 beyond the CI pair; inert-DSN gate issue fixed by delete.
  • Prior MCP opt-in / AGENTS threads already resolved.

Gates

  • Targeted vitest 58 passed; check:codex-cloudPASS
  • verify:cheap / verify:pr-local: 489 files / 5097 tests; Prettier OK; RAG fixtures 36/36

CI now: Change scope / PR policy / mergeability green; Unit coverage + Static PR in progress; Production UI skipped. Auto-merge off. Ledger local-only (not pushed).

Merge left to you.

Open in WebOpen in Cursor

cursoragentand others added 2 commits August 5, 2026 09:47
Keep SENTRY_AUTH_TOKEN/SENTRY_DSN in the shared credential inventory, but
delete SENTRY_DSN in offline wrappers instead of faking a URL that keeps
app gates enabled. Leave SENTRY_ENABLE_LOGS/SENTRY_SEND_TEST_LOG as
offline control flags outside providerCredentialVariables so Cloud setup
inventory checks stay aligned. Assert unset logging with an explicit empty
flag rather than undefined (which reads process.env defaults).
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursorBot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review-and-fix summary — PR #1613

Tip:fffd3011dc81a797abb0f4cd2b16b694e1381a9a on codex/cloud-mcp-parity-20260804
Sync / merge-tree: merged origin/main (was 2 behind); merge-tree clean; mergeable: MERGEABLE; auto-merge not armed
Prior GitHub tip reviewed:68c1f179 (Unit coverage / PR required red)

Fixed

  1. Required CI (Unit coverage → PR required)SENTRY_ENABLE_LOGS / SENTRY_SEND_TEST_LOG had been added to providerEnvironmentKeys, which spread into Cloud providerCredentialVariables and failed setup/raw-env inventory checks. Offline wrappers also used a truthy inert SENTRY_DSN URL that kept app Sentry gates “on”, and forcing SENTRY_ENABLE_LOGS=false in the Vitest parent env broke isSentryLoggingEnabled(undefined, dsn) (default params read process.env).
    • Keep credentials (SENTRY_AUTH_TOKEN, SENTRY_DSN) in the shared inventory.
    • DeleteSENTRY_DSN offline (blank fails Zod .url(); fake URL enables gates).
    • Keep enable/test-log flags as offline control flags outside the credential inventory.
    • Assert unset logging via explicit "" in tests/sentry-logging.test.ts.
  2. Behind main — one sync merge of origin/main after the fix.

Dispositioned / no further code change

  • Earlier Devin/Codex/CodeRabbit threads on opt-in MCP + AGENTS drift remain resolved/outdated; behaviour already matches Railway+Supabase baseline + CODEX_CLOUD_ENABLE_*=1 opt-ins with prompt.
  • Codex P2 (shared offline scrub) addressed by the credential-inventory + DSN-delete fix above.
  • Bugbot pass: no additional P0/P1 beyond the known CI pair; residual note that fake DSNs are unsafe for offline gates (fixed by delete).

Threads

All review threads resolved (none blocking). Inline replies were previously FORBIDDEN for this token; dispositions are in this summary.

Required CI

Re-queued on fffd3011 after push. Expect Unit coverage / Static PR / PR required to re-run; Production UI correctly skipped for this scripts/docs scope.

Local gates (decisive lines)

  • node scripts/run-vitest.mjs run tests/sentry-logging.test.ts tests/codex-cloud-setup.test.ts tests/test-runner-safety.test.ts58 passed
  • npm run check:codex-cloudPASS: static Cloud contracts match.
  • npm run verify:cheap → exit 0; Test Files 489 passed (489) / 5097 passed | 4 skipped
  • npm run verify:pr-local → exit 0; All matched files use Prettier code style!; Offline RAG fixture … passed (36 golden cases, 23 suites).; Skipping build: no build-affecting … changes detected.

Residual risks

  • Fresh connected Codex Cloud acceptance at this exact head still requires a host with CODEX_CLOUD_ACCESS_PROFILE=connected and a clean raw-env probe (prior acceptance blocked on offline + inherited OPENAI_BASE_URL) — host/environment work, not this tip’s code.
  • Ledger row for this head recorded locally only (not pushed — avoids ledger-only tip).

Merge left to you.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cursoragentand others added 2 commits August 5, 2026 11:51
…1613)
Blank SENTRY_DSN in offline wrappers so Next cannot reload a live DSN from
.env.local, while optionalUrlEnv coerces empty strings to unset for Zod.
Exercise isSentryLoggingEnabled's default-parameter path via stubEnv.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…P setup
Pin blank SENTRY_DSN in offline wrappers so Next cannot reload a live DSN,
treat empty optional URLs as unset in env parsing, resolve connected MCP URLs
from the audited config template, and harden related docs/tests.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

Review feedback resolved — tip aa5592ef

Addressed the two remaining unresolved threads on this tip:

  1. CodeRabbit (tests/sentry-logging.test.ts) — exercise isSentryLoggingEnabled's default-parameter path via vi.stubEnv("SENTRY_ENABLE_LOGS", "") + undefined, while keeping explicit-empty coverage.
  2. Devin (scripts/test-environment.mjs) — pin SENTRY_DSN="" offline (not delete) so Next cannot reload a live DSN from .env.local; optionalUrlEnv in src/lib/env.ts coerces blank DSNs to unset for Zod.

Proof:node scripts/run-vitest.mjs run tests/sentry-logging.test.ts tests/test-runner-safety.test.ts tests/env-sentry.test.ts42 passed; npm run typecheck → exit 0.

Unresolved review threads: 0. Merge left to you.

Keep overlapping offline Sentry scrub/test coverage from the remote tip and
retain connected MCP URL resolution, proxy profile export, and docs/test
hardening from the local review-fix commit.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

cursoragentand others added 3 commits August 5, 2026 12:03
Declare blank-tolerant Sentry DSN fields with inline z.preprocess so
check-env-parity still collects them, and cover the parser contract in
repo-hygiene tests. Record the PR #1613 babysit review ledger row.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Match Figma/Sentry project template approval to connected prompt gating,
scrub NEXT_PUBLIC_SENTRY_DSN offline like the server DSN, and clarify that
CODEX_CLOUD_ENABLE_* flags are environment/setup-time only.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

Review findings disposition (e9d2a822a832cbe09cfdd4acfa978b729ed73b1f)

FindingDisposition
Template Figma/Sentry writes vs connected promptfixed — project template + gate now use prompt (Railway stays writes)
Opt-in flags read only at setup timefixedAGENTS.md / docs/codex-cloud.md now say environment/setup-time + re-provision
SENTRY_DSN in credential inventoryacknowledged — intentional Cloud contract; raw-env/setup fail closed when present
z.preprocess env-parity regexalready guarded — comment + tests/repo-hygiene.test.ts live schema assertion
Sed MCP URL extractionalready correct — all five sections resolve from tracked template
NEXT_PUBLIC_SENTRY_DSN not scrubbedfixed — blanked offline + scrubbed from Cloud profile/raw-env
Forced offline Sentry control flagskept — belt-and-braces; overrides still win
Connected Figma/Sentry writes auto-approves readsalready fixed earlier — connected opt-ins use prompt
Offline SENTRY_DSN delete vs blankalready fixed earlier — blanked to \"\"
Supabase approval test anchoringalready fixed + added Figma/Sentry prompt coverage
Ambient CODEX_CLOUD_ENABLE_*=1 in testsalready fixed earlier — baseline sets \"0\"
Docs frontendchecklist namealready correct — table uses frontendchecklist_cloud
Template header comment driftfixed — header matches prompt/writes split
NODE_USE_ENV_PROXY setup-onlykept — intentional for CLI postinstall; not agent profile
Connected block hardcoded URLsalready fixed earlierresolve_codex_mcp_url for all five

Proof:npm run check:codex-cloud → PASS; npx vitest run tests/codex-cloud-setup.test.ts tests/test-runner-safety.test.ts → 50 passed.

@BigSimmoClaude

Copy link
Copy Markdown
OwnerAuthor

Closing as part of the open-PR review sweep, after rescuing the part worth keeping.

The Sentry scrub is preserved as #1622. That fix was real and independent of everything contested here: offlineTestEnvironment() covered OpenAI, Supabase, Postgres and E2E names but never Sentry, so an allegedly offline run inherited them. Demonstrated against main with sentinel values — SENTRY_DSN came through as https://REAL@o1.ingest.sentry.io/9 and SENTRY_AUTH_TOKEN as sntrys_REAL_TOKEN, into the child processes spawned by run-vitest.mjs and the Playwright wrappers. #1622 carries it with the delete-not-blank reasoning intact, plus the setup-codex-cloud.sh / check-codex-cloud-raw-env.sh propagation that providerCredentialVariables requires. Credit to this PR for both the fix and that coupling — the full suite is what surfaced it, exactly as bundled here.

One deliberate change on the way over: #1622 does not take this branch's tests/sentry-logging.test.ts edit. Passing "" positionally goes green while testing the explicit-empty path rather than the default-parameter path the test title claims — the subject of the still-unresolved CodeRabbit thread here. #1622 stubs SENTRY_ENABLE_LOGS empty and keeps passing undefined instead.

Why the rest is closing.#1617 supersedes it on the same six files, and the two hard-conflict (git merge-tree dirty, not merely behind). #1617 carries a first-hand fresh-Cloud-task acceptance run at head 76dfe85f reporting no Railway tool exposed, no Supabase tool exposed, no GitHub tool exposed — zero provider tools from repo-written MCP config — while the hosted OAuth path passed in ChatGPT. It attributes this to the connector surface, not to setup: "a product-surface limit, not a repository setup failure."

That is the measurement this PR's own merge gate asks for and leaves unchecked ("Fresh connected Codex Cloud acceptance at the exact current head"), alongside its own statement that "Repository CI proves the static and simulated setup contracts. It does not prove that the connected host exposed and constrained each hosted MCP at runtime." The two positions are not symmetric: one is untested by its author's own admission, the other was tested and came back negative.

There is also a concrete cost — this branch installs @railway/cli@5.30.4 (setup-codex-cloud.sh:277), and #1617 records that the first fresh acceptance attempt failed setup outright with ENETUNREACH on that binary download.

Caveat, stated plainly:#1617's acceptance is a self-report, and I could not independently launch a Codex Cloud task to re-run it. If that result is ever contradicted, this PR should be reopened — the branch codex/cloud-mcp-parity-20260804 is preserved and nothing here is lost.


Generated by Claude Code

@BigSimmoBigSimmo closed this Aug 5, 2026
BigSimmo added a commit that referenced this pull request Aug 5, 2026
…ment (#1622)
offlineTestEnvironment() scrubs OpenAI, Supabase, Postgres and E2E names but
never covered Sentry, so an allegedly offline run inherited them. Demonstrated
against main with sentinel values: SENTRY_DSN came through as
"https://REAL@o1.ingest.sentry.io/9" and SENTRY_AUTH_TOKEN as
"sntrys_REAL_TOKEN", straight into the child processes spawned by
run-vitest.mjs and the Playwright wrappers. That is enough to initialise Sentry
during a local "offline" check and to carry a source-map upload token into it.
SENTRY_DSN is deleted rather than blanked or faked, and the distinction cuts
both ways: a blank string fails the runtime schema's .url(), while an inert
loopback URL is truthy and would leave the app's Sentry gates ENABLED for the
whole run — the opposite of the intent. SENTRY_ENABLE_LOGS and
SENTRY_SEND_TEST_LOG are forced off as feature flags instead of joining the
credential inventory, since they never carry a secret.
Adding the two credentials to providerEnvironmentKeys also enrols them in
providerCredentialVariables, which check-codex-cloud-setup.mjs cross-checks
against Cloud setup and the raw-env probe. That coupling is deliberate — one
inventory, enforced in three places — so setup-codex-cloud.sh and
check-codex-cloud-raw-env.sh gain the same two names. The full unit suite is
what surfaced this; the narrower suites passed without it.
tests/sentry-logging.test.ts needed adjusting because offline Vitest now forces
SENTRY_ENABLE_LOGS=false, which is what isSentryLoggingEnabled's default
parameter reads. It stubs the flag empty and keeps passing undefined, so the
case still exercises the default-parameter path its title describes; passing ""
positionally would silently have tested the explicit-empty path instead.
Ported from the Codex Cloud MCP work in PR #1613, which bundles it with a
contested change to hosted MCP registration. The scrub is independent of that
dispute and should not wait on it.
Claude-Session: https://claude.ai/code/session_01T97Kqdj9Xh1Cubv5ms3KVy
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@cursoragent