Skip to content

Implement Audit Recommendations#1186

Closed
BigSimmo wants to merge 2 commits into
mainfrom
remediate-repository-audit-findings
Closed

Implement Audit Recommendations#1186
BigSimmo wants to merge 2 commits into
mainfrom
remediate-repository-audit-findings

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Resolves audit findings related to Git hygiene, UI CLS, and RAG evaluation parallelization.

Addresses the following issues:

  • ISSUE-01: Catalog Integrity (created skill-create.mjs and missing agent files)
  • ISSUE-02: Lock Contention (stale lock reclaiming & force-release option)
  • ISSUE-03, 04, 05 & IMP-05: Git Hygiene (sweep-merged-branches.mjs and branch cleanup)
  • IMP-02: RAG Score Parallelization (p-limit integration)
  • IMP-03: UI/UX Clinical Panels (skeleton loaders & contain-intrinsic-size)

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 114 files, which is 14 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6e202410-fc7d-4974-a1ad-f5554e0ab939

📥 Commits

Reviewing files that changed from the base of the PR and between fc9d162 and 8637fec.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (114)
  • .agents/skills/catalog.json
  • .agents/skills/dead-code-finder/SKILL.md
  • .agents/skills/dead-code-finder/agents/openai.yaml
  • .agents/skills/performance-profiling/SKILL.md
  • .agents/skills/performance-profiling/agents/openai.yaml
  • .agents/skills/prompt-perfector/SKILL.md
  • .agents/skills/prompt-perfector/agents/openai.yaml
  • .agents/skills/test-coverage-review/SKILL.md
  • .agents/skills/test-coverage-review/agents/openai.yaml
  • .gitattributes
  • .github/workflows/ci.yml
  • .github/workflows/pr-policy.yml
  • .npmrc
  • AGENTS.md
  • data/forms-catalog.json
  • docs/audit-handover-2026-07-14.md
  • docs/audit/repo-audit-2026-07-01.md
  • docs/audit/repo-wide-review-remediation-plan-2026-07-23.md
  • docs/audit/repo-wide-review-sweep-2026-07-19.md
  • docs/branch-review-ledger.md
  • docs/clinical-governance.md
  • docs/codex-review-protocol.md
  • docs/database-drift-detection.md
  • docs/ingestion-concurrency-fix-workorder.md
  • docs/outstanding-issues.md
  • docs/process-hardening.md
  • docs/search-chrome-behaviour.md
  • package.json
  • playwright.config.ts
  • scripts/audit-formatting-fixtures.ts
  • scripts/check-branch-review-ledger.mjs
  • scripts/check-github-action-pins.mjs
  • scripts/eval-retrieval.ts
  • scripts/run-heavy.mjs
  • scripts/skill-create.mjs
  • scripts/sweep-merged-branches.mjs
  • scripts/test-run-lock.mjs
  • src/app/api/answer/route.ts
  • src/app/api/answer/stream/route.ts
  • src/app/api/documents/[id]/reindex/route.ts
  • src/app/api/documents/bulk/reindex/route.ts
  • src/app/api/documents/bulk/route.ts
  • src/app/api/search/route.ts
  • src/app/api/upload/route.ts
  • src/app/globals.css
  • src/app/layout.tsx
  • src/app/privacy/page.tsx
  • src/app/reference/colour-coding/page.tsx
  • src/components/ClinicalDashboard.tsx
  • src/components/DocumentViewer.tsx
  • src/components/clinical-dashboard/ClinicalSidebar.tsx
  • src/components/clinical-dashboard/DocumentManagerPanel.tsx
  • src/components/clinical-dashboard/answer-status.tsx
  • src/components/clinical-dashboard/document-admin.tsx
  • src/components/clinical-dashboard/evidence-panels.tsx
  • src/components/clinical-dashboard/favourites-hub.tsx
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/mobile-composer-reserve.ts
  • src/components/clinical-dashboard/settings-dialog.tsx
  • src/components/clinical-dashboard/signed-image.tsx
  • src/components/differentials/differential-presentation-workflow-page.tsx
  • src/components/document-viewer/source-panels.tsx
  • src/components/document-viewer/types.ts
  • src/components/forms/form-detail-page.tsx
  • src/components/master-document-flow-mockups.tsx
  • src/components/mode-home-template.tsx
  • src/components/navigation-back-button.tsx
  • src/components/patient-safety-plan.tsx
  • src/components/services/service-detail-page.tsx
  • src/components/services/services-home-page.tsx
  • src/components/services/services-navigator-page.tsx
  • src/components/ui-primitives.tsx
  • src/components/ui/sheet.tsx
  • src/lib/answer-render-policy.ts
  • src/lib/compact-best-use-title.ts
  • src/lib/document-detail-contract.ts
  • src/lib/document-detail.ts
  • src/lib/form-catalog.ts
  • src/lib/ingestion-mutation-safety.ts
  • src/lib/search-scope.ts
  • src/lib/service-catalog-mapper.ts
  • src/lib/source-authority-metadata.ts
  • src/lib/source-authority-registry.ts
  • src/lib/source-metadata.ts
  • src/lib/supabase/database.types.ts
  • src/lib/validation/answer-request.ts
  • supabase/drift-manifest.json
  • supabase/migrations/20260724120000_create_uploaded_document_with_ingestion_job.sql
  • supabase/schema.sql
  • tests/accessible-table.dom.test.tsx
  • tests/answer-render-policy.test.ts
  • tests/audit-content-services-regressions.test.ts
  • tests/clinical-dashboard-merge-artifacts.test.ts
  • tests/document-detail-performance.test.ts
  • tests/favourites-auth-gate.test.ts
  • tests/favourites-hub-unavailable-controls.dom.test.tsx
  • tests/formatting-fixture-audit.test.ts
  • tests/forms-back-navigation.dom.test.tsx
  • tests/forms.test.ts
  • tests/ingestion-mutation-safety.test.ts
  • tests/mobile-composer-reserve.test.ts
  • tests/navigation-back-button.dom.test.tsx
  • tests/pdf-extraction-budget.test.ts
  • tests/private-access-routes.test.ts
  • tests/search-scope.test.ts
  • tests/services-catalog.test.ts
  • tests/signed-image.dom.test.tsx
  • tests/source-authority-tooling.test.ts
  • tests/ui-overlay-css-contract.test.ts
  • tests/ui-tools.spec.ts
  • tests/visual-evidence-tabs.dom.test.tsx
  • worker/main.ts
  • worker/python/extract_pdf_assets.py
  • worker/python/test_extract_pdf_assets_budget.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remediate-repository-audit-findings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@supabase

