Skip to content

fix(signals): require a code file before manifest_missing_tests fires - #5852

Merged
JSONbored merged 1 commit into
mainfrom
fix/manifest-missing-tests-docs-only-false-positive
Jul 14, 2026
Merged

fix(signals): require a code file before manifest_missing_tests fires#5852
JSONbored merged 1 commit into
mainfrom
fix/manifest-missing-tests-docs-only-false-positive

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • manifest_missing_tests fired on any PR with configured test expectations and no changed test file, even when the PR touched no code at all. Real production evidence: on JSONbored/awesome-claude, this check blocked 18 PRs and 9 merged anyway (50% false-positive rate), overwhelmingly single-file .mdx/README.md catalog-registration PRs with nothing a test could cover.
  • The sibling local_diff_missing_tests check already guards on codeFileCount > 0; this PR ports the same guard to both buildFocusManifestGuidance implementations (src/signals/focus-manifest.ts and the packages/loopover-engine copy) so they stay in sync.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • Linked issue — N/A. Maintainer-authored fix found via a production ops-anomaly detector, not a contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally — 851 passed, 0 failed (full unsharded run). Both branches of the new codeFileCount > 0 guard are exercised: fires when a code file exists, does not fire on a docs/content-only change, still fires on a mixed code+docs change.
  • npm run test:workers — not run, see note below
  • npm run build:mcp / npm run test:mcp-pack — not run, see note below
  • npm run ui:openapi:check / ui:lint / ui:typecheck / ui:build — not run, see note below
  • npm audit --audit-level=moderate — clean, 0 vulnerabilities
  • New/changed behavior has unit/integration tests for both branches of the new condition, plus a regression test for the reported false-positive

If any required check was skipped, explain why:

  • test:workers, build:mcp/test:mcp-pack, and the ui:* checks were not run. This change is confined to src/signals/focus-manifest.ts, packages/loopover-engine/src/focus-manifest/guidance.ts, and their unit tests — no Workers runtime, MCP package, API route, OpenAPI schema, or UI code is touched. Ran npm run test:coverage (unsharded) and npm run test:engine-parity instead, which exercise this exact code path end-to-end and confirmed no golden-fixture drift.

Safety

  • No secrets, wallets, hotkeys, coldkeys, trust scores, or reward values touched.
  • Public GitHub finding text (title/detail/action strings) is unchanged in content — only the trigger condition changed.
  • Auth/CORS/GitHub App/Cloudflare/session, API/OpenAPI/MCP, UI, and docs/changelog: not applicable, none touched.

UI Evidence

N/A — no UI/frontend/docs change.

Notes

  • A pre-existing test (test/unit/queue-2.test.ts) was incidentally relying on this exact bug: its fixture used a README.md-only changed file to test an unrelated "an ignored-bot author still gets the deterministic gate" behavior. Fixed the fixture to use a code file so it continues to test its actual subject instead of silently depending on the false positive.

manifest_missing_tests fired on any PR with configured test expectations
and no changed test file, even when the PR touched no code at all (a
single .mdx catalog entry, a README edit). Production evidence: roughly
half of the PRs this blocked on JSONbored/awesome-claude merged anyway,
overwhelmingly content-only registry submissions with nothing a test
could cover.

The sibling local_diff_missing_tests check already guards on
codeFileCount > 0; port the same guard to both buildFocusManifestGuidance
implementations (src/signals/focus-manifest.ts and the
packages/loopover-engine copy) so a docs/content-only PR no longer trips
a test-coverage finding it has nothing to satisfy, while a PR mixing code
with docs still requires tests as before.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.11%. Comparing base (db74aa3) to head (c120a2c).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5852   +/-   ##
=======================================
  Coverage   95.11%   95.11%           
=======================================
  Files         586      586           
  Lines       46480    46482    +2     
  Branches    14860    14860           
=======================================
+ Hits        44209    44211    +2     
  Misses       1515     1515           
  Partials      756      756           
Flag Coverage Δ
shard-1 43.73% <100.00%> (+<0.01%) ⬆️
shard-2 36.23% <75.00%> (+<0.01%) ⬆️
shard-3 32.15% <50.00%> (+0.06%) ⬆️
shard-4 32.90% <25.00%> (+0.07%) ⬆️
shard-5 31.64% <100.00%> (+<0.01%) ⬆️
shard-6 44.50% <50.00%> (-0.04%) ⬇️

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

Files with missing lines Coverage Δ
...ges/loopover-engine/src/focus-manifest/guidance.ts 100.00% <100.00%> (ø)
src/signals/focus-manifest.ts 99.65% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 14, 2026
@JSONbored JSONbored self-assigned this Jul 14, 2026
@JSONbored
JSONbored merged commit ad011d3 into main Jul 14, 2026
18 checks passed
@JSONbored
JSONbored deleted the fix/manifest-missing-tests-docs-only-false-positive branch July 14, 2026 19:53
This was referenced Jul 14, 2026
This was referenced Jul 15, 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