Skip to content

fix(test): stop the local gate from failing on main#5725

Merged
JSONbored merged 2 commits into
mainfrom
fix/flaky-tests-under-load
Jul 14, 2026
Merged

fix(test): stop the local gate from failing on main#5725
JSONbored merged 2 commits into
mainfrom
fix/flaky-tests-under-load

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Three independent, pre-existing gate breaks on main — none introduced by this branch. Found while investigating why release-please's #5710-#5713 looked flaky under local parallel test runs; confirmed each reproduces identically on a clean origin/main checkout.

  • Test timeouts: agent-sdk-driver.test.ts, ai-summaries.test.ts, upstream-ruleset.test.ts each do real, non-trivial work (git subprocess round-trips, a 42-entry forbidden-word sweep, 29 sequential D1-backed scenarios) that reliably exceeds vitest's 15s default under load. Widened each to an explicit, realistic timeout.
  • Grafana dashboard sentinel (selfhost-grafana-dashboard.test.ts): 5f187c2 (fix(observability): stop using Grafana's $__ macro prefix as the SQL "All" sentinel #5716) fixed a real production bug — Grafana's ${var:sqlstring} doesn't sql-quote a value starting with $__, so the old $__all "All repos" sentinel leaked through unescaped and SQLite misparsed it as its own bind parameter, silently zeroing every "All"-filtered panel. That commit updated the dashboard JSON and two sibling test files but missed this one.
  • Stale generated OpenAPI spec + lint: 40e6cdf (feat(github)!: rename the @gittensory bot mention command to @loopover #5715, the @gittensory@loopover bot-mention rename) changed copy text but never regenerated the OpenAPI spec or ran prettier on the reflowed JSX text nodes, so ui:openapi:check and ui:lint both fail on main right now.

Test plan

  • npm run test:ci green end-to-end (full chain: migrations, typecheck, engine/workers/mcp/miner tests, ui lint/typecheck/test/build)
  • npm audit --audit-level=moderate clean
  • Regenerated openapi.json via npm run ui:openapi; confirmed npm run ui:openapi:check passes
  • eslint --fix on the 3 affected .tsx files; confirmed npm run ui:lint passes (0 errors)
  • Confirmed all fixed failures reproduce identically on unmodified origin/main before fixing, so nothing here is specific to this branch

Three independent, pre-existing gate breaks, none introduced by this branch --
found while chasing why release-please's PRs (#5710-5713) looked flaky under
local parallel test runs, and confirmed to reproduce identically on a clean
origin/main checkout:

- test/unit/agent-sdk-driver.test.ts, ai-summaries.test.ts, upstream-ruleset.test.ts:
  each does real, non-trivial work (git subprocess round-trips, a 42-entry
  forbidden-word sweep, 29 sequential D1-backed scenarios) that reliably exceeds
  vitest's 15s default under load. Widened each to an explicit, realistic timeout
  instead of leaving them to flake.
- test/unit/selfhost-grafana-dashboard.test.ts: 5f187c2 (#5716) fixed a real
  production bug -- Grafana's ${var:sqlstring} doesn't sql-quote a value that
  starts with $__, so the old $__all "All repos" sentinel leaked through
  unescaped and SQLite misparsed it as its own bind parameter, silently zeroing
  every "All"-filtered panel. That commit updated the dashboard JSON and two
  sibling test files but missed this one.
- apps/gittensory-ui/public/openapi.json + 3 route/component .tsx files:
  40e6cdf (#5715, the @gittensory -> @Loopover bot-mention rename) changed
  copy text but never regenerated the OpenAPI spec or ran prettier on the
  reflowed JSX text nodes, so ui:openapi:check and ui:lint both fail on main.

Regenerated the spec (npm run ui:openapi) and ran eslint --fix on the affected
files; both are mechanical, zero-semantic-diff outputs.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 14, 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
loopover-ui 4c0c3c4 Commit Preview URL

Branch Preview URL
Jul 14 2026, 08:08 AM

…-load

# Conflicts:
#	test/unit/selfhost-grafana-dashboard.test.ts
@JSONbored JSONbored self-assigned this Jul 14, 2026
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.06%. Comparing base (8496b4f) to head (4c0c3c4).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5725   +/-   ##
=======================================
  Coverage   95.06%   95.06%           
=======================================
  Files         581      581           
  Lines       46164    46164           
  Branches    14810    14810           
=======================================
  Hits        43886    43886           
  Misses       1517     1517           
  Partials      761      761           
Flag Coverage Δ
shard-1 43.43% <ø> (-0.54%) ⬇️
shard-2 35.97% <ø> (+0.25%) ⬆️
shard-3 32.16% <ø> (-0.13%) ⬇️
shard-4 31.14% <ø> (-1.87%) ⬇️
shard-5 32.38% <ø> (+0.79%) ⬆️
shard-6 44.84% <ø> (+0.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 534dad7 into main Jul 14, 2026
17 checks passed
@JSONbored
JSONbored deleted the fix/flaky-tests-under-load branch July 14, 2026 08:09
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 14, 2026
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