Skip to content

Feature/full spec implementation - #85

Merged
milinsky merged 57 commits into
mainfrom
feature/full-spec-implementation
Nov 3, 2026
Merged

milinsky merged 57 commits into
mainfrom
feature/full-spec-implementation

Conversation

@milinsky

@milinsky milinsky commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Checklist

  • Tests added for new behaviour
  • CHANGELOG.md updated (or N/A: internal refactor)
  • BC-break documented in CHANGELOG ### BREAKING (or N/A)
  • make tests green
  • make psalm clean (0 errors)
  • make cs-fix clean
  • make rector clean

…ection runner

- Vendor json-schema-org/JSON-Schema-Test-Suite (pinned 89e83a74) via idempotent bin/fetch-json-schema-suite.sh with SHA validation, VERSION marker, upstream MIT LICENSE, remotes fixtures
- Add JsonSchemaSuiteTest runner: dataProvider over 2360 suite cases, ACTIVE/PENDING/EXCLUDED classification, deterministic per-section skips with FS-holder markers, defensive fail on unclassified sections
- 14 sections active (287 assertions green); 17 first-cut sections demoted to PENDING (38 real validator mismatches: null semantics, object vs array discrimination, PCRE unicode, bcmath scientific notation, grapheme length); optional/ecmascript-regex permanently excluded
- Add tests/Support suite infrastructure: traversal-safe JsonSchemaSuiteLocator, case DTO, deterministic loader, SuiteValidatorFactory with per-schema validator cache
- Cover suite infrastructure with 15 unit tests including classification guard and path-traversal cases
- Include pre-existing rector diff on 5 files (NewMethodCallWithoutParenthesesRector baseline)
…nchor, dynamicRef, comment, vocabulary, defs)

- Extend Schema with 7 typed nullable fields in ctor tail, preserve all through withOverrideGroups, default null from fromConstraintGroups
- Register wire mappings in SchemaFieldMetadata (flat scalars, defs as object map) preceding future extras block
- Parse string keys via scalar keyword parser; recurse $defs through new ResourceSchemaKeywordParser and SchemaKeywordAccumulator::schemaMap, boolean subschemas included
- Parse $vocabulary as array<string, bool> via new TypeHelper bool-map helpers
- Serialize new fields through scalar/object serializers driven by FieldMetadata, restoring $-prefixed wire names and omitting nulls
- Add SchemaResourceFieldsTest round-trip/override/defaults coverage plus integration smoke keeping defs.json pending
- Shrink psalm baseline by 2 entries via precise resolveType @return annotation
- Known carry-forward: SchemaSiblingMerger drops resource fields on ref+siblings rebuild; closed by FS-04
…emaKeywords

- Add KnownSchemaKeywords as single aggregation source over SchemaFieldMetadata registries, no hardcoded keyword lists
- Add ExtrasSchemaKeywordParser collecting keys outside the known set verbatim (objects, arrays, scalars) wired once in SchemaFromArrayConverter
- Extend Schema with nullable extras map (ctor tail after defs), preserved through withOverrideGroups, null from fromConstraintGroups
- Serialize extras as trailing wire keys and final snapshot key, omitted when null or empty
- Preserve dollar-prefixed unknowns like $recursiveRef verbatim, no logging, detector deferred to FS-12
- Add SchemaExtrasRoundTripTest: verbatim round-trip vectors (x-vendor, requird typo, nested arrays), known-keys anti-tests, wire ordering, int-key normalization, registry consistency guard
…ems from FS-40 to FS-16

- Point 114 pending suite cases at their actual carrier: FS-16 owns the null-semantics surface (allowsNull bare type null, normalize nested null) in SchemaValueNormalizer and TypeValidator
- Remaining FS-40 holders unchanged: root causes outside tasks 13/14/16 scope (object-array discrimination, empty enum, empty not schema, grapheme length, PCRE unicode mode, bcmath scientific notation)
- Task 16 file updated with activation mandate, target skipped 1959 (2073 - 114), and explicit fix surface
…bling merger

- Sibling merge inherits id, anchor, dynamicAnchor, comment, vocabulary, defs unconditionally from the resolved target, identity belongs to the resource
- dynamicRef resolves sibling-first as a ref instruction rather than identity
- Extras merge as a union with sibling priority on key collisions, null only when both sides are null
- Consolidate mixed-map union into ScalarSiblingMerger::mergeMixedMap, removing duplicate extras/examples helpers
- Extend SchemaSiblingMergerTest with identity, extras-union, dynamicRef, recursion and legacy branch coverage; document manual-construction extras collision in wire form
- Add immutable ValidationAnnotations DTO keyed by keyword with path/value records
- Add ValidationContext annotate/annotations per spec plus path() breadcrumb getter for annotation consumers
- Collect extras once per schema entry via annotateSchemaExtras wired in both root dispatchers (stateless validate and with-context doValidate after composition resolution)
- Extend branch merge to append child annotations only after successful branch evaluation
- Fork semantics: child context starts with empty annotation storage mirroring evaluatedPropertyNames; merge is append without dedup; copying parent annotations into a fork is forbidden (would duplicate entries)
- Dollar-prefixed comment never collected as annotation per core spec, guarded by parser-level and context-level anti-tests including dollar-key leak class
- Extract SchemaSubschemaWalker from DiscriminatorDetector as the single subschema traverser, defs included, yield order preserved, detector now delegates
- Add ResourceRegistry with separate uri, anchor and dynamicAnchor indexes, first occurrence wins on duplicates, base uri threading through nested ids
- Cache registries in a static WeakMap keyed by document, built lazily on access only, resolve path never triggers indexing
- Expose read accessor on RefResolver without extending its public interface
- Cover walker key completeness, defs position, registry laziness via counting spy, weakmap release, dag sharing, resolver-independent caching and resolve-path laziness
- DiscriminatorDetector behavior unchanged for existing consumers, defs scan closes false negative for schemas with definitions
…he resource registry

