test(services): fix stale actor/repo-key assertions left by the rebrand#6868
Merged
Conversation
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).
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
notify-pagerduty.test.ts: the test titled "a recent page recorded under the pre-rebrand 'gittensory' actor still suppresses a duplicate" was insertingactor: "loopover"into its fixture -- the wrong value for what it claims to test.src/services/notify-pagerduty.ts'strigger()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 toactor: "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 realmaster_repositories.jsonshape" -- verified directly against the live upstream registry (entrius/gittensor) that the real key is nowJSONbored/loopover. Fixed both comments; inregistry.test.tsthe 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
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm 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:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm 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 inminer-attempt-worktree.test.ts/miner-repo-clone.test.ts), all traced to severe local machine contention, not this diff:uptimeshowed a load average of 118-193 during this run (multiple concurrent local sessions were independently running their own heavynpm run test:coverage/git-clone workloads on this same shared machine at the time -- confirmed viaps). 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.Safety
UI Evidencesection -- N/A.Notes
gittensoryreferences left over from the rebrand (docs(selfhost): fix stale gittensory-selfhost self-host doc defaults #6826, chore(config): fix stale gittensory prose in infra/root config files #6841, chore(config): fix stale gittensory prose in wrangler.jsonc comments #6849, docs(miner): fix stale gittensory prose and broken links in loopover-miner docs #6859, docs(packages): fix stale gittensory prose and audit citations #6863). This one is the only one so far that fixes a genuine bug (a test-coverage gap) rather than pure prose/comment drift.