@@ -14,6 +14,8 @@ experiments.
1414 collection as a successful complete run.
1515- Plans and runs ` pg_perf_bench ` only against an explicitly selected disposable
1616 database, then validates and compares benchmark artifacts and TPS evidence.
17+ - Plans and runs reviewed ` pg_converter ` packets against an exact alias set
18+ through a detached, auditable, sequential workflow.
1719- Installs every component while preserving their independent use.
1820
1921The independently installable components are:
@@ -25,7 +27,9 @@ The independently installable components are:
2527- [ ` pg_diag ` ] ( https://github.com/O2eg/pg_diag ) — diagnostic JSON and HTML
2628 artifacts;
2729- [ ` pg_configurator ` ] ( https://github.com/O2eg/pg_configurator ) — version-aware
28- PostgreSQL configuration candidates.
30+ PostgreSQL configuration candidates;
31+ - [ ` pg_converter ` ] ( https://github.com/O2eg/pg_converter ) — reviewed SQL/Python
32+ packet deployment and migration operations;
2933- [ ` pg_perf_bench ` ] ( https://github.com/O2eg/pg_perf_bench ) — controlled pgbench
3034 execution and environment evidence.
3135
@@ -43,13 +47,13 @@ The independently installable components are:
4347 pg_stand ------------------------+
4448 |
4549 v
46- PostgreSQL stand
47- / | \
48- v v v
49- pg_workload pg_perf_bench pg_diag
50- | | |
51- | benchmark report |
52- +--------- run ----------+----> diagnostic report
50+ PostgreSQL stand
51+ / / \ \
52+ v v v v
53+ pg_converter pg_workload pg_perf_bench pg_diag
54+ | | | |
55+ packet run | benchmark report |
56+ +----------+------ run - ----------+----> diagnostic report
5357 |
5458 change one reviewed input
5559 |
@@ -62,7 +66,7 @@ The control layers are deliberately separate:
6266agent skills workflow and interpretation rules
6367 |
6468 v
65- pg-play-mcp twenty-six typed, high-level operations
69+ pg-play-mcp thirty-one typed, high-level operations
6670 |
6771 v
6872pg_play core validation, planning, state, comparison
@@ -71,6 +75,7 @@ pg_play core validation, planning, state, comparison
7175component adapters argv arrays + strict JSON envelopes
7276 |
7377 +---- pg_configurator
78+ +---- pg_converter
7479 +---- pg_stand
7580 +---- pg_workload
7681 +---- pg_diag
@@ -87,14 +92,15 @@ are hidden from its primary help and its normal human output is unchanged.
8792python -m pip install pg-play
8893```
8994
90- This installs compatible versions of all five component distributions. They
95+ This installs compatible versions of all six component distributions. They
9196remain available through their own commands:
9297
9398``` bash
9499pg-stand --help
95100pg-workload --help
96101pg-diag --help
97102pg-configurator --help
103+ pg-converter --help
98104pg-perf-bench --help
99105```
100106
@@ -208,7 +214,7 @@ The packaged JSON Schema is available as the MCP resource
208214Secrets are the deliberate exception : ` pg_workload` continues to accept
209215passwords only through environment/passfile mechanisms.
210216
211- All five components use the same hidden orchestration options :
217+ All six components use the same hidden orchestration options :
212218` --machine` , `--request-id`, and `--component-capabilities`. Their advertised
213219` machine_interface` object makes these names machine-verifiable.
214220
@@ -219,6 +225,11 @@ The `pg-play` CLI contains only complete experiment operations:
219225| Command | Effect |
220226| --- | --- |
221227| `capabilities` | Read installed component contracts |
228+ | `plan-converter-run --project DIR --config FILE --packet NAME` | Resolve packet content and exact database aliases without connecting |
229+ | `start-converter-run PLAN.json --plan-hash HASH --out DIR --run-id ID` | Start an unchanged packet plan in a detached worker |
230+ | `converter-run-status RUN_DIR` | Read durable packet-run state and detect a lost worker |
231+ | `converter-run-events RUN_DIR [--after-sequence N]` | Read ordered packet-run events |
232+ | `cancel-converter-run RUN_DIR [--reason TEXT]` | Request cooperative packet cancellation |
222233| `validate MANIFEST` | Validate the manifest and non-mutating component inputs |
223234| `plan MANIFEST` | Calculate the current read-only plan and its hash |
224235| `start MANIFEST --plan-hash HASH --run-id ID` | Start exactly that plan in a detached worker and return immediately |
@@ -262,6 +273,40 @@ for a verified failed, cancelled, or interrupted attempt; use a new id when the
262273manifest or plan changes. `run` retains the old synchronous behavior for
263274scripts that explicitly need it.
264275
276+ # ## Reviewed pg_converter packet runs
277+
278+ ` pg_converter` packets are trusted deployment code and are intentionally
279+ separate from the general experiment manifest. Plan an exact packet, review
280+ its legacy tracker checksum, SHA-256 source-tree hash, Python-step flag, and
281+ resolved database aliases and password-free connection identities, then start
282+ the unchanged plan :
283+
284+ ` ` ` bash
285+ pg-play plan-converter-run \
286+ --project /opt/pg_converter/current \
287+ --config /etc/pg_converter/pg_converter.conf \
288+ --packet release_42 \
289+ --database-selector 'prod_a,prod_b' \
290+ --placeholders-file /run/pg_converter/release_42.json \
291+ --timeout-seconds 3600 > converter-plan.json
292+
293+ pg-play start-converter-run converter-plan.json \
294+ --plan-hash sha256:... \
295+ --out /var/lib/pg_play/converter-runs \
296+ --run-id release-42
297+ ` ` `
298+
299+ The machine path always uses sequential database processing and never enables
300+ ` --force` , `--wipe`, `--stop`, `--unlock`, template copying, or skip-on-cancel
301+ modes. The reviewed plan replaces only the interactive multi-database prompt;
302+ it does not bypass PG Converter checksum or ambiguous-outcome safeguards.
303+ Credentials stay in the protected configuration file. Placeholder and
304+ configuration-override values are accepted only through protected JSON files
305+ and are represented in the plan by names and hashes, not values.
306+ See the
307+ [pg_converter integration runbook](https://github.com/O2eg/pg_play/blob/main/docs/pg_converter-integration.md)
308+ for the durable directory, cancellation, and recovery contracts.
309+
265310# # MCP server
266311
267312Start the stdio server with :
@@ -278,6 +323,11 @@ for concise MCP and Agent Skills configuration examples for Codex CLI, Claude
278323Code, Hermes Agent, Kimi Code CLI, Gemini CLI, and OpenCode.
279324
280325- ` component_capabilities`
326+ - ` plan_converter_run`
327+ - ` start_converter_run`
328+ - ` converter_run_status`
329+ - ` converter_run_events`
330+ - ` cancel_converter_run`
281331- ` plan_live_diagnostics`
282332- ` start_live_diagnostics`
283333- ` live_diagnostics_status`
@@ -314,11 +364,20 @@ and intentionally excludes the 2.x prerelease API.
314364The durable schemas are also exposed as `pgplay://run-state-schema` and
315365` pgplay://run-event-schema` .
316366
367+ For packet deployment, an agent must call `plan_converter_run`, show the exact
368+ packet/source hashes, target aliases, Python-step risk, and mutation flags to
369+ the user, and pass the unchanged plan and hash to `start_converter_run`.
370+ Observe it through `converter_run_status` and `converter_run_events`. A failed
371+ or interrupted packet is not automatically retried because non-transactional
372+ actions can have an ambiguous outcome.
373+
317374# # Agent skills
318375
319- The wheel contains five optional workflow skills under `pg_play/skills/` :
376+ The wheel contains six optional workflow skills under `pg_play/skills/` :
320377
321378- ` run-postgres-experiment` — validate, plan, start, and monitor a new run;
379+ - ` run-pg-converter-packet` — review exact packet sources and targets, start
380+ the immutable run, and preserve ambiguous outcomes for operator recovery;
322381- ` recover-postgres-experiment` — inspect, cancel, and safely resume an
323382 existing durable run;
324383- ` diagnose-live-postgres` — capture a bounded, read-only diagnostic window on
@@ -431,6 +490,8 @@ unknown step or changed core artifact blocks recovery.
431490 combined plan hash. `start` and `resume` enforce the same hash. Machine-mode
432491 ` pg_perf_bench benchmark` independently
433492 verifies a content-sensitive benchmark plan hash before resetting its database.
493+ - ` pg_converter run` independently verifies the reviewed component plan hash,
494+ including the exact alias set, packet source tree, and file-based inputs.
434495- Subprocesses receive argument arrays with `shell=False`.
435496- Password-bearing CLI arguments and password-bearing machine output are
436497 rejected.
@@ -456,22 +517,25 @@ read-only profiles and one bounded snapshots window per immutable capture id.
456517Configuration review extracts the bounded CPU, RAM, filesystem, mount, and disk
457518facts listed above. Generation or application of TuneD/systemd artifacts remains
458519a roadmap item; it is not silently approximated by the current implementation.
520+ Reviewed `pg_converter` runs are a separate durable workflow and are not
521+ silently injected into every experiment manifest.
459522
460523# # Development
461524
462525` ` ` bash
463526python3 -m venv .venv
464527.venv/bin/pip install -e ../pg_stand -e ../pg_workload -e ../pg_diag \
465- -e ../pg_configurator -e ../pg_perf_bench
528+ -e ../pg_configurator -e ../pg_converter -e ../ pg_perf_bench
466529.venv/bin/pip install -e '.[dev]'
467530.venv/bin/ruff check .
468531.venv/bin/ruff format --check .
469532.venv/bin/pytest
470533` ` `
471534
472535For coordinated releases, publish the component distributions before tagging
473- `pg_play` : first `pg_configurator`, `pg_diag`, `pg_stand`, and `pg_workload`,
474- then `pg_perf_bench` (which depends on `pg_diag`), and finally `pg_play`.
536+ `pg_play` : first `pg_configurator`, `pg_converter`, `pg_diag`, `pg_stand`, and
537+ ` pg_workload` , then `pg_perf_bench` (which depends on `pg_diag`), and finally
538+ ` pg_play` .
475539Ordinary branch CI checks out the component sources so a coordinated source
476540change can be tested before those versions reach PyPI. Tagged publish jobs use
477541the package index deliberately and therefore enforce this release order.
0 commit comments