- Route fragments in DocumentNavigator: slash-prefixed as RFC 6901 JSON Pointer with per-segment tilde unescaping, bare as plain-name anchor lookups without decoding, absolute URI refs through the registry with base combinations
- Look up plain names via anchor and dynamicAnchor indexes scoped per resource, first occurrence wins within a resource
- Keep raw-data navigation as fallback after registry miss, raise UnresolvableRefException only after both exhausted, with sanitized reasons including a dedicated empty-fragment case
- Thread depth through resolve into navigator and detect ref cycles per resolution path via visited set
- Treat bare hash fragments as same-document refs in ExternalRefDetector, uri-plus-fragment stays fail-closed
- Activate anchor suite section, rebind defs section to FS-40 pending owner decision on metaschema validation
- Propagate depth enforcement test coverage, stabilize weakmap cache test via per-test map isolation
- Add dynamicScope stack to ValidationContext ordered outermost first with enter/leave O(1) frames, adjacent-duplicate dedup only, and no-op pop on empty
- Resolve dynamic anchors by scanning from the outermost frame per core spec so an outer resource wins over an identically named inner one
- Copy the stack into branch forks as an isolated value while annotations keep their restart-on-branch semantics
- Enter and leave scope exactly at the two root descent dispatchers: stateless validate and with-context doValidate after ref resolution, root frame on empty scope, resource frame on id presence, balanced via finally
- Add spy validator plus unit and dispatcher tests for dedup, outermost-wins, fork isolation, balance on exceptions and nested resources
…ilder withDocument

- Add immutable DocumentRepository storing parsed documents by retrieval uri with immediate full parse, domain parse exception carrying the uri, and the shared external ref size cap
- Add fluent builder withDocument accumulating user supplied documents with no network access
- Resolve external refs in order registry, repository exact, repository base combinations, file jail, sanitized exception; repository matches are authoritative without file fallback
- Scan registered documents with the same confinement detector as the main spec, require repository resolvability or allowed root, deny file fallback when repository present without allowed root
- Recheck registered document sizes against the final cap at build time and keep repository cap in sync on every registration
- Cache confinement verdicts scoped by repository fingerprint
- Serve suite remotes through withDocument mapping with id aliases and memoized registration
- Apply spec size limit only to the main spec so oversize yaml documents stay confinement scanned
…ions after triage

- Activate default, infinite-loop-detection, optional/anchor, optional/id and optional/unknownKeyword sections, all cases green on the current validator
- Park items, ref, optional/refOfUnknownKeyword, unevaluatedItems and unevaluatedProperties under FS-40 pending the new 38a core-instance-semantics task
- Move boolean_schema to FS-16, its single failing case is null semantics in that task's surface
- Drop completed-task holders entirely: no suite section references FS-02, FS-03, FS-05, FS-06 or FS-07 anymore
- Document round-trip preservation of resource fields and unknown keywords in the changelog
- Add DynamicRefValidator resolving on every encounter, never at load time
- Replace the initial uri with the outermost dynamic scope anchor when the fragment names a dynamicAnchor, falling back to ref semantics otherwise
- Register enclosing resources of chain hops in dynamic scope so pointer entries into mid-resource targets still scope correctly regardless of defs order
- Enter wrapper resources into scope before ref resolution in both root dispatchers, chain resources included, with interleaved nested anchor lookup via the resource registry
- Terminate cycles by skipping already evaluated target and data path pairs within a run and stop depth growth with the depth limit exception, semantics pinned by unit tests
- Add Appendix C golden fixtures as separate documents through withDocument with regression protection against ref-only resolution
- Activate the three FS-10 suite sections, all 77 cases green through registered remotes
- Guard performance with a time budget and a deep-over-shallow ratio baseline
…ilder

