Skip to content

test(ledgergate): port the seven missing TS parity cases (RIG-8124) - #102

Merged
rigel-nemo[bot] merged 2 commits into
mainfrom
go-migration/rig-8124-port-the-seven-missing-ts-parity-cases
Nov 23, 2026
Merged

rigel-nemo[bot] merged 2 commits into
mainfrom
go-migration/rig-8124-port-the-seven-missing-ts-parity-cases

Conversation

@rigel-mintaka

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

Copy link
Copy Markdown
Contributor

What does this do

Ports the seven TypeScript parity cases that the Go tree did not assert. Each case gets a Go test next to the unit it covers. One production change: the dl-claim client takes its timeout as a parameter, so a test can confirm the requested deadline reaches the fetch.

Why do we need it

The parity audit found seven TS cases with no Go assertion. Without these tests a regression in config, list args, the claim leg, or the claim client would pass CI.

Summary

  • Runner: unknown depth-one surface, and claim exemption by PR author with service failure exiting 2.
  • Config: legs.claimCheck boolean check and exemptBranches load.
  • dl-list: grep no-match and flag-shaped value rejection.
  • dl-claim: requested deadline reaches the fetch, and transport failure prints endpoint and error name only.
  • Review fixes: the strengthened assertions check exit 1 and stderr through Main, pin the 30s default through Main, compare each flag error exactly, and fetch claims for cross-repository and unknown-status PRs with a trusted author.

TS count 268. Mapped 261 plus these 7. Dropped 0.

Verification

  • CGO_ENABLED=0 go vet ./...: rc=0.
  • go test -count=1 on dllist, dlclaim, ledgergate/core and ledgergate/run: all ok.
  • gofmt -l on the four edited test files: empty.
  • golangci-lint on the touched packages: 0 issues.
  • Review-fix mutations, each in a private overlay, each fails its test: exit 2 on claim failure (TestClaimCLI request rejection, main_test.go:99); newClient(time.Second) in run (TestClaimCLI default deadline, main_test.go:132); every flag error naming --x (TestParseArgs, list_test.go:203); cross-repo PR skips the claim fetch (TestRunOnceClaimExemption..., runner_test.go:559).

Risks

Low. Test-only except the newClient(timeout) seam, where main.go passes the same 30s default.

Spec-impact: none

Refs RIG-8124

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

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

test(ledgergate): port the seven missing TS parity cases (RIG-8124)

Port the seven TS test cases that the Go tree did not assert. Each new
Go test sits next to the unit it covers. One production change: the
dl-claim client takes its timeout as a parameter, so a test can check
that the requested deadline reaches the fetch.

- run: TestRunOnceReportsUnknownDepthOneSurface
- run: TestRunOnceClaimExemptionRequiresMatchingAuthorAndServiceFailureExitsTwo
- core: TestLoadConfigValidatesClaimCheckAndAuthorBindings
- dllist: TestListDecisions (no-match grep subtest)
- dllist: TestParseArgs (flag-shaped and missing values subtest)
- dlclaim: TestClaimService (deadline and transport-failure subtests)

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

linear-code Bot commented Nov 22, 2026

Copy link
Copy Markdown

RIG-8124

Strengthen the seven ported TS parity tests after review of PR 102.
No production code changes.

- dlclaim: a Main-level request rejection test asserts exit 1, the
  endpoint, the error name, the do-not-rerun warning, and no bearer
  text on stderr.
- dlclaim: a Main-level test asserts the 30s default deadline. The
  restating newClient assertion is removed.
- dllist: each missing or flag-shaped value error is compared exactly,
  naming its own flag.
- ledgergate: a cross-repository PR and an unknown repository status,
  both with the trusted author, still fetch claims.

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

Copy link
Copy Markdown
Contributor Author

All-clear at de3bcec
Base: main

@rigel-nemo

rigel-nemo Bot commented Nov 23, 2026

Copy link
Copy Markdown

Checks read:

@rigel-nemo
rigel-nemo Bot merged commit b717386 into main Nov 23, 2026
1 check passed
@rigel-nemo
rigel-nemo Bot deleted the go-migration/rig-8124-port-the-seven-missing-ts-parity-cases branch November 23, 2026 02:20
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