Skip to content

Commit 931f914

Browse files
committed
fix(ci): classify resume flags + provider-scenario resume coverage
The Integration Tests job's architecture-progress gate (test:integration:progress:check) requires every public CLI flag to be classified; --from/--plan-digest (replayFrom/replayPlanDigest) were unclassified. Classify them as device-observable workflow flags and add real provider-backed coverage to the Android lifecycle scenario: a full replay diverges on a missing selector, the report's resume object is asserted (allowed/from/planDigest), and resuming at the next index replays only the tail. Also refresh the stale replayUpdate reason ("selector-healing replay update" -> the retired no-op).
1 parent 8247d3b commit 931f914

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

‎scripts/integration-progress-model.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,10 @@ function summarizeProviderScenarioFlagCoverage(files) {
174174
['restart', 'logs clear --restart workflow'],
175175
['networkInclude', 'network dump include modes', ['include']],
176176
['noRecord', 'action recording suppression'],
177-
['replayUpdate', 'selector-healing replay update', ['update']],
177+
['replayUpdate', 'retired --update no-op replays without rewriting (ADR 0012)', ['update']],
178178
['replayEnv', 'replay/test variable injection', ['env']],
179+
['replayFrom', 'replay resume skips completed steps (ADR 0012)', ['resumeFrom']],
180+
['replayPlanDigest', 'replay resume plan-digest preflight binding', ['resumePlanDigest']],
179181
['failFast', 'test suite stops after first failure'],
180182
['timeoutMs', 'wait/test timeout flags'],
181183
['retries', 'test suite retry budget flows through request path'],

‎test/integration/provider-scenarios/android-lifecycle.test.ts‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,36 @@ async function runAndroidCaptureInteractionAndReplayWorkflow(
11441144
});
11451145
assert.equal(replayEnv.replayed, 3);
11461146

1147+
// ADR 0012 step 5: replay resume. A full run diverges at step 2 (a
1148+
// selector matching nothing); the report's resume object carries the plan
1149+
// digest. Resuming at the next index after the failed step (the documented
1150+
// "completed the failed action manually" loop) skips steps 1-2 without
1151+
// executing them and replays only the tail.
1152+
const resumePath = path.join(tempRoot, 'settings-resume.ad');
1153+
fs.writeFileSync(
1154+
resumePath,
1155+
['snapshot -i', 'press label="NoSuchControl"', 'get text @e3 Search', ''].join('\n'),
1156+
);
1157+
const divergenceError = await client.replay.run({ path: resumePath, ...selection }).then(
1158+
() => null,
1159+
(error: unknown) => error as { code?: string; details?: Record<string, unknown> },
1160+
);
1161+
assert.ok(divergenceError, 'expected the replay to diverge on the missing selector');
1162+
assert.equal(divergenceError.code, 'REPLAY_DIVERGENCE');
1163+
const divergenceReport = divergenceError.details?.divergence as {
1164+
resume: { allowed: boolean; from: number; planDigest: string };
1165+
};
1166+
assert.equal(divergenceReport.resume.allowed, true);
1167+
assert.equal(divergenceReport.resume.from, 2);
1168+
assert.match(divergenceReport.resume.planDigest, /^[0-9a-f]{64}$/);
1169+
const resumedReplay = await client.replay.run({
1170+
path: resumePath,
1171+
resumeFrom: divergenceReport.resume.from + 1,
1172+
resumePlanDigest: divergenceReport.resume.planDigest,
1173+
...selection,
1174+
});
1175+
assert.equal(resumedReplay.replayed, 1);
1176+
11471177
const screenshot = await client.capture.screenshot({
11481178
path: screenshotPath,
11491179
...selection,

0 commit comments

Comments
 (0)