- Expose fluent withExternalRefResolver accepting the existing ExternalRefResolverInterface seam
- Thread the resolver through BuilderConfig merge semantics, last call wins
- Custom resolver replaces the builtin file resolver after the document repository, default behavior unchanged without the call
- Custom resolver exceptions propagate unwrapped, only security exceptions are wrapped
- Cover injection, default denial, replacement order, error contract, repository priority and the file fallback lock lifted by a custom resolver
Intermediate chain resources now contribute their sibling keywords at
each hop instead of being dropped; entry resolution keeps the ref intact
and the chain is followed at validation time.
- Add VocabularyGuard with the nine supported vocabulary URIs, byte-wise comparison and single-pass traversal per document at build time
- Refuse documents declaring an unknown vocabulary as required, warn once per uri for optional unknown vocabularies
- Detect legacy recursiveRef and recursiveAnchor keywords in extras and warn with migration targets instead of refusing
- Dispatch vocabulary and legacy keyword warnings through the existing psr-14 event infrastructure, aggregated after the pass
- Keep registered withDocument resources outside the guard since cross-draft resources may legitimately declare another dialect vocabularies
- Cover the uri matrix, silent pass anti-test, single-pass spy, byte-wise comparison, warning dedup and registered document scope
…d path

- Add immutable DialectProfile value object with named 3.0/3.1 factories and a
  single fromOpenApiVersion computation per document
- Thread the profile through RefResolver, ValidationContext including branch
  forks, and the schema parser build path without branching any behavior
- Default to the 3.1 profile on the stateless path and missing version
- Pin carriers and fork propagation with unit and functional probes
- Add TypeArrayNotSupportedException with a static sanitized message per the
  OAS 3.0.3 rule that type must be a string
- Guard wire type arrays in the scalar keyword parser right after type
  resolution, driven by the dialect profile allowTypeArray flag, before the
  nullable folding gate
- Rethrow the domain exception through the spec loading wrappers so builders
  observe the domain type instead of a generic parse failure
- Keep the 3.1 type array semantics and the nullable folding gate untouched
- Repair the nullable ref sibling fixture to the 3.0-valid nullable syntax and
  pin the empty type array behavior
- Return the pure resolution target from resolveSchemaWithOverride when the
  dialect profile declares ref siblings as non-applying, keeping the id scoped
  base uri pipeline intact
- Suppress intermediate chain resource sibling merging for 3.0 documents at the
  single mergeChainSiblings convergence point covering both the navigation and
  registered document chain hops
- Keep the model merger free of dialect knowledge and the discriminator
  resolution path untouched
- Flip the nullable sibling fixture expectation for 3.0 and pin both chain
  carrier paths with repository and internal regression tests
- Cover the spec vectors and the two version by two sibling by three target
  type matrix
…iage

- Activate dependentSchemas and optional/no-schema sections, all cases green
  on the current validator
- Expand task 17 scope to the legacy dependencies keyword translating to
  dependentRequired and dependentSchemas, holder of the compatibility section
- Park optional/cross-draft under FS-40 pending per-resource dialect
  dispatching semantics with no current carrier
- Amend the task 16 target shape to preserve referral branches of allowsNull
  and gate only the nullable contribution, transcribe the two-branching-points
  invariant and the root validator cache check
- Document the dialect profile value object in the changelog
- Gate the nullable contribution in allowsNull and isNullableSchema on the
  dialect profile nullableRequiresType flag with referral branches preserved
- Thread the profile from the validation context through nine normalization
  call sites, defaulting the stateless path to the 3.1 profile
- Align the not branch so a null instance is validated against the subschema
  and the subschema validators decide the verdict
- Build the dynamic ref root validator configuration from the document
  dialect profile instead of a bare default
- Activate six suite sections, all 132 cases green, completing the nullable
  part of breaking#9 except the registered oneOf discriminator follow-up
- Flip seven legacy nullable composition expectations for 3.0 documents and
  split typed and untyped cases with preserved positive coverage
- Add dependentRequired schema field through the full cascade: model, object
  groups, field metadata, parser, wire serializer and a dedicated validator
  mirroring the required error shape
- Merge sibling dependentRequired by per-key union with deduplication,
  symmetric to required, instead of target-wins
- Translate the legacy draft-07 dependencies keyword at parse time: list form
  to dependentRequired, schema and boolean forms to dependentSchemas, empty
  list as vacuum, mixed forms into both maps
- Register dependencies in KnownSchemaKeywords via the translated keywords
  list so the strict keyword set of task 24 stays consistent
- Normalize an explicit empty dependentRequired map to null so the wire never
  emits an invalid empty array value
- Deduplicate parser-level key collisions and pin last-wins dependentSchemas
  collision semantics
- Activate both FS-17 suite sections, all 56 cases green
- Default content encoding and content media type validators record values
  into validation annotations without decoding or checking anything
- Warn through psr-14 and the logger on unrecognized media types instead of
  throwing
- Keep the strict assertion behavior behind the enableContentAssertions
  opt-in threaded through the builder configuration and validation stack
- Introduce a narrow content decoder seam injected through the validator
  dependencies so both decode points are observable
- Pin zero decoder invocations in the default mode with a counting spy
  performance test on a large payload
- Move existing content assertion tests into the content-assertions group
  without changing expectations
- Document the default change and the opt-in in the changelog
- Document the dependentRequired keyword and the legacy dependencies
  translation in the added section
- Merge the split changed sections into a single changed list
…assertions mode

- Add encoding syntax checks for base16, base32, base32hex, base64url and
  quoted-printable behind a shared isValid contract with alphabet constants
  and canonical padding tables
- Keep the existing strict base64 round-trip check unchanged on the same
  contract
- Route the content encoding validator through a dispatch map with identity
  entries for 7bit, 8bit and binary and a warning path for unknown encodings
- Check quoted-printable syntax only: uppercase hex escapes, crlf-only line
  breaks, soft breaks and trailing whitespace tolerated, no decoding
- Activate the content suite section, all 18 cases green following the suite
  triage rebind precedent
- Pin the alphabet vectors with data providers and regression anti-tests
- Add ContentAssertionPipeline running decode, media syntax check and
  subschema validation through the existing root validator without creating
  extra validation contexts
- Add the public ContentValidationResult surface attached to the validation
  context, lazily evaluated in annotation mode so the main pass stays
  decode-free, eager and failing in assertion mode
- Enforce a decoded content size limit on every decode path with a domain
  exception carrying actual and max sizes
- Propagate the content result from merged success branches so compositional
  content keywords stay readable from the root context
- Support skipping the media step through the pipeline signature for external
  content type handling
- Move media syntax checks from the media validator into the pipeline
- Pin first-wins attachment, repository threading of the size limit and
  base64url assertion behavior
- Skip the media step of the content pipeline when the media type comes from
  the content map key or the encoding object contentType, at the payload root
  for full paths and at the item root for streaming paths
- Gate the skip by validation depth so embedded contentMediaType assertions
  deeper in the payload keep working per the OAS embedded content examples
- Compute the external media type predicate once and pass the matched media
  type key from all four body validation entry points
- Cover root skip scenarios, embedded assertion invariants across all paths
  and both anti-test mutations
- Add the public KeywordValidatorInterface contract with appliesTo and
  validate signatures, separate from the internal schema validator interface
- Add the immutable KeywordValidatorRegistry keyed by keyword word with
  insertion order preservation, in-place builtin replacement and append
  after the unevaluated validators for new keywords
- Register the builtin set through keyword adapter instances covering every
  served word including multi-keyword builtins, keeping the canonical order
  identical to the previous literal array
- Extract the wrapper dynamic scope handling shared by both resolution entry
  points into a dedicated resolver with balanced compensation on resolution
  failures
- Keep the internal applicability contract, the weak map root cache and all
  builtin validator signatures untouched
- Raise the cached build budget from 25ms to 40ms after 24 measured medians
  of the partition 7 audit ranged 27.4 to 31.9ms with and without coverage
  instrumentation, and the flake reproduced 3 times in 25 full runs without
  any coverage at all
- Keep the cached-faster-than-reparse assertion so the test semantics are
  unchanged
- Drop an internal chain task reference from the readme follow-up note
- Add the fluent withKeywordValidator builder method accumulating custom
  keyword validators in the immutable keyword validator registry
- Dispatch registered custom keywords through a reverse adapter wrapping
  the public keyword validator contract into the internal schema validator
  list, keeping the canonical builtin order and appending new keywords
  after the unevaluated validators
- Read custom keyword values from schema extras without parsing them into
  the schema model, leaving unregistered keywords as annotations
- Merge the custom registry over the builtin set preserving replacement
  slots and document that context-dispatched items, properties and oneOf
  builtins additionally run regardless of replacement
- Cover the parity rejection and acceptance cases, the annotation default,
  stateless replacement semantics and the context path caveat with tests
- Add the strict keywords guard enabled by default: every unknown schema
  keyword fails the build with InvalidSchemaException naming the keyword
  and its JSON Pointer location, actionable to register a keyword
  validator, allow-list it or disable strict keywords
- Compute the legal set from known schema keywords, the OpenAPI base
  vocabulary, the x- prefix, legacy translated keywords, registered
  keyword validators and the builder allow-list, so withKeywordValidator
  registrations stay legal without extra configuration
- Add disableStrictKeywords and withAllowedUnknownKeywords builder
  methods with accumulating and deduplicating allow-list semantics,
  ignoring empty calls
- Extract the document schema traversal shared by both guards into the
  DocumentSchemaCollector removing the duplicated walker from the
  vocabulary guard while preserving its traversal order
- Track schema locations as JSON Pointer pairs, escape map key tokens
  through the shared JsonPointer helper at both document and subschema
  levels, and switch the subschema walker keys to relative pointer
  segments ignored by all previous consumers
- Rebind the vocabulary suite section to the final audit holder: the
  red case needs per-resource metaschema vocabulary dispatch parked
  there, confirmed by the tech lead following the defs precedent
- Raise the confinement cache budget from 40ms to 60ms: the guard
  re-traverses the document on every build and eight measured pcov
  medians ranged 46.67 to 47.36ms while an uncached re-parse stays at
  about 407ms median, so the tripwire margin is preserved
- Add the FormatAssertionMode enum with Assertion as the default and
  Annotation to record formats as annotations without asserting them
