Skip to content

Prepare opt-in Sol 6.1 answers and preserve ingestion compatibility - #3866

Closed
BigSimmo wants to merge 6 commits into
mainfrom
codex/rag-sol61-20261027
Closed

BigSimmo wants to merge 6 commits into
mainfrom
codex/rag-sol61-20261027

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prepare gpt-6.1-sol for both existing answer routes while retaining low/medium reasoning effort. Runtime and example answer defaults remain on GPT-5.6 Terra/Sol until model comparison and owner acceptance; merging this preparation does not activate Sol.

Keep classifier, summaries, indexing, vision and embeddings independent of answer-model changes. Align the Edge indexing agent with the Node indexing fallback so an answer-only override cannot discard valid structured summaries and generated labels. Preserve explicit indexing overrides in both environments. No schema migration, re-embedding or re-indexing is introduced.

Add server-only per-attempt generation accounting and a synthetic comparison harness. Unknown failed-call usage remains unknown cost. The component experiment reuses production generation, source fencing and validation; it does not measure full-route retrieval, planning, cache or recovery costs. It uses 12 cases, 48 measured executions and four symmetric route warm-ups, stops on failed/incomplete calls, and never automatically accepts a model.

Areas touched: Answer engine, Knowledge and records, Data platform and access, Source intake and indexing

RAG impact: no retrieval behaviour change — retrieval inputs, scoring, source admission, document permissions, embeddings, citation gates and final-only SSE remain unchanged. Edge model resolution preserves the intended structured indexing model when answer models change.

Verification

  • Independent architecture, safeguard and evaluator reviews; an additional ingestion review found the Node/Edge fallback mismatch. Regression reproduced summary/label loss before its one-variable fix; correction independently reviewed.
  • Integrated current main c4aa2b76dd2d14f83bb32c7d4a1974ce025450e2 with a normal merge. Final candidate 5d34d2a7d0a31c5a860dd8cbc20e49428c16b99f.
  • Fresh offline RAG contract gate: 26 suites / 1,002 tests passed after integration.
  • Fresh integrated Sol/ingestion checks: 33 suites / 544 tests passed, including worker production-bundle resolution, embedding compatibility, queue/recovery/egress, Edge summary retention, shared-model efforts, citations, streaming, SDK serialization, cost accounting and comparison approvals. All three answer-model settings were Sol for this offline run; provider credentials were scrubbed.
  • Edge/Node configuration regression group: 66 tests passed. Model-aware cache identities and server-only payload projection remain covered.
  • Earlier corrected component smoke: 52 deterministic stubbed executions, zero provider requests, accepted=false. It proves harness plumbing, not model quality.
  • Earlier complete PR-local gate failed: 33,838 passed / 23 failed / 165 skipped in Windows Cloud/release tooling and one timeout. The timeout subsequently passed in isolation. This historical full gate is not current-head passing evidence; the earlier tooling failures have not all been rechecked, and no current full-suite pass is claimed.
  • Subsequent offline application build passed for the RAG runtime candidate 5d34d2a7d0: compilation, TypeScript, static generation and client-bundle secret checks completed with exit 0, using separate 30-second admission and 20-minute execution limits (about 10m29s execution). The earlier ten-minute timeout is superseded by this completed evidence. Full typecheck, focused Edge ESLint, formatting, diff integrity, maintainability limits, upload-limit parity, documentation links and snapshot checks also passed.
  • Documentation registration repair is saved in local-only follow-up fc5baaa303468f0f8cc31c5cb0c8d2016dcf64c8: 24 pre-existing unplaced files registered to their actual owning areas, plus the generated ledger date. The development documentation check and 54 focused metadata tests passed; existing advisory warnings remain. This follow-up is NOT pushed, so the current PR does not contain it. No additional push is planned until its preview-compute exposure is controlled.
  • Normal pre-push guards passed at the committed candidate, including committed formatting, scoped lint and source typecheck. No guard override was used.
  • Verification not run: paid API access/quality/latency/cost comparison, live retrieval canary, hosted ingestion commissioning, clinical acceptance or deployment. No paid evaluation was dispatched.

Risk and rollout

