Degenerate boolean schemas misreport at every schema-slot existence check, not only media types
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 57/100
Rechercherichtung
Start from classifyOneSidedSchema in check_media_type_schema_existence.go, then run the oasdiff checks changelog coverage -f json jq filter quoted in the issue to enumerate the ~40 covered schema-slot cells. For each cell, find its existence check and reproduce the probe (a property or conjunct whose schema is false or true) with oasdiff changelog to see today's verdict before changing anything. Done when degenerate schemas no longer yield false verdicts, generalizing the annotation-only routing the allOf branch checks already use; the remaining id-routing decision for the false case tracks issue #1196.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
MediaTypeSchemaExistenceCheck classifies a body schema that appears or disappears by what the schema is: false routes to the schema-became-false ids and a schema equivalent to the empty schema reports nothing. Every other check that reports a schema-valued slot appearing or disappearing still classifies by the edit's shape alone, and the same two degenerate schemas misreport there.
Confirmed probe, on main:
# revision adds an optional property whose schema is the boolean false
properties:
name: {type: string}
legacy: false
$ oasdiff changelog base.yaml revision.yaml
info [new-optional-request-property] added the new optional request property `legacy`
A key that every request was previously free to send is now invalid whenever present: a request narrowing reported as a safe addition. (Under additionalProperties: false the key was already rejected, so the honest verdict may need that sibling, the same nuance as request-property-removed.)
The triage list is mechanical
The candidate sites are exactly the covered coverage cells whose location ends in a schema-valued slot with a set/unset/add/remove action:
$ oasdiff checks changelog coverage -f json | jq -r '.[] | select(.status=="covered")
| select(.action | IN("set","unset","add","remove"))
| select(.location | test("\\.(schema|items|itemSchema|not|if|then|else|contains|propertyNames|properties\\.\\*|prefixItems\\.\\*|oneOf\\.\\*|anyOf\\.\\*|allOf\\.\\*)$"))
| [.location, .action, (.checks | join(","))] | @tsv'
That yields roughly forty cells: the properties existence checks (request, response, parameter header properties), the subschema branch checks (allOf/anyOf/oneOf added and removed), the 3.1 applicators (if/then/else, contains, propertyNames), and the itemSchema pair already tracked in #1196. Waived cells need nothing: no check fires, so there is no verdict to get wrong.
Expected failure modes per cell
- Response-side
falsearrivals are the ones that matter: a safe verdict on a change that makes something unproducible (the probe above is the request-side sibling;response-body-all-of-addedwith afalseconjunct is the response-side one, info today). - Request-side
falsearrivals usually land on the right level for the wrong reason, with a message describing a constraint rather than an impossibility. true/ empty-equivalent arrivals and departures are contract no-ops reported as changes; on request-narrowing cells that is a false breaking verdict. The allOf branch checks already handle this via their annotation-only routing, which is the pattern to generalize.
classifyOneSidedSchema (check_media_type_schema_existence.go) is the reusable classifier; the open per-cell question is the same one as #1196: which id the false case routes to.
- Vorherrschende Sprache
- Go
- Sterne
- 1.4k
- Forks
- 109
- Ø Merge
- 1 T. 17 Std.
- Gemergte PRs (30 T.)
- 56
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus oasdiff/oasdiff
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 67/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
oasdiff/oasdiff#1361 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
oasdiff/oasdiff#1348 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 32/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
oasdiff/oasdiff#1341 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in oasdiff/oasdiff
Ähnliche Issues
-
agent-butler-finding bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
jordansmall/spindrift#6414 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Icinga/icinga-kubernetes#294 ·
Maintainer antworten meist innerhalb von 4 Tagen
-
Cluster details: the Control Plane version field has a different border color than its icon boxOffenkind/design sig/ui
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
kubermatic/dashboard#8449 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
filecoin-project/curio#1632 ·
Maintainer antworten meist innerhalb von 1 Tag