Skip to content

ci: wire the coco-dev-versions and import-specifiers drift checks into CI (#9649) - #9927

Closed
kai392 wants to merge 2 commits into
JSONbored:mainfrom
kai392:fix/9649-wire-drift-checks-into-ci
Closed

ci: wire the coco-dev-versions and import-specifiers drift checks into CI (#9649)#9927
kai392 wants to merge 2 commits into
JSONbored:mainfrom
kai392:fix/9649-wire-drift-checks-into-ci

Conversation

@kai392

@kai392 kai392 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What

Two checks in package.json's test:ci had no GitHub Actions job running them, so each could silently diverge with zero CI signal:

Every other test:ci entry with no explicit ci.yml step is covered another way; these two were the only ones with no enforcement path at all.

How

npm run actionlint and npm run lint:composite-actions pass on the edited workflow; the CI meta-tests (ci-engine-miner-filters, ci-dependency-cache, codecov-policy, observability-ci, ci-generated-artifact-drift-checks) all still pass.

Closes #9649

…verable (JSONbored#9667)

checkContentLaneDeliverable compares an issue-body path against the spec's
entryFilePattern/providerFilePattern, which globToRegExp compiles against a
CANONICALIZED (lowercased) path with no `i` flag -- so they only match
lowercase input. The changedFiles side already canonicalizes each path
before testing; the issue-body side did not. An issue naming the path with
any capitalization (`Registry/Subnets/Foo.json`) produced no mentionedPath,
so with no issueTitleImpliesEntryPattern the check returned "not-applicable"
and the deliverable gate silently did not run -- the exact "test-only PR
closes a content issue without delivering the content" gap the function
exists to close (classifyRegistryPrScope in the same file already documents
this canonicalization hazard).

- Canonicalize each token from extractPathTokens before matchesSpec, exactly
  as the changedFiles side does. `.find` still returns the ORIGINAL token, so
  the "missing" verdict's mentionedPath stays the path as written in the issue
  body (rendered verbatim into the public PR comment).

Tests: a mixed-case issue path is "missing" (original case preserved in
mentionedPath) and "delivered" when the real lowercase file is changed; the
all-lowercase behaviour is unchanged; a path matching no spec pattern still
returns not-applicable (no over-broadening). The mixed-case cases fail
against the current code.

Closes JSONbored#9667

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kai392
kai392 requested a review from JSONbored as a code owner July 30, 2026 00:20
@loopover-orb

loopover-orb Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

LoopOver closed this because @kai392 has 3 open pull requests, above this repository's configured limit of 2. Close or merge an existing one to open a new one. This is an automated maintenance action.

@loopover-orb loopover-orb Bot closed this Jul 30, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent Supply Chain Scan

Superagent flagged 1 dependency introduced by this pull request.

High risk: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9

  • Change: added 55cc8345863c7cc4c66a329aec7e433d2d1c52a9
  • Dependency path: .github/workflows/ci.yml → jobs → validate-code → steps → 24 → actions/cache/restore
  • Correlated risks: 3
  • Why flagged: Detects keylogging and input capture patterns. Location: cache-55cc8345863c7cc4c66a329aec7e433d2d1c52a9/dist/restore-only/index.js. Rules: threat-runtime-keylogging
  • Risk score: 4.9

View Superagent Supply Chain Scan

@loopover-orb loopover-orb Bot added mod:warning Gittensor contributor context gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 30, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

…o CI (JSONbored#9649)

Two checks in package.json's `test:ci` had no GitHub Actions job running
them, so the two could silently diverge with zero CI signal:

- `coco-dev-versions:check` keeps k8s/coco-dev/versions.json and the KBS
  kustomization in lockstep; its only test exercises the pure core against
  fabricated inputs and never reads the two real files.
- `import-specifiers:check` (JSONbored#9221) scans src/scripts/test and every
  packages/* workspace; JSONbored#9240 and JSONbored#9249 are two separate drifts that landed
  after it shipped, precisely because nothing enforced it in CI.

- ci.yml: the `changes` job gains a `cocoDev` path filter (k8s/coco-dev/**,
  scripts/check-coco-dev-versions*.ts) and two named validate-code steps --
  `coco-dev-versions:check` gated on cocoDev + the push clause, and
  `import-specifiers:check` gated on push || backend || mcp || engine ||
  miner || discoveryIndex (every filter covering a scanned root).
- check-import-specifiers-script.test.ts: a real-tree regression test that
  calls findImportSpecifierViolations() with no injected fs and asserts [],
  matching the real-tree guards on validate-no-hand-written-js and
  coverage-bolt-on-filenames -- the enforcement path that was missing.

actionlint and lint:composite-actions pass on the edited workflow.

Closes JSONbored#9649

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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. mod:warning Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: two test:ci drift checks are never executed by any GitHub Actions job

2 participants