feat(canopy): capability descriptors with semantics and typed params#92
Merged
Conversation
3a60347 to
abaa026
Compare
Bump bestool-canopy to 0.6.1 and advertise intents as descriptors (name, description, canopy semantics, typed parameter schema) instead of bare names, via the generated restore-capabilities client method. Collapse analytics-dev and analytics-dbt into a single parametrised analytics intent (semantics check + url): persistent_schemas, minimum_ttl, switchover_grace, storage_size_maximum and expose are now per-declaration params resolved by canopy and mapped onto the replica CR. verify keeps check + once. For the url semantic, an exposed replica's tailnet URL is looked up from the tailscale sidecar LocalAPI (MagicDNS suffix, cached) and attached to the verification health_details. The 0.6.x client bakes the base URL in at construction and exposes generated endpoint methods; several wire types moved under bestool_canopy::schema. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
abaa026 to
c784ed5
Compare
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.
🤖 Reworks pgro's canopy integration to advertise intents as capability descriptors, matching canopy's new managed-restore control plane (canopy#311).
What changed
Bumps
bestool-canopyto 0.6.1 and registers intents as descriptors — each a name, humandescription, the canopysemanticsit opts into, and a typed parameter schema — via the generatedrestore-capabilitiesclient method, replacing the old bare intent-name list. The 0.6.x client bakes the base URL in at construction and exposes generated endpoint methods; several wire types moved underbestool_canopy::schema.Two intents replace the previous three:
verify— semantics[check, once], no params (unchanged ephemeral snapshot check;oncelets canopy self-suppress a verified snapshot).analytics— semantics[check, url], parametrised, collapsing the formeranalytics-devandanalytics-dbt. The dev/dbt distinction is now thepersistent_schemasparam rather than two intents.analyticsparams, resolved per declaration by canopy and mapped onto the replica CR:minimum_ttlminimumTtlswitchover_graceswitchoverGracePeriodstorage_size_maximumstorageSizeMaximumpersistent_schemaspersistentSchemasexposeFor the
urlsemantic, an exposed replica's tailnet URL (https://infra-replica-{name}.<magic-dns-suffix>) is looked up from the tailscale sidecar LocalAPI (suffix cached) and attached to the verificationhealth_details.Notes
/var/run/tailscale/tailscaled.sock, anemptyDirshared with the sidecar; path viaPGRO_TAILSCALED_SOCKET). Status reads over the socket need no special identity. URL reporting is best-effort and degrades to omitting the link if the socket is absent/unreachable.analytics-dev/analytics-dbtintent names are retired; existing declarations must be re-declared asanalytics(replicas were disabled in canopy ahead of this).