Risk: medium — shared model handling and indexing validation require the recorded regression checks; live answer quality remains unproven. Keep draft; do not arm auto-merge. Better answer quality and lower total cost per accepted answer are not established. Production recovery can already make up to four generation calls under its deadline; the one-call component experiment cannot establish full-system operating cost.

Approval for paid evaluation must bind the source, fixtures, configuration, environment, verified pricing and a single absolute output directory. Persisted reservations precede dispatch; SDK/outer retries are zero. The 52-execution plan reserves 832,000 output tokens against the unchanged 400,000 cap, and published input reservations may stop it sooner. A feasible revised scope and specific spending approval are required before a live run. No spending cap was loosened. Offline preparation now proposes a 24-generation pilot (20 measured, four warm-ups) plus at most 24 exact input-count requests, capped at 480,000 generation input and 384,000 output tokens, with no retries. Its known generation reservation is US$6.492024. The input-count endpoint's billing terms are not established, so the complete total and its per-endpoint hard reservation remain blocked; no paid approval is requested or inferred. No request-bound allowance code has been introduced before that basis is complete.

On 27 October 2026 the owner reported automatic preview branching disabled, but the PR created an active Supabase preview. Read-only branch metadata verified preview project vhuuqhbvarmrktwwygof belongs to PR #3866 and codex/rag-sol61-20261027, is non-default/non-persistent, and was created with with_data:false. The owner explicitly authorised inspection and pausing only this preview. Supabase accepted the pause; follow-up metadata changed from ACTIVE_HEALTHY through PAUSING to INACTIVE. Production sjrfecxgysukkwxsowpy remained ACTIVE_HEALTHY and was not modified. Nothing was deleted. Prior charges and any non-compute billing remain unverified; automatic-branching settings were not inspected or changed. Keep this preview paused. Standard GitHub-hosted CI runs on this public repository; do not dispatch model evaluation or deployment.

After accepted evaluation and separate activation/deployment authority: preserve explicit non-answer workload settings in both runtimes, deploy the matching Edge function, then set OPENAI_ANSWER_MODEL, OPENAI_FAST_ANSWER_MODEL and OPENAI_STRONG_ANSWER_MODEL to gpt-6.1-sol. Retain low/medium effort and OPENAI_STORE_RESPONSES=false.

Rollback: restore the recorded prior answer/indexing configuration and matching application/Edge artifacts. Cache identities separate model configurations. No database or index rebuild is required.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains PsychSift Production (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Evidence / unresolved: new comparison fixtures are synthetic equipment examples. Owner clinical review, representative domain evaluation, provider/data-processing acceptance and applicable deployment classification remain prerequisites to activation. No clinical sign-off is asserted.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@supabase

supabase Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Updates to Preview Branch (codex/rag-sol61-20261027) ↗︎

Deployments Status Updated
Database ✅ Tue, 27 Oct 2026 04:13:30 UTC
Services ✅ Tue, 27 Oct 2026 04:13:30 UTC
APIs ✅ Tue, 27 Oct 2026 04:13:30 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations ✅ Tue, 27 Oct 2026 04:13:38 UTC
Migrations ✅ Tue, 27 Oct 2026 04:17:17 UTC
Seeding ✅ Tue, 27 Oct 2026 04:17:21 UTC
Edge Functions ✅ Tue, 27 Oct 2026 04:17:23 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@gitar-bot

gitar-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

Copy link
Copy Markdown
Owner Author

Review record

Branch: codex/rag-sol61-20261027
Head: 5d34d2a7d0a31c5a860dd8cbc20e49428c16b99f
Scope: Owner-requested fresh adversarial RAG/Sol preparation integration review, fixed base c4aa2b76dd2d14f83bb32c7d4a1974ce025450e2, including the unpublished metadata follow-up and local corrections.

Outcome: Keep draft. Three P2 findings exist at the published head; all three are corrected and independently re-reviewed locally at f2715fbf712ac2de228944e6c8e924e538c7f619. Those fixes have not been pushed. No P0/P1 was found within the reviewed scope. This is not merge, deployment or Sol activation approval.

Findings and local disposition:

  • P2, src/lib/env.ts:490-492 / supabase/functions/indexing-v3-agent/behavior.ts:35: fixed defaults changed legacy custom inherited non-answer models during preparation. A retained Terra summary could fail Edge indexing's model-authority check and trigger a database-protected repair refusal. Local fix restores exact classifier/summary/indexing inheritance and explicit-override precedence; regressions retain custom Terra structured summaries without persistence. Activation instructions require preserving effective workload models with explicit pins in both runtimes before changing answer tiers.
  • P2, scripts/compare-answer-models.ts:373-375: injection markers outside answer/section bodies could receive deterministic success credit. Local fix checks the full parsed raw envelope, with heading/gap/quote regressions.
  • P2, scripts/compare-answer-models.ts:566-581: executable helpers were missing from approval identity. Local fix hashes those helpers and records resolved SDK/Zod/tsx entrypoints/manifests plus the installed lock. A standalone CLI check also exposed and fixed a CommonJS resolution issue that unit imports missed. Dependency identity is not proof of every installed file's contents.

Checks and evidence:

  • Five failing regressions reproduced the configuration/injection gaps before correction; corrected focused suite: 83 passed/3 suites. The final test-only environment typing correction passed its selected standalone regression and fresh full TypeScript check.
  • Fresh offline RAG contract: 1,002 passed/26 suites.
  • Fresh all-Sol answer overrides with explicit non-answer pins: 549 passed/33 suites, including ingestion/worker bundle, model/summary preservation, provider egress, citation, access and streaming contracts. Suites overlap; counts are not additive.
  • Offline application build on corrected runtime: passed, 2026-10-27 07:20:57–07:25:43 UTC, including client-bundle secret check. Subsequent changes are evaluation tooling/tests only, separately checked.
  • Scoped ESLint, formatting, dependency parity, diff integrity, maintainability budgets and development documentation checks passed; existing documentation advisory warnings retained.
  • Two independent correction reviews found no remaining actionable defect in the correction scope.
  • Current main 2096dde2500ed37f2517e89480f8f48b5efe25f0 has a clean local test merge; it has not been merged into this branch or release-tested here.
  • Hosted static/security/policy checks passed at the published head. Build, unit coverage, ingestion SAST, migration replay and browser jobs were skipped for the draft; that is not full CI acceptance. No current whole-project-suite pass is claimed; an earlier broad run retained Windows/Cloud/release-test failures.

Remaining gates: control the automatic preview compute trigger before publishing the local commits; complete applicable exact integration/CI gates; establish actual account/model access and a feasible, fully priced, specifically approved comparison before activation. The existing 52-execution paid plan cannot fit its configured reservations. The private reduced proposal is not implemented/approved and its complete cost bound is unresolved. Zero paid OpenAI/model evaluation calls were made. Answer defaults, retrieval, embeddings and indexes remain unchanged; quality, latency and total cost improvements are unproven.

Reviewed by Codex using the repository review workflow, with two independent reviewers requested as gpt-6.1-sol/high; actual routing telemetry was unavailable.

Copy link
Copy Markdown
Owner Author

Review record
Branch: codex/rag-sol61-20261027 (PR #3866)
Head: 5d34d2a
Scope: Run PR sweep
Outcome: no change pushed. PR required green at head; 0 review threads; 55 commits behind main but git merge-tree shows no conflict, so no sync was made. The three P2 fixes recorded in the earlier review record remain local-only and unpublished; this sweep deliberately did not push to the branch because the PR body holds further pushes until the Supabase preview-compute trigger is controlled, and the branch touches RAG-protected and supabase/ surfaces.
Checks: read-only GitHub check-run, thread and merge-tree inspection only; no local gates run; no provider-backed checks run.


Generated by Claude Code

BigSimmo commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Closing at the owner's request: superseded by #3900, which merged at 4a368ee. #3900 contains all of this PR's commits: three were cherry-picked, and the Edge indexing-model fix is included as file content. Of the 28 files here, 18 are byte-identical in #3900 and the other 10 are supersets. The blank-model fix for Node was also added in #3900. The branch is kept.


Generated by Claude Code

@BigSimmo BigSimmo closed this Nov 7, 2026
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