Repository navigation
test(skills): cover frontmatter parse diagnostics during discovery - #84
Open
easonLiangWorldedtech wants to merge 1 commit into
Open
easonLiangWorldedtech wants to merge 1 commit into
easonLiangWorldedtech wants to merge 1 commit into
Conversation
Unit 6 of the 8-way split of the SkillsManager test harness described on Zoo-Code-Org#1321. Chain order: units 2, 3, 4, 5, 6, 7, 8; this unit merges after unit 5 and before units 7 and 8. Adds the three discovery rows that assert a SKILL.md with invalid, malformed or unterminated YAML frontmatter is skipped and the reason is recorded, against the existing harness only - no production change and no new mock surface in this unit. One file, 134 added lines, 0 removed, on top of unit 5 at 2809ebf. The row text is the feature branch text. The added ranges carry 153 lines of which 19 are blank; all 19 are 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 - so 153 - 19 = 134 and the diff is what a reviewer sees in the merged file.
This was referenced Nov 10, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unit 6 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, this pull request, and the two unit branches 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, 134 added lines and 0 removed. No production change and no new mock surface in this unit.units/skills-06-frontmatter-diagnosticsatd9cf6ae995c0ee0263f833436f1d577f7cc5ff2aunits/skills-05-update-path-resolutionat2809ebf7ed5c3a110870878120af87c7fd6c6452. The base class is the immediately preceding unit branch in this fork, a fork branch: not the org repo and notmain.Size and mutation price, both measured
git diff --numstat 2809ebf7ed5c d9cf6ae995c0printed134\t0\tsrc/services/skills/__tests__/SkillsManager.spec.ts, so 134 added and 0 removed, 134 added-plus-deleted against the 400-line budget.selectFromGiton the worktree at this head, base2809ebf7ed5c3a110870878120af87c7fd6c6452, headd9cf6ae995c0ee0263f833436f1d577f7cc5ff2a, 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
3
itheaders, all of them scalar rows, so the header count and the case count are the same number for this unit. The suite moves from 116 cases at the base to 119 cases at this head, and 116 + 3 = 119. Row counts in this body areitheaders in the spec file at the named head; case counts are what vitest reports at the named head. The two bases are named beside both numbers, because a header count and a case count in one paragraph are the kind of pair a reader conflates.The three rows assert that a
SKILL.mdwith invalid YAML frontmatter, with other malformed frontmatter, and with unterminated frontmatter plus a dangling quote is skipped during discovery and that the reason is recorded.Built width versus published width, as a named comparison
Built width 134, published width 134, difference 0, so nothing is published that the build did not measure. The build instrument is a two-pointer subsequence scan between the unit 5 spec and this unit's spec: it introduced 134 lines, removed 0 lines, and matched 3,811 of 3,811 lines of the unit 5 spec, which is 100 percent, and
git diff --numstaton the same pair printed 134 added and 0 removed. The spec blob isca85df011a0b7fd333216eac131724e9ac0eda08in the worktree, in the commit and in the file I assembled.The added ranges carry 153 lines of which 19 are blank. The blank-adjacency rule this split uses keeps a blank only when neither the line after the insertion anchor nor the line after that is blank in the parent file; all 19 fall under the rule, so 153 - 19 = 134 and the diff is what a reviewer sees in the merged file. None of this unit's blanks survive. The 21 blanks that survive across the whole chain belong to unit 8: 13 inside its row spans and 8 separators between spans. Blank accounting comes from the assembly manifest plus the rule, not from a diff between two consecutive unit children, because such a diff cannot tell which copy of a repeated line it is reading and its blank counts are position-shifted by construction.
Verification, interpreter named for each leg
Tests 119 passed (119)in 1.90 s (vitest 4.1.12, node 22.23.4, run fromsrc).prettier --check .: exit 0 with no failing files andAll matched files use Prettier code style!after 15 s.compileis a required context and its log runsprettier --check ., so the formatting leg is checked rather than assumed.tsc -p tsconfig.json --noEmit: exit 0 with empty stdout after 4 s (node 22.23.4).eslint --prune-suppressions --max-warnings=0on this spec: exit 0 after 7 s. The suppressions map after the run parses to 265 keys and is deep-equal to the map at HEAD: 0 value-differing keys and 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 that they are cold by construction rather than by a cache directory I guessed at: base leg at2809ebf7ed5cexit 0 with 12 tasks successful and 0 cached in 12.605 s; head leg atd9cf6ae995c0exit 0 with 12 tasks successful and 0 cached in 13.371 s; 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, so these are local readings on a different interpreter from CI's and are labelled as local readings.Negative control, decomposed
Against the pre-delta production blobs at
b66149f6c09e2e49a677049c9b47a336c6a3de(src/services/skills/SkillsManager.ts40,393 B, blob92ff4e0e094b4d54dff72876e548cac83914a953;src/shared/skills.ts898 B, blobf5151181f6d3577bec864890a19bb36ac0dabd14), with this unit's spec in place and production otherwise untouched: 27 failed of 119 cases. Machine-summed:The 2 rows in the last bucket are not killers of anything in this split: the parent spec alone against the same production prints 2 failed of 94 cases, and they are the same two rows,
should create a new global skillandshould allow creating a .roo skill when the duplicate lives in the lower-priority .agents root. The 2 order-coupled rows aremoveSkillrows that pass at the parent head and fail only once the chain is this long, so they are a property of the chain position and not of this unit's rows.Attribution rule used here: every failing row is assigned to the first unit child whose spec file contains its title, and the parent-failing set is measured by running the parent spec against the same production rather than assumed. Matching a title as a substring of a line range is not used, because it steals rows between units and it misses the table row whose header spans several lines. That table row is why unit 4 reads as 3 scalar rows plus 4 cases: its header is on multiple lines.
Two instrument failures in my own lane were fixed before this number was taken, and both are stated rather than tidied. An unverified production restore wrote a 0-byte
SkillsManager.ts, becausegit showhad failed and I had not checked it, and the empty file has no export, so the run printedTypeError: SkillsManager is not a constructorand 119 failed for 119, which was an artifact and not a property of the chain; the restore step now checks the exit status and compares the byte length againstcat-file -sbefore it writes. And the base sha I had been passing was a 38-character string rather than the 40-character commit: it resolved while a different commit with that prefix was reachable, andgit gc --autohas since pruned that commit, so the control base for units 3 to 5 was held by a dangling object. The base is now read fromrefs/remotes/origin/prep/skills-test-harnessand verified withcat-filebefore each run, withgc.auto=0on those runs.What these rows are killers for, and what is not claimed
These three rows are killers for the frontmatter-diagnostics areas of unit 2's production delta:
loadSkillMetadata43 lines,recordDiagnostic18,getFrontmatterLine28,isHiddenEntry15 andfindEscapingRelativeSymlink6, which is 43 + 18 + 28 + 15 + 6 = 110 of the 405 changed lines in that delta. 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 those areas land in the merged state in the declared order (this unit, then units 7 and 8), not on any intermediate head, and unit 2's own rows contribute 0 discriminating killers for its own delta.