Skip to content

fix(rag): stop reasoning-token starvation of the answer budget - #577

Closed
BigSimmo wants to merge 3 commits into
mainfrom
claude/repo-task-recommendations-f32752
Closed

fix(rag): stop reasoning-token starvation of the answer budget#577
BigSimmo wants to merge 3 commits into
mainfrom
claude/repo-task-recommendations-f32752

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Production returned "unsupported" after 60-96s on high-value clinical queries. gpt-5.5 reasoning tokens and the visible answer share one max_output_tokens budget; the strong route ran high reasoning effort against a 4000-token cap, so reasoning consumed the whole budget before the answer was written (incomplete:max_output_tokens) or timed out.

  • env: OPENAI_MAX_OUTPUT_TOKENS 4000 -> 16000; OPENAI_STRONG_REASONING_EFFORT high -> medium (all query classes now resolve medium, including the safety-critical dose/threshold classes that starved first)
  • openai: reasoningHeadroomFloor(effort) floors max_output_tokens per effort level at the single response-body call site (floor only raises)
  • rag: strong escalations retry truncations at max(2x env, 24000) instead of re-truncating on the same budget; cumulative generation wall-clock budget skips the final polish generation rather than discarding a valid strong answer
  • ingestion: document-enrichment + model-index-extraction now warn loudly on truncated structured responses instead of failing silent
  • observability: truncation/timeout fallback counters + rates on the deep health probe SLO snapshot

Summary

Verification

  • npm run verify:pr-local

During development, use npm run verify:cheap as the faster iteration gate before the final PR-local preflight.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims

For retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes, verify:pr-local runs eval:rag:offline automatically. Run the offline command directly during iteration before spending a live eval.

  • npm run eval:retrieval:quality (must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.
  • npm run eval:rag -- --limit 15 + npm run eval:quality -- --rag-only when answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

Clinical Governance Preflight

Complete this section when the change touches ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.

  • 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 Clinical KB Database (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

Notes

Production returned "unsupported" after 60-96s on high-value clinical
queries. gpt-5.5 reasoning tokens and the visible answer share one
max_output_tokens budget; the strong route ran high reasoning effort
against a 4000-token cap, so reasoning consumed the whole budget before
the answer was written (incomplete:max_output_tokens) or timed out.
- env: OPENAI_MAX_OUTPUT_TOKENS 4000 -> 16000; OPENAI_STRONG_REASONING_EFFORT
high -> medium (all query classes now resolve medium, including the
safety-critical dose/threshold classes that starved first)
- openai: reasoningHeadroomFloor(effort) floors max_output_tokens per
effort level at the single response-body call site (floor only raises)
- rag: strong escalations retry truncations at max(2x env, 24000) instead
of re-truncating on the same budget; cumulative generation wall-clock
budget skips the final polish generation rather than discarding a valid
strong answer
- ingestion: document-enrichment + model-index-extraction now warn loudly
on truncated structured responses instead of failing silent
- observability: truncation/timeout fallback counters + rates on the
deep health probe SLO snapshot
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@supabase

supabaseBot commented Jul 13, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


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

@coderabbitai

coderabbitaiBot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved SLO reporting coverage for truncation and timeout fallback queries.
    • Ensured fallback rates display as 0 when no queries are available, instead of showing invalid values.
    • Updated filtering behavior so fallback metrics are calculated from the correct query subsets.
  • Tests

    • Expanded validation of fallback query counts, rates, and event-type filtering.

Walkthrough

Extends answerSloSnapshot tests with truncation and timeout fallback counts, rates, filter expectations, and zero-query assertions. The fake client now supports optional fallback counts and routes related query filters.

Changes

Fallback SLO test coverage

Layer / File(s)Summary
Fallback metric test behavior
tests/answer-slo.test.ts
The fake client supports truncation and timeout fallback counts, while tests validate snapshot metrics, expanded event-type filters, and zero-query fallback rates of 0.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Description check⚠️ WarningThe template structure is present, but the required Summary, Verification, Notes, and Clinical Governance sections are mostly left as placeholders.Fill in the Summary section, check the relevant Verification and Clinical Governance items, and replace placeholder Notes with concrete details.
✅ Passed checks (10 passed)
Check nameStatusExplanation
Title check✅ PassedThe title is concise and accurately reflects the main change: fixing answer-budget starvation in RAG/LLM output generation.
Docstring Coverage✅ PassedDocstring coverage is 75.00% which is sufficient. The required threshold is 70.00%.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Generated And Sensitive Files✅ PassedDiff from origin/main only touches tests/answer-slo.test.ts; no secret-like patterns or risky generated/sensitive paths were found.
Verification Claims✅ PassedPR text only shows unchecked verification items; no unsupported 'passed' claim without a named command/result is present.
Risky Git Or Deployment Actions✅ PassedPASS: The merge commit only changes tests/answer-slo.test.ts, and it contains no force-push, reset, destructive-clean, branch-deletion, or deployment guidance.
Supabase Project And Schema Safety✅ PassedNo Supabase project refs or schema/migration files changed; the touched workflow/doc edits kept the same sjrfecxgysukkwxsowpy target.
Runtime And Package Manager Integrity✅ PassedThe PR only changes tests/answer-slo.test.ts; no package manager, lockfile, engine-strict, or Node/npm version files were modified, and the repo still pins npm@11.17.0/Node 24.x.
Api Route Failure Handling✅ PassedShared RAG/provider paths catch truncation/timeout/auth failures and convert them to controlled fallbacks; rate limits fail closed for answer/upload buckets.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/repo-task-recommendations-f32752
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/repo-task-recommendations-f32752

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Biome (2.5.1)
tests/answer-slo.test.ts

File contains syntax errors that prevent linting: Line 7: Expected a statement but instead found '<<<<<<< HEAD
// pattern) narrows it to the truncation or timeout fallback subset

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

tests/answer-slo.test.ts

Parsing error: Merge conflict marker encountered.


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

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:00ff16704e

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

Comment threadsrc/lib/env.ts
@github-actions

Copy link
Copy Markdown
Contributor

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 13, 2026 11:48
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@codex fix all comments and issues and ensure no regression and smallest safest fix

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
tests/model-index-extraction.test.ts (1)

1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a truncated: true test case for both ingestion paths. Both mocks hardcode truncated: false, so neither suite exercises the new truncation-warn branch (or, for model-index-extraction, the untested parseProfile failure path on partial JSON).

  • tests/model-index-extraction.test.ts#L14-23: add a case where the mock resolves truncated: true with a malformed/partial text, and assert console.warn fires and the function returns gracefully (this is the higher-priority case since parseProfile has no try/catch — see the related major issue on src/lib/model-index-extraction.ts).
  • tests/document-enrichment.test.ts#L13-22: add a case where the mock resolves truncated: true, and assert console.warn fires with the document identity and the existing fallback summary is returned.
🤖 Prompt for AI Agents
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/model-index-extraction.test.ts` at line 1, Add truncated-response test
cases in the ingestion mocks for both suites: in model-index-extraction, return
truncated true with malformed partial text, spy on console.warn, and assert
graceful behavior; in document-enrichment, return truncated true, assert the
warning includes document identity, and verify the existing fallback summary is
returned.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
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 `@src/lib/rag.ts`:
- Around line 4933-4938: Update the answer quality-repair branch around
answerNeedsStrongQualityRepair to reserve the retry’s
env.OPENAI_ANSWER_TIMEOUT_MS window before starting it. Skip the retry when
generationLatencyMs plus that timeout would reach or exceed
generationTotalBudgetMs, while preserving the existing retry path when
sufficient budget remains and recording the skip reason.
In `@tests/answer-slo.test.ts`:
- Around line 23-25: Update the ilike mock in the test query builder to validate
the column argument is metadata->>fallback_reason and match the exact
%max_output_tokens% and %timeout% patterns before returning truncation or
timeout; ensure unexpected columns or patterns cannot silently pass.
---
Nitpick comments:
In `@tests/model-index-extraction.test.ts`:
- Line 1: Add truncated-response test cases in the ingestion mocks for both
suites: in model-index-extraction, return truncated true with malformed partial
text, spy on console.warn, and assert graceful behavior; in document-enrichment,
return truncated true, assert the warning includes document identity, and verify
the existing fallback summary is returned.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1ed29d9b-03a1-4d39-873b-b06a1d019488

📥 Commits

Reviewing files that changed from the base of the PR and between 5444c49 and 00ff167.

📒 Files selected for processing (10)
  • src/lib/document-enrichment.ts
  • src/lib/env.ts
  • src/lib/model-index-extraction.ts
  • src/lib/observability/answer-slo.ts
  • src/lib/openai.ts
  • src/lib/rag.ts
  • tests/answer-slo.test.ts
  • tests/document-enrichment.test.ts
  • tests/model-index-extraction.test.ts
  • tests/openai-cache.test.ts

Comment threadsrc/lib/rag.ts
Comment on lines +4933 to +4938
if (answerNeedsStrongQualityRepair && generationLatencyMs >= generationTotalBudgetMs) {
// A4 tail-latency guard: out of the cumulative generation time budget, so keep the
// valid (if imperfect) cited strong answer instead of spending a third generation
// and risking a truncation -> unsupported tail. Recorded for observability.
answerRetryReasons.push(`strong_quality_repair_skipped_time_budget:${strongQualityFailureReason}`);
} else if (answerNeedsStrongQualityRepair) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Locate the relevant region in src/lib/rag.ts and show surrounding lines.
grep -n "answerNeedsStrongQualityRepair\|generationTotalBudgetMs\|OPENAI_ANSWER_TIMEOUT_MS" -n src/lib/rag.ts | head -n 40
echo"----"
nl -ba src/lib/rag.ts | sed -n '4900,4985p'

Repository: BigSimmo/Database

Length of output: 582


🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the surrounding control flow to understand how the retry timeout is chosen.
nl -ba src/lib/rag.ts | sed -n '4870,5015p'

Repository: BigSimmo/Database

Length of output: 195


🏁 Script executed:

#!/bin/bashset -euo pipefail
# Read the surrounding block with line numbers using tools available in the sandbox.
awk 'NR>=4918 && NR<=4965 { printf "%d:%s\n", NR, $0 }' src/lib/rag.ts

Repository: BigSimmo/Database

Length of output: 3710


🏁 Script executed:

#!/bin/bashset -euo pipefail
# Find where generationLatencyMs is initialized and updated to see what the budget guard is measuring.
grep -n "generationLatencyMs" src/lib/rag.ts
echo"----"
awk 'NR>=4580 && NR<=4665 { printf "%d:%s\n", NR, $0 }' src/lib/rag.ts

Repository: BigSimmo/Database

Length of output: 5305


Reserve budget for the quality-repair retry before starting it. This guard only skips once the cumulative latency has already hit generationTotalBudgetMs, but the retry still gets a full env.OPENAI_ANSWER_TIMEOUT_MS window. That can push the chain well past the intended tail-latency cap.

Suggested guard
- if (answerNeedsStrongQualityRepair && generationLatencyMs >= generationTotalBudgetMs) {+ if (+ answerNeedsStrongQualityRepair &&+ generationLatencyMs + env.OPENAI_ANSWER_TIMEOUT_MS >= generationTotalBudgetMs+ ) {
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if(answerNeedsStrongQualityRepair&&generationLatencyMs>=generationTotalBudgetMs){
// A4 tail-latency guard: out of the cumulative generation time budget, so keep the
// valid (if imperfect) cited strong answer instead of spending a third generation
// and risking a truncation -> unsupported tail. Recorded for observability.
answerRetryReasons.push(`strong_quality_repair_skipped_time_budget:${strongQualityFailureReason}`);
}elseif(answerNeedsStrongQualityRepair){
if(
answerNeedsStrongQualityRepair&&
generationLatencyMs+env.OPENAI_ANSWER_TIMEOUT_MS>=generationTotalBudgetMs
){
// A4 tail-latency guard: out of the cumulative generation time budget, so keep the
// valid (if imperfect) cited strong answer instead of spending a third generation
// and risking a truncation -> unsupported tail. Recorded for observability.
answerRetryReasons.push(`strong_quality_repair_skipped_time_budget:${strongQualityFailureReason}`);
}elseif(answerNeedsStrongQualityRepair){
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/lib/rag.ts` around lines 4933 - 4938, Update the answer quality-repair
branch around answerNeedsStrongQualityRepair to reserve the retry’s
env.OPENAI_ANSWER_TIMEOUT_MS window before starting it. Skip the retry when
generationLatencyMs plus that timeout would reach or exceed
generationTotalBudgetMs, while preserving the existing retry path when
sufficient budget remains and recording the skip reason.

Source: Coding guidelines

Comment on lines 23 to +25
not: (column: string) => build(column.includes("hybrid_rpc_errors") ? "hybrid" : "degraded"),
ilike: (_column: string, pattern: string) =>
build(pattern.includes("max_output_tokens") ? "truncation" : "timeout"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Assert the ilike column as well as the pattern.

The mock ignores _column, so this test still passes if production queries the wrong JSON path and reports incorrect SLO counts. Record or assert metadata->>fallback_reason together with the exact %max_output_tokens% and %timeout% patterns.

Proposed test hardening
- ilike: (_column: string, pattern: string) =>- build(pattern.includes("max_output_tokens") ? "truncation" : "timeout"),+ ilike: (column: string, pattern: string) => {+ expect(column).toBe("metadata->>fallback_reason");+ expect(["%max_output_tokens%", "%timeout%"]).toContain(pattern);+ return build(pattern.includes("max_output_tokens") ? "truncation" : "timeout");+ },
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
not: (column: string)=>build(column.includes("hybrid_rpc_errors") ? "hybrid" : "degraded"),
ilike: (_column: string,pattern: string)=>
build(pattern.includes("max_output_tokens") ? "truncation" : "timeout"),
ilike: (column: string,pattern: string)=>{
expect(column).toBe("metadata->>fallback_reason");
expect(["%max_output_tokens%","%timeout%"]).toContain(pattern);
returnbuild(pattern.includes("max_output_tokens") ? "truncation" : "timeout");
},
🤖 Prompt for AI Agents
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/answer-slo.test.ts` around lines 23 - 25, Update the ilike mock in the
test query builder to validate the column argument is metadata->>fallback_reason
and match the exact %max_output_tokens% and %timeout% patterns before returning
truncation or timeout; ensure unexpected columns or patterns cannot silently
pass.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Updated .env.example so bootstrap environments use the safer answer-generation token ceiling, OPENAI_MAX_OUTPUT_TOKENS=16000, matching the runtime default from the original PR. .env.exampleL35-L40
  • Updated .env.example so bootstrap environments use OPENAI_STRONG_REASONING_EFFORT=medium, avoiding the high-effort/low-budget starvation path called out in review. .env.exampleL53-L58
  • Committed the fix on the current branch: be4279e fix(env): align sample OpenAI answer defaults.
  • Created the follow-up PR via make_pr.

Testing

  • npm ci
  • npm run format:check -- .env.example
  • ⚠️npm run check:runtime && npm run typecheck && npm run check:production-readiness — runtime and typecheck completed, but check:production-readiness failed because this environment does not have the required Supabase/OpenAI secrets configured (NEXT_PUBLIC_SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, OPENAI_API_KEY).
  • ⚠️npm run check:runtime && npm run typecheck — initial attempt failed before environment setup because the container started with Node 20 and no local dependencies; reran successfully after installing Node 24.18.0 and dependencies.

View task →

@coderabbitai

coderabbitaiBot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

An unexpected error occurred while generating fixes: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@copilot resolve the merge conflicts on this branch.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@codex fix all issues identified with smallest fix without regression.

auto-merge was automatically disabled July 13, 2026 12:38

Head branch was pushed to by a user without write access

@coderabbitai

coderabbitaiBot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Caution

Docstrings generation - FAILED

No docstrings were generated.

CopilotAI commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts on this branch.

Merge conflicts resolved. There was a single conflict in tests/answer-slo.test.ts (a comment-only conflict). I kept the main branch's version which is more descriptive — it adds context that the third observedBaseFilters argument lets tests assert event-type scoping. All other files auto-merged cleanly. Committed in fix: resolve merge conflict in tests/answer-slo.test.ts.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
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 `@tests/answer-slo.test.ts`:
- Around line 7-12: Resolve the merge conflict in tests/answer-slo.test.ts by
removing the conflict markers and retaining the intended comment text, including
the third-argument event-type scoping clarification. Ensure no `<<<<<<<`,
`=======`, or `>>>>>>>` markers remain so Biome can parse the SLO tests.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b162e64-1d39-4bc7-b7ef-58e2a12f373d

📥 Commits

Reviewing files that changed from the base of the PR and between 00ff167 and 8f69910.

📒 Files selected for processing (1)
  • tests/answer-slo.test.ts

Comment threadtests/answer-slo.test.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • npm ci
  • npm run check:runtime
  • npm run test -- tests/answer-slo.test.ts tests/model-index-extraction.test.ts tests/document-enrichment.test.ts
  • npm run format:check -- src/lib/rag.ts src/lib/model-index-extraction.ts tests/answer-slo.test.ts tests/model-index-extraction.test.ts tests/document-enrichment.test.ts
  • npm run typecheck

View task →

@BigSimmo
BigSimmo enabled auto-merge (squash) July 13, 2026 12:50
@BigSimmo
BigSimmo disabled auto-merge July 13, 2026 12:55
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

Closing as a duplicate: the same token-starvation fix landed on main as #580 (merged 12:23Z) from the session that originally authored it — all five non-rag files are byte-identical to this branch, and the rag.ts differences are main-side dose-gate refinements from #574, not fix content. The verification evidence gathered here still stands and applies to #580: verify:cheap 1935 ✓; golden retrieval eval 36/36, content_mrr@10=0.9111; answer-quality A/B vs main baseline — identical failing-case sets, zero max_output_tokens/provider_timeout fallbacks, grounded rate no drop, danger failure 0. See #459 for the canary triage.

@BigSimmo
BigSimmo deleted the claude/repo-task-recommendations-f32752 branch July 13, 2026 18:17
Sign up for freeto 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.

2 participants

@BigSimmo