ci: wire the coco-dev-versions and import-specifiers drift checks into CI (#9649) - #9927
Closed
kai392 wants to merge 2 commits into
Closed
ci: wire the coco-dev-versions and import-specifiers drift checks into CI (#9649)#9927kai392 wants to merge 2 commits into
kai392 wants to merge 2 commits into
Conversation
…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>
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. |
Contributor
Superagent Supply Chain ScanSuperagent flagged 1 dependency introduced by this pull request. High risk:
|
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>
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.
What
Two checks in
package.json'stest:cihad no GitHub Actions job running them, so each could silently diverge with zero CI signal:coco-dev-versions:checkkeepsk8s/coco-dev/versions.jsonand the KBSkustomization.yamlin lockstep; its only test exercises the pure core against fabricated inputs and never reads the two real files, and.github/workflows/referenced nok8spath at all.import-specifiers:check(scripts: unify relative-import specifiers with src/** (extensionless) and add a drift guard #9221) scanssrc/scripts/testand everypackages/*workspace; chore(imports): packages/loopover-ui-kit drifted from #9221's extension convention (introduced by #9239) #9240 and chore(imports): test/unit/engine-coverage-script.test.ts drifted from #9221's extension convention (introduced by #9245) #9249 are two separate drifts that landed after it shipped, precisely because nothing enforced it in CI.Every other
test:cientry with no explicit ci.yml step is covered another way; these two were the only ones with no enforcement path at all.How
ci.yml: thechangesjob gains acocoDevpath filter (k8s/coco-dev/**,scripts/check-coco-dev-versions*.ts) and two namedvalidate-codesteps:coco-dev-versions:check— gated ongithub.event_name == 'push' || needs.changes.outputs.cocoDev == 'true'.import-specifiers:check— gated onpush || backend || mcp || engine || miner || discoveryIndex(every filter covering a scanned root).check-import-specifiers-script.test.ts: a real-tree regression test callingfindImportSpecifierViolations()with no injectedlistSourceFiles/readFile, asserting[]— matching the real-tree guards onvalidate-no-hand-written-jsandcoverage-bolt-on-filenames, with a comment naming chore(imports): packages/loopover-ui-kit drifted from #9221's extension convention (introduced by #9239) #9240/chore(imports): test/unit/engine-coverage-script.test.ts drifted from #9221's extension convention (introduced by #9245) #9249.npm run actionlintandnpm run lint:composite-actionspass 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