Skip to content

perf(rees): add cost-aware analyzer scheduling - #1833

Merged
JSONbored merged 2 commits into
codex/rees-bounded-fetchesfrom
codex/rees-scheduler-profiles
Jun 30, 2026
Merged

perf(rees): add cost-aware analyzer scheduling#1833
JSONbored merged 2 commits into
codex/rees-bounded-fetchesfrom
codex/rees-scheduler-profiles

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

What changed

  • Added a REES scheduler that plans analyzers by profile, cost class, input availability, and remaining budget.
  • Added per-cost concurrency and timeout caps for local, registry, GitHub-light, GitHub-heavy, and tooling analyzers.
  • Added skip predicates for absent inputs so registry and GitHub analyzers do not run when relevant files, tokens, or SHAs are unavailable.
  • Preserved explicit REES_ANALYZERS behavior while allowing profile defaults through REES_PROFILE.
  • Expanded analyzer statuses with capped and timeout for more attributable partial results.
  • Added focused scheduler tests plus engine wire tests for REES profile pass-through.

Why

REES previously fanned out requested analyzers uniformly, letting expensive analyzers compete for the full request budget. This makes the runtime plan cost-aware and keeps useful partial enrichment available before the caller transport timeout expires.

Validation

  • npm --prefix review-enrichment test
  • npx vitest run test/unit/enrichment-wire.test.ts test/unit/enrichment-wiring.test.ts
  • git diff --check

Notes

@dosubot dosubot Bot added the size:XL label Jun 30, 2026
@JSONbored JSONbored added the maintainer-only Owner-only work — yields no Gittensor points. label Jun 30, 2026
@loopover-orb

loopover-orb Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-06-30 07:31:15 UTC

24 files · 1 AI reviewer · 1 blocker · readiness 77/100 · CI pending · dirty

⏸️ Suggested Action - Manual Review

  • AI reviewers agree on a likely critical defect: apps/gittensory-ui/src/routes/docs.self-hosting-rees-analyzers.tsx:46 says unset, `all`, or `*` runs the full registry while apps/gittensory-ui/src/routes/docs.self-hosting-rees.tsx:111 says those same values use the selected `REES_PROFILE` defaults, so the self-hosting analyzer-selection contract is internally inconsistent and one page is wrong. — Resolve the flagged defect, or override if the AI reviewers are mistaken, then re-run the gate.

Review summary
The REES runtime changes in the visible diff are internally coherent: profile resolution, cost-class ordering, explicit analyzer handling, and per-analyzer timeout/capping all line up with the new scheduler. The main defect is in the published self-hosting docs, where the analyzer-selection contract is now internally contradictory for unset/all/* behavior. That needs correction because this is operator-facing configuration, not cosmetic wording.

Blockers

  • apps/gittensory-ui/src/routes/docs.self-hosting-rees-analyzers.tsx:46 says unset, `all`, or `*` runs the full registry while apps/gittensory-ui/src/routes/docs.self-hosting-rees.tsx:111 says those same values use the selected `REES_PROFILE` defaults, so the self-hosting analyzer-selection contract is internally inconsistent and one page is wrong.
Nits — 6 non-blocking
  • apps/gittensory-ui/src/routes/docs.self-hosting-rees-analyzers.tsx:110 lists GitHub API analyzers but omits `docCommentDrift`, even though the generated metadata on the same page marks it as requiring `github-token` and `head-sha`.
  • review-enrichment/scripts/generate-analyzer-metadata.mjs:111 wraps generated comma-separated `.env.example` comments without preserving a delimiter at line boundaries, making the analyzer/profile lists harder to copy or compare.
  • review-enrichment/src/request-guardrails.ts:102 should use `Number.isSafeInteger` for `prNumber` so oversized JSON integers are rejected instead of accepted after precision loss.
  • Make the analyzer-selection docs state one rule consistently: either `all` bypasses profiles and runs every analyzer, or `all` follows `REES_PROFILE` defaults; update both REES docs pages and `.env.example` together.
  • Derive the docs summary groups from `REES_ANALYZERS` requirements, especially the `github-token` group, so new token-aware analyzers cannot be omitted from the prose summary.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.

Concerns raised — review before merging

  • apps/gittensory-ui/src/routes/docs.self-hosting-rees-analyzers.tsx:46 says unset, `all`, or `*` runs the full registry while apps/gittensory-ui/src/routes/docs.self-hosting-rees.tsx:111 says those same values use the selected `REES_PROFILE` defaults, so the self-hosting analyzer-selection contract is internally inconsistent and one page is wrong.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ✅ Linked #1811
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 2 registered-repo PR(s), 2 merged, 273 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 2 PR(s), 273 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Triage stale or unlinked PRs.
  • No action.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@JSONbored
JSONbored force-pushed the codex/rees-bounded-fetches branch from 498bc5d to f6153dd Compare June 30, 2026 06:26
@JSONbored
JSONbored force-pushed the codex/rees-scheduler-profiles branch from a347a9b to 3f71202 Compare June 30, 2026 06:26
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui e28f9eb Commit Preview URL

Branch Preview URL
Jun 30 2026, 07:13 AM

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 30, 2026
@JSONbored JSONbored self-assigned this Jun 30, 2026
@JSONbored JSONbored removed the maintainer-only Owner-only work — yields no Gittensor points. label Jun 30, 2026
@JSONbored
JSONbored force-pushed the codex/rees-scheduler-profiles branch from 3f71202 to c9af3e8 Compare June 30, 2026 06:31
@JSONbored
JSONbored force-pushed the codex/rees-bounded-fetches branch from f6153dd to 16a9311 Compare June 30, 2026 06:31
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (codex/rees-bounded-fetches@353eee1). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                      Coverage Diff                      @@
##             codex/rees-bounded-fetches    #1833   +/-   ##
=============================================================
  Coverage                              ?   95.66%           
=============================================================
  Files                                 ?      214           
  Lines                                 ?    23342           
  Branches                              ?     8427           
=============================================================
  Hits                                  ?    22331           
  Misses                                ?      419           
  Partials                              ?      592           
Files with missing lines Coverage Δ
src/review/enrichment-wire.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored force-pushed the codex/rees-scheduler-profiles branch from c9af3e8 to b5fcaef Compare June 30, 2026 06:51
@JSONbored
JSONbored force-pushed the codex/rees-bounded-fetches branch from 16a9311 to 353eee1 Compare June 30, 2026 06:51
@JSONbored
JSONbored force-pushed the codex/rees-scheduler-profiles branch from b5fcaef to 8f17c83 Compare June 30, 2026 07:02
* feat(rees): generate analyzer config metadata

* feat(rees): add performance guardrails and telemetry (#1836)
@dosubot dosubot Bot added size:XXL and removed size:XL labels Jun 30, 2026
@JSONbored
JSONbored merged commit fc5c344 into codex/rees-bounded-fetches Jun 30, 2026
7 checks passed
@JSONbored
JSONbored deleted the codex/rees-scheduler-profiles branch June 30, 2026 07:15
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 30, 2026
JSONbored added a commit that referenced this pull request Jun 30, 2026
* fix(rees): bound external analyzer fetches

* perf(rees): add cost-aware analyzer scheduling (#1833)

* perf(rees): add cost-aware analyzer scheduling

* feat(rees): generate analyzer config metadata (#1835)

* feat(rees): generate analyzer config metadata

* feat(rees): add performance guardrails and telemetry (#1836)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant