Repository navigation
feat(e2e): support test.todo - #1858
bferanmi806-sketch wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 35 files
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Thanks for picking this up from #1855. Reviewed at ff34b2b. It works end to end. I checked it with the built CLI on a nested todo, a todo-only file (exit 0), test.only, a serial describe, tags, --shard, and --retries/--repeat-each, and the JSON, JUnit, Markdown, and HTML output all look right. pnpm check, oxlint, typecheck, the e2e unit suite, and the html-reporter and github tests pass. I approved fork CI.
Must-fix
packages/github/src/merge.ts:71,87:summarize()puts any status other than passed, flaky, interrupted, or failed intoskipped. The...basespread then keeps the rerun's staletodocount and hides the missing field from TypeScript. To reproduce: a first run has 1 todo and 1 failed test, and the--last-failedrerun leaves the todo out. The folded summary is{"skipped":1,"todo":0}, but the markdown header says "1 todo". Counttodo, and drop the spread so the compiler forces every field (or reuse the runner'scomputeSummary). Add a@e2e-dev/githubpatch changeset.- The changeset doesn't list
@e2e-dev/html-reporter, butpackages/html-reporter/app/*changed. WithonlyUpdatePeerDependentsWhenOutOfRange, the reporter won't be republished. The published one has notodoinTONE_ICON, so a report that contains a todo likely breaks it. Add'@e2e-dev/html-reporter': patch. - Reporter changes are untested. With any of these removed, all 3822 unit tests and the todo integration test still pass: JUnit
case 'todo'(junit.ts:149), the markdown "not implemented" note (markdown.ts:449), and thefileOutcometodo return (format.ts:351).list.ts:902,973has no test either. Add golden cases toreport-markdown.test.ts,report-list.test.ts, and the JUnit tests.
Should-fix
registry.ts:645: a body passed totest.todois silently dropped. From JS,test.todo('x', async () => { throw ... })runs as todo and exits 0. Throw aCollectionErrorwhen a second argument is given.registry.ts:651: the placeholder body throwsCollectionError('must never be scheduled')only to satisfyregisterTest. That's the wrong error class for an internal invariant. LetregisterTesttake no body for todo, or pass a no-op.build.ts:396:ReportSummary.todois required in the type but optional in the schema. Make it optional in the type, with an "absent in older reports" note.telemetry/events.ts:460has notests_todo, so thetests_*counts no longer add up toselected. Updatedocs/telemetry.mdx:145to match.markdown.tstestRownow nestsskipped ? : todo ? :, andlist.ts:902adds another ternary level. Pull the per-status symbol and note into one helper.
Nits
format.ts:351:skipped + todo === totalsays it directly. The currentpassed + failed + interrupted + flaky === 0breaks silently if a bucket is added.list.tshardcodes'○'; the file usesF_*glyph constants.- The Markdown row for a todo-only file shows
0ms; the list reporter hides it. html-reporter/app/data.ts:128sorts todo ahead of passed, against its own comment.- In
running.md, the "(todo)" sentence belongs with the text-output description, not after the JSON one.
For the maintainer
- The PR adds
todoas a test mode, a selection disposition, and a result status. Shard, CLI list, and units each get askip || todobranch. The alternative: keep todo asdisposition: 'skip'with atodocause until the result is built, so onlynonRunResultand the reporters know about it. - A new
ResultStatusvalue changesreport-1and thetest-finishedevent without aschemaVersionbump. Is that OK as non-breaking? list()now returnsdisposition: 'todo'. Is that meant to be public?
|
Thanks for the detailed review. I pushed
I left the HTML sort unchanged: its comment says TODO precedes passed, and the rank table matches that order. Verification: |
There was a problem hiding this comment.
All reported issues were addressed across 20 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked c3ad2ae. All three asks are done: merge.ts counts todo (test fails without it), html-reporter and github are in the changeset, and the reporter branches have tests (14 of 16 mutants killed). The HTML sort pushback is fine. Fork CI approved. One regression from this commit keeps the change request.
Must-fix
-
packages/e2e/src/report/list.ts:972: failed and timed-out titles are no longer red. Main hadpc.red(${F_CROSS} ${title}); now only the×is red. Withcolors: truethe output is\u001b[31m×\u001b[39m <badge> tests/a.e2e.ts > t > boom. Every test usescolors: false, so nothing caught it. Use${statusSymbol(...)} ${pc.red(title)}(cubic's suggestion) and add one colored assertion.
Should-fix
statusPresentationinformat.tsmoves branching around more than it removes it:bucketduplicatesstatusBucketright above it,terminalNotecovers only flaky/interrupted/todo while failed and skipped still build notes inline,markdownNoteexists only for todo,toneis a string a second switch maps back to colors, andstatusSymbol(pc, s, true)takes a bare boolean. Either shrink it to glyph maps (one for test rows, one for file rows) and keep notes inline, or make it own every note so call sites stop branching.markdown.tsfileRowhides the time only forfileOutcome(...) === 'todo'and callstally(results)twice. A file of only skipped tests still shows0ms. Key it on "no entry made an attempt" and tally once.html-reporter/app/ui.test.tsxis the first test underapp/, which is why the vitest include changed. Package convention istests/unit/(likedata.test.ts). Move it there and assert the icon name (droppingTONE_ICON.todopasses today, as does dropping thelist.tsxlegend entry).- Nit:
merge.ts:71ReportSummary & { todo: number }isRequired<ReportSummary>.
Maintainer questions still open: todo as a skip disposition with a todo cause vs a new status, whether a new ResultStatus value without a schemaVersion bump is non-breaking, and list() returning disposition: 'todo'.
c3ad2ae to
8af4f4c
Compare
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked at 8af4f4c (rebased on 4bff6fc, merges clean into main fabb0c0). The list.ts regression is fixed: failed and timed-out titles are red again, and the new colored test fails when pc.red(title) is removed. The four should-fix items from the last round are done too: statusPresentation is gone and replaced by two glyph maps with one exhaustive color switch, notes are back inline, the Markdown file row hides the time when no entry made an attempt and tallies once, the HTML UI test lives in tests/unit/ and asserts the icon and the legend entry, and merge.ts uses Required<ReportSummary>.
Must fix
- None.
Should fix
- None.
Nits
markdown.tstestRowhides the duration onskipped || todo, butfileRownow keys on "an attempt ran". Keying both onresult.attempts.length === 0keeps them from drifting apart.- Only the red color is asserted. Changing
interruptedfrom yellow to red, or dropping the tododim, incoloredStatusSymbolstill passes every test. Oneit.eachover statuses withcolors: truewould pin the switch.
Verified
- e2e unit suite: 3863 passed, 1 skipped (one run had a single failure that did not reproduce in 3 reruns, a load flake). Also passed: html-reporter (13), github (42), and the
todo.test.tsintegration test (2). - Typecheck passes for core, e2e, github, and html-reporter. Also clean: oxlint,
check-docs-translations(ja and zhtest.mdxmirror the new section and code block),check-docs-examples,check-docs-anchors,check-changeset-bumps, andsync-plugin --check. - Mutants on the new commits: 6 of 8 killed. Killed: red title, Markdown file-row time, file todo glyph, test todo glyph, HTML todo icon, HTML legend entry. Survived: the interrupted and todo colors.
- Fork CI is waiting for approval (
action_requiredon docs, spec, docs translations, benchmark, mobile).checkis green.
This also overlaps #1887 (test.fixme). Merging the two only conflicts in tests/types/sdk-types.ts and tests/unit/registry.test.ts, and the fix is to keep both sides.
Waiting on a maintainer decision: todo as a new result status (this PR) vs a skip with a reason (as #1887 does fixme), and whether adding todo to report-1 without a schema bump is fine. Labeling for human review.
Earlier asks done, see latest automated review.
kdy1
left a comment
There was a problem hiding this comment.
Note
This text was drafted with AI and posted after human approval.
- Harness: T3 Code
- AI agents: Claude Opus 5.5 (claude-opus-5-5), GPT-6 Astra (gpt-6-astra) via Codex, GPT-6.1 Sol (gpt-6.1-sol) via Codex, Claude Sonnet 5.5 (claude-sonnet-5-5)
Thanks for adding test.todo. The basic cases work: a todo-only file exits 0, a todo has no attempts, JUnit writes <skipped message="todo: not implemented"/>, and test.todo('x', fn) fails collection. I ran the built CLI at head 8af4f4c with a fake engine. I found two problems that I think must be fixed before merge, and some smaller ones.
Must fix
1. A todo in a serial group runs and is reported as passed when a filter selects a sibling
packages/e2e/src/collect/select.ts:753-754
applySerialClosure changes every filtered member of a selected serial unit to run. It does not check for a todo. The todo's empty body then runs.
describe('flow', { serial: true }, () => {
test('ready', async () => {});
test.todo('future');
});| Command | future |
Summary |
|---|---|---|
e2e run |
todo | passed: 1, todo: 1 |
e2e run --grep ready |
passed | executed: 2, passed: 2, todo: 0 |
e2e run s.e2e.ts:3 |
passed | executed: 2, passed: 2, todo: 0 |
The same occurs with --grep-invert, tags, and --last-failed after a sibling fails. If an earlier member fails, the todo is reported as skipped. A rerun of a failed serial flow with --last-failed is a common path, so the placeholder is counted as a passed test.
This change fixes it, and the e2e unit tests and todo.test.ts pass with it:
- return { ...pair, disposition: 'run' as const, skip: undefined };
+ return { ...pair, disposition: pair.test.mode === 'todo' ? ('todo' as const) : ('run' as const), skip: undefined };Another option is to reject test.todo in a serial group. Please add a test for serial + --grep and serial + file:line either way.
2. The Markdown file row loses its time for a file that has only serial tests
packages/e2e/src/report/markdown.ts:461
ranAnAttempt reads result.attempts. A serial member keeps its attempts on the group, so result.attempts is empty and the time cell is blank. For the same serial-only file, main shows 83ms and this branch shows an empty cell. Use entry.final.attempts.length > 0.
Should fix
3. A todo under --last-failed clears a beforeAll failure
packages/e2e/src/run/last-run.ts:167
passedAgain accepts any selected result in the hook's scope that is not skipped. A todo matches, but it does not run the hook.
describe('d', () => {
beforeAll(async () => { throw new Error('hook broke'); });
test('a', async () => {});
test.todo('t');
});Run 1 exits 1. Run 2, e2e run --last-failed --grep 't$', exits 0 with carried.errors: [], but the hook is still broken. Test a is selected again in run 3, so the effect is limited to the report and the GitHub comment of run 2. Add && result.status !== 'todo' (or require result.attempts.length > 0). last-run.test.ts passes with that change.
4. A todo-only project fails on an empty shard
packages/e2e/src/collect/select.ts:807
With only todos, --shard 1/2 exits 0 and --shard 2/2 exits 2 with NO_TESTS, which calls the todos "unselected". This does not agree with the new docs, which say a todo-only run does not fail. Also, a todo that this line moves to another shard is reported with the reason not selected, not outside the shard.
5. An earlier @e2e-dev/html-reporter crashes on a report with a todo
The published reporter has no todo entry in TONE_ICON and TONE_TEXT, so it throws Element type is invalid and does not write the page. Its peer range is e2e >=0.23.1 <1, so a user who updates only e2e gets this crash. The same applies to other consumers of the ResultStatus union and the report-1 status enum. A fallback for unknown statuses in the reporter would also prevent this for the next status.
Small items
docs/reference/cli.mdx:794, and thejaandzhpages: the sentence that says the counts add up toselecteddoes not includetodo.docs/reference/test.mdx,#### test.todo: there is no Errors table, as the other entries have. The example usestest.describe, but the rest of the page importsdescribe.packages/html-reporter/app/styles.css:99:--color-status-todohas the same value as skipped, so the run bar does not show todo and skipped as different segments.- The
## Verifiedsection in the PR body refers toc701e19andff34b2b, not the head commit.
Questions for @okwasniewski
- Must
todobe a new status, or a skip reason astest.fixmeis in #1887? - Is a
patchchangeset correct for a new value in theResultStatusunion and the report-1statusenum (see item 5)? - Is it intentional that a todo-only run exits 0 but a skip-only run exits 2 (
NO_TESTS)?
8af4f4c to
af378a6
Compare
|
Implemented the follow-up review fixes: serial closure preserves TODO status; TODO-only empty shards succeed and out-of-shard TODOs show the correct reason; Regression coverage, localized docs, and the TODO summary/reporting docs are updated. Focused tests, builds, typechecks, docs checks, and the reporter’s desktop/mobile light/dark review passed. The full monorepo suite was not run on this update. The report-1 schema-version question remains open. |
|
@okwasniewski, the follow-up fixes are pushed at |
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked at af378a6 (base 9d240ac, merges clean). kdy1's asks are mostly done. The serial closure keeps a todo as todo. --last-failed needs a real attempt before it clears a hook failure. The Markdown file row reads final.attempts. Todos moved off a shard now say outside the shard. cli.mdx counts todo in the sum, and the HTML todo tone is distinct with an unknown-status fallback. The new select, last-run, markdown, and dot tests fail when their fix is reverted.
Must fix
packages/e2e/src/collect/select.ts:375-379(todoOnlyShard): this special-cases one shape instead of fixing a rule, and it contradicts the--sharddocs ("A shard with no test isNO_TESTSunless--pass-with-no-tests"). Add onetest.skipto the todo-only file and--shard 2/2exits 2 withNO_TESTSagain, while the same file without--shardexits 0. One real test plus todos on--shard 2/2is alsoNO_TESTS. Drop the predicate and keep the documented rule: a shard that runs nothing isNO_TESTS, and--pass-with-no-testscovers it. Keep theoutside the shardreason fix. If todo-only shards really must pass, put that in the rule that decidesNO_TESTSfor every non-running disposition, not in a predicate that needs every test in the project to be a todo, and document it in the--shardrow.
Should fix
docs/reference/test.mdx#### test.todoand the ja/zh mirrors: the Throws table saysINVALID_ARGUMENT, butregistry.ts:755throwsCollectionError, which isCOLLECTION_ERROR.--shardrow indocs/reference/cli.mdx:639: "Skipped tests are not cut" now also applies to todos. Say so in one sentence.- kdy1's item 5 is only half fixed. The
resultTonefallback protects future reporters, but a published@e2e-dev/html-reporter(peere2e >=0.23.1 <1) still crashes on a report that contains a todo. This can't be fixed on the reporter side. It depends on the status-model decision below.
Verified
- Built core, e2e, web, github, and html-reporter. e2e unit: 4131 passed, 2 skipped.
todo.test.ts: 6 passed. html-reporter: 25 passed. github: 42 passed. Typecheck (e2e, html-reporter), oxlint on changed files,check-changeset-bumps, andsync-plugin --checkare clean. - Mutants on af378a6: 6 of 6 killed. Killed: the serial closure, the todo-only shard predicate, the shard reason,
last-runattempts, the Markdownfinal.attempts, and the dot glyph. The select mutants were run against a rebuilt dist. - Shard probes against the built runner: todo-only
--shard 2/2exits 0. todo +test.skipon--shard 2/2exits 2 (NO_TESTS), but exits 0 without--shard. One test + one todo on--shard 2/2exits 2 (NO_TESTS). skip-only exits 2 on both shards. - CI at af378a6: build, check, docs, install, and bun are green.
test(22/24/26), android, and ios are still running, so this isn't all green yet.
Still waiting on the maintainer decision about a new todo status vs a skip reason. See kdy1's questions.
There was a problem hiding this comment.
0 issues found across 9 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
View guided diff | Re-trigger cubic
|
@okwasniewski, thanks for the review. I removed The focused shard unit test and all 6 TODO integration tests pass; the docs check passes. The three positional file:line tests fail on this Windows setup on both Could you confirm whether |
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked 271a281 (main 402a615, merges clean). Everything from my last review is done:
todoOnlyShardis gone.select()uses one rule again: a run that selects no runnable or todo test isNO_TESTSunless--pass-with-no-tests. An unsharded todo-only run exits 0, and an empty shard exits 2. Every one of the shapes I listed now behaves the same way: todo only, todo +test.skip, and test + todo on--shard 2/2.- The
outside the shardreason is kept. - The
test.todoThrows table saysCOLLECTION_ERRORin en/ja/zh. - The
--shardrow says that skipped and TODO tests are not cut.
The new commit has no regressions.
This now matches Vitest. On Vitest 5.1.0, a todo-only file exits 0 and an empty --shard 2/2 exits 1 unless --passWithNoTests. Playwright has no test.todo, and it counts tests before sharding (testCountBeforeSharding in runner/tasks.ts), so an empty shard passes there. e2e's documented --shard rule follows Vitest, and the PR keeps that rule.
Still open (waits on the status decision, not on the author)
- kdy1's item 5: a published
@e2e-dev/html-reporter(peere2e >=0.23.1 <1) still crashes on a report that has atodostatus. The reporter cannot fix this. It goes away if todo becomes a skip reason, or needs a peer floor bump iftodostays a status. - A skip-only run is still
NO_TESTS, but a todo-only run passes. Vitest passes both. This is kdy1's third question and comes from main's rule, not from this PR.
Verified
- Built core, e2e, and web.
select.test.ts+last-run.test.ts: 77 passed.todo.test.ts: 6 passed. e2e typecheck, oxlint on the changed files, andcheck-changeset-bumpsare clean. - Mutants, run against a rebuilt dist: 2 of 2 killed.
- Any todo in the project suppresses
NO_TESTS: 3 tests fail. - Todos stop counting as selected: 4 tests fail.
- Any todo in the project suppresses
- Vitest probes in a scratch project: todo-only exits 0, skip-only exits 0,
--shard 2/2on one file exits 1. - CI at 271a281: check and cubic are green. docs, docs translations, spec, mobile, and benchmark show
action_requiredbecause the fork workflows still need approval.
Asks done, see latest automated re-check.
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked 40c845b (merge of main 1b007d4 into 271a281), against main e88153b. The merge commit resolves its conflicts correctly: the docs tables keep test.todo next to test.each/test.for, and mcp-run-tests.test.ts stays deleted as on main. Nothing in it regresses the earlier fixes. The PR now conflicts with #1887 (test.fixme), which landed after this merge.
Must fix
- Rebase onto main.
packages/e2e/src/collect/registry.ts,tests/types/sdk-types.tsandtests/unit/registry.test.tsconflict with #1887. Each side adds aTestModevalue and aTestAPImethod in the same places. Do this together with the item below, because #1887 changes how todo should be shaped.
Should fix (waits on a maintainer call, see below)
- Report todo the way #1887 reports fixme:
status: 'skipped'withskip.cause: 'todo', not a newtodoresult status. Main now has the extension point for this. Add'todo'toSELF_SKIP_CAUSESinpackages/core/src/run/records.ts, then givetest.todoaTestMode'todo'thatclassifyPairturns intodisposition: 'skip'with{ cause: 'todo', reason: 'todo' }, as it does forfixme. Route it throughregistrar('test.todo()', ...)so a serial group rejects it with an API-named error, as it rejectstest.skip/test.fixme/skipIf/runIf. This change:- removes the new
ResultStatus/ExecutedResultStatus, the report-1statusenum value, theattempts maxItems 0schema branch,summary.todo, thetododisposition inselect.ts/runner.ts/units.ts, and most of the list/markdown/junit/github/html-reporter edits. The PR shrinks a lot, and shard, serial-closure and--last-failedhandling reuse the pathsskipalready has. - fixes kdy1's item 5: a published
@e2e-dev/html-reporter(peere2e >=0.23.1 <1) crashes on atodostatus but shows an unknown skip cause like any other skip. - matches Vitest's reporter API. There
test.todoisstate: 'skipped'withoptions.mode: 'todo'(TestResultSkippedin vitest 5.1.0), and only the CLI summary prints "N todo". If we want that summary line, the list reporter can count skips whose cause istodo. That needs no new status. - Playwright has no
test.todo. Its closest API,test.fixme, is a skip with an annotation, and #1887 already follows that.
- removes the new
- Whether a todo-only run passes. A fixme-only run is
NO_TESTSon main ("marked fixme"), and so is a skip-only run. As a skip cause, todo-only would also beNO_TESTS("marked todo") unless--pass-with-no-testsis given, and thetodoexception inselect()and in the exit-code text (was marked todo) would go. Vitest passes all three, so if parity is the goal it is the shared rule that changes, not one exception for todo.
Verified
- Built core, e2e and web at 40c845b.
select,last-run,registry,report-list,report-markdownandintegration/todo: 293 passed. e2etsc --noEmitis clean. git merge-treeagainst main e88153b conflicts only in the three files above.- CI at 40c845b: check, cubic, pr-size and pr-policy are green. mobile, docs, docs translations, spec and benchmark are
action_requiredbecause the fork workflows still need approval.
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Posted by mistake by the automated triage script (empty review). Please ignore it; the earlier review still stands.
|
The Nov 20 review says this branch now conflicts with #1887 and recommends representing |
|
[claude-opus-5-5] automated review on behalf of @okwasniewski @bferanmi806-sketch yes, switch to the skip-cause model. #1887 set the precedent for
Then rebase on main and resolve the conflicts with that model. We'll re-review after the push. |
40c845b to
cfafc2f
Compare
|
Rebased onto current I added coverage for TODO-only Please re-review this update when convenient. |
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked cfafc2f (one commit on main 2f07acd, merges clean into main 5db0f41). The switch to the #1887 model is done: test.todo(title) registers through registrar('test.todo()', 'todo'), classifyPair gives it disposition: 'skip' with { cause: 'todo', reason: 'todo' }, 'todo' is in SELF_SKIP_CAUSES, and the report-1 schema only gains the enum value. The new result status, summary.todo, the todo disposition, the reporter/html-reporter/github edits and todoOnlyShard are all gone, so every earlier ask (mine and kdy1's) is either done or no longer applies: a todo in a serial group is a COLLECTION_ERROR, --last-failed leaves it out and cannot clear a hook failure with it (no attempt, cause not undelivered), reporters print the reason like any other skip, and an older @e2e-dev/html-reporter renders it as a plain skip.
Must fix
- None.
Should fix
.changeset/test-todo.md: #1887 shipped the newfixmecause as aminorwhose summary opens with**Breaking:**and tells users to update pinned copies ofschema/report-v1.schema.jsonand exhaustive skip-cause checks (.changeset/test-fixme.mdon 198d25f).todois the same kind of change, so the changeset should say the same, otherwise a consumer with a pinned schema finds out from a validation error. (Maintainer call on patch vs breaking minor, see below.)packages/e2e/src/collect/registry.ts:779-791:tododeepens two nested ternaries that both switch on the sameskipargument (3 levels each now). One lookup keyed by the registration kind keeps it flat, e.g.const registered = skip === 'fixme' ? { mode: 'fixme', reason: fixmeReason() } : skip === 'todo' ? { mode: 'todo', reason: 'todo' } : undefined, then buildoptionsandmodefrom it once. Same inselect.ts:727:cause: test.mode === 'fixme' || test.mode === 'todo' ? test.mode : 'explicit'.
Nits
docs/reference/test.mdx#### test.todo:test.fixmehas a Throws table; the todo section states the serial-groupCOLLECTION_ERRORin prose. A two-row table (serial group, body passed) would match the page.- The serial-group error for
test.todo()ends with "set skip on the serial describe instead", which reads oddly for a placeholder. Fine to keep if you prefer one message for every registered skip.
Verified
- Built core, web and e2e.
registry,select,schema-fixtures,last-run,runtime-skipunit tests andintegration/test-todo.test.ts: 187 passed. e2e and coretsc --noEmit, oxlint on changed files,check:changeset-bumps,check:peer-ranges,plugins:check,docs:check,docs:check-errorsare clean. - Mutants against the unit tests, 6 of 6 killed: todo cause ->
explicitinclassifyPair, dropping themarked todoNO_TESTS case, dropping the body guard, todo reason ->true, todo mode ->skip,todoremoved from the schema enum. - Probe:
test.todoinside a taggeddescribekeeps the group's tags and title path, reportsskippedwith no attempts, and its source position matches whattest.fixmegets in the same file. - CI at cfafc2f: check, pr-policy, pr-size green. docs, docs translations, mobile, spec and benchmark are
action_required(fork workflows need approval), which is why mergeable_state isunstable. cubic did not run (incremental review failed to start), not a finding.
michal-e2e
left a comment
There was a problem hiding this comment.
Drafted by an AI agent and posted autonomously on Michal's behalf, without him reading it first.
Reviewed at cfafc2f31 (merge base 2f07acd18).
The skip-cause design works through the CLI. Please enforce the same registration-only rule in the report contract.
Must fix
- The report schema accepts a TODO with execution records. I started with the valid fixture and ran two separate checks. The schema accepted a runtime attempt relabelled as
todoand accepted a TODO result carrying an existing valid attempt. A report consumer can then count a placeholder as executed, even though the CLI gives it zero attempts. The publicReporttype also accepts atodoattempt on the head. The same TypeScript input is rejected on the merge base. Please restricttodoto ordinary result-level skips, require zero attempts for that cause, and add negative fixture assertions for both invalid shapes. Preserve the existing runtimefixmebehavior and TODO rows outside the shard. Report schema · Attempt type
Optional
- In the TODO reference, say the selection fails by default and name
--pass-with-no-tests. The built CLI exits 0 and includes the TODO when I pass that flag. Test reference - Keep the assertion for result-level
fixmealongside the attempt-level assertion. The previous fixture test checked both fields. The revised test checks the attempt field alone. Schema fixture test
For the maintainer
- I confirmed the compatibility issue from the code owner's review. The previous report schema rejects the actual CLI output at
skip.cause. The breaking changeset forfixmecame through the follow-up to its merge. Changeset follow-up
Verified
- The built CLI fails with
COLLECTION_ERRORon the merge base, wheretest.todois absent. The head reports a selected TODO as skipped with zero attempts. A TODO-only selection exits 2 withNO_TESTSby default and exits 0 with--pass-with-no-tests. Serial registration and a body argument raiseCOLLECTION_ERROR. - The Chromium check passed through the built web engine on both revisions. At the head,
listshows the TODO as a skip with reasontodo,--last-failedexcludes it, and sharding keeps the original TODO cause when it is outside the current shard. The mobile SDK import also registered and reported a TODO through the built CLI with a test engine. The scratch schema trial accepted the real mixed and sharded reports and rejected both impossible execution shapes. pnpm check, the workspace package suites, the script tests, the testbed, and the deterministic web benchmark passed locally at the head. Eight recorded web-agent cases passed under--strict-cache. The testbed and both web benchmark reports passed the report consistency checks.- Assertions caught ten of the eleven runtime mutations. The remaining mutation removed TODO from runtime self-skip accounting and survived the targeted reporter and lifecycle tests. Registered TODOs do not reach that path. All seven TODO-specific tests failed under at least one mutation. Both type checks caught deliberate changes to the public signature.
- Packaged candidate
e2epassed a Chromium flow with the published web engine. - The Android benchmark's microphone-denial test failed with
ENGINE_FAILUREbecause the alert stayed visible after dismiss. The same test produced the same error on the merge base with the same emulator. The head benchmark and base-control reports passed the report consistency checks. - The iOS benchmark finished with 55 passes and six failures. Each failing case reproduced on the clean merge base on the same simulator, with the same error code and message. The head and base-control reports passed the report consistency checks.
Not run
- Published-runner compatibility in the reverse direction. npm has no stable
e2eversion in the candidate web engine's declared peer range. The local merge-base and head Chromium checks used each checkout's built packages. - Live model-backed benchmark scenarios. The local agent benchmark used committed recordings.
cfafc2f to
ae61c7c
Compare
|
Thanks for the review. I pushed
Core and e2e builds passed. Core, e2e, GitHub, and HTML reporter typechecks passed. Focused checks passed: 75 e2e tests, 27 GitHub fold tests, and 24 HTML reporter tests. The full GitHub package suite had one unrelated Windows path-link assertion failure (53/54 passed); I have not verified that failure against the base revision. The new GitHub checks are queued. Could you review the updated head when convenient? |
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked ae61c7c (two commits on main 5711573, merges clean). My earlier asks are done: the changeset is now a minor with **Breaking:**, worded like fixme's, and the nested ternaries in registry.ts and select.ts are flat. The test.todo docs have a Throws table and name --pass-with-no-tests. michal-e2e's must-fix is done in the schema. todo is allowed only in a result-level skip, attempt and serial skips reject it, and a todo row must be a kind: 'test' row with no serialGroupId, no expectedFailure, and zero attempts. The negative fixture tests catch each of those. His optional result-level fixme assertion is back too.
Must fix
packages/e2e/src/report/build.ts:356-371: turning the publicReportResultinto a union whose todo branch hasattempts: readonly []breaks theReporttype for reporter authors. Code that compiles on 0.24.0 no longer does. For example,(r: Report['run']['results'][number]): typeof r => ({ ...r, attempts: r.attempts.map((a) => ({ ...a, artifacts: [] })) })now fails withType ... is not assignable to type 'readonly []'(I checked it against the builte2etypes). This PR's own consumers needed workarounds:Extract<ReportResult, ...>/Exclude<..., { cause: 'todo' }>intests/helpers/report.ts,report-ctrf,report-markdown,report-failure-text,packages/github/tests/unit/fixtures.ts,fold.test.ts, and anas AttemptReportResultcast in the html-reporter test. michal's ask covered the schema and the attempt type, and both are already handled:ReportAttempt.skipisAttemptSkipInfo, and the schema enforces zero attempts on a todo row. Please makeReportResultan interface again, withskip?: SkipInfo. KeepAttemptSkipInfoon attempts, serial members, and groups. Then drop the todo branch inserializeResult, including its plainthrow new Error('invalid TODO result record'), which nothing can reach (removing it leaves all 4,855 unit and integration tests passing). Drop the test-helperExtracttypes as well.
Should fix
packages/e2e/src/run/units.ts:213-216: theskip.cause !== 'todo'check inisAttemptSkipInfocan never fire, because an interrupt'ssignal.reasonis always a runner skip. Removing it fails no test. Keep the oldisSkipInfobody and narrow only its return type.packages/e2e/schema/report-v1.schema.jsonresultSkip: no test covers thecause: todo->reason: 'todo'rule, and deleting it fails nothing. Add one negative assertion toaccepts a selected todo result without attempts(for exampletodo.skip.reason = 'later'-> invalid).
Verified
- Built core, e2e and web.
schema-fixtures,report-fold,registry,select,last-run,report-markdown,report-ctrf,report-failure-textandintegration/test-todo.test.ts: 305 passed. - Mutants: 4 of 7 killed. Dropping the
fold.tstodo guard, removingmaxItems: 0, addingtodoto the attempt skip enum, and removing thekind: testrule each fail a test. These survive: thereason: todorule, thebuild.tsthrow, and theunits.tstodo check (see above). - The
fold.tsguard is needed. Without it,--last-failedon a test that failed and was then changed totest.todofolds the old attempts into a todo row, and the new schema rejects that row. - CI at ae61c7c: check, pr-policy and pr-size passed. spec, mobile, docs, docs translations, benchmark and microbench are
action_required(fork workflows waiting for approval), so mergeable_state isunstable. cubic did not run on this head ("incremental review could not start"). Its earlier comments from Nov 16-17 were about the removedtododisposition and status and no longer apply.
Note: #2218 (KrzysztofMoch) takes over this PR with your first commit plus the breaking changeset. Which of the two lands is a maintainer decision.
There was a problem hiding this comment.
All reported issues were addressed across 10 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
View guided diff | Re-trigger cubic
|
Thanks for the review. I pushed
Verification: e2e, GitHub, and HTML reporter typechecks passed; 188 focused e2e report/schema/TODO tests, 27 GitHub fold tests, and 8 HTML reporter tests passed. |
Superseded by the latest automated re-check.
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked 5310e44 (b7055a4 and 5310e44 on top of ae61c7c; base 5711573, merges clean with main 2dfa407). All asks from my last review are done. ReportResult is a single interface again with skip?: SkipInfo. The todo branch and the unreachable throw are gone from serializeResult, and its key order matches main. The Extract/Exclude helper types and the html-reporter cast are gone. isAttemptSkipInfo no longer checks for todo, and InterruptMessage.skip is now AttemptSkipInfo. The schema test now asserts that cause: todo with reason: 'later' is invalid. The new remappedReportResult type check in sdk-types.ts catches the reporter-transform break I reported.
Must fix
packages/html-reporter/tests/unit/reporter.test.ts:9:type ReportResult = Report['run']['results'][number];is now unused, sopnpm lintfails witheslint(no-unused-vars). It is the only oxlint error in the repo. Thespecworkflow runspnpm lint, so it goes red as soon as fork CI is approved. Delete the alias.
Should fix
- Some union-era workarounds are still there. Now that
ReportResultis an interface again, revert them to main:packages/html-reporter/tests/unit/reporter.test.ts:116-117: thefirst.skip?.cause === 'todo'throw and theconst executable = firstalias.withArtifactscan be main's version again.packages/e2e/tests/helpers/report.ts:18:ReportResultOverridesis now the same type asPartial<ReportResult>. Keep the todo defaults inreportResult, but drop the exported type and thereport-failure-text.test.tsimport of it.packages/github/tests/unit/fixtures.ts:21(!instead ofas ReportResult),packages/github/tests/unit/fold.test.ts:448andpackages/e2e/tests/unit/report-ctrf.test.ts:449. These parameters now spell out the serial-member skip type where main hadReportResult['skip']. Nothing needs that any more.
Verified
- Built core, e2e and web. Typecheck passes for core, e2e, github and html-reporter.
check:dead-codeandcheck:changeset-bumpspass. - Tests:
schema-fixtures,report-fold,registry,select,last-run,report-markdown,report-ctrf,report-failure-textandintegration/test-todo(305 passed), githubfold(27 passed), html-reporterreporter(8 passed). - Mutants: 3 of 3 killed. Dropping the schema's
reason: todorule fails the new assertion. Dropping thefold.tstodo guard fails the fold regression. MakingreportResultgive todo rows an attempt fails the fold regression too. - cubic's two open threads on b7055a4 are not real, and your replies are right. The interrupt path only ever carries an
AttemptSkipInfo, and it is typed that way at the protocol now. The todo row rules belong in the schema, which has negative tests for each of them, and not in a public union type. Its third finding (the helper default) is fixed in 5310e44. - CI at 5310e44: check, pr-policy, pr-size and cubic passed. spec, mobile, docs, docs translations, benchmark, microbench and review-verdict are
action_required(fork workflows waiting for approval). Once spec runs, the lint error above will fail it.mergeable_state: blockedcomes only from my standing CHANGES_REQUESTED review: main requires 0 approvals and no checks, and nobody else has a review request open.
Note: #2218 (KrzysztofMoch) is a competing take on test.todo. Which one lands is a maintainer decision.
|
Note This text was drafted with AI and posted after human approval.
Thanks for the work on #2218 took over this PR and merged on 2026-11-25. It keeps your first commit with your authorship, and the follow-up commits carry the schema restriction and fold guard from your later commits here. |
Summary
test.todo(title).skippedresults withskip.cause: "todo"and no attempts; keep report-v1 without a new status or version.NO_TESTSrule unless--pass-with-no-testsis set.Issue
Part of #1855.
Verified