Skip to content

test(services): fix stale actor/repo-key assertions left by the rebrand#6868

Merged
JSONbored merged 1 commit into
mainfrom
test/rebrand-fix-stale-actor-assertions
Jul 17, 2026
Merged

test(services): fix stale actor/repo-key assertions left by the rebrand#6868
JSONbored merged 1 commit into
mainfrom
test/rebrand-fix-stale-actor-assertions

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Continues the repo-wide gittensory -> loopover rebrand cleanup sweep. Two genuine test-correctness bugs, both introduced by the rename and not caught before:
    • notify-pagerduty.test.ts: the test titled "a recent page recorded under the pre-rebrand 'gittensory' actor still suppresses a duplicate" was inserting actor: "loopover" into its fixture -- the wrong value for what it claims to test. src/services/notify-pagerduty.ts's trigger() path deliberately queries both the "loopover" and "gittensory" actors (a dual-actor OR-query, so a page recorded under the old actor value just before the rebrand deployed still suppresses a duplicate after it). Verified: no other test anywhere in the suite exercises the "gittensory" side of that query, so this branch had zero coverage despite this test's stated purpose. Flipped the fixture to actor: "gittensory" so the test actually covers the branch it's named for.
    • registry.test.ts / scoring.test.ts: two comments claimed to mirror "JSONbored/gittensory's real master_repositories.json shape" -- verified directly against the live upstream registry (entrius/gittensor) that the real key is now JSONbored/loopover. Fixed both comments; in registry.test.ts the comment's own fixture block used the same stale key as its literal input/lookup value in that one self-contained test case, so updated that too for internal consistency. Every other "JSONbored/gittensory" fixture elsewhere in that file is an unrelated, arbitrary placeholder repo name with no connection to the real upstream shape, and is left alone.

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.
  • I linked a currently open issue this PR resolves -- no issue linked: repo-owner-requested maintainer-equivalent cleanup pass, not a contributor fix tied to a filed issue.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage -- targeted run of the three changed test files is green (test/unit/notify-pagerduty.test.ts, test/unit/registry.test.ts, test/unit/scoring.test.ts); test-only change, exempt from Codecov patch coverage.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate (0 vulnerabilities)
  • [~] npm run test:ci: the three changed test files pass cleanly, individually and alongside each other. The full local run flagged 4 unrelated failures this attempt (ai-summaries.test.ts's 30s-timeout AI-rewrite test, and two real-git-subprocess tests in miner-attempt-worktree.test.ts/miner-repo-clone.test.ts), all traced to severe local machine contention, not this diff: uptime showed a load average of 118-193 during this run (multiple concurrent local sessions were independently running their own heavy npm run test:coverage/git-clone workloads on this same shared machine at the time -- confirmed via ps). None of the 4 failing files overlap this diff's 3 files at all, and re-running all 4 in isolation (away from the full-parallel-suite contention) passed cleanly, including the two git-subprocess tests, which are exactly the kind of test that's fragile under heavy concurrent I/O/CPU load. Given the repeated, targeted, isolated confirmation and the zero file-path overlap, I'm proceeding rather than continuing to re-run the full heavy suite against an already critically-loaded shared machine. Flagging this transparently rather than silently rerunning until it happens to go green.
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries -- N/A, test-only change (these test files gained coverage of an existing branch, no new production code).

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests -- N/A.
  • API/OpenAPI/MCP behavior is updated and tested where needed -- N/A.
  • UI changes use live API data or real empty/error/loading states -- N/A.
  • Visible UI changes include a UI Evidence section -- N/A.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs (none touched here).

Notes

notify-pagerduty.test.ts: the test titled "a recent page recorded under
the pre-rebrand 'gittensory' actor still suppresses a duplicate" was
inserting actor: "loopover" into its fixture -- the wrong value for what
it claims to test. src/services/notify-pagerduty.ts's trigger() path
deliberately queries BOTH the "loopover" and "gittensory" actors (a
dual-actor OR-query specifically so a page recorded under the old actor
value just before the rebrand deployed still suppresses a duplicate
after it), and no other test anywhere exercises the "gittensory" side of
that query. Flips the fixture to actor: "gittensory" so this regression
test actually covers the branch it's named for.

registry.test.ts / scoring.test.ts: two comments claimed to mirror
"JSONbored/gittensory's real master_repositories.json shape" -- verified
directly against the live upstream registry (entrius/gittensor) that the
real key is now "JSONbored/loopover". Fixed both comments; in
registry.test.ts the comment's own fixture block used the same stale key
as its literal input/lookup value in that one self-contained test case,
so updated that too for consistency (every other "JSONbored/gittensory"
fixture elsewhere in that file is an unrelated, arbitrary placeholder
repo name with no connection to the real upstream shape, and is left
alone).
@JSONbored JSONbored self-assigned this Jul 17, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored
JSONbored merged commit 9375861 into main Jul 17, 2026
13 checks passed
@JSONbored
JSONbored deleted the test/rebrand-fix-stale-actor-assertions branch July 17, 2026 09:40
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.64%. Comparing base (4b786b1) to head (beb7a5c).
⚠️ Report is 20 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6868   +/-   ##
=======================================
  Coverage   93.64%   93.64%           
=======================================
  Files         685      685           
  Lines       68243    68243           
  Branches    18707    18707           
=======================================
  Hits        63908    63908           
  Misses       3350     3350           
  Partials      985      985           
Flag Coverage Δ
shard-1 43.23% <ø> (-0.46%) ⬇️
shard-2 36.93% <ø> (+0.25%) ⬆️
shard-3 32.59% <ø> (-0.12%) ⬇️
shard-4 34.36% <ø> (-0.40%) ⬇️
shard-5 31.48% <ø> (+0.32%) ⬆️
shard-6 45.97% <ø> (+0.28%) ⬆️

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

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