Skip to content

fix: enable CI triage by default and scope #093 Playwright roots - #1515

Merged
BigSimmo merged 6 commits into
mainfrom
cursor/ci-followups-093-138-1bf5
Jul 31, 2026
Merged

fix: enable CI triage by default and scope #093 Playwright roots#1515
BigSimmo merged 6 commits into
mainfrom
cursor/ci-followups-093-138-1bf5

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the remaining follow-ups from the CI hygiene workstream that are code-fixable here:

  1. #138 / CI triage — enable by default (vars.CI_TRIAGE_ENABLED != 'false'). Opt out with CI_TRIAGE_ENABLED=false. Still trusted default-branch checkout only; never runs PR code. Fixes the stale “now set” claim in docs/process-hardening.md.
  2. #093 Playwright duplicate root — add shared visibleByTestId (visible filter, not bare .first()) and apply it to the known hotspots in ui-tools / ui-smoke / ui-accessibility.

Not in this PR: #023 remainder (needs a green weekly/manual release-browser-matrix datapoint + human irrelevant-at-10 disposition).

Clinical Governance Preflight

  • Intended clinical behavior change is documented above (or N/A) — N/A: CI triage + Playwright test helpers only.
  • Privacy / tenancy / owner-scope impact assessed — N/A.
  • Source governance / citation / document-access impact assessed — N/A.
  • Failure behavior remains conservative (no new guessy fallback / silent success) — triage stays fail-closed on real job failures; Playwright scopes to visible owners rather than masking with .first().
  • Verification evidence recorded below (commands + results) — see Verification.
  • Rollback path is identified — revert this PR; set CI_TRIAGE_ENABLED=false to disable triage without revert.

RAG impact

RAG impact: no retrieval behaviour change — test helpers and CI triage workflow only.

Verification

npm run check:outstanding-issues  # pass (43 open, 110 archived)
npm run check:ci-triage           # pass
npm run check:github-actions      # pass

Hosted: wait for tip PR required (UI jobs will run because Playwright specs changed).

Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features
    • CI failure triage is now enabled by default, with an opt-out setting available.
  • Bug Fixes
    • Improved automated UI checks to select visible results and controls when duplicate hidden elements are present.
    • Increased reliability for search, navigation, focus, mobile comparison, and accessibility validations.
  • Documentation
    • Clarified CI triage behavior and visual regression guidance.
    • Updated issue tracking and review records to reflect resolved work.

CI triage no longer requires CI_TRIAGE_ENABLED=true (opt out with false).
Add visibleByTestId for Next streaming duplicate roots and apply it to the
known ui-tools/ui-smoke/ui-accessibility hotspots instead of bare getByTestId
or .first(). Archive #93 and #138.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 155b53c8-2f16-417f-b34d-624bc0c65b52

📥 Commits

Reviewing files that changed from the base of the PR and between 239a2ce and e52aacf.

📒 Files selected for processing (1)
  • docs/branch-review-ledger.md

📝 Walkthrough

Walkthrough

The CI triage workflow is now enabled by default with an explicit opt-out. Playwright tests use visibility-aware test-ID locators for potentially duplicated DOM roots, and related documentation and review records were updated.

Changes

CI triage enablement

Layer / File(s) Summary
Default-enabled triage and records
.github/workflows/ci-triage.yml, docs/process-hardening.md, docs/outstanding-issues.md, docs/branch-review-ledger.md
CI triage runs unless CI_TRIAGE_ENABLED=false; documentation, issue archives, and review ledgers record the updated policy and related reconciliations.

Visibility-aware UI assertions

Layer / File(s) Summary
Visible locator helper and usage
tests/playwright-settlement.ts, tests/ui-accessibility.spec.ts, tests/ui-smoke.spec.ts, tests/ui-tools.spec.ts, docs/testing.md
Added visibleByTestId and updated Forms and Differentials assertions to target visible matching elements; duplicate-root documentation is now conditional.

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

Possibly related PRs

Suggested reviewers: cursoragent, claude

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides a clear summary, verification results, governance assessment, and rollback path, but omits the required Risk and rollout section. Add the required Risk and rollout section with explicit risk, rollback, and provider or production effects details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes both primary changes: enabling CI triage by default and scoping Playwright selectors to visible roots.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@BigSimmo

Copy link
Copy Markdown
Owner Author

Temporarily closing to preserve the serialized merge queue while #1510 exact-head CI completes. This PR will be reviewed in a later queue slot.

@BigSimmo BigSimmo closed this Jul 31, 2026
@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent Prep this closed PR for reopen. Leave it CLOSED. Do not merge, reopen, force-push, rebase, or arm auto-merge.