- Add the fluent withFormatAssertionMode builder method and thread the
  mode through both dispatch paths without weakening the strict formats
  semantics, which keep throwing for unknown formats in assertion mode
- Assert formats on schemas without an explicit type by resolving the
  instance domain, matching the vendor suite typeless fixtures and
  recording the format annotation in both modes
- Distinguish unknown formats from known formats outside the instance
  domain through the additive FormatRegistry types lookup
- Activate seven green format suite sections, park fifteen conformance
  and annotation-default sections with the final audit holder under a
  ratified planning decision, and exclude the ECMAScript regex section
  by the existing PCRE precedent
- Recognize raw InvalidFormatException as an invalid verdict in the
  suite runner and pin the annotation-default format section with a
  replay test under the Annotation mode
- Replace both silent returns in the response body validator with an
  UnsupportedMediaTypeException carrying the declared types, keeping
  the offending content type out of the message and available through
  the mediaType property
- Add the withLenientResponses builder option restoring the skipping
  behavior while dispatching an UnsupportedResponseMediaTypeWarningEvent
  for every skipped media type on both regular and streaming paths
- Thread the flag through the builder config, validator configuration,
  validator options and the validation stack consumed at validation time
- Migrate the nine skipping tests to the lenient mode with warning
  assertions and add fail-closed and lenient coverage for both paths
- Add the MediaTypeKind enum with Complete, Sequential and BinaryStream
  kinds and the MediaTypeClassifier table covering the thirteen
  recognized content pipeline types, the six sequential types and the
  binary stream type, resolving exact matches before family fallback
- Gate the streaming media type detector on the classifier so the
  sequential kind is excluded before the parseable pattern match while
  the routing behavior stays byte-identical on every input: parseable
  patterns are a subset of the sequential family checked first, and
  inputs without them yield null regardless of the gate, which an
  exhaustive 7321-entry corpus comparison against the original match
  confirmed with zero divergences
- Keep multipart mixed and geo+json-seq classified sequential yet
  outside the streaming route, pinned by tests that fail under a
  hypothetical silent routing so the fail-closed response invariant
  cannot regress
- Fix the SSE parser to append every data field with a newline as the
  WHATWG algorithm requires, so an empty data line no longer resets the
  accumulated value, and update the three pins that documented the old
  behavior
- Pin the explicit boundary that embedded sequential media types stay
  outside the content pipeline recognized set, documented in the
  changelog and readme for the SSE concatenation fix
- Widen the encoding contentType model field from a single string to a
  string list or null, parsing through a single private method in the
  component tree builder that delegates for the map and prefix forms
  and rejects empty lists, non-string entries and non-array scalars
  with a dedicated sanitizable domain exception that the builder
  rethrows unwrapped
- Preserve the incoming wire shape through serialization round trips
  without collapsing a list to its first entry or its join
- Widen the external media type predicate to the union with any-of
  semantics and add the primary lookup taking the first list entry as
  the parser override while the full list stays available for matching
- Migrate both streaming response read points to the primary lookup
  leaving the regular path literal null call untouched
- Cover both wire forms, round trip idempotence, parse rejections,
  delegation, predicate semantics, wildcard matching inside lists and
  parser selection on both paths with tests
- Add the multipart encoding applier as the single application seam for
  prefix, item and named encoding objects, wired post-parse in the
  request body validator where the content model is available while the
  multipart body parser stays a wire-pure splitter
- Resolve part encoding by position then by name with anchored
  content-disposition parsing that cannot capture the filename
  parameter, assert part content types with any-of lists and type
  wildcards including accept-all, and enforce required part headers
- Split nested bodies once for header inspection only, passing deeper
  nesting through unchanged without semantic recursion
- Report part content type mismatches with the declaring encoding
  field, the full expected list and the part index, plus a dedicated
  missing header error for reuse by the ordered multipart planner
- Keep bodies without encoding fields on the zero-cost early exit path
  and reuse the injected parser instance instead of constructing a
  second one
- Cover the canonical nested encoding fixture, positive and negative
  end-to-end payloads, wildcard and list matching, name resolution and
  depth handling with unit and functional tests
Align the multipart encoding applier with its Request/Internal
neighbors by adding the internal marker; the class is a validation
seam reserved for the request body validator and the ordered multipart
planner and is not part of the package surface.
- Add the ordered multipart planner dispatching positional parts
  against prefix items and item schemas in the model-aware validator
  layer while the multipart body parser stays a wire-pure splitter
- Apply part encoding through the shared multipart encoding applier
  seam only, parsing the wire body exactly once on the ordered path
  and never passing the by-name encoding map into positional mode
- Enforce mutual exclusion of named and positional encoding fields and
  require an array model or item schema for positional configuration
- Resolve local header references inside encoding headers through a
  dedicated resolver rebuilding the encoding tree with a fast path for
  reference-free documents
- Validate required part header values with full header object
  semantics including coercion while keeping presence-only checks for
  schema-less and content-based headers
- Resolve the effective part content type from the part header, the
  encoding override or the normative OAS default table by schema type,
  splitting comma-separated encoding lists and matching parameterized
  spec keys in the media type matcher
