Repository navigation
fix(spec): align privileged-event schema, fix fixtures/RFC drift, and tighten validators - #64
Merged
Merged
Conversation
… tighten validators
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.
What changed
Align
privileged-event.schema.json& API specs to0.2.0-draft:specification/events/privileged-event.schema.jsonso all privileged transition event payloads (maximumAccepted,maximumReduced,bidVoided,reserveChanged,closingTimeChanged,biddingClosed) match the flatevent.datashape emitted byRBBB::Engine, documented inspecification/contract.md, and asserted by conformance scenario044(withcloses_atonbidVoided,status: "closed"onbiddingClosed, and companion eventsexecuted_amount_changed/notification_requestedpreserved).nullfromold_closes_atinspecification/events/public-event.schema.jsonandspecification/events/privileged-event.schema.json.specification/common/{integer,money,timestamp}.schema.jsonx-rbbb-statusfromdrafttoexperimental.specification/openapi.yamlandspecification/asyncapi.yamldescriptions for0.2.0-draft(RFC 0001 + RFC 0005 fixed bid ladder), added standard400/401/403error responses (BadRequest,Unauthorized,Forbidden) onPOST /v1/commands, and aligned the409description withrejection.schema.json(stale_aggregate_version/bid_id_already_exists).Fix conformance fixtures, RFC amendments, and cross-RFC drift:
extension: nulltoconformance/fixtures/{usd-standard,usd-reserve,usd-tiered}.yamlso all 6 fixtures satisfyspecification/configuration/timed-proxy.schema.json.#59(extension.extend_on_void, defaultfalse, disabled on RFC 0004 linked closing sets) inspecification/contract.mdandrfcs/0001-timed-online-proxy-bidding.md(## Amendments).reduce_maximumcontradiction inrfcs/0004-flexible-live-scheduling.md,rfcs/proposals/flexible-live-scheduling-scenarios.md, andrfcs/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).specification/concepts.mdandconformance/scenarios/README.mdto reference RFCs 0001–0005 and sibling conformance suites (initial-scheduling/,shared-closing-clock/).Close validator and
SchemaAssertionsblind spots:unevaluatedProperties(tracking evaluated keys acrossallOf,oneOf,anyOf,if/then/else,$ref,properties,patternProperties, andadditionalProperties),else,not, andanyOfsupport toruby/engine/test/support/schema_assertions.rbwith unit tests inruby/engine/test/schema_assertions_test.rb.ruby/engine/test/support/conformance_runner.rbto validate every emitted privileged event againstspecification/events/privileged-event.schema.jsonand every rejection againstspecification/rejections/rejection.schema.jsonacross all 44 conformance scenarios.scripts/validate_documents.rbto validate all conformance fixtures againsttimed-proxy.schema.json, validate all conformance scenarios againstscenario.schema.json, verify version consistency acrossspecification/VERSION,openapi.yaml,asyncapi.yaml, andruby/engine/lib/rbbb/version.rb, scanrfcs/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 inruby/engine/test/specification_guard_test.rb.Policy and compatibility
old_closes_at(non-null timestamp) and documents400/401/403and409OpenAPI responses; aligns privileged-event schema with actual flatRBBB::Enginetransition payloads.RBBB::Enginebehavior change.Provenance
production payload, or identifying auction/bidder/payment data.
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)