fix(canopy): skip the verification report when the declaration label is absent - #126
Open
julianam-w wants to merge 1 commit into
Open
fix(canopy): skip the verification report when the declaration label is absent#126julianam-w wants to merge 1 commit into
julianam-w wants to merge 1 commit into
Conversation
…is absent bestool-canopy generates VerificationArgs from canopy OpenAPI fetched at build time, so a spec change lands without any source or lockfile change. replica_id became required, bon stopped emitting maybe_replica_id, and main has not compiled since the crate was last rebuilt from a cold cache. Guard the label the same way group and server_id already are. Skipping the report is the honest failure: a nil UUID would give canopy an identity it would key its worklist on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
main does not currently build. This restores it.
Cause
bestool-canopydoes not ship its wire types — itsbuild.rsfetches canopy's OpenAPI document live at build time frommeta.tamanu.app.Cargo.lockpins the crate version; it cannot pin the spec.Canopy made
replica_idrequired onVerificationArgssometime after 2026-08-11.bononly emitsmaybe_<field>setters for optional fields, so.maybe_replica_id(...)stopped existing:No source change and no lockfile change was involved. CI was last green on
ce0aa08(2026-08-11); GitHub evicts build caches after roughly 7 days idle, so the next cold build recompiledbestool-canopyagainst the changed spec and broke. Verified:origin/mainatce0aa08fails to build on Linux today from a clean target dir with exactly this error and nothing else.The committed
openapi.snapshot.jsonfallback is not a workaround — it is now stale in the other direction. Forcing it withCANOPY_OPENAPI_OFFLINE=1gives four different errors (MigrationArgs/MigrationTimingArgsunresolved,maybe_migrationmissing, no fieldtarget_version). The repo currently builds against neither the live spec nor the snapshot.Fix
replica_idcomes from theDECLARATION_IDlabel and was previously optional. Now that canopy requires it, a report without one cannot be constructed at all, so guard the label exactly asGROUPandSERVERalready are: warn and skip the report.The alternative — sending
Uuid::nil()— was rejected deliberately. Canopy keys worklist state onreplica_id, so a nil identity is worse than no report.Note
This is a structural fragility, not a one-off: any canopy spec change can break this build with no commit here. Worth a follow-up on whether
CANOPY_OPENAPI_OFFLINEplus a refreshed committed snapshot should be the default in CI, so builds are reproducible against a pinned spec instead of whatever the network returns.🤖 Generated with Claude Code