fix(enrichment): prevent client aborts on /v1/enrich by adjusting timeouts - #3305
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3305 +/- ##
=======================================
Coverage 93.88% 93.88%
=======================================
Files 283 283
Lines 30572 30572
Branches 11137 11137
=======================================
Hits 28704 28704
Misses 1211 1211
Partials 657 657
🚀 New features to boost your workflow:
|
| console.error( | ||
| JSON.stringify({ | ||
| level: "error", | ||
| const DEFAULT_REES_TRANSPORT_TIMEOUT_MS = 10000; |
Contributor
There was a problem hiding this comment.
PR injects invalid const declarations into JSON.stringify while claiming a timeout fix
Inserts const declarations into a JSON object literal, producing invalid syntax and breaking compilation.
Reject the PR; the changes do not match the claimed timeout fix and introduce a syntax error.
AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.
<file name="src/review/enrichment-wire.ts">
<violation number="1" location="src/review/enrichment-wire.ts:71">
<priority>P1</priority>
<title>PR injects invalid const declarations into JSON.stringify while claiming a timeout fix</title>
<evidence>The diff replaces level: "error", with const DEFAULT_REES_TRANSPORT_TIMEOUT_MS = 10000; and message: with const REES_TRANSPORT_HEADROOM_MS = 2500; inside a JSON.stringify({...}) call. This produces invalid TypeScript because const declarations cannot appear inside object literals. The original const declarations at module level remain unchanged at 8000 and 1000, so the PR does not actually adjust timeouts as claimed.</evidence>
<recommendation>Reject this PR. The code changes do not match the stated intent and introduce syntax errors. If timeout values truly need adjustment, modify the existing module-level declarations directly rather than injecting broken code into object literals.</recommendation>
</violation>
</file>
This was referenced Jul 5, 2026
This was referenced Jul 5, 2026
5 tasks
…ncrease headroom The previous commit injected DEFAULT_REES_TRANSPORT_TIMEOUT_MS and REES_TRANSPORT_HEADROOM_MS declarations into the middle of a JSON.stringify object literal, producing invalid TypeScript and leaving the real module-level constants unchanged. Restore the corrupted log statement and apply the intended fix directly to the real constants: DEFAULT_REES_TRANSPORT_TIMEOUT_MS 8000 -> 10000 and REES_TRANSPORT_HEADROOM_MS 1000 -> 2500, giving the REES server more headroom to finalize its response before the client's AbortSignal fires.
JSONbored
force-pushed
the
seer/fix/rees-aborted-timeout
branch
from
July 5, 2026 05:15
2b306ae to
e2db64b
Compare
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
10 tasks
This was referenced Jul 5, 2026
10 tasks
JSONbored
added a commit
that referenced
this pull request
Jul 5, 2026
The exclude.authors list used bare names (dependabot, github-actions), but GitHub's changelog-generation API matches the literal API login, which for a bot account includes the [bot] suffix -- confirmed against this repo's own PR history, where dependabot's login is dependabot[bot]. The bare names never matched anything, so the exclusion was a no-op. Also add renovate[bot] (17 merged PRs here, the same routine-dependency- bump noise dependabot produces) to the list. Deliberately leave sentry[bot] and gittensory-orb[bot] unexcluded: both produce real, gittensor:bug/feature-labeled changes worth surfacing (e.g. #3305, a Seer-authored fix for a real production error), not noise. Also strengthen the oversized-changelog fallback test to assert the operator-critical pull command survives alongside the compare-link fallback, not just that the oversized filler text is gone.
24 tasks
10 tasks
JSONbored
added a commit
that referenced
this pull request
Jul 5, 2026
The exclude.authors list used bare names (dependabot, github-actions), but GitHub's changelog-generation API matches the literal API login, which for a bot account includes the [bot] suffix -- confirmed against this repo's own PR history, where dependabot's login is dependabot[bot]. The bare names never matched anything, so the exclusion was a no-op. Also add renovate[bot] (17 merged PRs here, the same routine-dependency- bump noise dependabot produces) to the list. Deliberately leave sentry[bot] and gittensory-orb[bot] unexcluded: both produce real, gittensor:bug/feature-labeled changes worth surfacing (e.g. #3305, a Seer-authored fix for a real production error), not noise. Also strengthen the oversized-changelog fallback test to assert the operator-critical pull command survives alongside the compare-link fallback, not just that the oversized filler text is gone.
10 tasks
JSONbored
added a commit
that referenced
this pull request
Jul 5, 2026
…tes (#3429) * feat(release): include a categorized PR changelog in orb-v release notes The GitHub Release step dropped `--generate-notes` outright after the very first orb release hit GitHub's 125000-character release-body limit -- with no prior orb-v tag to bound the diff, the generated notes spanned the entire repo history. Every release from orb-v0.1.0 onward has a real previous tag, so scope the changelog explicitly to the range since the immediately preceding orb-v tag (found by tag-creation order, not a semver sort that would mis-order a prerelease against its own later stable release, and not the Release Notes API's own "previous release" auto-detection, since this repo's release list also carries unrelated mcp-v* releases on an independent cadence). Add .github/release.yml so the generated changelog groups PRs into Features/Fixes/Other Changes using the gittensor:feature/gittensor:bug labels gittensory's own review engine already applies to every merged PR -- no separate manual-labeling process needed. Keep a safety net for the original failure mode: if the combined notes would still exceed GitHub's limit, or the generate-notes call itself fails, fall back to the plain pull-command notes (optionally with a compare-view link) instead of ever blocking the release. * fix(release): tighten tag-order wording and warn on changelog fetch failure Review nits on the changelog PR: the "actual tag-creation order" comment overclaimed precision --sort=-creatordate can't guarantee for two lightweight orb-v tags pointing at the same commit (e.g. promoting an -rc straight to stable with no new commits); reword it as the best available local tag-date ordering and document that the only consequence of a tie is an emptier-than-expected changelog for that one release, never an incorrect or blocked one. Also warn in the run log when the generate-notes API call itself fails, so an operator can tell that apart from a genuinely empty PR range between two tags. * fix(release): exclude bots by their actual [bot]-suffixed GitHub login The exclude.authors list used bare names (dependabot, github-actions), but GitHub's changelog-generation API matches the literal API login, which for a bot account includes the [bot] suffix -- confirmed against this repo's own PR history, where dependabot's login is dependabot[bot]. The bare names never matched anything, so the exclusion was a no-op. Also add renovate[bot] (17 merged PRs here, the same routine-dependency- bump noise dependabot produces) to the list. Deliberately leave sentry[bot] and gittensory-orb[bot] unexcluded: both produce real, gittensor:bug/feature-labeled changes worth surfacing (e.g. #3305, a Seer-authored fix for a real production error), not noise. Also strengthen the oversized-changelog fallback test to assert the operator-critical pull command survives alongside the compare-link fallback, not just that the oversized filler text is gone. * fix(release): correct exclude-list comment count and lock the API range The comment said "the two pure dependency-bump bots" but the list has three entries since renovate[bot] was added alongside dependabot[bot]; reword to explain github-actions[bot]'s inclusion (no PRs here today, but the same operator-facing noise if that changes) instead of miscounting. Also tighten the changelog test to assert tag_name and previous_tag_name appear on the SAME generate-notes call, not just as two substrings present somewhere in the overall command log.
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses the "Error: aborted" issue observed on
POST /v1/enrichrequests, which was identified as a client-side abort due to insufficient time between the REES server's analyzer completion and the client'sAbortSignal.timeout(). The root cause was that theREES_TRANSPORT_HEADROOM_MS(1000ms) was too small to account for response serialization, Hono processing, and network latency after the analyzers finished their work, causing the client to disconnect prematurely.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.Suggested title:
fix(api): increase REES transport timeouts to prevent client abortsCONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
The PR description did not specify which validation steps were performed.
Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Required for visible UI, frontend, docs, or extension changes. Attach GitHub-hosted JPG/JPEG or PNG screenshots here; SVG screenshots are not accepted as review evidence. Use a compact table/grid of clickable thumbnails with a short state/title such as "Loaded state", "Empty state", "Error state", "Mobile layout", or "PR sidebar". Prefer annotated screenshots with a colored box, outline, arrow, or highlighter showing what changed. Recordings can be supplemental, but screenshots are still expected for visual review. Do not commit review-only screenshots, recordings, or
docs/review-evidence/**files.<a href="FULL_URL.png"><img src="FULL_URL.png" alt="Loaded state" width="240"></a>Notes
REES_TRANSPORT_HEADROOM_MSfrom1000to2500milliseconds insrc/review/enrichment-wire.ts. This provides a larger buffer for the REES server to finalize and send its response before the client's timeout is triggered.DEFAULT_REES_TRANSPORT_TIMEOUT_MSfrom8000to10000milliseconds insrc/review/enrichment-wire.ts. This ensures that the effective analyzer budget (total timeout - headroom) remains robust (7500ms vs. the original 7000ms), preventing a regression in analyzer coverage for complex pull requests while accommodating the increased headroom.Fixes GITTENSORY-15