Skip to content

fix(ci): allow dist/ in the MCP pack allowlist, which is the only thing it ships - #9950

Merged
JSONbored merged 1 commit into
mainfrom
fix/mcp-pack-allowlist
Jul 30, 2026
Merged

fix(ci): allow dist/ in the MCP pack allowlist, which is the only thing it ships#9950
JSONbored merged 1 commit into
mainfrom
fix/mcp-pack-allowlist

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Follow-on to #9946/#9947. That fix unblocked the MCP publish build; packing then failed on the very next step with Unexpected file in package tarball.

The stale rule

The smoke test allows package/(bin|lib|scripts)/…, which describes a source layout this package has not had for some time. Its manifest says:

"files": ["dist", "scripts", "CHANGELOG.md", "!scripts/check-syntax.ts", "!scripts/strip-bin-sourcemap.ts"],
"bin": { "loopover-mcp": "dist/bin/loopover-mcp.js", "loopover-verify": "dist/bin/loopover-verify.js" }

dist/ is not stray build output — it is the package.

Verified against a real tarball

Ran npm pack --workspace @loopover/mcp and inspected it: contents are dist/, scripts/, package.json, README.md, CHANGELOG.md, LICENSE, and the old pattern rejected exactly the 9 dist/ entries. With the corrected pattern, all three smoke-test stages pass locally:

  • allowlist — clean
  • secret scan — clean
  • npm install <tarball> then loopover-mcp --help — passes

actionlint clean.

Why it hid

The build step failed first, so packing never ran. Fixing one exposed the next — this is the second half of the same publish that has never succeeded. The Miner publish, which had only the first problem, is already green on main.

@loopover-orb

loopover-orb Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Important

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏳ LoopOver is waiting…

LoopOver has seen this pull request and is waiting on CI checks to finish before reviewing it. This comment will update once the review runs.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟨 Waiting

@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored JSONbored self-assigned this Jul 30, 2026
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.88%. Comparing base (648e68c) to head (adefdb6).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9950   +/-   ##
=======================================
  Coverage   91.88%   91.88%           
=======================================
  Files         928      928           
  Lines      113675   113675           
  Branches    27412    27412           
=======================================
  Hits       104445   104445           
  Misses       7931     7931           
  Partials     1299     1299           
Flag Coverage Δ
backend 95.67% <ø> (ø)

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

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 30, 2026
JSONbored added a commit that referenced this pull request Jul 30, 2026
…a checker so it stays fixed (#9958)

A test fixture that calls Date.now() once PER TIMESTAMP produces timestamps
that disagree with each other by however long elapsed between the calls. Where
the code under test derives a boundary from one of them, a single millisecond
flips the result.

queue-trends.test.ts had exactly that:

  function atDaysAgo(daysAgo: number) { return new Date(Date.now() - ...); }

buildWindow anchors on the newest snapshot:

  targetMs = latestMs - windowDays * day
  baseline = newest snapshot with fetchedAt <= targetMs

`atDaysAgo(0)` evaluated at T0 and `atDaysAgo(7)` a moment later at T1 put the
"7 days ago" row at T1-7d -- NEWER than the target T0-7d. No baseline, every
window "unavailable", assertion fails. Reproduced deterministically with a 2ms
offset. It fired for real on #9950, a PR whose only changed file was a GitHub
workflow, which is how it was spotted.

This matters more than a flaky test usually would: reviews are one-shot for
everyone but the maintainer, so a false red on a contributor PR is not a re-run
away from fine -- it auto-closes correct work the contributor cannot reopen.

Every offset helper in the suite is now anchored to one instant per file (11
files). scripts/check-fixture-clock-races.ts keeps it that way, wired into
test:ci.

The checker only reports helpers that PROJECT a timestamp from an offset the
caller varies. Reading the clock live stays correct where the passage of time
is itself under test -- a polling waitFor, a lock-expiry comparison -- and
those are not reported. Its own tests pin both directions, because a checker
that cries wolf gets muted, and a muted checker is worse than none.

Writing those tests caught two bugs in the checker itself: it undercounted
arrow-form helpers by one (`const name = (` does not match the call shape the
`-1` assumed), which silently exempted the exactly-two-call case -- the
smallest set that can race -- and its operator-to-parameter span crossed commas,
so a token-expiry helper read as a fixture race.

Closes #9955
…ng it ships

#9946 unblocked the MCP publish build; packing then failed on the very next
step with "Unexpected file in package tarball".

The allowlist permits package/(bin|lib|scripts)/, which describes a source
layout this package has not had for some time. Its package.json ships
`files: ["dist", "scripts", ...]` and both `bin` entries point at
dist/bin/*.js -- so dist/ is not stray output, it is the entire package.

Verified against a real `npm pack`: the tarball contains dist/, scripts/ and
the four metadata files, and the old pattern rejected exactly the 9 dist/
entries. With the corrected pattern all three smoke-test stages pass locally --
allowlist clean, secret scan clean, and the installed binary answers --help.

The mismatch stayed invisible because the build step failed first, so packing
never ran. Fixing one exposed the next: this is the second half of the same
never-succeeded publish.
@JSONbored
JSONbored force-pushed the fix/mcp-pack-allowlist branch from 6ff9523 to adefdb6 Compare July 30, 2026 21:20
@JSONbored
JSONbored merged commit 303d500 into main Jul 30, 2026
5 checks passed
@JSONbored
JSONbored deleted the fix/mcp-pack-allowlist branch July 30, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant