Repository navigation
ci: report what a new OpenShell release adds to the API, and audit coverage - #150
Gkrumbach07 wants to merge 4 commits into
Conversation
danreed-rh
left a comment
There was a problem hiding this comment.
The audit and release-reporting workflow are valuable. One part of the alert's stated scope is still missing: fields in newly added request messages are listed by name but never checked for dashboard coverage. I'd fix that before merge. The import and enum cases below are worthwhile follow-ups, but I would not hold this PR for them without evidence that a supported release is affected.
| if changes: | ||
| out["rpcs_changed"].append({"rpc": key, "changes": changes}) | ||
|
|
||
| for name in sorted(set(new["messages"]) - set(old["messages"])): |
There was a problem hiding this comment.
Could we pass fields of new request messages through the new-field coverage check? Today ResumeSandboxRequest.restart_if_restore_fails appears in the message’s field list, but it never enters fields_added or gets a ledger/source annotation. The PR says each new request field is checked, and #151’s planned ledger update will not change this reporting path.
There was a problem hiding this comment.
Fixed in 9eab73b. diff() now lists every field of a new message a client sends as message_fields_added. annotate() looks each one up the way it does any other new field: ledger first, then the source search. The report gives them a table of their own, "Fields of new messages a client can send". Fields of a new message that only the gateway returns stay listed with the message.
On the real 0.1.5 → 0.1.6 diff, ResumeSandboxRequest.restart_if_restore_fails now appears with the ledger's answer (not offered, until #151 updates the ledger). There are new tests for the listing, for leaving response-only messages out, for the ledger and source annotation, and for the table.
I left the import-error and enum-renumbering suggestions for a follow-up, as you suggested.
🤖 Addressed by Claude Code
| name = queue.pop(0) | ||
| if name in files or name.startswith("google/"): | ||
| continue | ||
| text = read(name) |
There was a problem hiding this comment.
If a non-Google import cannot be read, could this raise ProtoError instead of skipping it? The comparison can otherwise succeed with messages and fields missing. plan.api_changes() already catches ProtoError and produces the intended non-blocking “Not compared” report. I have not found evidence that the releases tested in this PR hit this case.
| out["enums_added"].append( | ||
| {"enum": name, "values": sorted(new["enums"][name]["values"]), "used_in": sorted(uses.get(name, []))} | ||
| ) | ||
| for name in sorted(set(old["enums"]) & set(new["enums"])): |
There was a problem hiding this comment.
Could a follow-up compare numbers for enum values present in both releases? Renumbering a value currently produces no change, even though its wire value changed. I don’t see an affected upstream release in this PR, so this need not hold the audit and alert work.
…verage Nothing told this project when upstream added something that broke nothing: SuspendSandbox, ResumeSandbox and two sandbox phases came with OpenShell 0.1.6 and were found by accident. The Follow upstream plan now reads the gateway's user-facing API from the protos of the pinned release and of the target (a shallow clone of each tag; no copy is kept here) and says what is new: RPCs, fields and enum values, added, removed or changed. The report goes in the bump pull request's description, the run summary and check A's issue. It informs and decides nothing: protos that cannot be fetched or parsed do not stop a bump, and the report then says the comparison is missing and how to make it by hand. follow.py api-diff --from 0.1.5 --to 0.1.6 the same report by hand follow.py api-coverage [--write] [--upstream] check the ledger and its document protoapi.py parses the proto3 upstream uses and keeps the RPCs whose authorization rule admits a user (bearer, dual, unauthenticated), with every message and enum they reach. apidiff.py compares two releases and looks each new thing up in the coverage ledger, then in the dashboard's source. docs/api-coverage.md is the audit at the pinned release, 0.1.9: all 69 user-facing RPCs and all 505 fields a client can send, each with whether the SDK and the BFF carry it and how the UI offers it. It is generated from deploy/ci/upstream/api-coverage.json, and the unit tests fail when the two disagree. 39 RPCs are offered, 12 are not. Of the 353 fields a person could author, 35% have an input, 30% can be set only in a YAML or JSON document and 23% cannot be sent. The page ranks the gaps, says why the Create provider profile form cannot make a profile the gateway accepts (measured on 0.1.6), and lists the compat probes that would have caught it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Gage Krumbach <gkrumbac@redhat.com>
PR 149 gives the Create provider profile form a protocol, an access preset and the allow-uninspected checkbox per endpoint. The page describes main without it; say so, and what to update when it merges. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Gage Krumbach <gkrumbac@redhat.com>
The alert said every new request field is looked up in the coverage ledger, but a field of a message that is itself new was only named in the message's field list: ResumeSandboxRequest.restart_if_restore_fails never reached the ledger or the source search. diff() now lists every field of a new message a client sends as message_fields_added, annotate() looks each up like any other new field (ledger first, then the source), and the report gives them a table of their own. Fields of a new message only the gateway returns stay listed with the message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Gage Krumbach <gkrumbac@redhat.com>
ai-openshell#149 ai-openshell#149 merged on 2026-11-30: each endpoint of the Create provider profile form now picks REST or WebSocket with an access preset, or plain TCP with allow_uninspected_credentials. The ledger still called the form broken and pointed at lines the change moved. The ledger entries for ImportProviderProfiles and ProviderProfile.endpoints now say what the form sends, every CreateProfileModal.tsx location is the line it is at on main, and the page's ranked gaps and profile-form section say what ai-openshell#149 fixed and what is still to do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Gage Krumbach <gkrumbac@redhat.com>
9eab73b to
285c83b
Compare
Problem
Nothing told this project when upstream added something that broke nothing.
SuspendSandbox,ResumeSandboxand two sandbox phases came with OpenShell 0.1.6 and were found by accident. There was also no record of how much of the gateway's user-facing API the dashboard offers.Change
The alert. The Follow upstream
planstep now compares the gateway's user-facing API at the pinned release and at the target, and says what is new: RPCs, fields and enum values, added, removed or changed. The report goes in three places: the bump pull request's description, the run summary, and check A's issue.openshell.protoand what it imports from a shallow clone of each tag. No copy of the protos is kept here (ADR 0003).authorizationrule admits a user:bearer,dualorunauthenticated. Sandbox, peer and operator RPCs are listed apart.frontend/srcandbackend/pkg; a name that occurs is reported as a hint, not as covered.planalready has git and the network.The audit.
docs/api-coverage.mdcovers the pinned release, 0.1.9: all 69 user-facing RPCs and all 505 fields a client can send, each with whether the SDK and the BFF carry it and how the UI offers it. Its counts and tables are generated fromdeploy/ci/upstream/api-coverage.json, and a unit test fails when the two disagree.The page also ranks the gaps, explains why the Create provider profile form was refused by the gateway (the fix is #149), and lists the compat probes that would have caught it.
What the alert says for 0.1.5 → 0.1.6
It also lists
SANDBOX_PHASE_SUSPENDINGandSANDBOX_PHASE_SUSPENDEDas named nowhere in the dashboard's source.Testing
deploy/ci/upstreamsuite passes (377).api-difffor 0.1.5 → 0.1.6 over the network gives the same report as from a local clone. A dry-runplantargets 0.1.10-pre.3 and renders a pull request body with the API section (six new RPCs, the workspace secrets).v0.1.9withapi-coverage --upstream: every user-facing RPC and request field is classified.Not in this change
api-coverage --upstreamcan do that on bump pull requests; whether it should is a decision left open (see "Not done" indeploy/ci/upstream/README.md).ProviderProfile.endpointsandImportProviderProfilesand the profile-form section of the page need updating in this branch.🤖 Generated with Claude Code