Skip to content
cccskills
FreePublished on GitHub

api-change

Change the TURNPool API types safely - edit types and markers, regenerate, update webhooks, tests and docs. Use whenever a field is added, removed or re-marked in api/v1alpha1.

The English summary is being prepared. Showing the original description.

Hazmi35/turnfleet2 stars(GitHub 2 + cccskills 0)

Run score Not tested

See how to install

Files included (1)

  • SKILL.md2.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Changing the TURNPool API

Work in this order. Each step catches a different class of mistake.

  1. Edit api/v1alpha1/turnpool_types.go.
    • Every field is explicitly +optional or +required. No floats. Ratios are portsInUse/portsTotal integers that consumers divide.
    • Lists get +listType=map + +listMapKey=<key> (or +listType=atomic with a one-line reason). Avoid maps.
    • Status fields are +optional and derived from the spec, never cached from it. Conditions stay the first status field, set with meta.SetStatusCondition.
    • New enum values: extend the Go type, the +kubebuilder:validation:Enum marker, and every switch over it (the exhaustive linter fails the build otherwise). Add the doc comment on the new value, and the AGENTS.md glossary line for it when the value names a domain concept, in the same edit.
  2. Decide mutability. Anything that would invalidate live allocations is immutable: relay port range, addressing mode and its per-node split, realm. Adding it to the immutability check in internal/webhook/v1alpha1/turnpool_webhook.go is part of the change, with the reason in the validation message.
  3. Regenerate (make generate manifests api-docs). Never hand-edit zz_generated.deepcopy.go, config/crd/bases/*, config/rbac/role.yaml or docs/api.md.
  4. Update the webhooks: defaulting for anything with a sensible default, validating for the rules the CRD schema cannot express (mode-specific config, listener port uniqueness, ports outside the relay range, overlap between relays sharing an address).
  5. Update tests:
    • internal/webhook/v1alpha1/turnpool_webhook_test.go for defaulting and each rejection (envtest, table-driven).
    • internal/relay golden files if the rendered coturn config changes; a new field that reaches the data plane always changes the goldens.
    • test/e2e/ if the field is observable from outside.
  6. Update docs: docs/api.md is generated. docs/architecture.md and docs/capacity-model.md are not. A new addressing mode also needs an ADR (add-addressing-mode).
  7. Prove it: make ci. If the change touches the data plane, make test-e2e.

Report which files changed and which command proved the change.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Add a new addressing mode to Turnfleet - implement Planner and Renderer, golden tests, an e2e case and an ADR. Use when a new way of assigning relay addresses or port ranges is needed.

The English summary is being prepared. Showing the original description.

Hazmi35/turnfleet2Updated Oct 25, 2026

Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".

The English summary is being prepared. Showing the original description.

Hazmi35/turnfleet2Updated Oct 25, 2026

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

The English summary is being prepared. Showing the original description.

Hazmi35/turnfleet2Updated Oct 25, 2026

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

The English summary is being prepared. Showing the original description.

Hazmi35/turnfleet2Updated Oct 25, 2026

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

The English summary is being prepared. Showing the original description.

Hazmi35/turnfleet2Updated Oct 25, 2026

Debug a failing relay end to end - inspect the kind cluster, relay logs and rendered coturn config, and run turnfleet-probe by hand. Use when a relay never forms, a probe fails, or an e2e case breaks.

The English summary is being prepared. Showing the original description.

Hazmi35/turnfleet2Updated Oct 25, 2026

See all skills by Hazmi35

Report a problem with this skill