GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: resolve design-audit and CI regression guard blockers by BigSimmo · Pull Request #840 · BigSimmo/PsychSift Conversation
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
📝 WalkthroughWalkthroughThe PR updates sitemap and redirect contracts, tightens route typing, changes dashboard and search UI behavior, removes RAG abort and observability plumbing, adds database indexing and trigger changes, and aligns regression tests with the updated behavior. ChangesRouting and sitemap contracts
Dashboard and search UI behavior
RAG retrieval and classifier plumbing
Database search and trigger hardening
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant searchChunksWithTelemetry
participant analyzeQueryWithClassifierFallback
participant SupabaseClient
searchChunksWithTelemetry->>analyzeQueryWithClassifierFallback: analyze query without caller signal
analyzeQueryWithClassifierFallback->>analyzeQueryWithClassifierFallback: await shared classifier promise
searchChunksWithTelemetry->>SupabaseClient: retrieve candidates through direct RPC calls
SupabaseClient-->>searchChunksWithTelemetry: return versioned or legacy results
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
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 `@supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql`:
- Around line 1-11: Update the document_table_facts_text_trgm_idx creation
statement to use CREATE INDEX CONCURRENTLY, and ensure the migration runs
non-transactionally so PostgreSQL permits the concurrent build. Preserve the
existing index expression, name, and IF NOT EXISTS behavior.
In `@tests/audit-navigation-auth-regressions.test.ts`:
- Around line 126-128: Align the root dashboard heading contract between
clinicalDashboardSource and ClinicalDashboard.tsx: either render exactly one
sr-only H1 containing “Clinical KB” in ClinicalDashboard.tsx, or revise the test
assertion to match the existing valid markup. Preserve the requirement that the
root dashboard has a single H1.
In `@tests/rag-abort-signal.test.ts`:
- Around line 38-55: The test covering callVersionedRetrievalRpc must reflect
the no-signal contract rather than caller-signal attachment. Rename the test to
describe that no signal is forwarded, and remove the non-aborted
controller.signal assertion or replace it with an assertion that directly
verifies the intended no-signal behavior while preserving the existing RPC
argument checks.
In `@tests/site-map.test.ts`:
- Around line 125-130: Update the main-product section generator to include
publicRouteHandlers, ensuring routes such as /applications are emitted there
before the assertions in the expectedProductHandlers loop. Regenerate
docs/site-map.md so the generated product section contains the public redirect
handlers, while preserving the existing API and redirect assertions.
In `@tests/supabase-schema.test.ts`:
- Line 1222: Synchronize the schema migration assertions with the actual
artifacts: update the migrationFiles latest-entry expectation to the
20260717173000 reassert migration, qualify the normalized SQL expectation with
pg_catalog.to_jsonb(old), and update the corrector migration function to set the
pg_trgm similarity threshold and enforce the requested min_sim bounds guard.
Retain the assertions after implementing the migration behavior rather than
weakening them.
In `@tests/ui-accessibility.spec.ts`:
- Line 51: Align the dashboard level-1 heading contract by making the
expectations in tests/ui-accessibility.spec.ts lines 51-51,
tests/ui-smoke.spec.ts lines 876-876, and tests/ui-smoke.spec.ts lines 1271-1271
match the runtime heading rendered by ClinicalDashboard, or consistently rename
that runtime heading to Clinical KB; apply the same choice at all three sites.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: bcb41d0f-b44e-4000-a3dd-0c0484eadca0
docs/site-map.mdplaywright.config.tsscripts/generate-site-map.tssrc/app/differentials/presentations/route.tssrc/app/page.tsxsrc/components/ClinicalDashboard.tsxsrc/components/clinical-dashboard/master-search-header.tsxsrc/components/services/services-navigator-page.tsxsrc/lib/rag-candidate-sources.tssrc/lib/rag.tssupabase/drift-manifest.jsonsupabase/migrations/20260714180000_patch_rag_and_corrector_scalability.sqlsupabase/migrations/20260714190000_document_table_facts_trgm_idx.sqltests/audit-content-services-regressions.test.tstests/audit-navigation-auth-regressions.test.tstests/rag-abort-signal.test.tstests/rag-classifier-memo.test.tstests/site-map.test.tstests/supabase-schema.test.tstests/ui-accessibility.spec.tstests/ui-smoke.spec.tstests/ui-tools.spec.ts
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| -- Migration to add GIN trigram index on document_table_facts text fields for performance optimization | ||
| create index if not exists document_table_facts_text_trgm_idx | ||
| on public.document_table_facts using gin ( | ||
| lower( | ||
| coalesce(table_title, '') || ' ' || | ||
| coalesce(row_label, '') || ' ' || | ||
| coalesce(clinical_parameter, '') || ' ' || | ||
| coalesce(threshold_value, '') || ' ' || | ||
| coalesce(action, '') | ||
| ) extensions.gin_trgm_ops | ||
| ); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '\n== repo files ==\n' git ls-files | rg '(^|/)(supabase|db|migrations|schema|package.json|config|README|docs)' printf '\n== migration file ==\n' cat -n supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql printf '\n== search migration runner / transaction settings ==\n' rg -n "transaction|concurrent|create index|migrations" supabase package.json .github . -g '!node_modules' -g '!dist' -g '!build' printf '\n== supabase config files ==\n' fd -a -t f 'supabase|config|package.json|migrate|migration' .
Repository: BigSimmo/Database
Length of output: 50374
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '== relevant files ==\n' git ls-files | rg '^(supabase/|package.json|.*supabase.*\.json|.*supabase.*\.toml|.*migration.*|.*migrate.*|README\.md|docs/)' printf '\n== package scripts and tooling ==\n' cat package.json | sed -n '1,220p' printf '\n== supabase config candidates ==\n' for f in supabase/config.toml supabase/.temp/config.toml supabase/migrations/*.sql; do [ -f "$f" ] && echo "--- $f" && sed -n '1,220p' "$f" done printf '\n== search for migration transaction / concurrent index hints ==\n' rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' \ "supabase db|migration.*transaction|transactional|create index concurrently|disable transaction|BEGIN;|COMMIT;|migrate" \ package.json supabase README.md docs .github .
Repository: BigSimmo/Database
Length of output: 50374
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '== supabase migration config ==\n' fd -a -t f 'config.toml|migrate|migration|supabase.*\.toml' supabase . | sed -n '1,120p' printf '\n== search for explicit non-transactional migration handling ==\n' rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' \ "(no[-_ ]transaction|transactional|BEGIN;|COMMIT;|CREATE INDEX CONCURRENTLY|migration.*mode|disable.*transaction|supabase db migration|supabase db push)" \ supabase .github package.json README.md docs scripts printf '\n== inspect migration-related scripts ==\n' node - <<'JS' const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); for (const [k,v] of Object.entries(pkg.scripts || {})) { if (/migrate|supabase|db|drift|schema|verify/i.test(k) || /migrate|supabase|db/i.test(String(v))) { console.log(`${k}: ${v}`); } } JS printf '\n== smallest relevant migration samples with index creation ==\n' for f in supabase/migrations/20260714180000_patch_rag_and_corrector_scalability.sql \ supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql \ supabase/migrations/20260717131000_guard_document_publication_approval.sql; do echo "--- $f" sed -n '1,80p' "$f" done
Repository: BigSimmo/Database
Length of output: 22194
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '== docs mentioning transactional index creation ==\n' sed -n '1,140p' docs/supabase-migration-reconciliation.md printf '\n== docs mentioning db push and concurrent index creation ==\n' sed -n '1,120p' supabase/schema.sql | sed -n '790,840p' sed -n '1,120p' supabase/migrations/20260708170000_ingestion_jobs_one_open_per_document.sql sed -n '1,120p' supabase/migrations/20260702150000_documents_owner_covering_index.sql sed -n '1,120p' supabase/migrations/20260623014639_finalize_embedding_fields_hnsw_health.sql printf '\n== exact lines around the target migration ==\n' sed -n '1,40p' supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql
Repository: BigSimmo/Database
Length of output: 17873
Avoid a blocking index build here. CREATE INDEX will hold write locks while it scans public.document_table_facts; use CREATE INDEX CONCURRENTLY in a non-transactional migration, or schedule this for a maintenance window if the transactional path is required.
[warning] 2-11: During normal index creation, table updates are blocked, but reads are still allowed. Use concurrently to avoid blocking writes.
(require-concurrent-index-creation)
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql` around
lines 1 - 11, Update the document_table_facts_text_trgm_idx creation statement
to use CREATE INDEX CONCURRENTLY, and ensure the migration runs
non-transactionally so PostgreSQL permits the concurrent build. Preserve the
existing index expression, name, and IF NOT EXISTS behavior.
Source: Linters/SAST tools
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| it("keeps the root dashboard H1 as Clinical KB", () => { | ||
| expect(clinicalDashboardSource.match(/<h1\b/g)).toHaveLength(1); | ||
| expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical Guide\s*<\/h1>/); | ||
| expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical KB\s*<\/h1>/); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Align the H1 source contract with ClinicalDashboard.tsx.
This new exact <h1 className="sr-only">Clinical KB</h1> assertion currently fails. Render that contract in ClinicalDashboard.tsx, or update the test to match the valid current markup.
[failure] 128-128: [node] tests/audit-navigation-auth-regressions.test.ts > audit navigation and auth regressions > keeps the root dashboard H1 as Clinical KB
AssertionError: expected '"use client";\n\nimport { useRouter, …' to match /
import { useRouter, useSearchParams } from "next/navigation";
import dynamic from "next/dynamic";
import {
CircleAlert,
BookOpen,
ChevronDown,
Clock3,
ExternalLink,
FileImage,
FileText,
FolderOpen,
Heart,
ListChecks,
Loader2,
Quote,
RefreshCw,
Search,
ShieldAlert,
Square,
UploadCloud,
WifiOff,
Wrench,
} from "lucide-react";
import { type CSSProperties, useCallback, useEffect, useMemo, useReducer, useRef, useState } from "react";
import { type DocumentDeleteResult } from "@/components/DocumentManagementActions";
import { extractSafetyFindings } from "@/lib/clinical-safety";
import { isLocalNoAuthMode, publicUploadsEnabled } from "@/lib/client-env";
import { readLocalProjectIdentity, unsafeLocalProjectMessage } from "@/lib/local-project-identity";
import { isDeployedClinicalKb } from "@/lib/deployed-app";
import {
appBackdrop,
answerSurface,
cn,
EmptyState,
floatingControl,
InlineNotice,
primaryControl,
textMuted,
} from "@/components/ui-primitives";
import { useAuthSession } from "@/lib/supabase/client";
import { AccountSetupDialog } from "@/components/clinical-dashboard/account-setup-dialog";
import { CrossModeLinksSection } from "@/components/clinical-dashboard/cross-mode-links";
import { useEventCallback } from "@/components/clinical-dashboard/use-event-callback";
import { AuthPanel } from "@/components/clinical-dashboard/auth-panel";
import { buildMobileSectionFabState, MobileSectionFab, ToolsHub } from "@/components/clinical-dashboard/dashboard-nav";
import { SettingsDialog } from "@/components/clinical-dashboard/settings-dialog";
import { useSidebarCollapsed } from "@/components/clinical-dashboard/use-sidebar-collapsed";
import { useTheme } from "@/components/clinical-dashboard/use-theme";
import {
deriveSidebarIdentity,
ClinicalDesktopSidebar,
ClinicalMobileSidebar,
} from "@/components/clinical-dashboard/ClinicalSidebar";
import {
SetupChecklist,
UploadPanel,
IndexingMonitor,
IngestionQualityConsole,
LibraryHealthStrip,
fallbackSetupChecks,
hasReadyRequiredPublicSearchConfig,
hasReadyPublicSearchSetup,
type SetupCheck,
type IngestionQualityReviewItem,
} from "@/components/clinical-dashboard/DocumentManagerPanel";
import { GuideDialog, GuideTrigger, UtilityDrawer } from "@/components/clinical-dashboard/dashboard-shell";
import { sanitizeAnswerDisplayText, sanitizeDisplayText } from "@/components/clinical-dashboard/display-text";
import {
isPreformattedGroundedAnswer,
NaturalLanguageAnswer,
ScopeAndGovernanceNotice,
UserQuestionBubble,
} from "@/components/clinical-dashboard/answer-content";
import { AnswerEmptyState, AnswerProgressStepper, AnswerSkeleton } from "@/components/clinical-dashboard/answer-status";
import {
type AnswerProgressUpdate,
type TimedAnswerProgressUpdate,
} from "@/components/clinical-dashboard/answer-progress";
import { evidenceMapRowsFromRenderModel } from "@/components/clinical-dashboard/evidence-map-model";
import { MasterSearchHeader } from "@/components/clinical-dashboard/master-search-header";
import { UniversalSearchAlsoMatches } from "@/components/clinical-dashboard/universal-search-also-matches";
import { useScrollHideReporter } from "@/components/clinical-dashboard/use-hide-on-scroll";
import { SearchCommandProvider } from "@/components/clinical-dashboard/search-command-context";
import {
answerReferencesDocument,
answerTimedOutError,
applyRenamedDocumentToAnswer,
compactScopeFilters,
hasActiveIndexingWork,
hasNonProductionSupabaseApiKeyFallback,
isAbortError,
mergeDocumentRefresh,
normalizeNavigationHash,
setupNeedsSlowRecheck,
setupRecheckPollMs,
shorterPollDelay,
} from "@/components/clinical-dashboard/clinical-dashboard-helpers";
import { answerRecovery, errorCopy } from "@/lib/ui-copy";
imp
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/audit-navigation-auth-regressions.test.ts` around lines 126 - 128,
Align the root dashboard heading contract between clinicalDashboardSource and
ClinicalDashboard.tsx: either render exactly one sr-only H1 containing “Clinical
KB” in ClinicalDashboard.tsx, or revise the test assertion to match the existing
valid markup. Preserve the requirement that the root dashboard has a single H1.
Source: Linters/SAST tools
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const rpcCalls: Array<{ name: string; args: Record<string, unknown> }> = []; | ||
| const supabase = { | ||
| rpc: vi.fn(async (name: string, args: Record<string, unknown>) => { | ||
| rpcCalls.push({ name, args }); | ||
| return { data: [], error: null }; | ||
| }), | ||
| }; | ||
| const { callVersionedRetrievalRpc } = await import("../src/lib/rag-candidate-sources"); | ||
|
|
||
| await callVersionedRetrievalRpc( | ||
| supabase as never, | ||
| "match_document_chunks_text_v2", | ||
| "match_document_chunks_text", | ||
| { query_text: "clozapine", match_count: 8 }, | ||
| controller.signal, | ||
| ); | ||
| await callVersionedRetrievalRpc(supabase as never, "match_document_chunks_text_v2", "match_document_chunks_text", { | ||
| query_text: "clozapine", | ||
| match_count: 8, | ||
| }); | ||
|
|
||
| expect(abortSignal).toHaveBeenCalledWith(controller.signal); | ||
| expect(rpcCalls[0]?.name).toBe("match_document_chunks_text_v2"); | ||
| expect(rpcCalls[0]?.args).toMatchObject({ query_text: "clozapine", match_count: 8 }); | ||
| expect(rpcCalls[0]?.args?.signal).toBeUndefined(); | ||
| expect(controller.signal.aborted).toBe(false); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Rename the test to match the new contract.
The test still says it “attaches the caller signal,” but the invocation omits controller.signal and asserts that no signal is forwarded. The non-aborted controller assertion does not exercise cancellation; rename the test and remove or replace that assertion with coverage for the intended no-signal behavior.
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/rag-abort-signal.test.ts` around lines 38 - 55, The test covering
callVersionedRetrievalRpc must reflect the no-signal contract rather than
caller-signal attachment. Rename the test to describe that no signal is
forwarded, and remove the non-aborted controller.signal assertion or replace it
with an assertion that directly verifies the intended no-signal behavior while
preserving the existing RPC argument checks.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| for (const [route, file, target] of expectedProductHandlers) { | ||
| expect(data.publicRouteHandlers).toContainEqual({ route, file }); | ||
| expect(data.apiRoutes).not.toContainEqual({ route, file }); | ||
| expect(data.redirects).toContainEqual({ route, file, target }); | ||
| expect(productSection).toContain(`\`${route}\``); | ||
| expect(apiSection).not.toContain(`\`${route}\``); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Generate public redirect handlers in the product section before asserting them.
Line 129 fails because the generated main-product section does not contain /applications. Add publicRouteHandlers to that generator section and regenerate docs/site-map.md, or remove this new expectation.
[failure] 129-129: [node] tests/site-map.test.ts > tracked sitemap > keeps public redirect handlers in product routes and API handlers in the API section
AssertionError: expected '## Main product routes\n\n- / - Mai…' to contain '/applications'
/applications/ - Main Clinical KB shell. Source: src/app/page.tsx./differentials - Differentials home and search surface. Source: src/app/differentials/page.tsx./differentials/diagnoses - Diagnosis stream. Source: src/app/differentials/diagnoses/page.tsx./differentials/presentations/[slug] - Route discovered from app directory Source: src/app/differentials/presentations/[slug]/page.tsx./documents/search - Documents search command centre. Source: src/app/documents/search/page.tsx./documents/source - Compatibility redirect to the canonical live document viewer when a valid id is supplied. Source: src/app/documents/source/page.tsx./documents/source/evidence - Compatibility redirect sharing the canonical live document viewer handoff. Source: src/app/documents/source/evidence/page.tsx./dsm - DSM-5 Diagnosis home. Source: src/app/dsm/page.tsx./dsm/compare - DSM diagnosis comparison. Source: src/app/dsm/compare/page.tsx./dsm/search - DSM diagnosis search and catalogue browser. Source: src/app/dsm/search/page.tsx./factsheets - Route discovered from app directory Source: src/app/factsheets/page.tsx./factsheets/[slug] - Route discovered from app directory Source: src/app/factsheets/[slug]/page.tsx./factsheets/search - Route discovered from app directory Source: src/app/factsheets/search/page.tsx./favourites - Saved clinical items and sets. Source: src/app/favourites/page.tsx./forms - Forms home and search surface. Source: src/app/forms/page.tsx./formulation - Clinical formulation home and local mechanism search surface. Source: src/app/formulation/page.tsx./formulation/builder - Structured clinical formulation builder. Source: src/app/formulation/builder/page.tsx./formulation/compare - Side-by-side mechanism comparison. Source: src/app/formulation/compare/page.tsx./formulation/map - Formulation mechanism domain map. Source: src/app/formulation/map/page.tsx./privacy - Privacy and data-processing governance draft. Source: src/app/privacy/page.tsx./reference/colour-coding - Route discovered from app directory Source: src/app/reference/colour-coding/page.tsx./services - Services home and search surface. Source: src/app/services/page.tsx./specifiers - Psychiatric specifier home and local search surface. Source: src/app/specifiers/page.tsx./specifiers/builder - Structured diagnostic wording builder. Source: src/app/specifiers/builder/page.tsx./specifiers/compare - Side-by-side psychiatric specifier comparison. Source: src/app/specifiers/compare/page.tsx./specifiers/map - Psychiatric specifier family map. Source: src/app/specifiers/map/page.tsx./therapy-compass - Route discovered from app directory Source: src/app/therapy-compass/page.tsx./tools - Route discovered from app directory Source: src/app/tools/page.tsx.❯ tests/site-map.test.ts:129:30
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/site-map.test.ts` around lines 125 - 130, Update the main-product
section generator to include publicRouteHandlers, ensuring routes such as
/applications are emitted there before the assertions in the
expectedProductHandlers loop. Regenerate docs/site-map.md so the generated
product section contains the public redirect handlers, while preserving the
existing API and redirect assertions.
Source: Linters/SAST tools
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .filter((fileName) => /^\d+_.+\.sql$/.test(fileName)) | ||
| .sort(); | ||
| expect(migrationFiles.at(-1)).toBe("20260717173000_reassert_supabase_admin_default_privileges.sql"); | ||
| expect(migrationFiles.at(-1)).toBe("20260717161000_assert_supabase_admin_default_privileges.sql"); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Synchronize these assertions with the actual migration artifacts.
The updated schema guards currently fail in three places:
migrationFiles.at(-1) resolves to 20260717173000_reassert_supabase_admin_default_privileges.sql, not 20260717161000_assert_supabase_admin_default_privileges.sql. Update the expected latest migration or remove/rename the later migration if it is stale.pg_catalog.to_jsonb(old)->>'kind'; include the qualification in the expected string.set pg_trgm.similarity_threshold = 0.3 nor the requested min_sim bounds guard. Implement that behavior in the migration before retaining these assertions; do not merely weaken the test.Also applies to: 1372-1374, 1398-1399
[failure] 1222-1222: [node] tests/supabase-schema.test.ts > Supabase Preview replay guards > fails closed on effective supabase_admin default ACLs
AssertionError: expected '20260717173000_reassert_supabase_admi…' to be '20260717161000_assert_supabase_admin_…' // Object.is equality
Expected: "20260717161000_assert_supabase_admin_default_privileges.sql"
Received: "20260717173000_reassert_supabase_admin_default_privileges.sql"
❯ tests/supabase-schema.test.ts:1222:35
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/supabase-schema.test.ts` at line 1222, Synchronize the schema migration
assertions with the actual artifacts: update the migrationFiles latest-entry
expectation to the 20260717173000 reassert migration, qualify the normalized SQL
expectation with pg_catalog.to_jsonb(old), and update the corrector migration
function to set the pg_trgm similarity threshold and enforce the requested
min_sim bounds guard. Retain the assertions after implementing the migration
behavior rather than weakening them.
Source: Linters/SAST tools
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| async function expectDashboardUsable(page: Page) { | ||
| await expect(page.getByRole("heading", { level: 1, name: "Clinical Guide" })).toHaveCount(1); | ||
| await expect(page.getByRole("heading", { level: 1, name: "Clinical KB" })).toHaveCount(1); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Align the dashboard heading contract before merging.
src/components/ClinicalDashboard.tsx still renders the level-1 heading Clinical Guide at Line 3495, so these new Clinical KB expectations resolve to zero elements and fail the UI suite. Either update the runtime heading or restore the assertions to Clinical Guide.
tests/ui-accessibility.spec.ts#L51-L51: change the expected heading to match the runtime dashboard heading, or rename the runtime heading.tests/ui-smoke.spec.ts#L876-L876: apply the same heading contract.tests/ui-smoke.spec.ts#L1271-L1271: apply the same heading contract.tests/ui-accessibility.spec.ts#L51-L51 (this comment)tests/ui-smoke.spec.ts#L876-L876tests/ui-smoke.spec.ts#L1271-L1271Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/ui-accessibility.spec.ts` at line 51, Align the dashboard level-1
heading contract by making the expectations in tests/ui-accessibility.spec.ts
lines 51-51, tests/ui-smoke.spec.ts lines 876-876, and tests/ui-smoke.spec.ts
lines 1271-1271 match the runtime heading rendered by ClinicalDashboard, or
consistently rename that runtime heading to Clinical KB; apply the same choice
at all three sites.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
CI triageCI failed on this PR. Automated classification of the 3 failed job(s):
Compared with main CI run #3245 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.