@ihyeon/error-to-test 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +3 -1
- package/README.md +4 -2
- package/dist/cli.js +46 -8
- package/docs/releases.md +4 -0
- package/package.json +1 -1
- package/skills/error-to-test/SKILL.md +1 -1
- package/skills/error-to-test/references/workflow.md +4 -4
package/README.ko.md
CHANGED
|
@@ -325,6 +325,8 @@ error-to-test results ./analysis --fail-on failed --fail-on error --fail-on not-
|
|
|
325
325
|
|
|
326
326
|
전체 보고서를 출력하거나 저장한 뒤 0 또는 2를 반환하고 숫자로 된 판정 요약은 stderr에 씁니다. JSON stdout은 기존 `error-to-test/run-summary-1` 형식이며 판정 필드를 추가하지 않습니다. 출력 오류는 판정 요약 없이 코드 1로 처리하고 기존 파일은 보존합니다.
|
|
327
327
|
|
|
328
|
+
전체 통과를 요구할 때는 `error-to-test results ./analysis --require-pass`를 사용합니다. 선택한 대상의 최신 실행 자체가 통과했고, 내보낸 TC가 하나 이상이며 그 실행에서 모두 통과해야 종료 코드 0입니다. 중단·부분 실행·미실행은 2입니다. 대상이 여럿이거나 대상 정보가 없는 기록이 섞여 있으면 확인하려는 `--target-fingerprint`를 지정하세요. 대상이 없는 기록만 있다면 대상 정보가 있는 보고서가 필요합니다. 잘못된 입력·옵션·출력 오류는 1입니다.
|
|
329
|
+
|
|
328
330
|
선택한 대상 범위의 최신 실행 하나에 있는 TC 결과만 평가하며 과거 실패나 다른 대상의 결과를 합치거나 실행 전체 상태를 별도 조건으로 삼지 않습니다. 연결 실행이 없으면 선택된 TC는 `not-run`이므로 미실행도 실패시킬 때 이 값을 지정하세요. 지정하지 않은 상태는 실패 조건이 아니지만, 선택된 TC가 없는 결과는 항상 코드 2입니다. 검토 대기와 미해결 맥락은 실행 전 `readiness`로 별도 점검하세요. 정책 통과는 검토 승인·브라우저 실행 증명·원본 오류 수정 완료를 의미하지 않습니다.
|
|
329
331
|
|
|
330
332
|
`--fail-on`을 생략하면 기존 결과 조회 동작과 종료 코드를 유지합니다. `--fail-on`은 `results` 전용이고 `--target-fingerprint`는 `results`와 `trace`에서 사용합니다. 요약은 `error-to-test/run-summary-1`을 유지하면서 대상 목록·범위 필드를 추가합니다. API에서는 `readRunSummary(directory, { targetFingerprint })`가 반환한 `counts`로 정책을 적용할 수 있습니다.
|
|
@@ -333,6 +335,6 @@ error-to-test results ./analysis --fail-on failed --fail-on error --fail-on not-
|
|
|
333
335
|
|
|
334
336
|
알려진 자격증명·이메일·URL 인증/쿼리 정보는 결과에서 정제합니다. 민감정보가 포함된 실행 단계나 기대 결과는 변경해 통과시키지 않고 질문으로 남깁니다. 모든 개인정보를 제거한다고 보장하지 않으므로 실제 업무 데이터를 입력하기 전에는 별도로 정제하세요. 비공개 오류는 셸 기록에 남는 인자 대신 파일·표준 입력을 사용하세요.
|
|
335
337
|
|
|
336
|
-
검증은 `npm run check`, `npm run check:package`입니다. `npm run smoke:ecosystem`은 현재 소스의 tarball과 공개 Browser Error Log 0.2.
|
|
338
|
+
검증은 `npm run check`, `npm run check:package`입니다. `npm run smoke:ecosystem`은 현재 소스의 tarball과 공개 Browser Error Log 0.2.18·Flow QA 0.9.9를 새 환경에 설치합니다. Chromium에서 실제 JavaScript·resource 오류 수집, 검토 전 차단, 수정 전 실패·수정 후 통과, 선택 실행 재연결과 미실행 게이트, 설치된 UI·디자인 시스템 연결을 검사합니다. CI 릴리스도 이 검사를 통과해야 합니다. 결과는 `output/ecosystem/verification.json`에 기록하며 운영 서비스·실제 로그인·모델을 호출하지 않습니다.
|
|
337
339
|
|
|
338
340
|
로컬 소스 조합은 `FLOW_QA_SOURCE=/path/to/flow-qa BROWSER_ERROR_SOURCE=/path/to/browser-error-log npm run smoke:flowqa`로 별도 검사할 수 있습니다. 자세한 입력 계약과 제한은 [영문 문서](README.md)에 있습니다.
|
package/README.md
CHANGED
|
@@ -440,6 +440,8 @@ if (summary.targets.length) {
|
|
|
440
440
|
|
|
441
441
|
### Fail CI on selected case outcomes
|
|
442
442
|
|
|
443
|
+
For a release check, use `error-to-test results ./analysis --require-pass`. Exit 0 requires a nonempty set of exported cases, all passed in the latest run, and the overall run reported as passed. A partial, missing or interrupted run exits 2. With multiple target fingerprints or unscoped history, pass `--target-fingerprint` for the intended target. A history consisting only of unidentified runs needs a report with a target. Invalid options, input or output exit 1.
|
|
444
|
+
|
|
443
445
|
Use repeatable `--fail-on` with `results` to apply a policy to the latest linked run's case counts:
|
|
444
446
|
|
|
445
447
|
```sh
|
|
@@ -459,7 +461,7 @@ The full existing Markdown/JSON report is output or saved before returning `0` o
|
|
|
459
461
|
|
|
460
462
|
Only the case outcomes from the one latest linked run in the chosen scope are evaluated. Historical failures and outcomes from other targets are not combined with newer results, and the overall run status is not a separate gate condition. Without a linked run, selected cases are `not-run`: include `--fail-on not-run` if unexecuted cases should fail. A status you did not choose does not fail the gate, but an empty selection always does. Use `readiness` separately to check recorded context/review blockers before execution. Passing this policy does not approve cases, prove a browser ran, or resolve source errors.
|
|
461
463
|
|
|
462
|
-
Omitting
|
|
464
|
+
Omitting both gate options preserves the existing results behavior and exit codes. Both `--fail-on` and `--target-fingerprint` are results-only. The summary keeps `error-to-test/run-summary-1` with additive target inventory and scope fields. API callers can apply their own policy to the `counts` returned by `await readRunSummary(directory, { targetFingerprint })`.
|
|
463
465
|
|
|
464
466
|
## Data handling and checks
|
|
465
467
|
|
|
@@ -472,6 +474,6 @@ npm run smoke:ecosystem
|
|
|
472
474
|
FLOW_QA_SOURCE=/path/to/flow-qa BROWSER_ERROR_SOURCE=/path/to/browser-error-log npm run smoke:flowqa
|
|
473
475
|
```
|
|
474
476
|
|
|
475
|
-
`smoke:ecosystem` installs the current built tarball alongside published Browser Error Log 0.2.
|
|
477
|
+
`smoke:ecosystem` installs the current built tarball alongside published Browser Error Log 0.2.18 and Flow QA 0.9.9 in a fresh temporary consumer. It checks real JavaScript/resource capture, partial export preservation, the review gate, failures before fixture repair and passes after it, selected-run linkage and the not-run gate, and installed UI/design-system assets. CI requires this check before release preparation. Evidence is written to `output/ecosystem/verification.json`. Set `ERROR_TO_TEST_RELEASE_VERSION=X.Y.Z` to test that exact registry release instead of the local tarball. The script installs Chromium and only runs a controlled local fixture, without production access, login, or model calls.
|
|
476
478
|
|
|
477
479
|
The optional `smoke:flowqa` uses local Browser Error Log and Flow QA sources in a controlled Chromium demo. It additionally preserves an unresolved case and checks stale-source rejection. It requires their local source/dependencies and an installed Chromium browser.
|
package/dist/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ const help = `Error to Test — local error analysis and regression TC drafts
|
|
|
31
31
|
error-to-test refine new-directory --profile updated.json --out refined-directory [--reviewed]
|
|
32
32
|
error-to-test issue new-directory --group GROUP_ID [--out issue.md]
|
|
33
33
|
error-to-test link-run new-directory --report path/to/qa-report.json
|
|
34
|
-
error-to-test results new-directory [--format text|json] [--out summary.md] [--target-fingerprint SHA256] [--fail-on STATUS ...]
|
|
34
|
+
error-to-test results new-directory [--format text|json] [--out summary.md] [--target-fingerprint SHA256] [--require-pass | --fail-on STATUS ...]
|
|
35
35
|
error-to-test readiness new-directory [--format text|json]
|
|
36
36
|
error-to-test coverage new-directory [--format text|json]
|
|
37
37
|
error-to-test trace new-directory --event-id ID [--format text|json] [--target-fingerprint SHA256]
|
|
@@ -42,6 +42,7 @@ Options:
|
|
|
42
42
|
--error TEXT Submit a single error directly; remaining lines are its stack
|
|
43
43
|
--format auto|json|jsonl|text Analyze input format; JSONL requires explicit selection and one record per line; auto rejects malformed JSON-looking input
|
|
44
44
|
--format text|json Results summary format (default: text Markdown)
|
|
45
|
+
--require-pass Require a passed full run and all exported cases passed on one identified target (exit 2 otherwise)
|
|
45
46
|
--fail-on STATUS Results gate: failed|flaky|blocked|skipped|error|not-run (repeatable; exit 2 on a match or no selected cases, 1 on error)
|
|
46
47
|
--target-fingerprint SHA256 Scope results or trace to this target's 64-character lowercase SHA-256 fingerprint
|
|
47
48
|
--format text|json Compare format (default: text Markdown)
|
|
@@ -115,6 +116,18 @@ async function writeGateOutput(content) {
|
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
118
|
const resultsGateStatuses = ['failed', 'flaky', 'blocked', 'skipped', 'error', 'not-run'];
|
|
119
|
+
function incompleteRun(summary) {
|
|
120
|
+
if (!summary.latestRun)
|
|
121
|
+
return 'No linked run in this target scope.';
|
|
122
|
+
if (!summary.selectedTargetFingerprint && (summary.targets.length !== 1 || summary.unscopedRunCount > 0)) {
|
|
123
|
+
return 'The target is ambiguous or unidentified. Select --target-fingerprint from the results inventory or link a run with an identified target.';
|
|
124
|
+
}
|
|
125
|
+
if (summary.latestRun.status !== 'passed')
|
|
126
|
+
return `The latest run reported ${summary.latestRun.status}.`;
|
|
127
|
+
if (!summary.counts.passed || resultsGateStatuses.some(status => summary.counts[status] > 0)) {
|
|
128
|
+
return 'Every exported case must have a passing outcome in this run. See the case counts.';
|
|
129
|
+
}
|
|
130
|
+
}
|
|
118
131
|
async function inputContents(paths, command) {
|
|
119
132
|
if (paths.length < 1 || paths.length > 50)
|
|
120
133
|
throw new Error('Provide between 1 and 50 --input files.');
|
|
@@ -169,7 +182,7 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
169
182
|
help: { type: 'boolean', short: 'h' }, version: { type: 'boolean', short: 'v' }, input: { type: 'string', multiple: true }, error: { type: 'string' }, report: { type: 'string' },
|
|
170
183
|
format: { type: 'string' }, profile: { type: 'string' }, baseline: { type: 'string' }, project: { type: 'string' }, environment: { type: 'string' },
|
|
171
184
|
release: { type: 'string' }, page: { type: 'string' }, type: { type: 'string' }, runtime: { type: 'string' }, from: { type: 'string' }, to: { type: 'string' },
|
|
172
|
-
top: { type: 'string' }, 'min-count': { type: 'string' }, 'max-new': { type: 'string' }, group: { type: 'string', multiple: true }, 'fail-on': { type: 'string', multiple: true }, 'target-fingerprint': { type: 'string' }, 'event-id': { type: 'string' }, out: { type: 'string' }, reviewed: { type: 'boolean' },
|
|
185
|
+
top: { type: 'string' }, 'min-count': { type: 'string' }, 'max-new': { type: 'string' }, group: { type: 'string', multiple: true }, 'fail-on': { type: 'string', multiple: true }, 'require-pass': { type: 'boolean' }, 'target-fingerprint': { type: 'string' }, 'event-id': { type: 'string' }, out: { type: 'string' }, reviewed: { type: 'boolean' },
|
|
173
186
|
reproduce: { type: 'string', multiple: true }, precondition: { type: 'string', multiple: true },
|
|
174
187
|
expected: { type: 'string' }, 'expected-source': { type: 'string' },
|
|
175
188
|
} });
|
|
@@ -270,12 +283,22 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
270
283
|
throw new Error('link-run requires a bundle directory and --report.');
|
|
271
284
|
if (Object.keys(values).some(key => key !== 'report' && key !== 'help'))
|
|
272
285
|
throw new Error('Unsupported option for link-run.');
|
|
286
|
+
let reportText;
|
|
287
|
+
try {
|
|
288
|
+
reportText = await readBoundedFile(resolve(values.report), 2 * 1024 * 1024);
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
if (error.code === 'ENOENT') {
|
|
292
|
+
throw new Error('Flow QA report file not found. Use the qa-report.json path printed by flow-qa run.');
|
|
293
|
+
}
|
|
294
|
+
throw new Error('The Flow QA report must be a readable UTF-8 file within 2 MiB.');
|
|
295
|
+
}
|
|
273
296
|
let report;
|
|
274
297
|
try {
|
|
275
|
-
report = JSON.parse(
|
|
298
|
+
report = JSON.parse(reportText);
|
|
276
299
|
}
|
|
277
300
|
catch {
|
|
278
|
-
throw new Error('The Flow QA report
|
|
301
|
+
throw new Error('The Flow QA report contains invalid JSON. Use qa-report.json from a completed Flow QA run.');
|
|
279
302
|
}
|
|
280
303
|
const file = await linkFlowQaReport(resolve(positionals[1]), report);
|
|
281
304
|
process.stdout.write(`Run linked: ${file}\nSource issues were not automatically closed.\n`);
|
|
@@ -284,12 +307,15 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
284
307
|
if (command === 'results') {
|
|
285
308
|
if (positionals.length !== 2 || !positionals[1])
|
|
286
309
|
throw new Error('results requires one bundle directory.');
|
|
287
|
-
if (Object.keys(values).some(key => !['format', 'out', 'fail-on', 'target-fingerprint', 'help'].includes(key)))
|
|
288
|
-
throw new Error('Unsupported option for results. Use only --format text|json, --out FILE, --target-fingerprint SHA256, and --fail-on STATUS.');
|
|
310
|
+
if (Object.keys(values).some(key => !['format', 'out', 'fail-on', 'require-pass', 'target-fingerprint', 'help'].includes(key)))
|
|
311
|
+
throw new Error('Unsupported option for results. Use only --format text|json, --out FILE, --target-fingerprint SHA256, and --require-pass or --fail-on STATUS.');
|
|
289
312
|
const format = values.format ?? 'text';
|
|
290
313
|
if (format !== 'text' && format !== 'json')
|
|
291
314
|
throw new Error('results --format must be text or json.');
|
|
315
|
+
const requirePass = values['require-pass'] === true;
|
|
292
316
|
const requestedStatuses = values['fail-on'];
|
|
317
|
+
if (requirePass && requestedStatuses)
|
|
318
|
+
throw new Error('Choose --require-pass or a custom --fail-on case policy.');
|
|
293
319
|
if (requestedStatuses?.some(status => !resultsGateStatuses.includes(status))) {
|
|
294
320
|
throw new Error('results --fail-on must be failed, flaky, blocked, skipped, error, or not-run.');
|
|
295
321
|
}
|
|
@@ -300,6 +326,13 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
300
326
|
if (Buffer.byteLength(content) > 64 * 1024 * 1024)
|
|
301
327
|
throw new Error('The results summary exceeds 64 MiB. Narrow the bundle before requesting output.');
|
|
302
328
|
const finishGate = () => {
|
|
329
|
+
if (requirePass) {
|
|
330
|
+
const blocker = incompleteRun(summary);
|
|
331
|
+
process.stderr.write(blocker ? `Full-run gate failed: ${blocker}\n` : `Full-run gate passed: ${summary.counts.passed} case(s) passed.\n`);
|
|
332
|
+
if (blocker)
|
|
333
|
+
process.exitCode = 2;
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
303
336
|
if (failOn === undefined)
|
|
304
337
|
return;
|
|
305
338
|
const selectedTotal = Object.values(summary.counts).reduce((total, count) => total + count, 0);
|
|
@@ -309,11 +342,14 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
309
342
|
process.stderr.write(selectedTotal === 0
|
|
310
343
|
? 'Results gate failed: no selected cases.\n'
|
|
311
344
|
: `Results gate ${failed ? 'failed' : 'passed'}: ${matchTotal} cases match --fail-on (${detail}).\n`);
|
|
345
|
+
if (!failed && summary.latestRun && summary.latestRun.status !== 'passed') {
|
|
346
|
+
process.stderr.write(`Overall run: ${summary.latestRun.status}. --fail-on checks case counts only.\n`);
|
|
347
|
+
}
|
|
312
348
|
if (failed)
|
|
313
349
|
process.exitCode = 2;
|
|
314
350
|
};
|
|
315
351
|
if (values.out === undefined) {
|
|
316
|
-
if (failOn === undefined)
|
|
352
|
+
if (!requirePass && failOn === undefined)
|
|
317
353
|
process.stdout.write(content);
|
|
318
354
|
else
|
|
319
355
|
await writeGateOutput(content);
|
|
@@ -334,7 +370,7 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
334
370
|
throw error;
|
|
335
371
|
}
|
|
336
372
|
const written = `Results summary written: ${out}\n`;
|
|
337
|
-
if (failOn === undefined)
|
|
373
|
+
if (!requirePass && failOn === undefined)
|
|
338
374
|
process.stdout.write(written);
|
|
339
375
|
else
|
|
340
376
|
await writeGateOutput(written);
|
|
@@ -495,6 +531,8 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
495
531
|
throw new Error('Use analyze, init-profile, refine, issue, verify, prepare-run, link-run, results, compare, readiness, coverage, or trace. See --help.');
|
|
496
532
|
if (values.report)
|
|
497
533
|
throw new Error('--report applies to link-run only.');
|
|
534
|
+
if (values['require-pass'])
|
|
535
|
+
throw new Error('--require-pass applies to results only.');
|
|
498
536
|
if (values['fail-on'] !== undefined)
|
|
499
537
|
throw new Error('--fail-on applies to results only.');
|
|
500
538
|
if (values['target-fingerprint'] !== undefined)
|
package/docs/releases.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Package: `@ihyeon/error-to-test` · Repository: [hyeonse-swing/error-to-test](https://github.com/hyeonse-swing/error-to-test) · Workflow: `.github/workflows/ci.yml`.
|
|
4
4
|
|
|
5
|
+
## 0.4.7 — distinguish a passed case from a completed run
|
|
6
|
+
|
|
7
|
+
`results --require-pass` checks that the latest run on the intended target completed with every exported case passing. An interrupted runner can preserve passing case results. The custom `--fail-on` case policy keeps its exit behavior and reports the overall run status when a case policy passes a non-passing run.
|
|
8
|
+
|
|
5
9
|
## 0.4.6 — reviewed Flow QA workspace
|
|
6
10
|
|
|
7
11
|
`prepare-run` verifies the analysis bundle and creates a fresh Flow QA workspace with its original flow and suite bytes. Original inputs and the profile can be checked during the same operation. A blocked or empty selection exits 2 before creating the directory. The operator chooses the target and initiates execution in Flow QA.
|
package/package.json
CHANGED
|
@@ -12,6 +12,6 @@ Use the installed `@ihyeon/error-to-test` package and the user's supplied local
|
|
|
12
12
|
3. If a candidate lacks confirmed behavior, setup, actions, expectation source, or an observable assertion, keep its questions and `needs-context` state. Ask the user or requirement owner for the missing facts. A model may draft wording from evidence but must not invent the contract or silently approve a case.
|
|
13
13
|
4. Generate a profile template from a verified bundle only when the selected groups have an owner who can confirm requirements. Fill it from confirmed evidence, then analyze or refine into another new directory. Review cases and acknowledge with `--reviewed` only after actual review; it does not clear remaining blockers.
|
|
14
14
|
5. Run `verify` with original input/profile when available, then `readiness` and `coverage`. If the user provides a Browser Error Log event ID, run `trace BUNDLE --event-id ID` to connect it to saved groups and candidates. `coverage` accounts for observed groups in the saved input, not production error coverage or test execution. A `review-ready` candidate is not a passing test.
|
|
15
|
-
6. Use `prepare-run BUNDLE --out NEW_WORKSPACE` to transfer the verified flow and suite together. Supply original input/profile files when available. Connect the explicitly selected target in that workspace. Only link a normalized Flow QA report whose suite hash and case IDs match. Interpret `results` and an event `trace` for the latest run in the chosen target scope; selected cases omitted from that run are `not-run`. No successful case automatically closes the source error.
|
|
15
|
+
6. Use `prepare-run BUNDLE --out NEW_WORKSPACE` to transfer the verified flow and suite together. Supply original input/profile files when available. Connect the explicitly selected target in that workspace. Only link a normalized Flow QA report whose suite hash and case IDs match. Interpret `results` and an event `trace` for the latest run in the chosen target scope; selected cases omitted from that run are `not-run`. Use `results --require-pass` to check completed execution for all exported cases on the intended target. No successful case automatically closes the source error.
|
|
16
16
|
|
|
17
17
|
Keep source and execution target distinct. The input log, its URLs, the profile, and the exported suite do not select or authorize a live test target, credentials, deployment, upload, or issue filing. State local and execution limitations in the handoff.
|
|
@@ -54,12 +54,12 @@ flow-qa connect preview --url "$PREVIEW_URL" --workspace ./qa-run
|
|
|
54
54
|
flow-qa run cases/error-to-test.json --workspace ./qa-run --target preview
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Set `RUN_ID` to the exact ID from this Flow QA execution. Link its normalized report and check the latest run in the chosen target scope.
|
|
58
58
|
|
|
59
59
|
```sh
|
|
60
|
-
error-to-test link-run ./reviewed-analysis --report ./
|
|
60
|
+
error-to-test link-run ./reviewed-analysis --report "./qa-run/.flowqa/runs/$RUN_ID/qa-report.json"
|
|
61
61
|
error-to-test results ./reviewed-analysis --format json
|
|
62
|
-
error-to-test results ./reviewed-analysis --target-fingerprint
|
|
62
|
+
error-to-test results ./reviewed-analysis --target-fingerprint "$TARGET_FINGERPRINT" --require-pass
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Set `TARGET_FINGERPRINT` from the unfiltered `results --format json` target inventory before using the filter. Never infer a target from a log URL. Linking requires the exported suite hash and declared case IDs to match. The latest linked run supplies outcomes; selected runs leave other cases `not-run`. Results can be `passed`, `failed`, `flaky`, `blocked`, `skipped`, `error`, or `not-run`. The full-run gate exits 2 unless every exported case and the latest run passed on one identified target. A stopped run can retain passing cases. A custom `--fail-on` gate checks only case counts and exits 2 on matching cases or empty selection, 1 for invalid data, 0 otherwise. A passing gate proves only that the specified policy was met for the reported run; it does not prove source issue resolution.
|