Skip to content

fix(spec): align privileged-event schema, fix fixtures/RFC drift, and tighten validators - #64

Merged
willtmc merged 1 commit into
mainfrom
fix/spec-schema-alignment-and-validators
Nov 26, 2026
Merged

willtmc merged 1 commit into
mainfrom
fix/spec-schema-alignment-and-validators

Conversation

@willtmc

@willtmc willtmc commented Nov 26, 2026

Copy link
Copy Markdown
Owner

What changed

  1. Align privileged-event.schema.json & API specs to 0.2.0-draft:

    • Updated specification/events/privileged-event.schema.json so all privileged transition event payloads (maximumAccepted, maximumReduced, bidVoided, reserveChanged, closingTimeChanged, biddingClosed) match the flat event.data shape emitted by RBBB::Engine, documented in specification/contract.md, and asserted by conformance scenario 044 (with closes_at on bidVoided, status: "closed" on biddingClosed, and companion events executed_amount_changed / notification_requested preserved).
    • Removed null from old_closes_at in specification/events/public-event.schema.json and specification/events/privileged-event.schema.json.
    • Aligned specification/common/{integer,money,timestamp}.schema.json x-rbbb-status from draft to experimental.
    • Updated specification/openapi.yaml and specification/asyncapi.yaml descriptions for 0.2.0-draft (RFC 0001 + RFC 0005 fixed bid ladder), added standard 400/401/403 error responses (BadRequest, Unauthorized, Forbidden) on POST /v1/commands, and aligned the 409 description with rejection.schema.json (stale_aggregate_version / bid_id_already_exists).
  2. Fix conformance fixtures, RFC amendments, and cross-RFC drift:

    • Added explicit extension: null to conformance/fixtures/{usd-standard,usd-reserve,usd-tiered}.yaml so all 6 fixtures satisfy specification/configuration/timed-proxy.schema.json.
    • Documented #59 (extension.extend_on_void, default false, disabled on RFC 0004 linked closing sets) in specification/contract.md and rfcs/0001-timed-online-proxy-bidding.md (## Amendments).
    • Resolved the reduce_maximum contradiction in rfcs/0004-flexible-live-scheduling.md, rfcs/proposals/flexible-live-scheduling-scenarios.md, and rfcs/proposals/flexible-live-scheduling/minute-batch-examples.json (clarifying that a leader reducing onto a tied executable rung takes later priority and can change the leader and standing public state under RFC 0001).
    • Updated stale boilerplate in specification/concepts.md and conformance/scenarios/README.md to reference RFCs 0001–0005 and sibling conformance suites (initial-scheduling/, shared-closing-clock/).
  3. Close validator and SchemaAssertions blind spots:

    • Added JSON Schema 2020-12 unevaluatedProperties (tracking evaluated keys across allOf, oneOf, anyOf, if/then/else, $ref, properties, patternProperties, and additionalProperties), else, not, and anyOf support to ruby/engine/test/support/schema_assertions.rb with unit tests in ruby/engine/test/schema_assertions_test.rb.
    • Updated ruby/engine/test/support/conformance_runner.rb to validate every emitted privileged event against specification/events/privileged-event.schema.json and every rejection against specification/rejections/rejection.schema.json across all 44 conformance scenarios.
    • Tightened scripts/validate_documents.rb to validate all conformance fixtures against timed-proxy.schema.json, validate all conformance scenarios against scenario.schema.json, verify version consistency across specification/VERSION, openapi.yaml, asyncapi.yaml, and ruby/engine/lib/rbbb/version.rb, scan rfcs/proposals/flexible-live-scheduling/*.schema.json, and expand the public-leak denylist (bid_id, bidder_notice, positions, executed_minor_units, authorization_history, reserve_history, voided_bid_ids), with regression guards in ruby/engine/test/specification_guard_test.rb.

Policy and compatibility

  • Governing RFC, if normative: RFC 0001, RFC 0004, RFC 0005
  • Public contract impact: Tightens old_closes_at (non-null timestamp) and documents 400/401/403 and 409 OpenAPI responses; aligns privileged-event schema with actual flat RBBB::Engine transition payloads.
  • Compatibility or migration impact: Schema/doc/validator alignment only; no runtime RBBB::Engine behavior change.

Provenance

  • This change contains no proprietary source, private documentation,
    production payload, or identifying auction/bidder/payment data.
  • I have the right to submit this work under the MIT License.

Verification

  • ruby scripts/validate_documents.rb (24 JSON Schemas, 6 conformance fixtures, 44 conformance scenarios, OpenAPI/AsyncAPI)
  • cd ruby/engine && bundle exec rake (434 runs, 391,902 assertions, 0 failures, 0 errors + verify_package.rb)
  • Conformance scenarios added or updated for behavior changes (all 44 scenarios now validate privileged events and rejections against contract schemas)
  • No private bidding facts appear in public events, examples, or logs

@willtmc
willtmc merged commit b99171a into main Nov 26, 2026
5 checks passed
@willtmc
willtmc deleted the fix/spec-schema-alignment-and-validators branch November 26, 2026 17:48
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