Skip to content

ci probe A (head HAS test.yml, base lacks it) — will close - #54

Closed
madejackson wants to merge 3 commits into
unstablefrom
ci-selftest
Closed

madejackson wants to merge 3 commits into
unstablefrom
ci-selftest

Conversation

@madejackson

@madejackson madejackson commented Nov 14, 2026 •

Copy link
Copy Markdown

Throwaway CI probe — result: the test job ran and passed (success, ~5 min on ubuntu-latest). Head branch had .github/workflows/test.yml, base (unstable) did not. Proves pull_request resolves workflows from the merge ref, so a PR that adds a workflow is covered by it on its own first push. Superseded by #57.

…teAddr

`go test ./src/...` on this tree failed one test: TestGetCertificateProvidedAndHTTPOnly
expected 404 for www.own.org, other.net and 192.168.1.10. That is the fork's
restored HTTP->HTTPS redirect (dd395ed, upstream PR azukaar#576) meeting upstream's
zones_test.go (63e5a24), which encodes the opposite design position for the
same function.

Decided deliberately, not papered over: the fork keeps the redirect, and the
test now asserts it. azukaar#576 stays open upstream -- closing it "in favour of"
upstream's 404 would record that upstream had the redirect and removed it in
favour of this, which is false. 748302d dropped the handler and nothing
replaced it. The assertion is commented with azukaar#576 on each line and the
divergence is ledgered in ASERACORP.md.

The 192.168.1.10 case was not a behaviour difference at all: the fixture never
set RemoteAddr, so httptest's default 1.2.3.4 was used. That is not loopback,
not private and not CGNAT, so IsLocalIP returned false and the local-IP
passthrough branch was unreachable -- the test was asserting 404 for code it
never exercised. RemoteAddr is now set explicitly and both directions are
covered (remote -> 301, private/CGNAT -> served directly), so the fixture tests
the passthrough instead of accidentally bypassing it. Lowering the bar to
404-on-localhost would have been the wrong fix; the fixture was the broken part.

Verified by mutation, so the assertion cannot pass by accident: swapping the
fork's http.Redirect(...StatusMovedPermanently) for upstream's http.NotFound,
passthrough untouched, fails exactly the three redirect cases; reverting the
handler wholesale fails all five.

Also runs the suite in CI (build.yml). It only fires on push to master/unstable,
so this catches drift after merge, not at PR time -- upstream has no PR-time
workflow and adding one is the maintainer's call. The Test step copies the
gitignored src/launcher/update.go first, same as build.sh: go test ./src/...
cannot compile src/launcher without it.
build.yml fires only on push to master/unstable, and publishes a release. A PR
into this repo has no tests run against it at all, so test drift (the zones_test.go
divergence in this branch, for one) surfaces only after merge.

Separate file on purpose: build.yml publishes to GHCR and creates a GitHub
Release with allowUpdates, and a pull_request trigger must not be able to reach
those. This workflow is contents:read, nothing else.

The step copies the gitignored src/launcher/update.go first, exactly as build.sh
does -- go test ./src/... cannot compile src/launcher without it
(launcher.go:160: undefined: GetLatestVersion).

pull_request runs the workflow file as it exists in the PR's base branch, so this
file cannot validate the PR that adds it: its own runs start once it is on
master/unstable. Verified locally on a clean checkout (no GeoLite2 mmdb, no
nebula/restic binaries, no client build output): the step's two commands give
go test -count=1 ./src/... all packages ok.
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