Skip to content

tests(ingestion): replace source-grep with executable behavioral coverage for worker and indexing agent - #1475

Merged
BigSimmo merged 7 commits into
mainfrom
codex/replace-source-grep-tests-with-coverage
Jul 30, 2026
Merged

tests(ingestion): replace source-grep with executable behavioral coverage for worker and indexing agent#1475
BigSimmo merged 7 commits into
mainfrom
codex/replace-source-grep-tests-with-coverage

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Extract ingestion worker retry/failure and enrichment-repair decisions into worker/behavior.ts and consume them from worker/main.ts.
  • Add agentFailureDecision to the indexing-v3 behavior module and consume it from the edge-function entrypoint.
  • Replace the matching source-text assertion with deterministic executable coverage and archive issue Revert "chore: production readiness improvements and E2E fixes" #106.

RAG impact: no retrieval behaviour change — this extracts existing ingestion failure and repair decisions byte-for-byte at their call sites; retrieval, ranking, search ordering, prompts, and answer generation are unchanged.

Verification

  • npm test -- --run tests/worker-behavior.test.ts tests/indexing-v3-agent.test.ts tests/worker-visual-capture.test.ts — 3 files, 27 tests passed.
  • npm run typecheck — passed.
  • npm run check:installed-lock-parity — passed on Node 24/npm 11 lock state.
  • npm run check:outstanding-issues and npm run check:branch-review-ledger — passed.
  • git diff --check — passed.

Not run: provider-backed ingestion, Supabase, OpenAI, or live-corpus workflows; this PR is verified with offline/static tests only. Hosted clean-install CI is the final exact-head gate.

Risk and rollback

Risk is low-to-moderate because production entrypoints now delegate existing decisions to importable pure helpers. The focused tests pin retry exhaustion, partial-write recovery, atomic-reindex status preservation, optional-artifact repair, and agent terminal failure. Roll back by reverting the squash commit; no migration or provider configuration changes are included.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains separated from real clinical sources
  • Source metadata, review status, and unknown-source behavior remain conservative
  • No clinical ranking, answer, or decision-support semantics changed

@supabase

supabaseBot commented Jul 30, 2026

Copy link
Copy Markdown

Updates to Preview Branch (codex/replace-source-grep-tests-with-coverage) ↗︎

DeploymentsStatusUpdated
DatabaseThu, 30 Jul 2026 18:42:49 UTC
ServicesThu, 30 Jul 2026 18:42:49 UTC
APIsThu, 30 Jul 2026 18:42:49 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.

TasksStatusUpdated
ConfigurationsThu, 30 Jul 2026 18:42:51 UTC
MigrationsThu, 30 Jul 2026 18:42:53 UTC
SeedingThu, 30 Jul 2026 18:42:55 UTC
Edge FunctionsThu, 30 Jul 2026 18:42:58 UTC

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

@coderabbitai

coderabbitaiBot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in:34 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 62cc8eea-a1cc-42e0-b8ed-8e8cc5b42570

📥 Commits

Reviewing files that changed from the base of the PR and between 4eaf037 and 814bb1c.

📒 Files selected for processing (9)
  • docs/branch-review-ledger.md
  • docs/outstanding-issues.md
  • supabase/functions/indexing-v3-agent/behavior.ts
  • supabase/functions/indexing-v3-agent/index.ts
  • tests/indexing-v3-agent.test.ts
  • tests/worker-behavior.test.ts
  • tests/worker-visual-capture.test.ts
  • worker/behavior.ts
  • worker/main.ts

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

@BigSimmoBigSimmo added the skip-branch-sync Opt out of hosted pr-branch-sync / update-branch on this PR label Jul 30, 2026
@BigSimmo
BigSimmo merged commit e01dc89 into mainJul 30, 2026
24 checks passed
@BigSimmo
BigSimmo deleted the codex/replace-source-grep-tests-with-coverage branch July 30, 2026 18:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codexskip-branch-syncOpt out of hosted pr-branch-sync / update-branch on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@BigSimmo