- Extract the shared sequential media type literals used by both the
  classifier table and the streaming detector match
- Cover both spec fixture shapes end to end, the shorter instance
  vector, guards, defaults table and matcher priority with tests
- Add the multipart instance resolver building a typed part tree
  recursively in the model layer while the body parser stays a
  mechanical wire splitter, with the nesting cap parameterized and a
  dedicated domain exception reporting the limit without stack overflow
- Resolve named form data parts into object properties per the OAS
  default value rules, collecting same-named parts of an array property
  while duplicate names against a scalar property fail with an honest
  type mismatch so no parts are dropped
- Resolve leaf content types through the shared effective content type
  resolver including xml decoding and wildcard try-decoding restricted
  to structural positions when the part carries no explicit header
- Replace the multipart pins that documented named parts failing
  required validation, documenting the behavior change in the
  changelog, and pin the silent empty resolution of a nested part
  declared multipart without any boundary
- Cover the nested mixed fixture tree, depth bomb, multiple files,
  duplicates, name resolution with filename ordering and the named
  nesting intersection with unit and functional tests
Align the ordered multipart plan value object with its Request/Internal
neighbors by adding the internal marker; the plan is a validation-layer
handoff between the ordered planner and the encoding applier and is not
part of the package surface.
Add an ordered multipart fixture asserting that an object part without
a content type header is decoded as JSON by the normative default
table, extending the default coverage from the unit layer to the full
request validation path; a mutation flipping the object default to
text/plain is now caught at the functional level as well.

The planner test flake observed twice under coverage did not reproduce
across fifteen full coverage runs and forty isolated runs with distinct
random seeds; the execution path is stateless, ruling out order
dependence, leaving a transient pcov on PHP 8.5 ZTS as the residual
hypothesis with a documented tracking strategy.
- Route ordered multipart requests through a streaming entry point
  that splits the body incrementally with CRLF anchored delimiters,
  validating close delimiter tails per RFC 2046 so binary content
  containing boundary-like sequences can no longer hide parts from
  validation, while tolerating a bare close marker only at the true
  end of the body
- Apply the shared nesting depth limit across the buffered and
  streaming recursion paths from a single configuration point and cap
  the part count on unclosed trailing parts as well
- Parse declared content range headers with a strict RFC 9110 range
  value object raising a sanitized domain validation error for
  malformed or inverted ranges
- Fall back part header validation from the header schema to the
  encoding header content schema so content-declared headers such as
  content ranges are actually validated
- Parse wire bodies once on the named path feeding parsed parts into
  the encoding applier, deduplicate the request body resolution
  prologue shared by the buffered and streaming entries and make the
  streaming multipart detection case-insensitive
- Apply per part coercion and example warnings under the effective
  part schema where the item schema takes precedence over the body
  items schema, pinned by discriminating acceptance and rejection
  cases, and document the streaming gaps for whole array keywords and
  whitespace only required bodies in the changelog
- Add the schema-driven XML mapping applier resolving node types,
  namespace-qualified attributes and prefixed namespace children with
  xsi:nil values mapped to null only for the canonical instance
  namespace while omitted non-nullable attributes surface the required
  validation error
- Type empty elements through the position schema so object and array
  positions map to empty composites and scalar positions to empty
  strings, keeping generic unparsed bodies unchanged without a schema
- Default the node type to none for reference schemas per the spec,
  dispatch an ambiguous wrapped array warning with the property path
  through the validation event dispatcher and keep malformed documents
  degrading to raw content for the type validation error
- Thread the resolved request schema and the multipart part schema
  through the body parser and the multipart instance resolver so
  nested multipart xml leaves are mapped by their part schemas
- Flip the empty element pins to the new semantics with the breaking
  changelog entry documenting composite priority in unions, the
  untrimmed root leaf and the reference node type default
- Add the deprecated flag to the security scheme model with the wire
  field positioned per the 3.2 scheme table
- Rename the oauth2 device flow wire key from deviceCode to
  deviceAuthorization across the parser, serializer and builder in a
  single change set with the round trip pin proving both directions and
  the legacy key quietly dropped on parsing
- Normalize the security scheme type to lowercase at parse time so the
  serialized value is stable across round trips while runtime
  validators keep their defensive comparison
- Validate the oauth2 metadata url as an absolute URI at parse time
  raising a sanitized domain error without echoing the invalid value
- Update the device flow pins across unit, builder, integration tests
  and the 3.2 full spec fixture in the same change set
- Add the public security scheme handler contract with supports and
  validate signatures and the immutable ordered handler registry with
  prepend semantics for custom handlers, a builtin factory registering
  the bearer and api key handlers in the canonical order and a first
  supporting handler lookup
- Wrap the existing bearer and api key validators into internal
  handlers without touching their validation logic, keeping the whole
  http type routed to the bearer handler so unsupported subschemes
  keep reporting their http scheme parameter
- Dispatch the security validator scheme matching through the registry
  lookup with the unsupported scheme fallback while leaving the
  alternative and conjunction validation blocks untouched
