You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9c98a7f
Browse filesBrowse the repository at this point in the historyBrowse files
Define a common testing strategy for OpenShell that separates the behavioral
15
-
contract being tested from the environment, installation, execution mechanism,
16
-
and CI policy used to validate it. Contributors should be able to place a test,
17
-
run it locally, and understand what its result establishes without consulting
18
-
several competing descriptions of conformance.
15
+
contract being tested from the environment, installation, client interface,
16
+
and CI policy used to validate it. Reuse tests of public behavior across
17
+
configured targets, while keeping implementation-specific checks and performance
18
+
measurements distinct. A passing test establishes the same contract regardless
19
+
of how its target was prepared.
19
20
20
21
Use Nix for reproducible build inputs and test artifacts, and tmachine for
21
-
integration and Linux installation environments it can represent. Keep general
22
-
conformance focused on public behavior exercised through the OpenShell CLI.
23
-
Feature, driver, disruption, load/scale, and SDK coverage retain explicit
24
-
boundaries. This is a proposal for incremental implementation, not a description
25
-
of gates already enforced by CI.
22
+
integration and Linux installation environments it can represent. Keep test
23
+
contracts independent of those tools. Initially exercise general conformance
24
+
through the OpenShell CLI; using an SDK does not create a different test category.
25
+
This is a proposal for incremental implementation, not a description of gates
26
+
already enforced by CI.
26
27
27
28
## Motivation
28
29
29
-
OpenShell tests have accumulated across crate-local tests, E2E binaries,
30
-
driver wrappers, installed-artifact suites, and CI workflows. A single source
31
-
binary can mix a portable behavioral contract, native runtime inspection, an
32
-
external service integration, and performance measurements. This makes both
33
-
ownership and coverage difficult to assess.
30
+
How do we establish that OpenShell behaves as promised across supported
31
+
configurations without duplicating behavioral tests for every driver and
32
+
environment? Tests tied to particular environments make it difficult to
33
+
distinguish product requirements from implementation details, reuse coverage,
34
+
or determine what a passing suite establishes.
34
35
35
-
Documentation has the same problem. TESTING.md is being asked to describe local
36
-
commands, a future execution model, conformance admission rules, migration work,
37
-
and release gates. Suite READMEs and implementation PRs independently define
38
-
parts of that strategy. Contributors cannot tell which document owns a decision
39
-
or whether a statement describes current behavior or a target state.
36
+
OpenShell tests have accumulated across crate-local tests, E2E binaries,
37
+
driver wrappers, installed-artifact suites, and CI workflows. A single binary
38
+
can mix public behavior, native runtime inspection, an external integration,
39
+
and performance measurements. Without a shared model, contributors must either
40
+
duplicate this coverage for new targets or carry assumptions that do not apply
41
+
to them. Reviewers cannot reliably distinguish missing product support from
42
+
missing test infrastructure.
40
43
41
44
The migration tracked by #3712 makes this concrete: the tmachine e2e-podman
42
45
suite supplies interim coverage, but the intended outcome is to move the source
@@ -49,58 +52,54 @@ the definition of OpenShell conformance.
49
52
- Implement the proposed framework, capability API, or CI matrices in this PR.
50
53
- Finalize the destination of every existing E2E assertion; migration issues
51
54
retain that analysis and their task lists.
52
-
- Introduce named conformance profiles, hierarchical capability inference, or
53
-
generic capability parameters before concrete tests require them.
54
-
- Create a dedicated workload fixture image or dependency-declaration system
55
-
for scenarios initially.
56
55
- Establish a certification program, review board, or reporting service.
57
56
- Replace the SDK compatibility proposal in #3238 or standardize language SDK
58
57
APIs through the CLI runner.
59
58
60
59
## Proposal
61
60
62
-
### 1. Separate behavioral ownership from execution dimensions
61
+
### 1. Define contracts and organise tests by purpose
63
62
64
-
Each assertion has an intended contract and an appropriate owner. A binary can
65
-
be split when its assertions belong to different families.
63
+
A behavioral contract specifies the expected observable result of an operation
64
+
under stated conditions. A test case exercises that behavior; an assertion
65
+
checks an observation against an expectation. A suite groups related test cases.
66
+
For example, a contract may require that a deleted sandbox is absent from the
67
+
sandbox list; the assertion checks that its identifier is absent. Assertions
68
+
that verify test setup do not each define a separate product contract.
66
69
67
-
| Family | Contract and admission boundary |
70
+
Group tests by the contracts they exercise, not by their current binary or
71
+
runner. Split binaries when they mix unrelated contracts or prerequisites.
72
+
73
+
| Family | Purpose |
68
74
| --- | --- |
69
75
| Unit and component integration | Internal logic, configuration selection, translation, and implementation mechanics; use the lowest effective layer. |
70
-
| General conformance | Public behavior demonstrated on at least two different drivers, with effective API capabilities for non-universal support. |
76
+
| General conformance | Public behavioral contracts that hold across drivers and environments, independent of implementation details. |
71
77
| Feature-specific | Public feature behavior requiring configured external integration, or currently implemented on only one driver; one representative driver suffices. |
72
78
| Driver-specific | Driver configuration, runtime and host integration, and implementation contracts; exercise applicable environments for that driver. |
73
79
| Disruption conformance | Portable continuity or recovery assertions using environment-specific disruption actuators; one working actuator suffices initially. |
74
80
| Load/scale | Throughput, latency, concurrency, saturation, and scaling measurements, reported separately from behavioral correctness. |
75
-
| SDK conformance | Behavior and compatibility of SDK implementations through their native interfaces, specified separately in #3238. |
81
+
82
+
The placement of portable, capability-dependent tests in general conformance
83
+
or feature-specific suites remains open until a concrete migration example
84
+
requires that decision. Capability dependence alone does not determine a family.
85
+
86
+
The client interface is separate from the test family. A public contract tested
87
+
through an SDK can belong to general conformance just as it can through the CLI.
88
+
SDK-specific behavior, such as language-specific conversion and cancellation,
89
+
needs focused coverage; #3238 retains its SDK compatibility design scope.
76
90
77
91
Security portability is a workstream spanning these families. Define a separate
78
92
security family only if multiple tests need common specialized infrastructure.
79
93
For example, bypass prevention is an intended universal guarantee, but the
80
94
existing seccomp-oriented probe needs separate analysis before its portable
81
95
migration. Core-dump protection similarly needs a portable contract and probe.
82
96
83
-
The execution matrix has independent axes:
84
-
85
-
| Axis | Examples |
86
-
| --- | --- |
87
-
| Platform | Host and workload OS and architecture |
88
-
| Driver | Docker, Podman, Kubernetes, VM, MXC |
89
-
| Environment | Rootful/rootless Podman, local runtime, Kubernetes cluster |
0 commit comments