Do only this, in order:

  1. Snapshot

    • Branch tip, base, behind/ahead vs origin/main, mergeable state.
    • Unresolved review threads (Codex / Bugbot / Copilot / human).
    • Failing checks: on the current tip, or stale closed-PR rollup.
    • High-risk surfaces touched (auth, privacy, migrations/RLS, clinical/RAG/retrieval, workers, production/config, provider calls).
    • Run npm run ledger:lookup -- <branch> --scope "closed-PR reopen prep". If already reviewed at this HEAD and still merge-clean with no open threads, summarize and stop unless something new needs fixing.
  2. Sync once

    • Fetch origin/main.
    • Use git merge-tree to tell real conflicts from behind-but-clean.
    • Merge main only if needed; resolve with the smallest correct fix.
    • For ledger/issues churn conflicts: prefer main’s shared queues, preserve this PR’s intentional notes.
  3. Review the tip vs base

    • Findings-first, high-confidence only: correctness, security, privacy, auth, data loss, migrations/RLS, clinical/RAG/source behavior, production reliability, user-facing regressions.
    • For each finding: severity, file/line, failure mode, smallest fix.
    • Skip formatting/naming/speculative nits unless they are a real defect.
    • Check PR title/body still accurate for this tip (RAG impact / Clinical Governance only if this PR’s risk class requires them). Don’t rewrite for polish.
  4. Threads + fixes

    • For each unresolved actionable review/Bugbot comment, or each new P0–P2 finding: implement the smallest fix, or disposition as already-fixed / not-actionable with a short reply, then resolve.
    • Ignore bot rate-limit / summary noise.
    • Do not broad-refactor.
  5. Tip hygiene

    • No secrets, junk, or unrelated WIP.
    • Don’t push a tip whose only delta is a review-ledger append.
  6. Confirm ready + handoff

    • merge-tree clean vs origin/main.
    • No unresolved actionable threads.
    • Push the branch. Leave closed.
    • Append ledger: npm run ledger:append for this HEAD and scope "closed-PR reopen prep".
    • Report: tip SHA, sync/conflict outcome, findings fixed or dispositioned, residual risks, and that fresh mergeability/required CI apply only after reopen.

Treat closed-PR CI as stale until reopen. Do not run local test suites CI will cover unless needed to prove a specific fix.

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

PR #1515 is ready for reopen and remains CLOSED.

Snapshot (before sync)

  • Branch cursor/ci-followups-093-138-1bf5 @ f1543194, draft, closed
  • Ahead 1 / behind 1 vs origin/main; GitHub MERGEABLE / BEHIND
  • No unresolved review threads
  • Closed-PR CI: mostly green; Production UI (1–3) still pending (stale until reopen)
  • Surfaces: CI triage workflow + Playwright helpers/docs only — not auth/privacy/RAG/migrations/workers
  • Ledger: NOT REVIEWED at that HEAD for "closed-PR reopen prep"

Sync

  • Real conflict in docs/outstanding-issues.md (not behind-but-clean)
  • Merged origin/main (49aee229)
  • Resolution: kept main’s queue / #098 note / #158 archive; preserved this PR’s #093 / #138 archive rows
  • npm run check:outstanding-issues passed (45 open, 111 archived, next-id=159)

Review (tip vs main)

No P0–P2 findings.

  • Triage default-on still uses trusted default-branch checkout only
  • visibleByTestId matches existing Playwright filter({ visible: true }) usage; fail-closed on multiple visible matches
  • Title/body/RAG/governance still accurate for this tip

Threads + fixes

Nothing actionable. No code fixes required.

Handoff

Item Value
Branch tip (pushed) a1e32a8d
Content tip reviewed 29969848 (main merge)
vs origin/main ahead 3, behind 0; merge-tree clean
PR state CLOSED (not reopened, not auto-merged)
Closed-PR head_sha still f1543194 — GitHub freezes closed PR heads; updates on reopen
Ledger appended for 29969848 / "closed-PR reopen prep"

Residual risks: enabling triage by default will start commenting on PR CI failures (intended; opt out with CI_TRIAGE_ENABLED=false). #093 product mount bisect remains optional if a new surface appears.

Fresh mergeability and required CI apply only after reopen.

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 31, 2026 00:50
Resolve docs/outstanding-issues.md by keeping main's shared queue and
#98/#158 notes while preserving this PR's #93/#138 archive rows.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Ledger row for tip after main sync; PR remains closed.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo BigSimmo reopened this Jul 31, 2026
@supabase

supabase Bot commented Jul 31, 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 ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 31, 2026 01:35
@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.

