Skip to content

fix(review): skip RAG pruning for truncated trees - #10356

Open
VitoBeijing wants to merge 2 commits into
JSONbored:mainfrom
VitoBeijing:fix/rag-tree-truncation-10328
Open

fix(review): skip RAG pruning for truncated trees#10356
VitoBeijing wants to merge 2 commits into
JSONbored:mainfrom
VitoBeijing:fix/rag-tree-truncation-10328

Conversation

@VitoBeijing

@VitoBeijing VitoBeijing commented Aug 17, 2026

Copy link
Copy Markdown

Summary

  • surface the GitHub recursive-tree truncated flag to RAG indexing
  • skip destructive missing-path pruning when the returned tree is incomplete
  • continue indexing returned entries and preserve complete-tree pruning behavior
  • add regression coverage for both complete and truncated trees
  • freeze the gate-outcome dashboard test clock so its fixed audit fixtures remain inside the tested 30-day window

Closes #10328

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npx vitest run test/unit/rag-index.test.ts — 53 passed
  • npx vitest run test/unit/routes-gate-outcome-breakdown.test.ts — 6 passed
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build

Full-suite note: 26,765 tests passed; 41 concurrent tests timed out locally.
The affected Git fixture suite passed 79/79 when run in isolation with the
user-level Git hook configuration excluded.

Notes

The dashboard test fix only controls Date and restores real timers after each test.
No production dashboard behavior, UI, API contract, dependency, authentication,
or authorization changes.

@VitoBeijing
VitoBeijing requested a review from JSONbored as a code owner August 17, 2026 04:35
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
4912 2 4910 11
View the top 2 failed test(s) by shortest run time
test/unit/routes-gate-outcome-breakdown.test.ts > GET /v1/app/maintainer-dashboard gateOutcomeBreakdown (#2203) > excludes non-terminal and non-gate audit rows from gateOutcomeBreakdown totals
Stack Traces | 0.164s run time
AssertionError: expected { windowDays: 30, …(5) } to match object { total: 1, counts: { …(3) } }
(7 matching properties omitted from actual)

- Expected
+ Received

  {
    "counts": {
      "autoClosed": 0,
-     "autoMerged": 1,
+     "autoMerged": 0,
      "held": 0,
    },
-   "total": 1,
+   "total": 0,
  }

 ❯ test/unit/routes-gate-outcome-breakdown.test.ts:147:56
test/unit/routes-gate-outcome-breakdown.test.ts > GET /v1/app/maintainer-dashboard gateOutcomeBreakdown (#2203) > surfaces repo-scoped gate-outcome counts on qualityDashboard for an owner session
Stack Traces | 0.337s run time
AssertionError: expected { windowDays: 30, …(5) } to match object { windowDays: 30, total: 3, …(2) }
(2 matching properties omitted from actual)

- Expected
+ Received

  {
    "counts": {
-     "autoClosed": 1,
-     "autoMerged": 1,
-     "held": 1,
+     "autoClosed": 0,
+     "autoMerged": 0,
+     "held": 0,
    },
    "rates": {
-     "autoClosed": 33.3,
-     "autoMerged": 33.3,
-     "held": 33.3,
+     "autoClosed": null,
+     "autoMerged": null,
+     "held": null,
    },
-   "total": 3,
+   "total": 0,
    "windowDays": 30,
  }

 ❯ test/unit/routes-gate-outcome-breakdown.test.ts:79:56

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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.

review(rag-index): honor GitHub's tree-truncation flag before pruning RAG chunks

1 participant