Skip to content

feat(engine): add opt-in soft-close extension on leader/price-changing void - #59

Merged
willtmc merged 1 commit into
mainfrom
feat-58-void-soft-close-extension
Nov 23, 2026
Merged

willtmc merged 1 commit into
mainfrom
feat-58-void-soft-close-extension

Conversation

@willtmc

@willtmc willtmc commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Summary

Adds an opt-in extension.extend_on_void configuration flag (boolean, default false) so an operator void_bid that changes the lot's leader or standing price inside the soft-close trigger window extends closes_at using the same rule as an accepted bid.

Closes #58

Changes

  • Schema & RFC:
    • specification/configuration/timed-proxy.schema.json: added optional extend_on_void boolean property (default false) to $defs.extension.
    • rfcs/0001-timed-online-proxy-bidding.md: documented extension.extend_on_void under Timed closing and extensions.
  • Reference Engine:
    • ruby/engine/lib/rbbb/configuration.rb: parses and validates extension.extend_on_void (defaults to false, raises RBBB::InvalidConfiguration on non-boolean values).
    • ruby/engine/lib/rbbb/engine.rb: when configuration.extension["extend_on_void"] is true, build_void_decision computes closes_at via extended_closing_time(state, effective_at, public_result_changed) where public_result_changed is true iff standing_minor_units or leader_id changed, records the updated closes_at on the privileged bid_voided transition event, and emits a public closing_time_changed event when closes_at advances. With extend_on_void omitted or false, behavior and emitted events are byte-identical to prior behavior.
  • Conformance & Tests:
    • Added fixture conformance/fixtures/usd-soft-close-extend-on-void.yaml and scenario conformance/scenarios/timed-proxy/044-void-extends-soft-close-when-configured.yaml.
    • Added unit and replay/checkpoint regression tests in ruby/engine/test/bid_void_test.rb covering: default-off byte identity, non-boolean validation, leader+price change, price-only change, leader-only change, voiding the sole bid, no-op void (neither leader nor price changed), outside-window void, short-duration non-shortening invariant, and full event/command replay + checkpoint restore.

Verification

  • ruby scripts/validate_documents.rb: Validated 21 JSON Schemas, 44 conformance scenarios, and the OpenAPI/AsyncAPI documents.
  • cd ruby/engine && bundle exec rake: 402 runs, 357271 assertions, 0 failures, 0 errors, 0 skips + package:verify (rbbb-0.2.0.pre.1.gem verified).

@willtmc
willtmc marked this pull request as ready for review November 23, 2026 20:45
@willtmc
willtmc merged commit 26f7c17 into main Nov 23, 2026
4 checks passed
@willtmc
willtmc deleted the feat-58-void-soft-close-extension branch November 23, 2026 20:45
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.

Option to extend a lot's close when a void changes the leader or price inside the soft-close window

1 participant