-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Apply audit system remediation and address all outstanding issues #1261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| interface: | ||
| display_name: "Prompt Perfector" | ||
| short_description: "Refine, structure, and optimize user prompts safely" | ||
| default_prompt: "Use $prompt-perfector to polish and optimize prompts in an isolated environment." |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Bundle Size Audit | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main, develop, "release/*"] | ||
| paths: | ||
| - "src/**" | ||
| - "public/**" | ||
| - "package.json" | ||
| - "package-lock.json" | ||
| - "next.config.ts" | ||
| - "bundle-budget.json" | ||
|
|
||
| concurrency: | ||
| group: bundle-size-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| bundle-size: | ||
| name: Guard Bundle Budget | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Node and dependencies | ||
| uses: ./.github/actions/setup-node-cached | ||
|
|
||
| - name: Restore Next.js build cache | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6 | ||
| with: | ||
| path: .next/cache | ||
| key: bundle-${{ runner.os }}-${{ hashFiles('.nvmrc', 'package-lock.json') }}-${{ hashFiles('src/**', 'data/**', 'public/**', 'next.config.ts', 'tsconfig.json', 'postcss.config.mjs') }} | ||
| restore-keys: | | ||
| bundle-${{ runner.os }}-${{ hashFiles('.nvmrc', 'package-lock.json') }}- | ||
|
|
||
| - name: Build production application | ||
| env: | ||
| NEXT_BUILD_CPUS: "4" | ||
| run: npm run build | ||
|
|
||
| - name: Check Client Bundle Budget | ||
| run: npm run check:bundle-budget | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Nightly Drift & Regression Suite | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 4 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: nightly-drift-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| NEXT_PUBLIC_SUPABASE_URL: https://sjrfecxgysukkwxsowpy.supabase.co | ||
| SUPABASE_PROJECT_REF: sjrfecxgysukkwxsowpy | ||
| SUPABASE_PROJECT_NAME: Clinical KB Database | ||
| NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY: placeholder-ci-anon-key | ||
| SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | ||
|
|
||
| jobs: | ||
| nightly-suite: | ||
| name: Nightly Regression & Drift Check | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 30 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version-file: ".nvmrc" | ||
| cache: npm | ||
| cache-dependency-path: package-lock.json | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run unit and integration regressions | ||
| run: npm run test | ||
|
|
||
| - name: Check architecture boundaries and env parity | ||
| run: npm run check:env-parity | ||
|
|
||
| - name: Preflight required secrets for drift check | ||
| id: secret-check | ||
| run: | | ||
| if [ -z "$SUPABASE_SERVICE_ROLE_KEY" ]; then | ||
| echo "missing_secrets=true" >> $GITHUB_OUTPUT | ||
| echo "::warning::Skipping live drift check due to missing secrets." | ||
| else | ||
| echo "missing_secrets=false" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Guard Supabase project identity | ||
| if: steps.secret-check.outputs.missing_secrets != 'true' | ||
| run: npm run check:supabase-project | ||
|
|
||
| - name: Compare live schema drift | ||
| if: steps.secret-check.outputs.missing_secrets != 'true' | ||
| run: npm run check:drift | ||
|
|
||
| - name: Align migration history for Supabase Preview | ||
| if: steps.secret-check.outputs.missing_secrets != 'true' | ||
| run: npm run check:migration-history |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Cross-Browser Playwright Matrix | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 5 * * 0" # Sunday at 5:00 UTC | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: playwright-matrix-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| browser-matrix: | ||
| name: Playwright Tests (${{ matrix.project }}) | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 45 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| project: [chromium, firefox, webkit] | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup UI e2e environment | ||
| uses: ./.github/actions/setup-ui-e2e | ||
|
|
||
| - name: Run Playwright suite | ||
| run: node scripts/run-playwright.mjs --project=${{ matrix.project }} | ||
|
Comment on lines
+31
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On a fresh runner or browser-cache miss, the Firefox and WebKit matrix entries fail before executing tests: the inspected Useful? React with 👍 / 👎. |
||
|
|
||
| - name: Classify exact failed test identities | ||
| if: failure() | ||
| run: node scripts/classify-playwright-failures.mjs | ||
|
|
||
| - name: Upload browser diagnostics | ||
| if: failure() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: playwright-${{ matrix.project }}-diagnostics-${{ github.run_id }} | ||
| path: | | ||
| test-results/ | ||
| playwright-report/ | ||
| if-no-files-found: ignore | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| # Repository-wide review remediation plan — 2026-07-23 | ||
|
|
||
| ## Goal | ||
|
|
@@ -25,11 +22,7 @@ Resolve the outstanding issues from the repository-wide review sweep with the sm | |
| 2. Run `node scripts/check-node-engine.cjs`. | ||
| 3. Run `npm ci` only after Node 24 is active. | ||
| 4. Confirm dependency/tool presence: | ||
| ======= | ||
| ======= | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
|
|
||
| # Repository-wide review remediation completion plan — 2026-07-24 | ||
|
|
||
| ## Objective | ||
|
|
@@ -73,20 +66,10 @@ Complete every outstanding finding from the 2026-07-19 repository-wide review sw | |
| 2. Run `node scripts/check-node-engine.cjs`. | ||
| 3. Run `npm ci` without changing package manager or lockfile. | ||
| 4. Confirm: | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
| - `node -v && npm -v` | ||
| - `test -f node_modules/typescript/bin/tsc` | ||
| - `test -f node_modules/next/dist/bin/next` | ||
| - `test -d node_modules/next/dist/docs` | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| 5. Read only the relevant installed Next docs before any Next/config code change. | ||
|
|
||
| **Verification** | ||
|
|
@@ -134,12 +117,7 @@ Complete every outstanding finding from the 2026-07-19 repository-wide review sw | |
|
|
||
| 1. In `.github/workflows/pr-policy.yml`, add `"release/**"` to `pull_request_target.branches` so PR Policy mirrors CI PR branches. | ||
| 2. In `scripts/check-github-action-pins.mjs`, extend discovery to include: | ||
| ======= | ||
| ======= | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
| 5. Before any Next/framework code change, read the relevant installed guide in `node_modules/next/dist/docs/`. | ||
| 3. Before any Next/framework code change, read the relevant installed guide in `node_modules/next/dist/docs/`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Restore the missing action-pin discovery details. The preceding item ends with “extend discovery to include:” but item 3 starts immediately, so this checklist omits the required 🤖 Prompt for AI Agents |
||
|
|
||
| **Verification ladder** | ||
|
|
||
|
|
@@ -194,20 +172,10 @@ Complete every outstanding finding from the 2026-07-19 repository-wide review sw | |
|
|
||
| 1. Add `"release/**"` to PR Policy `pull_request_target.branches`. | ||
| 2. Extend checker discovery to include workflow YAML plus composite action definitions: | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
| - `.github/workflows/*.yml` | ||
| - `.github/workflows/*.yaml` | ||
| - `.github/actions/**/action.yml` | ||
| - `.github/actions/**/action.yaml` | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| 3. Add a self-test or fixture to prove unpinned external `uses:` inside a composite action fails the checker. | ||
|
|
||
| **Verification** | ||
|
|
@@ -293,13 +261,7 @@ Run only after Node 24, dependencies, and focused checks are clean: | |
|
|
||
| ## Approval-required follow-up gates | ||
|
|
||
| Ask before running any of these: | ||
| ======= | ||
| ======= | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
| 3. Add a self-test that would fail if an unpinned external `uses:` in a composite action is ignored. | ||
| Ask before running any of these: 3. Add a self-test that would fail if an unpinned external `uses:` in a composite action is ignored. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Move the composite-action self-test out of the approval-only section. This line is malformed as 🤖 Prompt for AI Agents |
||
|
|
||
| **Focused proof** | ||
|
|
||
|
|
@@ -405,13 +367,6 @@ Run after all batches are complete under Node 24 with dependencies installed: | |
| ## Provider-backed approval gates | ||
|
|
||
| Do not run these without explicit confirmation: | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
|
|
||
| - `npm run check:supabase-project` | ||
| - `npm run check:production-readiness` | ||
|
|
@@ -420,9 +375,6 @@ Do not run these without explicit confirmation: | |
| - `npm run eval:quality -- --rag-only` | ||
| - `npm run verify:release` | ||
|
|
||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| ## Recommended execution order | ||
|
|
||
| 1. Batch 0 — prerequisites. | ||
|
|
@@ -434,11 +386,7 @@ Do not run these without explicit confirmation: | |
| 7. Final handoff gate. | ||
|
|
||
| This order fixes the highest clinical/governance risk first, avoids formatting noise during logic review, and keeps provider-backed uncertainty outside local development until explicit approval is given. | ||
| ======= | ||
| ======= | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
|
|
||
| ## Recommended PR split | ||
|
|
||
| 1. PR A: Batch 0 docs/prerequisite proof only if environment setup requires repo documentation; otherwise no PR. | ||
|
|
@@ -449,10 +397,3 @@ This order fixes the highest clinical/governance risk first, avoids formatting n | |
| 6. PR F: Batch 5 formatting-only cleanup. | ||
|
|
||
| This split keeps clinical behavior, CI governance, UI polish, npm config, and formatting isolated so regressions are easier to detect and revert. | ||
| <<<<<<< ours | ||
| <<<<<<< ours | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
| ======= | ||
| >>>>>>> theirs | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Trigger the audit when its own implementation changes.
Changes to the bundle-budget checker, local setup action, or this workflow do not match these paths, so the guard can be modified without running. Include the relevant
scripts/**,.github/actions/setup-node-cached/**, and workflow path. As per coding guidelines, CI workflows must use documented project and provider safety boundaries.🤖 Prompt for AI Agents
Source: Coding guidelines