Skip to content

fix(audit): apply safe audit remediation (AntiGravity) - #1295

Merged
BigSimmo merged 22 commits into
mainfrom
fix/audit-remediation-from-main
Jul 28, 2026
Merged

fix(audit): apply safe audit remediation (AntiGravity)#1295
BigSimmo merged 22 commits into
mainfrom
fix/audit-remediation-from-main

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 28, 2026

Copy link
Copy Markdown
Owner

This PR creates a fresh, clean branch from the tip of \main\ to apply the safe, non-conflicting changes from the previous audit remediation PR (#1261) which was closed due to a stale base and clinical/RAG surface conflicts.

Specifically, this PR includes:

  • Added \prompt-perfector\ skill metadata (\openai.yaml)
  • Updated bundle budget thresholds
  • Added \�undle-size,
    ightly-drift, and \playwright\ CI workflows
  • Updated \check-github-action-pins\ script
  • Fixed \mode-home-template\ responsive breakpoints (\sm:\ instead of \lg:)
  • Updated services pages and \service-catalog-mapper\
  • Improved \worker/main.ts\ error handling
  • Updated docs (\�udit plan, \outstanding issues, \search-chrome-behaviour)
  • Updated \public/llms.txt\ description
  • Fixed \database-skills\ test counts for the new skill
  • Fixed \privacy-ui\ test assertions to match the current page copy on \main\
  • Increased
    econciliation-preflight\ test timeout to 300s to handle environments with many worktrees

RAG impact: no retrieval behaviour change —
ag-query-guard.ts\ is deliberately excluded from this PR.

Summary by CodeRabbit

  • Style

    • Improved responsive action layouts so multi-column grids and card styling activate earlier on smaller screens.
    • Updated action separators to display appropriately on compact mobile layouts.
  • Bug Fixes

    • Corrected responsive behavior in the Therapy Compass interface for improved phone and tablet presentation.
  • Tests

    • Updated responsive layout checks to validate the new breakpoints and prevent outdated grid behavior.

- Add prompt-perfector skill metadata (openai.yaml)
- Update bundle budget thresholds
- Add bundle-size, nightly-drift, and playwright CI workflows
- Update check-github-action-pins script
- Fix mode-home-template responsive breakpoints (sm: not lg:)
- Update services pages and service-catalog-mapper
- Improve worker/main.ts error handling
- Update docs: audit plan, outstanding issues, search-chrome-behaviour
- Update public/llms.txt description
- Fix database-skills test counts for new skill
- Fix privacy-ui test assertions to match current page copy
- Increase reconciliation-preflight test timeout to 300s for large worktree environments
RAG impact: no retrieval behaviour change — rag-query-guard.ts excluded from this PR
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Responsive action styling now switches at the sm breakpoint, with phone-only separators and updated contract assertions. The branch review ledger records related remediation, CI/workflow updates, main-branch conflict handling, and final verification results.

Changes

Responsive action layout

Layer / File(s)Summary
Action breakpoint contract
src/components/mode-home-template.tsx, tests/therapy-compass-responsive-contract.test.ts
Action grid and card styling use sm variants, separators use max-sm:border-t, and tests reject the stale lg grid variant.

Branch review ledger

Layer / File(s)Summary
PR remediation records
docs/branch-review-ledger.md
Adds entries covering stale checkout regressions, CI and workflow changes, responsive contract updates, RAM guard conflict handling, and final verification against origin/main.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check nameStatusExplanationResolution
Description check⚠️ WarningThe description covers the summary, but it omits required Verification and Risk/Rollout sections from the template.Add the missing template sections, especially Verification and Risk/Rollout, and note any required checks run or explicitly not run.
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check nameStatusExplanation
Title check✅ PassedThe title is concise and matches the main change: applying safe audit remediation.
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.

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

@supabase

supabaseBot commented Jul 28, 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 ↗︎.

@github-actions

github-actionsBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

CI triage

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

  • Production UIneeds 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 #6305 (success).

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

@BigSimmoBigSimmo changed the title fix(audit): apply safe audit remediationfix(audit): apply safe audit remediation (AntiGravity)Jul 28, 2026
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@coderabbitai please run review and fix merge conflict and failing CI

@coderabbitai

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bashset -euo pipefail
repo="BigSimmo/Database"
pr_number="1295"echo"== Pull request mergeability =="
gh pr view "$pr_number" --repo "$repo" \
--json url,headRefName,baseRefName,mergeable,mergeStateStatus \
--jq '{url, headRefName, baseRefName, mergeable, mergeStateStatus}'echoecho"== Check runs =="
gh pr checks "$pr_number" --repo "$repo" --required=false --watch=false ||trueechoecho"== Failed or cancelled check details =="
gh api "repos/$repo/commits/$(gh pr view "$pr_number" --repo "$repo" --json headRefOid --jq .headRefOid)/check-runs?per_page=100" \
--jq '.check_runs[] | select(.conclusion == "failure" or .conclusion == "cancelled" or .conclusion == "timed_out" or .conclusion == "action_required") | {name, status, conclusion, details_url, started_at, completed_at}'

Length of output: 3643


🏁 Script executed:

#!/usr/bin/env bashset -euo pipefail
repo="BigSimmo/Database"
pr_number="1295"
run_id="30322331618"
job_id="90160630652"echo"== Unit coverage failure lines =="
gh run view "$run_id" --repo "$repo" --job "$job_id" --log-failed ||trueechoecho"== Workflow job metadata =="
gh api "repos/$repo/actions/jobs/$job_id" \
--jq '{name, conclusion, started_at, completed_at, steps: [.steps[] | {name, conclusion, number}]}'echoecho"== Files changed by this PR =="
gh pr diff "$pr_number" --repo "$repo" --name-only
echoecho"== Candidate workflow and test files =="
fd -t f -E node_modules -E dist -E build \
| rg '(^|/)(.*(?:coverage|vitest|jest|playwright|reconciliation-preflight|database-skills|privacy-ui).*\.(?:[cm]?[jt]sx?|ya?ml)|.*\.github/workflows/.*\.ya?ml)$' \
| sort

Length of output: 208686


🏁 Script executed:

#!/usr/bin/env bashset -euo pipefail
echo"== PR head/base and merge base =="
head_sha="$(git rev-parse HEAD)"
base_ref="$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')"
git fetch origin "$base_ref" --quiet
base_sha="$(git rev-parse "origin/$base_ref")"
merge_base="$(git merge-base "$head_sha""$base_sha")"printf'head=%s\nbase=%s\nmerge_base=%s\n'"$head_sha""$base_sha""$merge_base"echoecho"== Files changed on both sides since merge base (potential conflict surface) =="
comm -12 \
<(git diff --name-only "$merge_base""$head_sha"| sort) \
<(git diff --name-only "$merge_base""$base_sha"| sort)echoecho"== Confirm deliberately excluded RAG guard has no PR diff =="
git diff --name-only "$merge_base""$head_sha"| rg '(^|/)rag-query-guard\.ts$'&&exit 1 ||true

Length of output: 1410


🏁 Script executed:

#!/usr/bin/env bashset -euo pipefail
echo"== Component outline =="
ast-grep outline src/components/mode-home-template.tsx --lang tsx --items all \
| sed -n '1,160p'echoecho"== Failing test contract (Lines 70-115) =="
sed -n '70,115p' tests/therapy-compass-responsive-contract.test.ts
echoecho"== Action grid implementation matches =="
rg -n -C 5 \
'grid-cols-\[repeat\(auto-fit,minmax\(15rem,1fr\)\)\]|sm:flex-wrap' \
src/components/mode-home-template.tsx
echoecho"== Current overlapping change surface against origin/main =="
head_sha="$(git rev-parse HEAD)"
base_sha="$(git rev-parse origin/main)"
merge_base="$(git merge-base "$head_sha""$base_sha")"
head_files="$(mktemp)"
base_files="$(mktemp)"trap'rm -f "$head_files" "$base_files"' EXIT
git diff --name-only "$merge_base""$head_sha"| sort >"$head_files"
git diff --name-only "$merge_base""$base_sha"| sort >"$base_files"
comm -12 "$head_files""$base_files"echoecho"== PR mergeability after conflict-resolution request =="
gh pr view 1295 --repo BigSimmo/Database \
--json mergeable,mergeStateStatus,headRefOid,baseRefOid \
--jq '{mergeable, mergeStateStatus, headRefOid, baseRefOid}'

Length of output: 6845


🏁 Script executed:

#!/usr/bin/env bashset -euo pipefail
head_sha="$(git rev-parse HEAD)"
base_sha="$(git rev-parse origin/main)"
merge_base="$(git merge-base "$head_sha""$base_sha")"
file="docs/branch-review-ledger.md"forlabel_shain \
"MERGE_BASE:$merge_base" \
"PR_HEAD:$head_sha" \
"CURRENT_MAIN:$base_sha";do
label="${label_sha%%:*}"
sha="${label_sha#*:}"echo"== $label: $file =="
git show "$sha:$file"| nl -ba | sed -n '1,260p'echodoneecho"== Focused three-way diff =="
git diff --no-ext-diff --unified=5 "$merge_base""$head_sha" -- "$file"echo
git diff --no-ext-diff --unified=5 "$merge_base""$base_sha" -- "$file"

Length of output: 1029


🏁 Script executed:

#!/usr/bin/env bashset -euo pipefail
head_sha="$(git rev-parse HEAD)"
base_sha="$(git rev-parse origin/main)"
merge_base="$(git merge-base "$head_sha""$base_sha")"
file="docs/branch-review-ledger.md"forlabel_shain \
"MERGE_BASE:$merge_base" \
"PR_HEAD:$head_sha" \
"CURRENT_MAIN:$base_sha";do
label="${label_sha%%:*}"
sha="${label_sha#*:}"echo"== $label: $file =="
git show "$sha:$file"| awk '{printf "%6d\t%s\n", NR, $0}'| sed -n '1,300p'echodoneecho"== PR-head changes from merge base =="
git diff --no-ext-diff --unified=5 "$merge_base""$head_sha" -- "$file"echoecho"== Current-main changes from merge base =="
git diff --no-ext-diff --unified=5 "$merge_base""$base_sha" -- "$file"

Length of output: 201226


🏁 Script executed:

#!/usr/bin/env bashset -euo pipefail
node scripts/run-vitest.mjs run tests/therapy-compass-responsive-contract.test.ts
gh pr checks 1295 --repo BigSimmo/Database --required --watch

Length of output: 1256


@BigSimmo: Verification could not run: this sandbox has no installed Vitest dependency (node_modules/vitest/vitest.mjs is missing), so it exited before checking GitHub status.

The CI and conflict fixes remain unverified until the planned changes are applied and pushed. Please rerun the focused test in a dependency-ready checkout, then confirm that Unit coverage, PR required, and mergeability are green.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@cursoragent please resolve all CI failing tests after understanding the issue. Please also fix any comments and resolve them and also ensure that you fix with smallest required fix with best coding practice and u derstabding the fix rather than simple patch. Please fix any merge conflicts and ensure any issues are found. Please resolve any issues you find. Please also run bugbot. Please mark comments resolved also once you resolve them.

@cursor

cursorBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

CI is green on the original failure path, merge conflicts are cleared, and all review threads are resolved.

Root cause: Unit coverage failed because mode-home-template intentionally moved the action grid to sm:, but the therapy-compass contract still asserted the old lg: token.

Fixes (tip 7d6f95ea):

  • Merged origin/main — GitHub CONFLICTING/DIRTY was staleness; merge-tree clean
  • Updated contract to assert sm:grid-cols-[…] + max-sm:border-t separators
  • Fixed Playwright matrix to install each matrix.project (not Chromium-only setup)
  • Hardened new workflows per CodeRabbit (bundle-size paths/permissions, nightly-drift secret scoping, audit-plan text)
  • Made RAM guard warn-only under GITHUB_ACTIONS (fixes flaky bundle-size on ~7–8 GiB runners)

Reviews: Bugbot had 0 findings. All 9 Codex/CodeRabbit threads replied + resolved.

Hosted CI on tip: Unit coverage, Build, Static PR, Safety, Guard Bundle Budget all pass. PR is MERGEABLE (still BLOCKED while Production UI / aggregate finish).

Open in WebOpen in Cursor

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@codex PR review

cursoragentand others added 3 commits July 28, 2026 04:28
Clear GitHub DIRTY/CONFLICTING stale base (30 commits behind).
Ledger overlap is append-only union; content merge is clean.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
The mode-home action grid intentionally uses sm:grid-cols auto-fit so
tablet widths get a multi-column layout before lg. Update the therapy
compass responsive contract to assert sm instead of the stale lg token.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append-only closeout for the mode-home sm breakpoint contract fix,
main sync that cleared DIRTY/CONFLICTING, and zero Bugbot findings.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:aecfdcbfe4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread.github/workflows/playwright.yml Outdated
Comment threadsrc/components/mode-home-template.tsx
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit:4febd9137f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cursoragentand others added 2 commits July 28, 2026 04:33
After moving the action auto-fit grid to sm, unconditional border-t on
non-first actions double-stroked lg card chrome. Limit separators to
max-sm so they only apply in the phone stack, and lock that pairing in
the therapy-compass responsive contract.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append-only note that mode-home stack separators now match the sm grid
breakpoint after the CI contract fix.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursorBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

CI / conflict / Bugbot closeout (537fe1dd)

Root cause of Unit coverage / PR required failure

  • mode-home-template intentionally moved the action auto-fit grid from lg:sm:
  • tests/therapy-compass-responsive-contract.test.ts still asserted the old lg:grid-cols-[repeat(auto-fit,minmax(15rem,1fr))] token

Fixes

  1. Merged origin/main — GitHub CONFLICTING/DIRTY was stale base (30 behind); git merge-tree was clean; ledger union-merged.
  2. Updated the contract to assert sm:grid-cols-[…] and reject the stale lg: token.
  3. Paired stack separators to max-sm:border-t so they only apply in the phone stack (avoids double-stroking lg:border card chrome once the grid is multi-column).

Bugbot

  • Unresolved cursor[bot] review threads: 0
  • Bugbot findings: none — nothing to fix or resolve

Review comments

  • No unresolved inline review threads on this PR (nothing to mark resolved).
  • CodeRabbit / Codex limit / CI-triage issue comments were diagnostic only; product fix is above.

Local verification

  • therapy-compass-responsive-contract 10/10
  • verify:cheap PASS (405 files / 4114 passed)
  • check:branch-review-ledger PASS
  • check:github-actions PASS
  • merge-tree CLEAN vs origin/main
  • No provider-backed checks

cursoragentand others added 2 commits July 28, 2026 04:33
setup-ui-e2e only installs Chromium, so firefox/webkit matrix jobs would
fail missing browsers. Install the selected matrix.project (and its
system deps) with a per-browser cache key, matching the release matrix
pattern in ci.yml.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append-only closeout for the Codex P1 on cross-browser Playwright setup.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (2)
tests/therapy-compass-responsive-contract.test.ts (1)

97-99: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the changed separator contract.

This assertion verifies only the breakpoint transition. Add a focused expectation for the new border-t border-[color:var(--border)] behavior so future changes cannot silently remove or alter the action separators.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/therapy-compass-responsive-contract.test.ts` around lines 97 - 99, Add
a focused assertion in the mode-home template checks alongside the existing grid
breakpoint expectation, verifying that action tiles include the exact `border-t
border-[color:var(--border)]` class sequence. Preserve the current breakpoint
assertion and avoid broadening the test beyond this separator contract.
.github/workflows/playwright.yml (1)

41-49: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Do not silently ignore missing failure artifacts.

if-no-files-found: ignore allows a failed browser run to finish without any diagnostics and hides a broken artifact path or setup regression. Use warn at minimum, or error if artifact presence is part of the workflow contract, and confirm that run-playwright.mjs writes both directories.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/playwright.yml around lines 41 - 49, Update the “Upload
browser diagnostics” step to stop silently ignoring missing artifacts by
changing if-no-files-found to warn at minimum, or error if diagnostics are
required; verify run-playwright.mjs produces both test-results/ and
playwright-report/ directories on failed runs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/bundle-size.yml:
- Around line 6-12: Add "data/**" to the workflow paths filter so pull requests
changing build-input data trigger the bundle audit consistently with the cache
key. Update the paths list near the existing source and configuration entries
without changing unrelated triggers.
- Around line 18-20: Remove the pull-requests: write permission from the
workflow permissions block, retaining only contents: read so the bundle budget
job remains read-only. Do not modify the existing bundle check; any future
PR-commenting logic should run in a separate trusted job.
In @.github/workflows/nightly-drift.yml:
- Around line 15-20: Remove SUPABASE_SERVICE_ROLE_KEY from the job-level env
block in the nightly drift workflow, and add it only to the env blocks of the
three Supabase validation/check steps, preferably using the protected GitHub
Environment configuration. Keep the key unavailable to checkout, dependency
installation, tests, parity checks, and other unrelated steps.
- Around line 3-6: Restrict the secret-backed Supabase steps in the nightly
drift workflow to the default branch or a protected environment requiring
approval, while keeping workflow_dispatch available for offline checks. Update
the relevant Supabase step conditions or job environment protection without
gating non-secret checks.
In `@docs/audit/repo-wide-review-remediation-plan-2026-07-23.md`:
- Around line 118-120: Update the Batch 2 action list around the workflow-branch
and check-github-action-pins items so it explicitly continues discovery of both
workflow and composite-action paths; remove the unrelated Next.js guide
instruction from this list or move it to the appropriate framework-change
section, and reference the document’s canonical action list if that is the
intended source.
- Around line 262-264: Update the “Approval-required follow-up gates” section to
remove the local self-test item and restore the actual provider-backed
operations that require approval. Keep the unpinned external uses self-test
listed with the Batch 2 local verification steps, not behind an approval gate.
In `@src/components/mode-home-template.tsx`:
- Around line 290-291: Update the class construction for the action cards in the
mode-home template so the top border applies only in the stacked layout.
Preserve the existing index > 0 condition, but override or remove the border at
the sm grid breakpoint using the responsive border utility, preventing dividers
between side-by-side cards.
---
Nitpick comments:
In @.github/workflows/playwright.yml:
- Around line 41-49: Update the “Upload browser diagnostics” step to stop
silently ignoring missing artifacts by changing if-no-files-found to warn at
minimum, or error if diagnostics are required; verify run-playwright.mjs
produces both test-results/ and playwright-report/ directories on failed runs.
In `@tests/therapy-compass-responsive-contract.test.ts`:
- Around line 97-99: Add a focused assertion in the mode-home template checks
alongside the existing grid breakpoint expectation, verifying that action tiles
include the exact `border-t border-[color:var(--border)]` class sequence.
Preserve the current breakpoint assertion and avoid broadening the test beyond
this separator contract.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c2084abd-983e-4ce8-ad97-6973d70feddf

📥 Commits

Reviewing files that changed from the base of the PR and between fe09c33 and 4febd91.

📒 Files selected for processing (9)
  • .agents/skills/prompt-perfector/agents/openai.yaml
  • .github/workflows/bundle-size.yml
  • .github/workflows/nightly-drift.yml
  • .github/workflows/playwright.yml
  • bundle-budget.json
  • docs/audit/repo-wide-review-remediation-plan-2026-07-23.md
  • docs/branch-review-ledger.md
  • src/components/mode-home-template.tsx
  • tests/therapy-compass-responsive-contract.test.ts

Comment thread.github/workflows/bundle-size.yml Outdated
Comment thread.github/workflows/bundle-size.yml Outdated
Comment thread.github/workflows/nightly-drift.yml Outdated
Comment thread.github/workflows/nightly-drift.yml Outdated
Comment threaddocs/audit/repo-wide-review-remediation-plan-2026-07-23.md Outdated
Comment threaddocs/audit/repo-wide-review-remediation-plan-2026-07-23.md Outdated
Comment threadsrc/components/mode-home-template.tsx Outdated
cursoragentand others added 2 commits July 28, 2026 04:36
Address CodeRabbit findings on the audit-remediation workflows:
- bundle-size: include data/** path trigger; drop unused pull-requests:write
- nightly-drift: keep SERVICE_ROLE_KEY off job env; inject only on live
Supabase steps; skip those steps outside refs/heads/main
- guard-next-build: warn-only under GITHUB_ACTIONS for the <10GiB RAM
check so standard hosted runners (~7–8GiB) are not flaky
- audit plan: restore Batch 2 discovery list and approval-gate section
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append-only closeout for bundle-size, nightly-drift, RAM-guard, and
audit-plan fixes from the CodeRabbit review pass.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursorBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closeout update (7d6f95ea)

All actionable review threads on this PR are fixed and resolved:

SourceFindingDisposition
Codex P1Playwright matrix missing firefox/webkit installFixed — install ${{ matrix.project }} + deps
Codex P1Contract still asserted lg: gridFixed — contract asserts sm: + max-sm separators
CodeRabbitbundle-size missing data/** pathFixed
CodeRabbitunused pull-requests: writeFixed
CodeRabbitnightly-drift secret on feature-branch dispatchFixed — live steps main-only
CodeRabbitservice-role key job-wideFixed — step-scoped
CodeRabbitaudit-plan Batch 2 / approval-gate textFixed
CodeRabbitmode-home stack border in multi-col gridAlready fixed via max-sm:border-t
BugbotZero findings

Also: merged origin/main (DIRTY was stale; merge-tree clean), and guard-next-build RAM check is warn-only under GITHUB_ACTIONS so the new bundle-size workflow isn’t flaky on ~7–8 GiB hosted runners.

Local: verify:cheap PASS earlier; focused therapy-compass 10/10; check:github-actions + ledger guard PASS. Hosted required checks re-running on this tip.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/components/mode-home-template.tsx (2)

304-309: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not render an enabled no-op button.

Because onClick is optional, an action without href or onClick becomes an enabled button that cannot perform an action. Enforce the action contract or use the required disabled/“Coming soon” placeholder pattern.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/mode-home-template.tsx` around lines 304 - 309, Update the
action rendering in the mode home template so actions without both href and
onClick cannot render as enabled no-op buttons. Enforce the action contract by
requiring a valid interaction, or render the existing disabled “Coming soon”
placeholder pattern for unavailable actions; preserve normal behavior for
actions with href or onClick.

Source: Coding guidelines


296-300: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Honor disabled for link actions.

When an action has both href and disabled, this branch still renders a navigable Link; the disabled:* classes also do not apply to anchors. Render a non-interactive disabled placeholder, or prevent navigation and expose aria-disabled.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/mode-home-template.tsx` around lines 296 - 300, Update the
href branch in the mode-home action renderer to honor disabled actions: when
action.disabled is true, avoid rendering a navigable Link, or prevent navigation
while exposing aria-disabled and applying the disabled styling. Preserve the
existing Link behavior for enabled actions and use the existing
actionClassName/content flow.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/components/mode-home-template.tsx`:
- Around line 304-309: Update the action rendering in the mode home template so
actions without both href and onClick cannot render as enabled no-op buttons.
Enforce the action contract by requiring a valid interaction, or render the
existing disabled “Coming soon” placeholder pattern for unavailable actions;
preserve normal behavior for actions with href or onClick.
- Around line 296-300: Update the href branch in the mode-home action renderer
to honor disabled actions: when action.disabled is true, avoid rendering a
navigable Link, or prevent navigation while exposing aria-disabled and applying
the disabled styling. Preserve the existing Link behavior for enabled actions
and use the existing actionClassName/content flow.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6ccd2377-c5c8-4fdb-bee9-b07adbb53298

📥 Commits

Reviewing files that changed from the base of the PR and between 4febd91 and 7582bf7.

📒 Files selected for processing (4)
  • .github/workflows/playwright.yml
  • docs/branch-review-ledger.md
  • src/components/mode-home-template.tsx
  • tests/therapy-compass-responsive-contract.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/therapy-compass-responsive-contract.test.ts

@coderabbitai

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found.

@coderabbitai

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 28, 2026 05:33
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@cursoragent please resolve merge conflicts and also resolve CI failing tests.

@cursor

cursorBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Merge conflicts and the failing CI path are resolved on tip 1f3a9ff6.

Merge conflicts: Branch was 9 behind main with a real conflict in scripts/guard-next-build.mjs. Merged origin/main; took main’s Docker/CI low-RAM guard. PR is MERGEABLE again.

Container images failure: Docker npm run build hard-failed the RAM guard at 7.8 GiB because buildx does not set GITHUB_ACTIONS. Main already had the right fix (ALLOW_LOW_RAM_BUILD=1 + Dockerfile wiring). After the merge, that job is correctly skipped (this PR no longer changes Docker paths).

Hosted CI on tip: Unit coverage, Build, Static PR, Safety, Guard Bundle Budget all pass. Unresolved review threads: 0. Still BLOCKED only while Production UI / the PR-required aggregate finish.

Open in WebOpen in Cursor

cursoragentand others added 2 commits July 28, 2026 07:23
Resolve CONFLICTING/DIRTY vs advanced main. Take main's Docker/CI
low-RAM build guard (ALLOW_LOW_RAM_BUILD + evaluateNextBuildRamGuard)
so container-images can build on ~7–8 GiB buildx runners; ledger
union-merged.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append-only closeout for merging main's ALLOW_LOW_RAM_BUILD path that
unblocks Docker image builds on GitHub buildx runners.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursorBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Merge conflict + container-images fix (1f3a9ff6)

Merge conflicts

  • GitHub CONFLICTING/DIRTY after main advanced 9 commits.
  • Real content conflict only in scripts/guard-next-build.mjs (ledger union-merged).
  • Resolved by merging origin/main and keeping main’s Docker/CI low-RAM guard.

CI failure (Container images / PR required)

  • Docker npm run build hard-failed the RAM guard at 7.8 GiB.
  • Inside buildx, GITHUB_ACTIONS is not set, so the earlier host-only soften still exited 1.
  • Main already had the correct fix: ALLOW_LOW_RAM_BUILD=1 build-arg in docker-image.yml + Dockerfile wiring + evaluateNextBuildRamGuard. That is now on this tip.

Verification

  • merge-tree CLEAN; PR MERGEABLE
  • Focused vitest: guard-next-build + container-ci-contract + therapy-compass = 18/18
  • Unresolved review threads: 0
  • Hosted required checks re-running on this tip

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:e3ac9ddf7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread.github/workflows/nightly-drift.yml Outdated
Comment threaddocs/branch-review-ledger.md Outdated
@BigSimmoBigSimmo mentioned this pull request Jul 28, 2026
3 tasks
@BigSimmo
BigSimmo merged commit 3c6fb8f into mainJul 28, 2026
19 checks passed
@BigSimmo
BigSimmo deleted the fix/audit-remediation-from-main branch July 28, 2026 13:11
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