supabase Bot commented Jul 25, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy due to reaching the limit of concurrent preview branches.
Go to Project Integrations Settings ↗︎ if you wish to update this limit.


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

@chatgpt-codex-connector chatgpt-codex-connector Bot 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: 8637fec36d

ℹ️ 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".

max_upload_mb: env.MAX_UPLOAD_MB,
confidentiality_scope: "guidelines-only",
content_hash: contentHash,
<<<<<<< ours

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Resolve the committed merge conflict

The committed <<<<<<< ours block leaves this production route as invalid TypeScript, so importing the upload handler, type-checking, or building the application fails before uploads can be served. The commit-tree scan also finds unresolved markers in the answer route and several production components, so all conflict blocks need to be resolved rather than committing both alternatives.

Useful? React with 👍 / 👎.

Comment thread scripts/test-run-lock.mjs
Comment on lines +158 to +159
if (Date.now() - mtime > 30 * 60 * 1000) {
isStale = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep live heavyweight locks from being reclaimed

When a heavyweight command runs for more than 30 minutes, this marks its lock stale even though its PID is alive: run-heavy.mjs waits using spawnSync, which blocks the parent event loop and prevents the new setInterval heartbeat from updating owner.json. A second invocation can consequently remove the live lock and start another heavyweight command concurrently; retain the live-PID check as authoritative or move the heartbeat to a mechanism that runs while the synchronous child is active.

AGENTS.md reference: AGENTS.md:L167-L168

Useful? React with 👍 / 👎.

for (const branch of branchesToDelete) {
console.log(`Deleting merged branch: ${branch}`);
try {
run(`git branch -d ${branch}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pass branch names without shell interpolation

When a merged local branch contains shell metacharacters, this template passes the ref through execSync's shell rather than as one Git argument. Git accepts names such as topic;id, so running npm run branch:cleanup can execute the suffix as a separate command instead of deleting only that ref; invoke Git with an argument array, such as execFileSync, to preserve the branch name literally.

Useful? React with 👍 / 👎.

@cursor

cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Closed as superseded without merging.

Intentional audit fixes were ported onto current main in #1209 (cursor/pr1186-audit-remediation-c94c). This PR’s head remained conflicted against a dirty reconciliation checkpoint and was not landable.

BigSimmo added a commit that referenced this pull request Jul 25, 2026
BigSimmo added a commit that referenced this pull request Jul 25, 2026
BigSimmo added a commit that referenced this pull request Jul 25, 2026
* fix(audit): port safe #1186 remediation onto current main

Supersede conflicted PR #1186 by landing only the intentional audit fixes:
library-health skeleton/CLS, eval concurrency without duplicate bindings,
async heavy-run lock heartbeats with force/stale reclaim, dry-run branch
cleanup, and skill-create scaffolding with the interface openai.yaml shape.

* docs(ledger): record #1186 superseding remediation review

* docs(ledger): record #1186 close and #1209 CI green

* docs(ledger): record #1186 closeout and #1209 CI green
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.

1 participant