Story: Implement ores-shell provisioning commands

Table of Contents

This page documents a story in Sprint 20. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

Goal

Implement the ores-shell provisioning command surface specified by the Provisioners from the shell — analysis and design story (the interface design lives in its brainstorm task's Result; the wizard-to-shell coverage mapping in its analysis task's Result):

  • Shell infrastructure: optional-flag parsing for commands, and stop-on-error load semantics with --continue-on-error.
  • Plumbing primitives: bundles list/publish [--wait], workflow wait, lei countries/entities, synthetic generate, parties list, account-parties add, tenants complete-provisioning, reports templates.
  • Porcelain: provision system, provision tenant and provision party spanning the three wizard flows with the wizards' defaults, per-phase progress and resumable failure reporting.

The script library, end-to-end script, tangle build and manual chapter follow in the Provisioning script library story.

Status

Field Value
State DONE
Parent sprint Sprint 20
Now Nothing.
Waiting on Nothing.
Next Provisioning script library story (live e2e verification there).
Last touched 2026-06-06

Acceptance

  • load aborts on the first failed command (line, command and error reported); --continue-on-error restores the old behaviour; a failed script can never report success.
  • Every plumbing primitive from the design exists and wraps its NATS subject; each porcelain phase logs its plumbing equivalent.
  • provision system, provision tenant and provision party reproduce the wizard flows end-to-end against a fresh database, with the wizards' defaults (single-tenant mode, synthetic knobs, reports all).
  • The deliberate divergences hold: cancelling never clears the bootstrap flag; party activation failure is a hard failure; publishes stay atomic/upsert so reruns are safe.

Tasks

Task State Start End Description
Add flag parsing and stop-on-error load semantics DONE 2026-06-06 2026-06-06 Shell infrastructure for the provisioning surface: optional –flag parsing and load that aborts on first failure.
Add bundles and workflow shell commands DONE 2026-06-06 2026-06-06 bundles list, bundles publish [–wait], workflow wait — the dataset-publication plumbing.
Add lei and synthetic shell commands DONE 2026-06-06 2026-06-06 lei countries/entities and synthetic generate — the data-source plumbing.
Add parties, account-parties and reports shell commands DONE 2026-06-06 2026-06-06 parties list, account-parties add, tenants complete-provisioning, reports templates — the refdata/iam/reporting plumbing.
Add the provision system command DONE 2026-06-06 2026-06-06 Porcelain spanning the SystemProvisionerWizard: bootstrap admin + first tenant with single-tenant defaults.
Add the provision tenant command DONE 2026-06-06 2026-06-06 Porcelain spanning the TenantProvisioningWizard: bundle publish, GLEIF/synthetic data, association, finalize.
Add the provision party command DONE 2026-06-06 2026-06-06 Porcelain spanning the PartyProvisioningWizard: counterparties, org bundle, reports, activation.

Decisions

Out of scope

  • The org-mode script library, end-to-end provisioning script, emacs tangle build and manual chapter — the Provisioning script library story (depends on this one).
  • Changes to the Qt wizards.
  • Interactive wizard-style prompting in the shell.

Promoted from capture

Captured 2026-06-06 in the product backlog; promoted preserving the UUID.

What

Implement command-line provisioning per the design produced by the Provisioners from the shell — analysis and design story. Expected work items (final granularity to be set by that story's decision task):

  • Shell command surface for the system provisioner flow (bootstrap admin, setup mode, tenant details, tenant admin).
  • Shell command surface for the tenant provisioner flow (bundle selection, GLEIF/synthetic data sources, party association, finalize).
  • Shell command surface for the party provisioner flow (counterparties, report definitions, party activation).
  • An ores-shell script library: org-mode files with detailed commentary, tangled to runnable .ores scripts.
  • The end-to-end provisioning script: super_admin (password Secure-Password-123), base system, tenant with tenant_admin, party setup, with logins/logoffs between stages; an error-free run ends with a fully provisioned system.
  • An emacs batch build target that tangles the script library.

Why

Provisioning currently requires clicking through the three Qt wizards; a scripted command-line path enables repeatable environment builds, testing, and automation. The design story produces the wizard-to-shell coverage mapping and the idiomatic command surface; this capture holds the implementation so it is scoped only once those decisions are made.

References

See also

Emacs 29.1 (Org mode 9.6.6)