Skip to content

docs: multiple-charm state transition tests (OP089)#13

Draft
tonyandrewmeyer wants to merge 5 commits into
canonical:mainfrom
tonyandrewmeyer:spec-saddle-multi-charm-unit-testing
Draft

docs: multiple-charm state transition tests (OP089)#13
tonyandrewmeyer wants to merge 5 commits into
canonical:mainfrom
tonyandrewmeyer:spec-saddle-multi-charm-unit-testing

Conversation

@tonyandrewmeyer

@tonyandrewmeyer tonyandrewmeyer commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator
  • Adds the working draft of Saddle: Multi-Charm Unit Testing in ops.testing as a self-contained spec in specs/, opened as a draft for team review prior to submission to specs.canonical.com.
  • OP number is not yet claimed; filename and in-document Index field both use the OPxxx placeholder and will be updated once a number is assigned.
  • Drafted against main rather than docs: add cleaned OP specs #1 (docs-add-specs) so it can be reviewed independently of that larger PR's status.

The spec defines a Juju-shaped multi-charm test surface in ops.testing (deploy / integrate / add-unit / remove-unit / update-config / run_action, with events triggered automatically and a convergence loop), backed by subprocess + per-charm venv isolation (subinterpreters explicitly ruled out). Six previously-open questions are resolved inline; six-step incremental delivery plan is included.

Adds the working draft of "Saddle: Multi-Charm Unit Testing in
ops.testing" as a self-contained spec for team review prior to
submission to specs.canonical.com.

The OP number is not yet claimed (placeholder OPxxx); the filename and
in-document Index field will be updated once a number is assigned.

The spec defines:

- A Juju-shaped multi-charm test surface in `ops.testing`:
  `deploy` / `integrate` / `add-unit` / `remove-unit` / `update-config`
  / `run_action`, with events triggered automatically and a convergence
  loop.
- Subprocess + per-charm venv as the isolation mechanism (subinterpreters
  ruled out); persistent worker model behind the same surface.
- Self-contained resolutions for six previously-open questions:
  StoredState fidelity (always-on typed escape hatch); JSON `State`
  schema stability (explicit `state_schema_version` field + dispatch
  table); settle-policy determinism requirement (byte-for-byte
  reproducible) with implementation choice deferred to step 5;
  inline-vs-on-disk docstring convention for new operations; persistent-
  worker 2× acceptance bar on a 4-charm/20-event workload; six-shape
  metadata-resolution test acceptance set for step 6.
- Six-step incremental delivery plan; each step independently useful.

Drafting against `main` rather than `docs-add-specs` (#1) so the spec
can be reviewed independently of that larger PR's status.
@tonyandrewmeyer tonyandrewmeyer changed the title docs(specs): draft Saddle multi-charm unit-testing spec (OPxxx) docs: draft Saddle multi-charm unit-testing spec (OPxxx) Jun 6, 2026
@tonyandrewmeyer tonyandrewmeyer changed the title docs: draft Saddle multi-charm unit-testing spec (OPxxx) docs: multiple-charm state transition tests (OP089) Jul 24, 2026
tonyandrewmeyer and others added 4 commits July 24, 2026 16:51
- v1 charm= is local path only; Charmhub deferred; git-deploy out of scope
- integrate() takes App objects (Jubilant-shaped); get_endpoint() for disambiguation
- Elaborate on determinism vs Juju concurrency; anticipate settle() strategy args
- Add stepping() context + settle() event/state trace for mid-flight / post-hoc assertions
- Cross-ops-version compat policy: handshake negotiation, directionality (parent-authoritative, orchestrator ops >= any charm ops), documented compat window, pin_ops escape hatch
- Thread step-3 measured timings into acceptance criteria; 2x bar up for revision
- Restructure Environment provisioning as three layers (inherit / explicit python+requirements / opt-in auto-provision helper)
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.

1 participant