Skip to content

test(go): port the root checks to Go (RIG-8132) - #98

Merged
rigel-nemo[bot] merged 1 commit into
mainfrom
go-migration/rig-8132-port-the-root-checks-to-go
Nov 21, 2026
Merged

rigel-nemo[bot] merged 1 commit into
mainfrom
go-migration/rig-8132-port-the-root-checks-to-go

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What does this do

Ports meissa's root TypeScript checks to Go in go/internal/repochecks. Those checks are shared-configs, rumdl-extends and package-bins, and the TS files are deleted.

Why do we need it

RIG-5901 / record § M13: the root checks move to Go so that root lint and test no longer need Bun.

Summary

  • Test parity: shared-configs 7/7, rumdl-extends 2/2, package-bins 4/4. ref-gate.config.test.ts was already ported as refgate.TestRepositoryPrefilterKeepsEveryConfiguredPattern.
  • biome: the root biome.json extends ./packages/biome-config/biome.json, so lint runs without bun install.
  • Root test task: it depends on go:test (cgo -race) and has no command of its own.
  • Deviations from the record:
    • The record's repoRoot is replaced by the existing moduleRoot.
    • publish.test.ts stays in a bun publish-test task. Its future is decided in RIG-11659.
    • The Node resolution test uses a temp node_modules.
    • The package-bins check is ported, not deleted, because packages/docs-bundle still publishes a Bun bin.

Verification

  • Go: go vet, go test (CGO_ENABLED=0 locally; no gcc) and golangci-lint all pass, with 0 issues. gofmt is clean.
  • moon: moon run root:lint, root:markdownlint, root:refgate and root:publish-test pass.
  • Mutations: a node shebang, a ./ bin path and a removed bin each fail their subtest.
  • Review: r1 found 3M/3L. r2 was clean at b2d57f16.

Risks

The macOS symlink fix has only been run on Linux. -race runs only where cgo is present, as in CI.

Spec impact

Spec-impact: none to contracts. The record's M13 line "Delete package-bins.test.ts" changes to "port it"; that goes in a separate docs PR.

Checks skipped: p0:RIG-9887

Refs RIG-8132

Co-authored-by: Matt Wilkinson matt@rigel.build

Port shared-configs, rumdl-extends and package-bins from TypeScript to
go/internal/repochecks. The shared-configs port writes a consumer
package.json so Biome resolves the bare biome-config extends, and
resolves both config packages from a fixture node_modules. The
package-bins port checks each declared bin for the bun shebang and
for a missing ./ prefix.

The root biome.json extends ./packages/biome-config/biome.json, so
lint no longer needs bun install. The root test task depends on
go:test and has no command of its own. publish.test.ts stays in a
bun task until M14.

Co-Authored-By: Matt Wilkinson <matt@rigel.build>

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Nov 21, 2026

Copy link
Copy Markdown

RIG-8132

@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

All-clear at 3a976fd
Base: main

All-clear at 3a976fd

Review r2 was clean at b2d57f16, after r1 found 3M/3L. rjc rebased the commit onto main 05a41fb as 3a976fd, and its diff is byte-identical to b2d57f16 apart from index lines.

  • Test parity: 7/7 shared-configs, 2/2 rumdl-extends, 4/4 package-bins. Each package-bins case fails under its mutation.
  • Checks: go vet, go test and golangci-lint pass with 0 issues. moon run root:lint passes without bun install.
  • Root test task: depends on go:test, which runs cgo -race.

Two low notes, neither blocking. The record line on deleting package-bins.test.ts gets corrected in a docs PR. -race was not run here because the host has no gcc; CI runs it.

@rigel-nemo

rigel-nemo Bot commented Nov 21, 2026

Copy link
Copy Markdown

Checks read:

@rigel-nemo
rigel-nemo Bot merged commit 58fbf74 into main Nov 21, 2026
1 check passed
@rigel-nemo
rigel-nemo Bot deleted the go-migration/rig-8132-port-the-root-checks-to-go branch November 21, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant