Conversation
Both local copies of the name grammar accepted a dash inside a label, which the registry is dropping (moshcoder/moshpit-name#6, moshcoder/moshcode#193). A name accepted here and rejected there forwards the tab to a page saying it does not exist, which is a worse failure than refusing it up front. Neither drift test would have caught this. moshpit.test.js compares the extension port against the TypeScript reference over a shared hostname list, and moshpit-drift.test.js compares both against the published package — and neither list contained a dash inside a label. Leading and trailing dashes were covered from the start; the case the rule actually turns on was covered nowhere, so all three implementations could disagree and every assertion still passed. Both lists now carry it, and the anchor consequently fails against @moshcoder/moshpit-resolve 0.1.1 with a real behavioural difference: blue.lazy-loaded decides 'park' against the package and 'clearnet' here. That is the guard working. It goes green once moshcoder/moshpit-resolve#3 publishes and the devDependency is bumped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
ralyodio
marked this pull request as ready for review
August 1, 2026 13:03
ralyodio
added a commit
that referenced
this pull request
Aug 1, 2026
Unblocks main, red since #66 merged. #66 dropped dashes from both local copies of the name grammar while the published package still allowed them, so moshpit-drift.test.js failed on blue.lazy-loaded — and not merely on parsing: the two disagreed on where a tab goes, 'park' against the package and 'clearnet' against the new rule. That is the anchor earning its place. 0.1.2 carries the rule. The lockfile is the part that matters: CI installs frozen, so the ^0.1.1 range never picked the new version up on its own. Scoped to the one package deliberately. Doing this with `pnpm update --latest` first pulled the whole tree forward — TypeScript 5.9.3 to 7.0.2, eslint 9 to 10, babel 7 to 8, 3509 lines of lockfile — and broke Lint with "typescript-eslint does not support TS 7.0". This touches 11 lines. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ralyodio
added a commit
that referenced
this pull request
Aug 1, 2026
Unblocks main, red since #66 merged. #66 dropped dashes from both local copies of the name grammar while the published package still allowed them, so moshpit-drift.test.js failed on blue.lazy-loaded — and not merely on parsing: the two disagreed on where a tab goes, 'park' against the package and 'clearnet' against the new rule. That is the anchor earning its place. 0.1.2 carries the rule. The lockfile is the part that matters: CI installs frozen, so the ^0.1.1 range never picked the new version up on its own. Scoped to the one package deliberately. Doing this with `pnpm update --latest` first pulled the whole tree forward — TypeScript 5.9.3 to 7.0.2, eslint 9 to 10, babel 7 to 8, 3509 lines of lockfile — and broke Lint with "typescript-eslint does not support TS 7.0". This touches 11 lines. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Draft: blocked on moshcoder/moshpit-resolve#3 publishing. See "CI will be red" below — that's the guard working, not a bug.
The change
Both local copies of the name grammar accepted a dash inside a label. The registry is dropping it (moshcoder/moshpit-name#6, moshcoder/moshcode#193), and a name accepted here but rejected there forwards the tab to a page saying it does not exist — worse than refusing it up front.
Changed in
apps/desktop/src/moshpit-resolve.tsandextensions/ai-sidebar/moshpit.jstogether, since the extension is a hand port of the module.Neither drift test would have caught this
This repo already has two, and both were blind to the exact rule in question:
moshpit.test.jsmoshpit-drift.test.js@moshcoder/moshpit-resolveLeading and trailing dashes were covered elsewhere from the start. A dash inside a label — the case this rule turns on — was covered nowhere. All three implementations could disagree and every assertion would still pass.
Both shared hostname lists now carry
lazy-loaded,blue.lazy-loaded,register-me.eggs,a-b.c-d.CI will be red until the package publishes
With the lists fixed, the anchor now fails against
@moshcoder/moshpit-resolve@0.1.1— and not merely on parsing. It's a behavioural difference:A tab sent somewhere different. That's precisely what the anchor exists to catch.
To land: merge moshcoder/moshpit-resolve#3 → publish → bump
@moshcoder/moshpit-resolveinapps/desktop/package.json→ CI green → mark ready.Six copies of one regex
For the record, this rule currently lives in:
moshpit-name,moshpit-resolve,moshcode/apps/pwa,moshcode/src/dns.mjs, and both copies here. The packages can't be imported at runtime by the unbundled extension or by moshcode's tarball install, so the copies are deliberate — the drift tests are what make them safe, and on this rule none of them were.Tests
65 tests pass in
moshpit-resolve.test.ts+moshpit.test.js, including new coverage for the rule on both sides.Release tagging (
v*) is left alone — cut it from main after this merges.🤖 Generated with Claude Code