Repository navigation
chore(drift): triage the baremetal commitment operations; serve the seven query parameters the refreshed contract declares - #884
Open
Huyvux12 wants to merge 3 commits into
Conversation
… a measured absence of caller Fixes stephrobert#875 Assisted-by: Muse (Muse Spark 1.3)
…pstream The pre-push hook requires contracts/scaleway.json to match a fresh extraction. The committed contract predates the stephrobert#827 baseline refresh: it lacked the two baremetal commitment operations triaged in the previous commit, and the current upstream OpenAPI adds further fields (e.g. application_id). This refresh adds the two operations' contract entries and the other upstream drift; docs/limits.md carries the regenerated schema count 712 -> 718. Assisted-by: Muse (Muse Spark 1.3)
…t declares The contract re-extraction in the previous commit declares seven query parameters the handlers never named, which TestNoDeclaredQueryParameterIsDroppedByItsHandler refuses to let pass (stephrobert#277). Five are served, two are refused with a reason — never dropped: - instance/v1 ListIPs: `server` filters by the attached server id and `detached` by whether one is attached at all (Attrs["server"] is {id, name} on attach, nil on detach). The SDK names them precisely one of a pair; the handler applies each filter it is given, so both together narrow conjunctively rather than inventing which one wins. - ipam/v1 ListIPs: `regional` is the opposite of the `zonal` filter the handler already serves — every address here is regional, so regional=false matches nothing and an unparseable value is a 400. - marketplace/v2 ListLocalImages: `image_id` resolves the label through labelByID, so an id alone still names its image; an id outside the table, or one that disagrees with a label also sent, answers empty. - marketplace/v2 ListLocalImages: `version_id` is refused with a 400 — this catalogue records no version for its images (docs/limits.md). - instance/v2alpha1 ListPrivateNetworkInterfaces: `security_group_ids` is refused with a 400 — this pack records no security group on a private interface (create/update ignore the security_group_id the SDK's requests carry), and the SDK lets create/update set the interface's own group, so deriving it from the attached server would be a guess. Measured: the Terraform provider references SecurityGroupIDs nowhere, so no client this project drives passes it. Each new behaviour carries a test that fails without its fix and passes with it. Part of the stephrobert#875 PR: the triage there cannot be pushed without the re-extraction, and the re-extraction cannot land without these. Assisted-by: Muse (Muse Spark 1.3)
This branch has not been deployed
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.
Fixes #875
What
Three commits, 16 files, +646/−33, base
main@e23b49b:8340c02— triage: decline baremetal/v1UpdateServerCommitmentandUpgradeServerCommitment, baselineunknown2 → 0.67d677d— re-extractcontracts/scaleway.jsonfrom the current upstream (the pre-push hookcontracts-are-extractedrequires the committed contract to match a fresh extraction; the committed one predated chore(drift): refresh the upstream coverage baseline #827) +docs/limits.md712 → 718 schemas.6ce30fb— serve the seven query parameters the refreshed contract declares, whichTestNoDeclaredQueryParameterIsDroppedByItsHandlerrefused to let pass (13 Scaleway list operations read their query and still drop 24 declared parameters (the per-parameter half of #271) #277).Why decline (the two operations)
SDK semantics (
baremetal_sdk.go:3150,:3190):UpdateServerCommitmenttoggles auto-renewal on an existing commitment (ServerID + AutoRenewal bool);UpgradeServerCommitmentstarts or upgrades one to a period of one month to three years (ServerID + Period). Both return*Server; both are paid billing-term changes.No client this project drives calls either:
UpdateServerCommitment0 hits,UpgradeServerCommitment0 hits (positive control:UpdateServerresolves ininternal/services/baremetal/server.go).scw baremetal commitmentis an empty parent node —baremetalCommitment()has Short/Long/Namespace/Resource only, no Verb, no Run, no subcommands; livescw baremetal commitment --helpon scw 2.56.3 falls back to baremetal help. The onlycommitment-periodargs are fields onserver create/server update, whose Run funcs callapi.CreateServer/api.UpdateServer.GetServerTypesAvailability.The reason names what reopens it: "the first client measured on either path reopens it".
The issue's first question, answered
The two operations arrived with baseline refresh #827, commit
947325c(2026-10-28). The nightly drift job DID surface them as a diff (baselineunknown: [] → 2 entries), but by design it opens PRs on surface moves and issues only on scan failure — no issue was opened and no triage followed for 14 days.The seven parameters (commit 3)
Served (5):
server(string) +detached(bool):serverfilters by the attached server id,detachedby whether one is attached at all (Attrs["server"]is{id, name}on attach, nil on detach). The SDK names them "Precisely one of Server, Detached must be set"; the handler applies each filter it is given, so both together narrow conjunctively rather than inventing which one wins.regional(bool): every address here is regional, soregional=falsematches nothing; an unparseable value is a 400 (queryBool, mirroringattached/is_ipv6).image_id(string): resolves the label throughlabelByIDbefore theubuntu_jammydefault, so an id alone still names its image; an id outside the table, or one that disagrees with a label also sent, answers empty.Refused with a 400 and a reason (2), documented in
docs/limits.md:version_id: this catalogue records no version for its images; answering the one image for an arbitrary version would claim a version nobody recorded. Measured: the Terraform provider referencesListLocalImagesnowhere.security_group_ids: this pack records no security group on a private interface (create/update ignore thesecurity_group_idthe SDK's requests carry; both views omit it), and the SDK lets create/update set the interface's own group, so deriving it from the attached server would be a guess. Measured: the Terraform provider referencesSecurityGroupIDsnowhere.Each new behaviour carries a test that fails without its fix and passes with it (verified by reverting each handler: all 4 tests fail on the unfixed tree).
Proof (per the maintainer's requirements on #875)
e23b49b.mise run drift:checkclean (exit 0, 51.71s; scaleway 204 implemented / 344 declined / 0 unknown) +mise run checkpassed (exit 0, 346.27s, "local check passed", no FAIL) — these two are the proof.tools/conformance/scaleway/scw-cli.shmentionscommitmentzero times).mise run evidence:updatewas not run as proof: it writescoverage/evidence.jsonand risks unrelated diff scope.address-domains,artefact-reasons,catalogue-is-served,command-tables-two-audiences,recorded-scaleway-fields,the-gateway-is-served-and-scanned,undriven-says-why) — all 7 pass (exit 0 each, restoration green after every mutation) on the 3-commit HEAD. Stockmise run falsifycannot start on this VM (it wraps commands insystemd-run --user --scope; no systemd user bus), so the replay used a local copy with only the systemd-run prefix removed, repo file untouched.mise run docs:checkpassed (exit 0, 13.48s; README up to date).mise run limits:checkpassing (exit 0; 61 sections, 123 issues cited) after docs: the limits page catches up, and a Linux reader installs without Homebrew (#857, #843) #878 re-dated the sections that made it fail pre-existing at the old base.image_idtest.Risks interrogated and excluded
application_idfield) that the committed contract had missed since chore(drift): refresh the upstream coverage baseline #827.security_group_ids/version_idbreak no driven client (measured above).