Skip to content

test(review): seed the live pull_requests ledger for the submission-cadence tests - #9096

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-cadence-test-live-ledger-9041
Closed

test(review): seed the live pull_requests ledger for the submission-cadence tests#9096
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-cadence-test-live-ledger-9041

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Problem

The submission-cadence signal (#4514) tests in test/unit/reputation-wiring.test.ts fail on current main (the FLAG-ON: true for a machine-paced submitter case asserts true but gets false), which fails validate-tests for every branch cut from main.

Root cause: #9041 deliberately moved getSubmitterCadence (src/review/submitter-reputation.ts) off review_targets — which stopped receiving writes at the 2026-06-22 self-host cutover — to read the live pull_requests ledger:

SELECT created_at FROM pull_requests WHERE repo_full_name = ? AND LOWER(author_login) = LOWER(?) AND created_at >= datetime('now', '-24 hours') ...

But the cadence describe block's local seedReviewTarget helper still seeds only review_targets, so the cadence query reads zero samplescount 0isMachinePacedCadence returns false → the machine-paced assertion fails.

Fix

Seed pull_requests alongside review_targets in that helper so the cadence signal has the live data it now reads. The existing merged/approved review_targets rows are kept untouched — they are what hold the quality signal neutral so only cadence can trip these two tests. Only the assertion's data source is corrected; the assertions themselves are unchanged.

Verification

test/unit/reputation-wiring.test.ts: 36/36 pass (was 1 failed). The machine-paced test now correctly detects the sub-10-minute median gap, and the human-pace test still reads false. Test-only change.

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 26, 2026 17:20
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-26 17:24:37 UTC

1 file · 1 AI reviewer · 1 blocker · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This is a narrowly-scoped test-only fix: the cadence describe block's local seedReviewTarget helper now also inserts into pull_requests, matching the read path getSubmitterCadence uses since #9041's cutover migration. The change is correct — it seeds the exact table/columns (repo_full_name, author_login, created_at) that the live cadence query filters on, while leaving the existing review_targets insert untouched to keep the quality signal neutral. CI is green (36/36), and the fix is properly scoped to only the failing describe block rather than touching the outer seedReviewTarget used by other tests.

Nits — 3 non-blocking
  • The PR description doesn't link an open issue per repo convention; confirm this failing-test fix is tied to a maintainer-tracked issue (e.g. feat(review): add a submission-cadence/inter-arrival-time signal to the reputation and slop models to flag machine-paced submitters #4514) rather than being submitted unsolicited.
  • test/unit/reputation-wiring.test.ts: the inner seedReviewTarget shadows the outer one of the same name — consider renaming (e.g. seedCadenceSample) to avoid confusion when reading the file top-to-bottom.
  • Add a one-line comment near the top of the describe block noting that this local helper intentionally diverges from the outer seedReviewTarget so future readers don't try to unify them.

Why this is blocked

  • No linked issue detected: No closing reference or linked issue number was found in the PR metadata/body. — If this PR is intended to solve an issue, link it explicitly in the PR body.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected: No closing reference or linked issue number was found in the PR metadata/body. — If this PR is intended to solve an issue, link it explicitly in the PR body.

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 295 registered-repo PR(s), 124 merged, 37 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 295 PR(s), 37 issue(s).
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal · LLM: minor
Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, Ruby, TypeScript, Svelte, Cuda, JavaScript, Markdown, MDX
  • Official Gittensor activity: 295 PR(s), 37 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (No linked issue detected). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 26, 2026
…adence tests

JSONbored#9041 moved getSubmitterCadence off review_targets (frozen at the self-host
cutover) to read the live pull_requests table, but the cadence test's local
seed helper still wrote only review_targets. The query therefore read zero
samples, so the machine-paced submitter assertion failed on main and broke
validate-tests for every branch.

Seed pull_requests alongside review_targets in the cadence helper so the
signal has the live data it now reads, without disturbing the merged/approved
review_targets rows that keep the quality signal neutral.
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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant