internal/tdclient/client.go redefines the server's models by hand (Team, DeadmanSwitch, Integration, the escalation request types, ...), and terdut-tui has a third copy in internal/api/types.go. The workspace rule "any change to a server endpoint or JSON shape must be mirrored" is manual, and only a manual kind pass catches drift; the controller tests use a hand-written fake server.
Options
An OpenAPI spec for the server API, with a generated Go client/types used by the operator and the TUI.
Or a small shared terdut-api Go module of request/response types.
Either way, a contract test that runs the operator's client against the real server router (the server's tests already run it against Postgres).
Why now
The Oct 2026 redesign changed several shapes at once (external_id on teams, username in escalation targets, 409s on duplicate names, the removed endpoints); the only real check was a curl smoke test.
Touches terdut-server and terdut-tui; filed here because the operator is the heaviest consumer.
`internal/tdclient/client.go` redefines the server's models by hand (`Team`, `DeadmanSwitch`, `Integration`, the escalation request types, ...), and terdut-tui has a third copy in `internal/api/types.go`. The workspace rule "any change to a server endpoint or JSON shape must be mirrored" is manual, and only a manual kind pass catches drift; the controller tests use a hand-written fake server.
## Options
- An OpenAPI spec for the server API, with a generated Go client/types used by the operator and the TUI.
- Or a small shared `terdut-api` Go module of request/response types.
- Either way, a contract test that runs the operator's client against the real server router (the server's tests already run it against Postgres).
## Why now
The Oct 2026 redesign changed several shapes at once (`external_id` on teams, `username` in escalation targets, 409s on duplicate names, the removed endpoints); the only real check was a curl smoke test.
Touches terdut-server and terdut-tui; filed here because the operator is the heaviest consumer.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
internal/tdclient/client.goredefines the server's models by hand (Team,DeadmanSwitch,Integration, the escalation request types, ...), and terdut-tui has a third copy ininternal/api/types.go. The workspace rule "any change to a server endpoint or JSON shape must be mirrored" is manual, and only a manual kind pass catches drift; the controller tests use a hand-written fake server.Options
terdut-apiGo module of request/response types.Why now
The Oct 2026 redesign changed several shapes at once (
external_idon teams,usernamein escalation targets, 409s on duplicate names, the removed endpoints); the only real check was a curl smoke test.Touches terdut-server and terdut-tui; filed here because the operator is the heaviest consumer.