@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent This PR was just reopened. Do not merge, force-push, rebase, or arm auto-merge
unless I explicitly ask.

  1. Confirm GitHub is on the current branch tip (not the old closed head).
    Snapshot head SHA, behind/ahead, mergeable state, required checks, and
    unresolved actionable threads.

  2. Mergeability on this tip only:

    • Real conflict (merge-tree dirty): smallest fix, push.
    • Behind-but-clean: if required CI is in flight, wait and sync once late;
      otherwise sync once now. Prefer human/operator identity for update-branch;
      else git merge origin/main + push. No sync thrash.
    • Clean/current: leave it.
      Missing checks while mergeability is dirty ≠ green.
  3. Fresh required CI on this tip only — ignore pre-close rollup. On failure:
    smallest fix, push, re-check. Don’t rerun unless a fix landed or a check
    is stuck. No provider-backed gates without approval.

  4. New/unresolved actionable Codex/Bugbot/Copilot/human threads: smallest fix
    or short already-fixed/not-actionable reply, then resolve. Ignore
    rate-limit/summary noise.

  5. Stop when: merge-tree clean, no actionable threads, required checks green
    or clearly in progress on this tip. Report tip SHA, sync done/not needed,
    CI status, threads handled, residual risks. Leave the merge decision to me.

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

PR #1515 is reopen-ready on the current tip. Merge left to you.

1. Snapshot

  • GitHub head matches branch tip: 239a2ce6
  • Open, not draft; MERGEABLE / BLOCKED (checks still running)
  • Ahead 5 / behind 0 vs origin/main
  • No unresolved review threads

2. Sync

  • Real conflict on reopen (docs/outstanding-issues.md vs main #1485 / #1466)
  • Merged origin/main; kept main’s #038/#065/#092 archives + this PR’s #093/#138
  • merge-tree clean after sync

3–4. CI + threads

  • Fresh CI on 239a2ce6 (pre-close rollup ignored)
  • CodeRabbit: scoped Forms global-search-input count through visibleByTestId → fixed, resolved
  • CodeRabbit ledger nit on inbound main row 1addcece → not actionable, resolved
  • Current tip checks: Change scope / PR policy / PR mergeability / Safety pass; Static PR, Unit coverage, Production UI critical in progress

Handoff

Item Value
Tip 239a2ce6
Sync done (conflict resolved)
Threads 0 unresolved
Residual triage-on-by-default will comment on PR CI failures (opt out with CI_TRIAGE_ENABLED=false)

Not merged, not force-pushed, not rebased, auto-merge not armed.

Open in Web Open in Cursor 

Resolve outstanding-issues archive conflict by keeping main's #38/#65/#92
resolutions alongside this PR's #93/#138 archive rows.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

@coderabbitai coderabbitai Bot 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: 1

🤖 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 `@tests/ui-tools.spec.ts`:
- Around line 1401-1405: Update the global-search count assertion in the Forms
test to query through the visible forms-home container, reusing
visibleByTestId(page, "forms-home") or the existing visible-input helper instead
of page.getByTestId("global-search-input"). Keep the assertion expecting exactly
one visible input.
🪄 Autofix (Beta)

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: 099dc09a-1b57-42d0-8122-79165b8235e3

📥 Commits

Reviewing files that changed from the base of the PR and between 012852e and a1e32a8.

📒 Files selected for processing (9)
  • .github/workflows/ci-triage.yml
  • docs/branch-review-ledger.md
  • docs/outstanding-issues.md
  • docs/process-hardening.md
  • docs/testing.md
  • tests/playwright-settlement.ts
  • tests/ui-accessibility.spec.ts
  • tests/ui-smoke.spec.ts
  • tests/ui-tools.spec.ts

Comment thread tests/ui-tools.spec.ts

@coderabbitai coderabbitai Bot 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: 1

🤖 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 `@docs/branch-review-ledger.md`:
- Line 349: Update the ledger entry for commit
1addcece5a2b7122c5898584830109f617421a3a with the decisive output for each
listed verification gate, including static checks, lint, typecheck, Vitest,
Chromium UI, and production-readiness; if any result is unavailable, explicitly
mark that check as pending instead of claiming completion.
🪄 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: 428849f7-9a4d-4cc6-8ec7-dac12310cd3b

📥 Commits

Reviewing files that changed from the base of the PR and between a1e32a8 and 7d7fdc6.

📒 Files selected for processing (4)
  • docs/branch-review-ledger.md
  • docs/outstanding-issues.md
  • docs/process-hardening.md
  • tests/ui-smoke.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/process-hardening.md
  • tests/ui-smoke.spec.ts
  • docs/outstanding-issues.md

Comment thread docs/branch-review-ledger.md
cursoragent and others added 2 commits July 31, 2026 01:40
CodeRabbit: page-wide global-search-input toHaveCount(1) still trips on
hidden streaming duplicates; count under the visible forms-home owner.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

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 31, 2026 01:47
@BigSimmo
BigSimmo merged commit ca2c4de into main Jul 31, 2026
25 checks passed
@BigSimmo
BigSimmo deleted the cursor/ci-followups-093-138-1bf5 branch July 31, 2026 01:56
Sign up for free to 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