Repository navigation
feat(goip): build the netlink write path only with goip_write (FP-8b) - #298
Merged
randomizedcoder merged 6 commits intoNov 14, 2026
Merged
Conversation
Every runX write arm now calls through writeOps, a table of the arms whose untagged default is a stub per arm returning ErrWriteNotCompiled (an ErrWriteVerb). write_ops_goip_write.go fills in the real arms under the goip_write tag. The chain arms claim exactly their segment's verbs, so flush, restore and route's MPLS check keep their order; neigh and nexthop gain segments for that. ioam's and sr's inline write tails become ioamWrite and srWrite. From here an untagged build refuses every write verb. The write files still compile into it; the next commit tags them, their tests, and the builds that need them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The write-only files in internal/goip, pkg/xtcpnl and pkg/nlparity/nlparity_write.go carry //go:build goip_write, as do internal/goipparity and cmd/goip-parity whole. Untagged, writeOps keeps its stubs and every write verb is ErrWriteNotCompiled, exit 1. Tests follow the code: a test of a tagged file is tagged, a mixed file's write tests move to <stem>_write_test.go, and the helpers only tagged tests use move with them. A mixed table's write rows skip in the untagged build when the run is ErrWriteNotCompiled; the goip_write leg runs them. - nlparity.IsWrite and ParseWriteRequests* move to the untagged nlparity_classify.go, and xtcpnl.IsAdmittedXfrmWrite to xtcpnl_xfrm_request.go: they classify, they build nothing. - notag_test.go: every write verb is ErrWriteNotCompiled with no request sent, and writeOps is the stubs; TestWriteOpsTagged is the other half. - The segment parity test gains neigh and nexthop. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- versions.goipWriteTags; binaries.nix adds it per name (extraTagsByName) to goip and goip-parity only. goip_write joins optInOnlyTags, and flavor-tags fails a full xtcp2 that carries it. - The three golangci tiers and govulncheck's all-tags pass take the tag. - test-focused-goip runs with it, over internal/goipparity, pkg/nlparity and pkg/xtcpnl too: their write halves build only so. The untagged halves run in the default `go test ./...`. - write_ops.go: initialized, for misspell. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…te-tag Main's NX10 bpf encap writes (bpf_load.go, lwt_encap_bpf_args.go and their tests) take the goip_write tag like the other encap parsers. wsO5Spaces moves to the untagged ws_differential_test.go: the readback tests (O9) read it. Main's fou and O5 test updates go to the tagged files they moved to. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#282's treatment actuator (internal/goip/actuate) encodes routes and rules with xtcpnl's typed builders, which FP-8b put behind goip_write. - BuildWriteRequest, the route builders and the rule builders build with `goip_write || treatment`; link, addr, nsid, genl and xfrm writes stay goip_write-only. - actuate, pkg/treatment/{local,agent}, xtcp2-treatment-agent and xtcp2-treatmentctl build with `treatment` (mkGoBinary already sets it for the full-destination builds those binaries come from). - Boundary rules for those packages walk with the tag; the untagged daemon must not reach actuate. - golangci tiers lint with `treatment`; tcp-controller quality tests and focused-xtcp-treatment pass it (treatmentctl added). Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Stacked on #297. xtcp2 and go-link-monitor serve goip's listings on
/ip; after this PR they no longer link goip's write verbs or pkg/xtcpnl's write request builders at all.cmd/goipandcmd/goip-paritykeep them behind thegoip_writebuild tag.writeOps. Untagged, each field is a stub returningErrWriteNotCompiled(anErrWriteVerb, exit 1);write_ops_goip_write.goswaps in the real arms ininit.//go:build goip_writeon the write-only files in internal/goip, pkg/xtcpnl (the*_writebuilders) andpkg/nlparity/nlparity_write.go; internal/goipparity and cmd/goip-parity are tagged whole.nlparity.IsWrite/ParseWriteRequests*(moved tonlparity_classify.go) andxtcpnl.IsAdmittedXfrmWrite. They classify messages and build none.<stem>_write_test.go. In mixed tables, write rows skip untagged onErrWriteNotCompiled; the tagged leg runs them.notag_test.gochecks that every write verb of every object isErrWriteNotCompiledwith no request sent, and thatwriteOpsis the stubs.TestWriteOpsTaggedchecks the reverse: no stub is left. The segment parity test now covers neigh and nexthop.extraTagsgives goip and goip-parity the tag (their store names becomegoip-goip_write-*).goip_writejoinsoptInOnlyTags, so flavor-tags fails any xtcp2 flavor that carries it. The tag is also in the three golangci tiers and govulncheck's all-tags pass.test-focused-goipruns tagged and also covers goipparity, nlparity and xtcpnl.goip_writeleg in go-test-flavors: those legs test only pkg/xtcp.go vet/go testover internal, pkg and cmd-raceboth waysnix build .#goip .#goip-parity .#xtcp2 .#go-link-monitorgo tool nm: write builders absent from xtcp2/go-link-monitor, present in tagged goipnix run .#microvm-x86_64-goip-parity -- --timeout 20000at 8daa4c7): 1422 rowsGOIP_PARITY_PASS,GOIP_PARITY_OVERALL_PASS,GOIP_PARITY_UNGATED_CLEAN.🤖 Generated with Claude Code