Open-Stack Acceptance Runbook
This runbook runs one project by hand. At each step you check a fact in the JSON output. The same journey runs as a script.
The project is the POC 05-orchestration/13-open-stack-acceptance. It needs no warehouse credentials. It starts its own Postgres in Docker and writes to a local DuckDB file.
What the journey tests
Section titled “What the journey tests” Postgres ──rocky load──▶ poc.main.events ──rocky run──▶ poc.main.events_by_type public.events --connector │ │ │ source range │ output range │ (1 to 20 rows) │ (1 to 3 rows) ▼ ▼ counted at run start counted after the build │ deadline every minute ◀── delivery: on time, late, at risk budget 0.72 ms a month ◀── cost by product, breach event, hook │ rocky serve ──▶ GET /api/v1/...The deadline is every minute (deliver_by = "* * * * *"), so you see an on-time and a late delivery in minutes. The budget limit is 0.72 ms of model time, so the first run breaches it.
Before you start
Section titled “Before you start”Put rocky, docker (with docker compose and a running daemon), python3 3.8+, the duckdb CLI and curl on PATH. The first run downloads the postgres:16-alpine image and the DuckDB postgres extension.
Open a terminal in the POC directory. Set the Postgres settings. They match docker-compose.yml.
cd examples/playground/pocs/05-orchestration/13-open-stack-acceptanceexport PGHOST=127.0.0.1 PGPORT=55433 PGUSER=rocky_reader \ PGPASSWORD=rocky-acceptance-reader-pw PGDATABASE=rocky_srcalias r='rocky -c rocky.toml --state-path .rocky/state.redb --output json'rm -rf .rocky expected poc.duckdb && mkdir expectedRun the scripted journey
Section titled “Run the scripted journey”Run the script first. It does every step below and asserts every fact.
REQUIRE_DOCKER=1 ./run.shIt takes about 4 minutes and ends with ACCEPTANCE PASS. It prints FAIL: at the first failed step. Without Docker it prints SKIP; REQUIRE_DOCKER=1 turns that into a failure. Then reset and run the steps by hand:
rm -rf .rocky expected poc.duckdb && mkdir expectedDo the steps in order. Each step names the facts that make it pass.
1. Check the config
Section titled “1. Check the config”rocky -c rocky.toml validatePass: "valid": true, and a V067 message with severity ok for connector.pg_events.
2. Start Postgres
Section titled “2. Start Postgres”docker compose up -d --waitPass: the container rocky-open-stack-acceptance is Healthy. Postgres holds 20 rows in public.events.
3. Load 1 with the child connector
Section titled “3. Load 1 with the child connector”r load --connector pg_events > expected/load-1.jsonPass: connector.status is loaded, total_rows is 19, and connector.commit_seq_after is 1. The 20th row waits: the connector holds back the rows at the source maximum.
4. Run 1: build the product
Section titled “4. Run 1: build the product”r run --pipeline events > expected/run-1.jsonPass, all of:
statusisSuccess.source_volumes[0]:tableispoc.main.events,row_countis19,verdictisin_range.- The
materializationsentry forevents_by_typehasvolume.row_count3andvolume.verdictin_range. product_budgets[0].budget.verdictisbreached, andproduct_budgets[0].breach_eventis present. Write down itsrun_id.expected/budget-breach-hook.jsonlhas one line. Itseventisbudget_breach, and itsmetadata.productisevents_by_type.
5. Product status after one delivery
Section titled “5. Product status after one delivery”r product status events_by_type > expected/status-1.jsonPass: delivery.on_time is true, delivery.late_by_seconds is 0, delivery.estimate.state is unknown, and delivery.at_risk is null. The estimate needs 5 runs before it gives a verdict.
6. Runs 2 to 5
Section titled “6. Runs 2 to 5”Run the pipeline four more times, quickly.
for n in 2 3 4 5; do r run --pipeline events > expected/run-$n.json; donePass: each run has status Success and a breached budget with no breach_event. The breach was already recorded at run 1. expected/budget-breach-hook.jsonl still has one line.
7. Load 2: new rows at the source
Section titled “7. Load 2: new rows at the source”Insert 5 rows in Postgres, then load.
docker compose exec -T postgres psql -U "$PGUSER" -d "$PGDATABASE" -c \ "INSERT INTO public.events (id, event_type, amount_cents, created_at) SELECT g, 'purchase', g * 100, timestamptz '2026-10-01 00:00:00+00' + g * interval '1 minute' FROM generate_series(21, 25) AS g;"r load --connector pg_events > expected/load-2.jsonPass: total_rows is 5, connector.commit_seq_after is 2. The table now holds 24 rows.
8. Wait for a deadline to pass
Section titled “8. Wait for a deadline to pass”Wait about two minutes, until the clock is past the second minute boundary after run 5. Run 5 covered the next deadline. The deadline after it must pass with no delivery.
9. Run 6: a late delivery
Section titled “9. Run 6: a late delivery”r run --pipeline events > expected/run-6.jsonPass:
source_volumes[0].row_countis24and itsverdictisabove_max. The range is a warning, so the output still builds.volume_warningshas a line that namespoc.main.events.- The output range is still
in_rangewith 3 rows.
10. Product status after the late delivery
Section titled “10. Product status after the late delivery”r product status events_by_type > expected/status-2.jsonPass:
delivery.on_timeisfalse, anddelivery.late_by_secondsis more than0.delivery.estimate.stateisknown, anddelivery.at_riskistrueorfalse, notnull.source_volumes[0].verdictisabove_max, andvolume.verdictisin_range.cost_month.cost.budget.verdictisbreached.
11. Load 3: nothing new
Section titled “11. Load 3: nothing new”r load --connector pg_events > expected/load-3.jsonPass: total_rows is 0 and connector.commit_seq_after is 3. The state commits even when no row moves.
12. Let the scheduler see the cron
Section titled “12. Let the scheduler see the cron”r tick > expected/tick.jsonPass: evaluated has the pipeline events with due false, and executed is empty. The cron fires at 23:59 UTC, so do not run this step between 23:50 and 00:00 UTC.
13. Cost for the month, by product
Section titled “13. Cost for the month, by product”Use the month in cost_month.month from step 10, for example 2026-11.
r cost --month 2026-11 --by product > expected/cost-month.jsonPass, for the product events_by_type:
chargedhas acompute_msamount above0.money_statusispriced. Thecomputeentry inmoney_partsiscompute_ms× $0.000001:[cost] compute_cost_per_machine_houris3.6.egressandai_tokensinmoney_partsarenot_measured.budget.verdictisbreached.breach_eventshas one event, and itsrun_idis the one from step 4.- For each unit in
measured_total, the products’chargedplusunallocatedequals the total.
14. The browser UI’s HTTP API
Section titled “14. The browser UI’s HTTP API”Start the server in a second terminal, with the same state store.
rocky -c rocky.toml --state-path .rocky/state.redb serve --port 8093The product page’s Delivery and cost panel reads these routes.
curl -s "http://127.0.0.1:8093/api/v1/cost/month?month=2026-11" > expected/api-cost-month.jsoncurl -s http://127.0.0.1:8093/api/v1/products/events_by_type > expected/api-product.jsoncurl -s http://127.0.0.1:8093/api/v1/schedule > expected/api-schedule.jsonPass:
api-cost-month.jsonhas the same product row as step 13: the samecompute_msincharged,keptandbuilt, the same budget verdict, the same breach events. Storage byte-hours grow with time, so they can differ.api-product.jsonhas the samedeliveryfacts,volumeandsource_volumesas step 10.next_due_atandat_riskmove with the clock.- In
api-schedule.json, the pipelineeventshasdelivery.productevents_by_typeanddelivery.on_timefalse. Itslatest_starthascron_checktoo_late,cron_too_latetrueand awarning. A cron at 23:59 cannot meet a deadline every minute.
15. No secret in the output
Section titled “15. No secret in the output”grep -r -a -F -l -- "$PGPASSWORD" expected .rocky && echo FAIL || echo "0 hits"Pass: 0 hits.
16. Clean up
Section titled “16. Clean up”docker compose down -vResult
Section titled “Result”The journey passes when every step passes. For a failed step, keep its JSON file and .log from expected/.
Related
Section titled “Related”- Child connectors: the protocol and the reference Postgres connector
- Product commands: deadlines, volume ranges and
rocky product status rocky cost --month: the monthly split by product[product_budget.NAME]: monthly budgets- Browser UI: the Delivery and cost panel