Skip to content

fix(bindings): thread adminToken through PilotPolicySet#14

Merged
TeoSlayer merged 1 commit into
mainfrom
fix/policyset-admin-token
Jun 9, 2026
Merged

fix(bindings): thread adminToken through PilotPolicySet#14
TeoSlayer merged 1 commit into
mainfrom
fix/policyset-admin-token

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Summary

`common`'s `driver.PolicySet` gained a third `adminToken string`
parameter in v0.4.4. libpilot's `bindings.go` was still calling the
old 2-arg form, so the whole CGO shim has been failing to build on
main since 2026-06-06
.

This adds a fourth C argument (`adminToken *C.char`) to
`PilotPolicySet`, mirroring the convention `PilotBroadcast` already
follows (bindings.go:512 for comparison). Empty strings are valid —
the daemon side treats an absent token the same as "no admin auth
attempted."

This is a C ABI break, but the library has been uncompilable for three
days; anyone embedding it can't be. Re-publishing as v0.x with the new
symbol shape is the right call.

`go mod tidy` also bumps the sibling deps that had drifted alongside:

Dep Old New
common 0.4.3 0.4.8
runtime 0.1.0 0.3.1
handshake 0.1.0 0.2.1
policy 0.1.0 0.2.2
trustedagents 0.1.0 0.2.3

Test plan

  • `go build ./...` clean
  • `go test ./... -count=1 -short` green
  • Reviewer: any external C callers of `PilotPolicySet` will need
    to pass a fourth `adminToken` argument. Pass an empty string `""`
    for unchanged behaviour.

common's driver.PolicySet gained a third `adminToken string` parameter
in v0.4.4. libpilot's `bindings.go` was still calling the old 2-arg
form, so the whole CGO shim has been failing to build on main since
2026-06-06.

Adds a fourth C argument (`adminToken *C.char`) to PilotPolicySet,
mirroring the convention PilotBroadcast already follows. Empty
strings are valid — the daemon side treats an absent token the same
as "no admin auth attempted."

This is a C ABI break, but the library has been uncompilable for
three days; anyone embedding it can't be. Re-publishing as v0.x with
the new symbol shape is the right call.

go.mod tidy also bumps the sibling deps that drifted alongside:

  common         0.4.3 → 0.4.8
  runtime        0.1.0 → 0.3.1
  handshake      0.1.0 → 0.2.1
  policy         0.1.0 → 0.2.2
  trustedagents  0.1.0 → 0.2.3

Build + unit tests pass.
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@TeoSlayer TeoSlayer merged commit bb2287d into main Jun 9, 2026
4 checks passed
@TeoSlayer TeoSlayer deleted the fix/policyset-admin-token branch June 9, 2026 06:52
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.

2 participants