Conversation
jaxxstorm
commented
Apr 10, 2026
- introduce property gaps for the API
- feat: cover all properties in the API
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
There was a problem hiding this comment.
Pull request overview
This PR strengthens the repo’s OpenAPI contract tooling by adding property-level coverage tracking and remediating several tscli commands to preserve/return authoritative API request/response properties (especially where the upstream SDK model is incomplete).
Changes:
- Add property-level coverage analysis/reporting to
coverage/coveragegapswith YAML manifests for covered/excluded properties. - Introduce schema-aligned DTOs (
pkg/apitype) and audited “raw JSON passthrough” helpers (pkg/tscli/audited_api.go) to preserve documented API fields. - Update
get/list/setdevice/routes/settings commands plus fixtures/integration + OpenAPI snapshot tests to assert key properties.
Reviewed changes
Copilot reviewed 33 out of 44 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
coverage/coveragegaps/main.go |
Extends coverage report outputs and baseline diffing to include property coverage. |
coverage/coveragegaps/properties.go |
Implements property inventory collection from OpenAPI + coverage/exclusion classification. |
coverage/coveragegaps/properties_test.go |
Adds unit tests for property path expansion and default exclusion behavior. |
coverage/property-coverage.yaml |
Declares per-operation request/response property coverage evidence. |
coverage/property-exclusions.yaml |
Adds default request/response-side exclusions for unaudited operations. |
Makefile |
Wires property coverage/exclusions inputs into coverage-gaps targets. |
pkg/apitype/models.go |
Adds local DTOs aligned to pinned schema for audited request/response bodies. |
pkg/tscli/audited_api.go |
Adds helpers that fetch/return raw JSON from API endpoints for audited commands. |
cmd/tscli/list/devices/cli.go |
Switches to printing raw API response for devices (preserves schema fields). |
cmd/tscli/get/device/cli.go |
Switches to printing raw API response for device GET (incl. fields=all). |
cmd/tscli/list/routes/cli.go |
Switches to printing raw API response for routes list. |
cmd/tscli/set/device/routes/cli.go |
Switches from synthetic summary to authoritative API response + schema-aligned request. |
cmd/tscli/get/settings/cli.go |
Switches to printing raw API response for settings GET. |
cmd/tscli/set/settings/cli.go |
Switches to schema-aligned request + authoritative API response for settings update. |
internal/testutil/apimock/fixtures.go |
Expands fixtures to include newly-audited properties and new settings/routes fixtures. |
test/cli/group_integration_test.go |
Adds integration assertions for preserved response properties and request field names. |
pkg/contract/openapi/openapi_snapshot_test.go |
Adds pinned-schema assertions for newly tracked properties; extends snapshot parsing. |
docs/README.md |
Updates contributor guidance to maintain property coverage data. |
coverage/coverage-gaps.{md,json} / coverage/coverage-gaps-diff.md |
Updated generated reports with property coverage sections. |
openspec/** |
Updates specifications and change-tracking docs for property coverage and gap elimination. |
go.mod / go.sum |
Bumps dependencies (notably tailscale.com/client/tailscale/v2 and indirects). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c03af9ab7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for _, op := range ops { | ||
| if _, excluded := excludedOps[op]; excluded { | ||
| continue | ||
| } | ||
| seen[op] = struct{}{} |
There was a problem hiding this comment.
Skip unknown operations before property coverage derivation
This loop adds every mapped operation to the property-audit set even when the operation key is not present in the pinned OpenAPI document. In that case, derivePropertyCoverage later calls collectOperationPropertyPaths and errors (path ... not found), causing main to fatalf instead of reporting the entry under unknown_mapped_operations. A stale or mistyped mapping should remain a reportable gap, not abort coverage report generation.
Useful? React with 👍 / 👎.
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>