Repository navigation
feat(task): observation registry and the Task run-state fields (split 2 of #1914, #1375) - #2384
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Review statusThanks for contributing. This comment tracks the review sequence and the next action. Current step: Awaiting fresh human maintainer or CODEOWNER approval. Automated review is complete for the latest commit but does not replace human approval. Review-state labels are managed by this workflow; do not edit them manually. |
Changed-code mutation testingReport for PR head
Details: mutants, guidance, and reproductionChanged-code mutation testing
Focused tests
Reproduce locallyFrom a full checkout containing both commits: Mutation reports
The workflow uploads generated reports in the Advisory findings
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What this is
Unit 2 of the five-way split of #1914, planned and issued on #2020. Whole-file module cut, 5 files, no partial hunks:
src/core/task/observationRegistry.tswith its spec, thesrc/core/task/Task.tschanges that expose the run-state fields its consumers read, and the twoTaskspec files. It is an independent pull request rather than a stack - nothing in it depends on any other unit, and it compiles on thismaintip alone.Half of this unit is content a reviewer may already have read.
observationRegistry.tsis blobb3b7a719871d, byte-identical to what #1913, #2357 and #2359 already carry, and it accounts for 20 of this unit 25 counted executable lines.Task.tsis blob77a1333b39e0, which is #1914 own blob and one of 8 distinct versions of that file across this series. If #1913 lands first, the production content here reduces to the 5 counted executable lines inTask.ts, because the registry blob would already be onmain; the spec file travels with it regardless, tests being uncounted. That is the honest price of this unit, stated up front rather than discovered at merge time.Numbers, with the base named
Base:
maintipe487cd7b2a497aa1d9b60f9b0cb497f7839bb629, which is this commit own parent (git merge-base --is-ancestorexits 0 against it, so the gate merge-base and the base coincide).Counted executable lines: 25 against the 500 limit, headroom 475. Per file:
observationRegistry.ts20 andTask.ts5. The three__tests__files count for nothing, becausepackageForPathreturns no package for test paths.Added and deleted lines, beside that number and not instead of it: 349 (349 added, 0 deleted) over 5 files.
zdt split measureagainst this base printed the following, quoted exactly as measured, with the exit code exactly as measured:exit code 0. This unit is under both added-deleted caps and under the executable-line cap measured standalone against its own base; the pull request it came out of is not, which is why it was split.
Typecheck:
tsc --noEmit -p src/tsconfig.pcmap.jsonfrom the verification worktree root (node v22.23.4): exit 0, 0 error lines.Tests, run from the same worktree
srcover this unit three spec files withvitest.core.config.ts: it printedTest Files 3 passed (3)andTests 241 passed (241), 0 failed and 0 skipped, and exited 0. Named rather than left silent: this unit lane reports 0 skipped, and the sixtest.skipIf(process.platform === "win32")skips in this split chain live insrc/utils/__tests__/safeWriteJson.test.ts, which belongs to held unit cut5.One advisory worth knowing before reviewing: the local preflight printed
mutation exclusions must use "// Stryker disable next-line MutatorName: concrete reason"against src/core/task/Task.ts:4454, which is existing content this unit inherits. It is an advisory rather than a blocking finding, and this unit adds no Stryker directive of its own - no directive was added anywhere in this split.Gate numbers and what they mean
Two different questions get two numbers, and the base is named for both. Counted executable lines come from the repository own
buildManifestinscripts/stryker-diff.mjs, run through.tmp-cr-audit/u8-measure-chain.mjs(node v22.23.4), with per-path diffs at--unified=0becauseparseChangedLinesmarks every line a hunk covers andselectFromGitpasses--unified=0at scripts/stryker-diff.mjs:306. Added-and-deleted lines are the plaingit diff --shortstatfigure, printed beside the counted number and not instead of it.The base named below is the current
maintip, which is also this commit own parent.git merge-base --is-ancestorexits 0 against it, so the CI gate merge-base computation and my base coincide exactly and no two-dot approximation is involved in these figures.Mutation gate: local attempt, and an honest deferral
A local
zdt mutation preflightwas attempted at this base. The wrapper printedpreflight exit code: 0and=> PASS (local gate green)while writingno reports (mutation testing not applicable or run incomplete)and a digest with an empty package list, and the wrapped Stryker log says why: it instrumented the changed files and then died withCannot find module 'vitest/config'from its.stryker-tmpsandbox copy ofvitest.config.ts, whose require stack resolvesviteout of the parent clone.pnpmstore rather than through this worktree junctionednode_modules. A green verdict with an empty report set is not a green verdict, so this pull request carries no local mutation reading. CI mutation-diff will be the first real one.That deferral is safe for two measured reasons rather than evasive ones. First, #1914 mutation-diff has never produced a mutant verdict for this content at all: it fails on the 1,044-versus-500 width gate before the runner reports, so there is no mutation history being inherited here. Second, if a surviving mutant does appear, the answer is test hardening, which lands in
__tests__paths and therefore costs zero counted executable lines, becausepackageForPathreturns nothing for test paths. A mutation-red cannot move this unit further from mergeable than it already is.Content fidelity
Every file here is #1914 verbatim content, taken from the merge commit that closes it (
7209a5f1681b387e397434172707cb028e33ec3b, tree3c919730a813) with no edits. The five whole-file units of this split are path-disjoint and their file sets sum to the 26 files #1914 changes. Applied onto thismaintip they produce tree83cdd9cb0223, andgit diff --name-only 83cdd9cb0223 7209a5f1681b387e397434172707cb028e33ec3bprints 14 files - every one of them newer content that arrived onmainafter the merge base5319fe91fb0caf4aa4ec66aac68fa03744ebbc23, none of them among the 26. The split therefore neither loses nor invents content, and each unit measures the same counted executable lines against the merge base and against this tip.Series housekeeping
This split was planned and issued on #2020 before any split pull request opened (comments 6738707507, 6739312036, 6739376708, 6739428842, 6739719219), and the version question for the contested files is asked there in comment 6739877102. #1914 stays open until the units of its split have been reviewed, because its review history is the only record of what has already been said about this content; its 14 open review rows were answered on the pull request itself. On #1914 there is no review event from anyone except the bot and the author, and no non-empty review body from anyone except the bot (140 review events over 2 pages, 81 from the bot and 59 from the author account, 0 from anyone else).
No
.changesetfile and no CHANGELOG edit, per AGENTS.md.src/eslint-suppressions.jsonis not touched here: the 96-to-94 count change forcore/tools/__tests__/readFileTool.spec.tsbelongs to held unit cut4 and to that unit alone, so no two pull requests in this split edit that file.knip.jsonis likewise not touched here - held unit cut3 owns its one entry, and the fact that #1914 and #2359 both carry blob34450fc441a3whilemain, #1911, #1912, #1913, #1917 and #2368 carry1f4956faa6ccis a known conflict cost of the series, recorded on #2020, not a mistake of this unit.