Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body:
id: version
attributes:
label: Version or commit
placeholder: 0.1.0.pre.3 or commit SHA
placeholder: 0.2.0.pre.1 (or installed gem version)
validations:
required: true
- type: textarea
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,31 @@ on:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
contents: read

jobs:
documents-and-examples:
name: documents-and-examples
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # v1.343.0
with:
ruby-version: "3.4"
- name: Validate specification documents
run: ruby scripts/validate_documents.rb
- name: Run fixed bid ladder example
run: ruby -Iruby/engine/lib examples/fixed_bid_ladder.rb

test:
name: Ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
Expand All @@ -19,14 +40,14 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # pinned 2026-09-01
uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # v1.343.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
working-directory: ruby/engine
- name: Validate specification documents
run: ruby scripts/validate_documents.rb
- name: Test and package reference engine
working-directory: ruby/engine
run: bundle exec rake
95 changes: 81 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,110 @@ permissions:
contents: read

jobs:
publish:
name: Publish to RubyGems.org
verify:
name: Verify release tag and package
if: github.repository == 'willtmc/rbbb'
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
id-token: write
contents: read
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # pinned 2026-09-01
uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # v1.343.0
with:
ruby-version: "3.2"
ruby-version: "3.4"
bundler-cache: true
working-directory: ruby/engine
- name: Verify tag, documents, engine, and package
- name: Verify tag, ancestry, changelog, documents, engine, and package
shell: bash
working-directory: ruby/engine
run: |
version="$(ruby -Ilib -rrbbb/version -e 'print RBBB::VERSION')"
set -euo pipefail
version="$(ruby -Iruby/engine/lib -rrbbb/version -e 'print RBBB::VERSION')"
test "$GITHUB_REF_NAME" = "v$version"
ruby ../../scripts/validate_documents.rb
bundle exec rake
git rev-parse --verify refs/remotes/origin/main >/dev/null
git merge-base --is-ancestor HEAD refs/remotes/origin/main
grep -Fq "$version" CHANGELOG.md
ruby scripts/validate_documents.rb
(
cd ruby/engine
bundle exec rake
bundle exec rake build
)
test -f "ruby/engine/pkg/rbbb-${version}.gem"
- name: Upload verified gem artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: rbbb-verified-gem
path: ruby/engine/pkg/rbbb-*.gem
if-no-files-found: error

publish-rubygems:
name: Publish to RubyGems.org
needs: verify
if: github.repository == 'willtmc/rbbb'
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # v1.343.0
with:
ruby-version: "3.4"
bundler-cache: true
working-directory: ruby/engine
- name: Publish with RubyGems trusted publishing
uses: rubygems/release-gem@5c53f5308233b7c0f47411f0471b3faae6fa57b2 # v1.4.2
with:
working-directory: ruby/engine
- name: Upload published gem artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: rbbb-published-gem
path: ruby/engine/pkg/rbbb-*.gem
if-no-files-found: error