- Drop the dead api key validator constructor parameter as the
  registry now owns the handlers, a breaking change for direct
  integrators documented in the changelog
- Pin the existing dispatch semantics with characterization tests
  written before the migration covering short circuit, error
  accumulation, unsupported precedence and http scheme reporting
- Add the basic and digest builtin security scheme handlers validating
  the presence and format of the authorization header through the
  injected preg executor, registered ahead of the bearer handler so
  http subschemes resolve to their specific validators
- Report missing or malformed credentials through the sanitized
  credential reporter with the same verbose shape as the bearer
  handler while never decoding, comparing or logging credential values
- Convert preg runtime limit exhaustion on adversarial authorization
  headers into the missing credentials validation error so malformed
  input yields the 401 class instead of an infrastructure exception
- Parse digest parameters with the byte safe RFC 7230 token and
  quoted string pattern using named groups and case insensitive
  scheme prefixes per the bearer precedent
- Update the pins that documented basic and digest falling through to
  the unsupported scheme error, documenting the new validation
  behavior in the changelog
- Add the mutual tls handler detecting client certificate headers on
  the request with a warning per heuristic hit and the proxy trust
  disclaimer kept for the readme, skipping server parameters per the
  task scope
- Add oauth2 and open id connect handlers validating the metadata url
  format through the shared uri predicate and message factory while
  request time failures surface as missing credential errors and
  never as the parse time schema exception
- Extract the bearer presence validator sharing the public bearer
  auth pattern with the oauth2 and open id connect handlers instead
  of delegating to the http bearer validator with its wrong error
  label, logging the declared scopes union from all five flow objects
  plus the flat scopes
- Convert preg runtime limit exhaustion on adversarial whitespace
  padded authorization headers into the missing credentials error
  across the shared presence validator and the http bearer validator
  so oversized input yields the fail closed 401 class instead of
  escaping as an infrastructure exception
- Take the injection logger through the builtin factory for the
  warning and scope logging, register the three handlers after the
  api key handler pinning the canonical order of seven, and update
  the unsupported scheme message to the factual no builtin handler
  form
- Promote the scheme credential reporter from the internal security
  namespace to the public one as the starting gate of this task so
  external handler implementations typehint a stable class without the
  internal marker
- Add the withSecuritySchemeHandler builder method accumulating custom
  handlers into the user registry prepended over the builtin set at
  assembly, threaded through the builder config, validator options and
  validation stack into all three security validator call sites
  covering requests, webhooks and callbacks
- Keep the no registry behavior byte identical by defaulting the
  security validator to the builtin factory while user handlers win
  the first supporting lookup over builtins and the last registered
  competing handler wins the lookup
- Cover the extension point with the seven scheme type matrix over the
  alternative and conjunction requirement scenarios, unsupported
  siblings in both alternative positions, the introspection override
  proving builtins are skipped, disjoint handler accumulation in a
  conjunction requirement and the webhook and callback wiring
- Reference the extension method from the unsupported scheme error and
  document the additions in the changelog
- Percent decode pointer segments before unescaping tildes per RFC 6901
  and pin the empty fragment, escaped tilde and percent forms in the
  document navigator
- Resolve non defs pointers from the resource root trying the array
  converter first and falling back to the resource registry on a path
  miss, navigate unknown keyword and example collections across
  documents and vendor the 2020-12 meta schemas serving them on
  canonical uris through the document repository
- Apply unevaluated items and properties semantics per the 2020-12
  model with evaluation sets tracked on container paths, fresh forks
  for branch isolation, sibling applicators applied as companions
  reading the merged context and non evaluation scalar sibling fields
  merged into the target so nullable and count siblings keep their
  behavior
- Treat the 2020 12 examples keyword as a list through parsing, sibling
  merging and wire round trips
- Guard items application to true lists and treat untyped schemas as
  accepting null outside the 3.0 dialect profile
- Activate the items, ref, refOfUnknownKeyword, unevaluatedItems and
  unevaluatedProperties suite sections covering three hundred eighteen
  previously skipped cases and document the invariant amendment for
  the third reference sibling branching point and the phase zero
  declines with the reference cache rollback in the task notes
- Accumulate content validation results per data path in the
  validation context keeping the first attached result for repeated
  paths while exposing the full ordered map and a direct path lookup
- Compute deferred results after the run on first access with
  memoization so decoding stays out of the main pass, and merge branch
  maps in attach order with existing parent keys winning over failed
  branches
- Keep the first wins result accessor unchanged and cover the anyOf
  branch intersection, the if then else branch selection, the merge
  ordering and the annotation only encoding instances in tests and
  documentation
- Repair fourteen format validators against the JSON Schema conformance
  suite: hostname and idn hostname with ldh and idna semantics, uri and
  uri reference with the full rfc 3986 grammar extracted into a shared
  grammar class, iri and iri reference with ucschar and iprivate, uri
  templates per rfc 6570 modifiers, duration composition, email
  address literals and quoted parts with length limits, idn email as
  the utf8 superset with ldh domain labels, time and date time with
  leap seconds and full offset ranges, uuid as pure syntax and
  relative json pointers with multi token pointers
