Skip to content

Commit 4037d0e

Browse files
Conformance blocker: complete sample-app coverage beyond deterministic smoke (#329)
1 parent 091bdcd commit 4037d0e

4 files changed

Lines changed: 15 additions & 11 deletions

File tree

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,16 @@ activities running in the worker container can reach the app. Set
180180
`SAMPLE_APP_CONFORMANCE_URL` when running against a different network address.
181181
The wrapper runs strict by default; set `SAMPLE_APP_CONFORMANCE_ALLOW_SKIPS=1`
182182
for local exploratory runs that should return zero while naming skipped surfaces.
183-
`scripts/compose-smoke.sh` is the bounded deterministic preflight: it runs the
184-
deterministic samples and exits after printing the blocked step, container
185-
status, and recent app/worker logs on failure. Set `SAMPLE_APP_SMOKE_ONLY=1`
186-
when a caller wants to make that intent explicit. To chain the broader public
187-
sample-app surface after the deterministic preflight, set
188-
`SAMPLE_APP_CONFORMANCE_AFTER_SMOKE=1`; otherwise run
189-
`scripts/compose-conformance.sh --strict` directly.
183+
`scripts/compose-smoke.sh` starts with the bounded deterministic preflight: it
184+
runs the deterministic samples and exits after printing the blocked step,
185+
container status, and recent app/worker logs on failure. By default, a passing
186+
preflight continues into the broader public sample-app conformance surface so a
187+
release/conformance caller does not accidentally record deterministic smoke as
188+
full coverage. Set `SAMPLE_APP_SMOKE_ONLY=1` when a caller intentionally wants
189+
only the deterministic path. Set `SAMPLE_APP_CONFORMANCE_AFTER_SMOKE=0` to
190+
disable the chained full surface for exploratory local runs, or run
191+
`scripts/compose-conformance.sh --strict` directly when the deterministic
192+
preflight is not needed.
190193

191194
Tear the stack down with `docker compose down -v --remove-orphans` when
192195
finished. The deterministic Docker path is exercised on every push through the

scripts/compose-smoke.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ run_sample "elapsed workflow" "app:elapsed" "Elapsed Time: [0-9]+ seconds"
131131
run_sample "microservice workflow" "app:microservice" "workflow_activity_other"
132132
run_sample "webhook workflow" "app:webhook" "Hello world"
133133

134-
if [[ "${SAMPLE_APP_CONFORMANCE_AFTER_SMOKE:-0}" == "1" && "${SAMPLE_APP_SMOKE_ONLY:-0}" != "1" ]]; then
134+
if [[ "${SAMPLE_APP_CONFORMANCE_AFTER_SMOKE:-1}" == "1" && "${SAMPLE_APP_SMOKE_ONLY:-0}" != "1" ]]; then
135135
printf '\n==> full sample-app conformance surface\n'
136136
set +e
137137
timeout "${SAMPLE_APP_CONFORMANCE_AFTER_SMOKE_TIMEOUT_SECONDS:-1800}s" scripts/compose-conformance.sh

tests/Feature/SampleTeachingMaterialTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public function test_full_conformance_harness_is_public_and_names_required_surfa
102102
$this->assertStringContainsString('SAMPLE_APP_CONFORMANCE_METADATA_PATH', $readme);
103103
$this->assertStringContainsString('DW_AGENT_OPERABILITY_SAMPLE_APP_METADATA_PATH', $readme);
104104
$this->assertStringContainsString('SAMPLE_APP_SMOKE_ONLY=1', $readme);
105-
$this->assertStringContainsString('SAMPLE_APP_CONFORMANCE_AFTER_SMOKE=1', $readme);
105+
$this->assertStringContainsString('SAMPLE_APP_CONFORMANCE_AFTER_SMOKE=0', $readme);
106+
$this->assertStringContainsString('does not accidentally record deterministic smoke as', $readme);
106107
$this->assertStringContainsString('DURABLE_WORKFLOW_ARTIFACT_SOURCE=pinned', $readme);
107108
$this->assertStringContainsString('DURABLE_WORKFLOW_ARTIFACT_TUPLE_FILE=/path/to/tuple.json', $readme);
108109
$this->assertStringContainsString('API documentation check', $readme);

tests/Unit/ComposeScriptContractTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public function test_smoke_restarts_worker_after_schema_refresh_before_samples()
1919
$this->assertStringContainsString('compose-smoke: all deterministic sample workflows passed', $script);
2020
$this->assertStringContainsString('restart_worker_after_schema_refresh()', $script);
2121
$this->assertStringContainsString('docker compose up -d --no-deps --force-recreate --wait worker', $script);
22-
$this->assertStringContainsString('SAMPLE_APP_CONFORMANCE_AFTER_SMOKE:-0', $script);
22+
$this->assertStringContainsString('SAMPLE_APP_CONFORMANCE_AFTER_SMOKE:-1', $script);
2323
$this->assertStringContainsString(
24-
'if [[ "${SAMPLE_APP_CONFORMANCE_AFTER_SMOKE:-0}" == "1" && "${SAMPLE_APP_SMOKE_ONLY:-0}" != "1" ]]; then',
24+
'if [[ "${SAMPLE_APP_CONFORMANCE_AFTER_SMOKE:-1}" == "1" && "${SAMPLE_APP_SMOKE_ONLY:-0}" != "1" ]]; then',
2525
$script,
2626
);
2727
$this->assertStringContainsString('SAMPLE_APP_CONFORMANCE_AFTER_SMOKE_TIMEOUT_SECONDS:-1800', $script);

0 commit comments

Comments
 (0)