Repository navigation
test(skills): cover skill diagnostics read and clear paths - #85
easonLiangWorldedtech wants to merge 1 commit into
Conversation
Adds the skill-diagnostics rows to src/services/skills/__tests__/SkillsManager.spec.ts: 206 added lines, 0 removed, one file. The added ranges carry 206 lines of which 0 are blank, so nothing is dropped by the blank-adjacency rule this split uses - a blank is kept only when neither the line after the insertion anchor nor the line after that is blank in the parent file - and 206 - 0 = 206, which is what a reviewer sees in the merged file. Two of the 206 lines are the carried container lines of the skill diagnostics describe block, its opening line and its closing brace. They arrive with unit 7 because unit 7's rows are the first rows inside that block; every blank that survives across the whole chain belongs to unit 8, 13 inside its row spans and 8 separators between spans. This is unit 7 of the 8-way split of the SkillsManager test harness described on Zoo-Code-Org#1321. Merge order for the fork chain is units 2, 3, 4, 5, 6, 7, 8; the org-repo pull requests for the same units are opened after Zoo-Code-Org#2417 merges, in the same order.
|
Superseded sentence in the body of fork #85, named here rather than edited out of that body. The paragraph on what unit 7's rows are killers for says that neither Measured again for this comment, on
So the corrected statement is: What does not change: unit 7's six rows name posted by u5a-2359, unit 7 lane. |
Unit 7 of the 8-way split of the SkillsManager test harness described on Zoo-Code-Org#1321.
Merge order for this fork chain: units 2, 3, 4, 5, 6, 7, 8, which is #76, #80, #81, #82, #84, this pull request, and unit 8 still to open. The org-repo pull requests for these units are opened after Zoo-Code-Org#2417 merges, in the same order.
One file,
src/services/skills/__tests__/SkillsManager.spec.ts, 206 added lines and 0 removed. No production change and no new mock surface in this unit.units/skills-07-skill-diagnosticsat1a29b1cd613d258919f3ddd6f4e00b0d69b516abunits/skills-06-frontmatter-diagnosticsatd9cf6ae995c0ee0263f833436f1d577f7cc5ff2a. The base class is the immediately preceding unit branch in this fork, a fork branch: not the org repo and notmain.58c5f25fbecc73ca925fbe6c4c38b527ec9437d7; sha256(16) of the same filedb3f4b98dfe62d0e. A digest without its instrument named is how a reader comparinggit hash-objectagainst a lane report finds a mismatch that does not exist.Size and mutation price, both measured
git diff --numstat d9cf6ae995c0 1a29b1cd613dprinted206\t0\tsrc/services/skills/__tests__/SkillsManager.spec.ts, so 206 added and 0 removed, 206 added-plus-deleted against the 400-line budget.selectFromGiton the worktree at this head, based9cf6ae995c0ee0263f833436f1d577f7cc5ff2a, head1a29b1cd613d258919f3ddd6f4e00b0d69b516ab, printed"packages": []and"advisories": []withmergeBaseequal to the base, which is 0 counted changed executable lines against the 500-line cap. The unit touches only a file under__tests__/, which the selector excludes, so this unit generates no mutants and its mutation digest is empty by construction.Rows and cases, with the counting basis named
6 rows, all scalar
itheaders, inside theskill diagnosticsdescribe block. The suite moves from 125 cases at this head where 116 areitheaders in this file: the 9-case gap is the multi-lineit.eachheaders carried since unit 3, which a header-line count misses and vitest counts as cases. The base head reports 119 cases and this head 125, and 119 + 6 = 125. Row counts here areitheaders in the spec file at the named head; case counts are what vitest reports at the named head.The six rows assert that malformed YAML frontmatter is reported with its location while discovery still returns the healthy skills, that overlapping scans are serialized so an older scan cannot overwrite a newer snapshot, that a reader never sees a half-built snapshot, that the parser does not hint at unescaped quotes when the parse failure is elsewhere, that the same malformed skill keeps reporting on repeated scans, and that a non-Error parse failure still records a diagnostic.
Built width versus published width, as a named comparison
Built width 206, published width 206, difference 0. The added ranges carry 206 lines of which 0 are blank: the file has 555 blank lines at this head and 555 at the base head, so blank growth is 0 and the blank-adjacency rule this split uses drops nothing here, 206 - 0 = 206. Composition: 204 lines of row content plus the 2 carried container lines of the
skill diagnosticsdescribe block, its opening line and its closing brace, which arrive with this unit because its rows are the first rows inside that block; 204 + 2 = 206. Every blank that survives across the whole chain belongs to unit 8, 13 inside its row spans and 8 separators between its spans.Verification, interpreter named for each leg
Tests 125 passed (125)in 2.35 s (vitest 4.1.12, node 22.23.4, run fromsrc).prettier --check .: exit 0, 0 failing files,All matched files use Prettier code style!.compileis a required context and its log runsprettier --check ., so a prettier-forced trailing newline is not a fidelity failure.tsc -p tsconfig.json --noEmit: exit 0, empty stdout (node 22.23.4).eslint --prune-suppressions --max-warnings=0on this spec: exit 0. The suppressions map after the run parses to 265 keys and is deep-equal to the map at HEAD: 0 value-differing keys, 0 keys present only on disk. eslint rewrites that file's indentation when it prunes, so it is restored withgit checkout --and this unit carries no churn in it.turbo run check-types --forcewith a fresh--cache-dirper leg so they are cold by construction: base leg atd9cf6ae995c012 tasks successful and 0 cached in 14.169 s, exit 0; head leg at1a29b1cd613d12 tasks successful and 0 cached in 13.470 s, exit 0; 0error TSlines on either leg. Both legs ran on node v25.9.0 with pnpm 10.8.1 and turbo 2.11.10 whilepackage.jsonasks for node 22.23.4, one engine-mismatch line per leg, so these are local readings on a different interpreter from CI's and are labelled as local readings.Negative control, decomposed
With this unit's spec in place and production otherwise untouched at
b66149f6c09e2e4649a677049c9b47a336c6a3de(src/services/skills/SkillsManager.ts40,393 B, blob92ff4e0e094b4d54dff72876e548cac83914a953;src/shared/skills.ts898 B, blobf5151181f6d3577bec864890a19bb36ac0dabd14; the 40-character sha printed byrefs/remotes/origin/prep/skills-test-harnessand proved withcat-file -e): 33 failed of 125 cases. Machine-summed:The set difference against unit 6's control run on the same base is exact: unit 6 prints 27 distinct failing rows, unit 7 prints 33, and the 6 that appear here and not there are unit 7's own six rows, with 0 rows lost, so 27 + 6 = 33 is a measured delta and not an inferred one. The 2 parent-failing rows are
should create a new global skillandshould allow creating a .roo skill when the duplicate lives in the lower-priority .agents root, measured by running the parent spec against the same production: 2 failed of 94. The 2 order-coupled rows areshould move a skill from generic to mode-specific directoryandshould move a skill from one mode to another, both already present in the parent spec and passing there, failing only once the chain is this long.Attribution rule: parent-first. A failing row belongs to a unit only if its title is absent from the parent spec, and then to the first unit child whose spec contains it; the parent-failing set is measured rather than assumed. A title present in the parent that fails only at chain length is attributed to the chain position, not to the unit whose text it resembles. Matching a title as a substring of a line range is not used, because it steals rows from short spans when a longer span contains similar text.
Two restores were proved before this number was taken, because a control run against a broken baseline does not fail loudly, it fails plausibly: each write is gated on
git showexiting 0 and the written byte length equallinggit cat-file -s, which here printed 40,393 of 40,393 B and 898 of 898 B with blob ids matching, and production was restored to the head blobs afterwards on the same gate, with the tree equal to the head tree before the push.What these rows are killers for, and what is not claimed
The six rows name one area of unit 2's production delta on the call-site basis:
getSkillDiagnostics, 3 changed lines. The basis is named because the two available bases disagree here and the weaker one reads larger. Every one of the six row spans callsdiscoverSkills,getSkillsMetadataandgetSkillDiagnosticson theskillsManagerreceiver; the first two are not among the map's areas, because the map's areas are the declarations unit 2's delta actually changed, and neither name appears on an added line ofgit diff --unified=0 b66149f6c09e 6471e7fbd8a9 -- src/services/skills/SkillsManager.tsin the reading taken here (1 added lines mentiondiscoverSkillsand 0 mentiongetSkillsMetadata), so they are exercised but not newly introduced. On the weaker basis, the identifierrecordDiagnosticappears inside one row span, and it is stated as identifier presence rather than folded into the call-site tally. Taken with unit 6 on the call-site basis, units 6 and 7 nameloadSkillMetadata43,recordDiagnostic18,getFrontmatterLine28,isHiddenEntry15,findEscapingRelativeSymlink6 andgetSkillDiagnostics3, which as a union is 110 + 3 = 113 of the 405 changed lines.Two defects in the derivation instrument for this paragraph, recorded rather than tidied. It first looked for the receiver name
manager, while the spec's receiver isskillsManager, so it printed no calls at all for six rows that call three methods each. And it looked up two area line counts by short key while the map stores them underSkillsManager.getFrontmatterLine (module function)andSkillsManager.isHiddenEntry (module function), so the first receipt printedNaNwhere the map says 28 and 15. Both are lookup errors in my own instrument, not properties of the rows or of the map, and the numbers in this paragraph come from the map's own stored counts read through their stored keys.Naming is a proxy for reachability, not proof that a row kills a mutant: nothing in that map came from running a mutant. The killers for these areas land in the merged state in the declared order - this unit is the second of the three diagnostics units, with unit 8 carrying the container rows - not on any intermediate head, and unit 2's own rows contribute 0 discriminating killers for its own delta.
Not claimed: any CI mutation reading for this head or for units 3 to 6, none having been read; and nothing about unit 8, whose rows complete the diagnostics container and whose built width is 197 + 13 + 8 = 218 and will be reported against its published width as its own named comparison.