github-release:
name: Publish matching GitHub release
needs: publish-rubygems
if: github.repository == 'willtmc/rbbb'
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@be3c7df29b3349ec6bcfc6b4792f1cf9f5237d18 # v1.343.0
with:
ruby-version: "3.4"
- name: Download published gem artifact
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: rbbb-published-gem
path: ruby/engine/pkg
- name: Publish matching GitHub release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
version="${GITHUB_REF_NAME#v}"
release_status="$(ruby -Iruby/engine/lib -rrbbb/version -e 'print RBBB::RELEASE_STATUS')"
gem_file="ruby/engine/pkg/rbbb-${version}.gem"
test -f "$gem_file"
checksum="$(sha256sum "$gem_file" | cut -d ' ' -f 1)"
notes_file="$RUNNER_TEMP/rbbb-release-notes.md"
release_flags=()
Expand All @@ -56,8 +121,10 @@ jobs:
fi
{
echo "${release_status^} package for the RBBB Ruby reference engine."
echo
echo "Not production ready; do not use it to accept or resolve live bids."
if [[ "$release_status" != "stable" ]]; then
echo
echo "Not production ready; do not use it to accept or resolve live bids."
fi
echo
echo "SHA-256: \`$checksum\`"
echo
Expand Down
111 changes: 53 additions & 58 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,66 @@
# Changelog

## 0.2.0.pre.1 — fixed ladder evaluation

Incompatible specification 0.2.0-draft, accepted in RFC 0005 on 2026-10-23:
fixed ladder execution, arbitrary entered maxima, no cut bids, and private
nonblocking bidder notices. Unused remainders affect neither price nor priority.
Reserves execute at the first eligible rung, and corrections replay identical
rules. Existing post-close and operator authorization boundaries remain intact.
Positions now carry executable maximum separately from entered authority.
Preserve 0.1 snapshots and the pinned baseline; no live migration is provided.


All notable changes will be documented here.

The project intends to follow Semantic Versioning once it begins publishing
versioned artifacts.

## Unreleased

- Fix operator void reconstruction returning a `bid_voided` event that `apply`
refused. A later bid that falls below its bidder's executed amount in the
reconstructed order now has no effect, as a reduction below it already had,
so executed amounts stay within executable maxima. Record the maintainer
decision of 2026-11-10 in RFC 0001: such a void can leave another bidder
executed above the maximum they have on file, the engine allows it, and hosts
warn the operator; the contract explains how a host derives the warning from
the prior state and the `bid_voided` positions (no new field). Adds scenarios
041 and 042 and a seeded property test with an exhaustive short-history
observation. For rare histories that `apply` already accepted before this
fix, the stored priority numbers after a void now differ, and so can the tie
order, because a bid below the replayed executed amount no longer takes
effect. The leader or the price can also differ from the previous release
when a bidder's most recent bid is voided, in histories with three or more
bidders in which bidders had lowered their maximums; the maintainer chose the
new result (RFC 0001 amendment, second ruling of 2026-11-10). Adds scenario
043 and two named regressions for it.

- Clarify bidder revocation versus audited operator correction and add trusted
admission regressions: executed competition remains binding, operator identity
cannot be spoofed, corrections require reasons, and post-close voids remain
rejected. Historical partial removals must not imply full authorization voids.

Source targets `0.2.0.pre.1` (specification `0.2.0-draft`, incompatible with
`0.1.0-draft`). No `0.2.0.pre.1` package has been published yet; `0.1.0.pre.3`
remains the latest published RubyGems prerelease.

- Add the RFC 0002 initial closing schedule planner (`#36`): minute batches,
arbitrary group membership, latest-member defaults, and explicit initial
overrides. This does not add live group coordination or change baseline bids.
- Add the RFC 0003 fixed-membership shared closing-clock component (`#37`) and
process-local / SQLite durable shared-group host examples with retry receipts
and atomic group closing (`#38`, `#39`, `#40`). New qualifying bids extend
all members; leader proxy adjustments do not.
- Accept RFC 0004 (`#43`) and complete the optional linked soft-close reference
coordinator (`#47`): live group/schedule edits, standalone registration,
independent linked bidding and atomic closing, durable SQLite
ordering/receipts/outbox, trusted admission, authorized snapshots, and atomic
snapshot-first recovery. Reject wrong-route commands in pure scheduling
entrypoints and refuse missing, reordered, or conflicting native records
during complete-commit replay. Adds behavioral, resource, process-race,
crash/restore, and installed-package coverage. Source-only evaluation work,
not a package release or live deployment.
- Preserve competitive standing price when the leader raises a hidden maximum,
including ordered reconstruction after a void. Retain reserve pressure and
exact-maximum tie priority when reducing back to the executed floor. Add seven
synthetic regression scenarios, clarify RFC 0001, and retain the post-close
correction boundary. This source change is not a published package release.

- Complete the optional RFC 0004 linked soft-close reference coordinator:
live group/schedule edits, standalone registration, independent linked bidding
and atomic closing, durable SQLite ordering/receipts/outbox, trusted admission,
authorized snapshots and atomic snapshot-first recovery. Add full behavioral,
resource, process-race/crash/restore and installed-package coverage.
Baseline RFC 0001 semantics and published capabilities remain unchanged.
This is source-only evaluation work, not a package release or live deployment.
- Reject wrong-route commands in pure scheduling entrypoints and refuse missing,
reordered or conflicting native records during complete-commit replay.

- Add the fixed-membership shared closing-clock component. New qualifying bids
extend all members; proxy adjustments do not. Atomic host integration remains
separate, and baseline per-unit bidding semantics are unchanged.


- Add the RFC 0002 initial closing schedule planner: minute batches, arbitrary
group membership, latest-member defaults and explicit initial overrides.
This does not add live group coordination or change baseline bids.

including ordered reconstruction after a void (`#50`). Retain reserve
pressure and exact-maximum tie priority when reducing back to the executed
floor, add seven synthetic regression scenarios, clarify RFC 0001, and retain
the post-close correction boundary.
- Clarify bidder revocation versus audited operator correction and add trusted
admission regressions (`#51`): executed competition remains binding, operator
identity cannot be spoofed, corrections require reasons, and post-close voids
remain rejected. Historical partial removals must not imply full
authorization voids.
- **Breaking (`0.2.0-draft`, RFC 0005, accepted 2026-10-23):** execute maxima
on a fixed bid ladder (`#52`). Bidders may enter arbitrary maxima, but only
published ladder rungs execute; there are no cut bids. Adds private
nonblocking `maximum_not_fully_executable` bidder notices; unused remainders
affect neither price nor priority. Reserves execute at the first eligible
rung, positions carry executable maximum separately from entered authority,
and corrections replay identical rules. Preserve 0.1 snapshots and the pinned
baseline; no live migration is provided.
- Fix operator void reconstruction returning a `bid_voided` event that `apply`
refused (`#57`). A later bid that falls below its bidder's executed amount in
the reconstructed order now has no effect, as a reduction below it already
had, so executed amounts stay within executable maxima. Records the
2026-11-10 maintainer rulings in RFC 0001 (including host-derived operator
warnings when a void leaves another bidder executed above their on-file
maximum, and priority/leader replay semantics for multi-bidder histories with
maximum reductions) and adds scenarios 041–043 plus a seeded property test
and exhaustive short-history check.
- Add opt-in `extend_on_void` soft-close configuration (`#59`): when enabled,
an audited pre-close void that changes the leader or standing price within
the trigger window extends closing time, backed by fixture
`usd-soft-close-extend-on-void` and scenario 044.
- Track durable public result delivery acknowledgments (`#41`): add restart-safe
outbox stream identity and per-consumer delivery cursors in the SQLite
shared-group host example for receiver deduplication.

## 0.1.0.pre.3 — 2026-09-02

Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ license agreement.

## Development

The Ruby reference engine currently supports Ruby 3.2 and newer.
The Ruby reference engine currently supports Ruby 3.2 and newer. The `rbbb` gem
itself has zero runtime dependencies; `bundle install` in `ruby/engine` installs
`sqlite3` as a development dependency for running the durable host examples and
their tests.

```sh
cd ruby/engine
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ application's code.
specification/ Language-neutral concepts, schemas, and API contracts
conformance/ Portable behavior scenarios for every compliant engine
ruby/engine/ Pure-Ruby reference implementation
ruby/server/ Future deployable reference service
examples/ Synthetic host, admission, reader, and consumer examples
rfcs/ Proposed changes to normative auction behavior
docs/ Architecture, terminology, and design decisions
```
Expand Down Expand Up @@ -89,6 +89,10 @@ gem build rbbb.gemspec
gem install ./rbbb-0.2.0.pre.1.gem
```

The `rbbb` gem itself has zero runtime dependencies. Running `bundle install`
in `ruby/engine` installs `sqlite3` as a development dependency so you can run
the durable host examples and their tests.

This artifact is for evaluation and historical replay only. It is not a hosted
service and must not be used to accept or resolve live bids. See the
[Ruby engine guide](ruby/engine/README.md) for installation and usage, or the
Expand Down
35 changes: 22 additions & 13 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,25 @@ Quantity, choice, multi-parcel bidding, additional
auctioneer overrides, and other formats remain out of scope until their
semantics are specified and tested.

[RFC 0004: Flexible live scheduling and closing groups](rfcs/0004-flexible-live-scheduling.md)
was accepted on 2026-09-24: mutable group membership and explicit earlier/later
deadlines during bidding, with atomic ordering, auditable operator actions, a
host-set minimum shortening lead, and leader-change extensions. The bounded
reference coordinator and its durable host/snapshot recovery examples are now
implemented; see the [acceptance and integration evidence](docs/live-scheduling-implementation.md).
Deployment certification and a separately approved release remain future work.
The baseline engine's behavior is unchanged and no service capability is advertised.

An optional rule that realigns a proxy-clipped short increment to the regular
increment grid is explicitly deferred. The v0.1 baseline permits short
increments and calculates the next required amount from the resulting standing
amount.
Optional closing-schedule extensions are accepted and implemented in source
(unreleased):

- [RFC 0002: Initial closing schedule planning](rfcs/0002-initial-closing-schedules.md)
(minute batches and nonconsecutive initial group planning);
- [RFC 0003: Fixed-membership shared closing clock](rfcs/0003-shared-closing-clock.md)
(shared quiet-period clock component for fixed groups); and
- [RFC 0004: Flexible live scheduling and closing groups](rfcs/0004-flexible-live-scheduling.md),
accepted on 2026-09-24 (mutable group membership and explicit earlier/later
deadlines during bidding, with atomic ordering, auditable operator actions, a
host-set minimum shortening lead, and leader-change extensions). The bounded
reference coordinator and its durable host/snapshot recovery examples are
implemented; see the [acceptance and integration evidence](docs/live-scheduling-implementation.md).
Deployment certification and a separately approved release remain future work.
The baseline engine's behavior is unchanged and no service capability is advertised.

[RFC 0005: Fixed bid ladder with arbitrary maximum authority](rfcs/0005-fixed-bid-ladder.md)
was accepted on 2026-10-23 (`0.2.0-draft`, implemented in source), superseding
the v0.1 short-increment and raw-maximum tie rules. All executed bids now follow
the fixed published ladder with no cut bids, while odd entered maxima retain
their full authorization and emit a private nonblocking notice. The v0.1
baseline remains pinned for historical auctions and replays.
5 changes: 0 additions & 5 deletions clients/README.md

This file was deleted.

Loading