- Add the idn processor mapping and validating internationalized
  domains through ext intl with the rfc 5892 contexto rules, a label
  round trips and a documented fail closed behavior when the extension
  is absent
- Activate the fourteen optional format suite sections covering six
  hundred forty six previously skipped cases
- Split regular expressions through the preg executor keeping the
  fail closed error conversion and quote string parsing shared between
  the email and idn email validators
- Document the intl recommendation, the frozen pvalid table
  conservatism, the port cap deviation and the coverage waiver for the
  environment unreachable intl fallback in the changelog, readme and
  task notes
- Add the per section format assertion mode map to the suite validator
  factory and thread the resolved mode through the builder for the
  section owned validation, disambiguating the static validator cache
  key by the mode so shared schemas across sections cannot leak a
  profile in random execution order
- Activate the format suite section covering one hundred thirty three
  annotation default cases in the runner
- Remove the annotation mode replay test superseded by the runner
  activation with the section classification still pinning the full
  vendor case count
- Resolve the replay follow up in the format section rebinding notes
- Rewrite the readme with the full feature coverage table across media
  types, multipart, xml objects, strict keywords, format assertion
  modes, uri validation bounds and content negotiation, replace the
  stale security validation claims with the seven builtin handlers,
  the registry order, the bearer fallback for http subschemes, the
  proxy trust disclaimer for mtls and a working introspection example,
  and refresh the builder method, event and error tables
- Consolidate the 0.10.0 changelog section with all fifteen breaking
  registry entries including the unchanged by design ones, the era
  additions, the raw rethrow of parse phase domain errors and the
  fixed enforcement of the json body size cap on buffered request
  bodies
- Correct the confinement messages to reference the external schema
  resolver within the truncation budget and thread the validator
  configuration into the request validator so the documented cap is
  enforced
- Cover the body limit withers, the strict streaming toggles and the
  confinement messages with pins
- Run the nullable sweep across the discriminated oneOf gate so
  nullable members of an inline union are honoured under the 3.0
  dialect profile while the nullable as type pin stays for the
  nullable requires type profile, covering both dialect directions
  with twin acceptance and rejection tests
- Pin the missing request body branch where required content is null
  while a non empty body is present
- Document the discriminated oneof nullable gate fix in the changelog
- Pin the multipart stream splitter close delimiter anchoring with a
  single junk character before a bare line feed so a delimiter like
  sequence inside binary content can no longer silently split a part
  under a weakened anchor, closing the mutation testing blind spot of
  the streaming multipart epoch
- Pin the override and chain resolution contract of the reference
  resolver interface documented as a compatibility requirement for
  external implementations, restoring the resolver line coverage above
  the gate
- List dependentRequired in the object validation keywords and the
  invalid content type exception in the error table
- Ignore the local task and wiki directory in the package gitignore
- Note the post tag continuation of the 0.9.0 changelog section and
  rewrite the three internal audit path references in the historical
  release notes keeping their meaning
- Record the owner decisions for the silent empty type array in the
  3.0 dialect and the legacy schema less positional encoding handling
- Verify every readme claim against the code, adding the missing
  error classes, core and annotation keyword sections and the
  dependent required error while removing duplicated fragments and
  the hardcoded validator count
- Remove the dead code paths traced to zero production callers: the
  buffered multipart application method, the lossy options mapping,
  the link scope factory cluster, the discriminator wrapper, the
  string list merge and the dead local part assignments, porting or
  dropping their tests and replacing reflection probes with
  behavioral pins
- Demote twenty five unused constructor properties and drop two
  unused constructors keeping the wiring intact
- Make the rector gate non mutating
Close the audit-canonicity-fixes epic (0.11.0):

- Canonical explode default (true for form/cookie) with
  withLegacyExplodeDefaults() opt-out; ParameterStyles as single source
- unevaluated* schema-form annotations now land at instance level (MUST core 11.2/11.3)
- Parameter content enforced for all four locations + content XOR schema at build
- Callback runtime expressions via shared RuntimeExpressionEvaluator +
  CallbackContext (fail-closed, wildcard unreachable with context)
- Discriminator is a hint in 3.2 (fallback to oneOf), decisive in 3.0/3.1;
  withDecisiveDiscriminator() opt-out
- readOnly+required request relaxation for the 3.0 dialect;
  enforceRequiredForReadOnly() opt-out
- PackageInfo::VERSION in the PSR-6 cache fingerprint (stale-cache invalidation)
- Build-time diagnostics: duplicate $id, $id fragments, invalid anchors
- Numeric formats per OAS 3.2: integer-valued floats for int32/int64 ranges,
  integers accepted for float/double, int32/int64 registered under type number

Suite 11443 OK; psalm level 1 clean; cs-fixer/rector clean; Infection
diff runs Covered MSI 83-95% (full run delegated to CI).
@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@milinsky
milinsky merged commit cfe4bbd into main Nov 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant