Repository navigation
[split 2/8 of #1321] atomic SKILL.md publish + SkillDiagnostic, with the 2 rows it changes - #76
Open
easonLiangWorldedtech wants to merge 1 commit into
Open
easonLiangWorldedtech wants to merge 1 commit into
easonLiangWorldedtech wants to merge 1 commit into
Conversation
The extension's skills service now stages SKILL.md through a sibling temp file and renames it into place, so a reader never observes a half-written file, and it reports per-skill load failures through the SkillDiagnostic type added to src/shared/skills.ts instead of swallowing them. The two spec rows whose expectations this changes travel with it: 'should create a new global skill' and 'should allow creating a .roo skill when the duplicate lives in the lower-priority source' assert the staging path and the rename pair that the old rows asserted as a single write. Running the production change against the previous row text fails exactly those two rows and nothing else, which is why they are in this unit rather than in a later spec-only unit: a unit that moved the production file without them would land a red head. Focused suite 94 of 94 on node v22.23.4, tsc --noEmit clean, eslint --prune-suppressions reports 0 problems for all three files with the suppression counts unchanged, and prettier --check passes for all three.
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 2 of the eight-unit split of Zoo-Code-Org#1321 planned in comment 6777921244 on Zoo-Code-Org#1321 (contract comment 6774239651).
Parent:
prep/skills-test-harnessatb66149f6c09e(unit 1, which is Zoo-Code-Org#2417). This is a fork PR against its predecessor branch because the parent is a unit rather thanmain; it re-opens in the org repo once the parent merges.What it carries
src/services/skills/SkillsManager.ts+396/-41: atomicSKILL.mdpublish (write to.SKILL.md.<random>.tmp, then rename onto the final path) and theSkillDiagnosticdiagnostics path.src/shared/skills.ts+9/-0: the shared type addition the manager returns.src/services/skills/__tests__/SkillsManager.spec.ts+17/-5: the 2 rows whose expectations this production change makes true. They travel with the declaration that makes them true, so the unit is never shipped with a stale or a red suite.Prices, taken before the push, with the base named
git --numstat)b66149f6c09escripts/stryker-diff.mjs)extension: 262 againstMAX_CHANGED_LINES500b66149f6c09eMAX_MUTANTS400selectFromGit("b66149f6c09e", "6471e7fbd8a9")reported merge baseb66149f6c09e2e4649a677049c9b47a336c6a3de,packages [{id: "extension", changedExecutableLines: 262}],advisories []. The 262 lines are the binding axis; the 236 is a preflight reading whose instrument is disclosed below.How the mutant figure was taken
Instrument delta. The committed
scripts/stryker-diff.mjscannot start Stryker on this machine:node_modules/.bin/strykeris a#!/bin/shshim (1,724 B, siblingsstryker.CMD1,584 B andstryker.ps12,439 B) thatspawnSyncwill not launch on Windows. The committed script exited 1:The 236 came from a copy of that same 30,108-byte script (digest
c332971815aecfaf, blob identical atmaintip and at the parent) carrying two edits, and only two. Edit 1 is the spawn target:process.execPathagainstnode_modules/@stryker-mutator/core/bin/stryker.jsinstead ofnode_modules/.bin/stryker. Edit 2 is the ceiling: 40 minutes instead of the 12 minutes the committed script sets at line 424, so nothing in the reading below was taken under the committed ceiling. The copy is scratch, never committed, and it is now deleted.This is not a new finding. It is the defect Mutation gate spawns the extensionless .bin/stryker shim without a shell, which cannot start on Windows Zoo-Code-Org/Zoo-Code#2410 already reports, and the campaign has two reproductions there, one of which invokes exactly this shape (
process.execPathagainstnode_modules/@stryker-mutator/core/bin/stryker.js). CI on Linux is unaffected.The 236 stays labelled as a number taken with that copy until a CI digest keyed to head
6471e7fbd8a9says otherwise; at that point the digest is the source and the local figure becomes the corroborating reading. A digest comment is reused per PR and re-keyed to the head it measured, so its comment id is not a run identifier.With the copy, the preflight stage reported:
236 mutants over 262 counted lines is 0.9007 mutants per counted line, measured at head
6471e7fbd8a9over the file set that run mutated (Found 1 of 1383 file(s) to be mutated;Instrumented 1 source file(s)). The record's 1.0323 per counted line, which predicted roughly 270 here, was measured at 1911 over 5 of 1,383 files and 373 instrumented mutants against 496 lines at main tip, so the ratio is a property of the file set being mutated and not a constant of the repository; it is quoted here as an estimate with a named source, not as a prediction, and it is not reused as a multiplier for a one-file extension delta. The full-run stage with the copy exited 1 and printed, into the file the script itself writes for a PR comment (wt-r235-prep/.tmp-reports-s1/pr-comment.md, a local run print and not a comment on any pull request - this unit has no CI run behind that head marker yet, because the fork reported 0 check-runs and 0 status contexts for it), a head markerhead:6471e7fbd8a94ac732197f2ee488e8fbc47902ce blocking:0 advisories:1with Valid 0, Killed 0, Timeout 0, Survived 0, No coverage 0 and the advisory:That advisory text is stage-blind in the script (line 442 emits it for either stage, while line 447 is what names a stage), so which spawn hit the ceiling is inferred, not quoted: the measured dry run finished 2 minutes 51 seconds after
ProjectReaderlogged, and the script calls the preflight before the run, so on this machine the ceiling that was reached belongs to the run stage. The advisory is evidence about the wall clock and about the run stopping; it is not evidence about kills.extensionis a package whosediscoverRelatedTestsis false, so the vitest shim inresolveVitestBinaryis never spawned for it at all.a green local preflight over Valid 0, Killed 0, Survived 0 and No coverage 0 with blocking 0 and advisories 2 is not evidence in either direction on this machine.
the mutation leg is unmeasured, a PASS over an empty digest is not evidence in either direction, and CI at the first pushed unit is the only proof of the gate.
Verification on this commit
services/skills/__tests__/SkillsManager.spec.ts): 94 passed (94).createSkill, both on the staging path:should create a new global skillat spec line 2066 (expect(String(writeCall[0])).toMatch(/[\/\\]new-skill[\/\\]\.SKILL\.md\.[^/\\]+\.tmp$/)) andshould allow creating a .roo skill when the duplicate lives in the lower-priority directoryat spec line 2188 (expect(String(staged)).toMatch(/\.SKILL\.md\.[^/\\]+\.tmp$/)). On the parent production the write lands directly onSKILL.md, which is the failure the assertions name.tsc -p tsconfig.json --noEmit: 0 errors.pnpm run check-types(cold pair, not deferred): 12 tasks successful, 12 total, 10 cached, 5.373 s.eslint --prune-suppressions --max-warnings=0on all three touched paths: 0 errors, andsrc/eslint-suppressions.jsonbyte-equal to the parent blob, so no count moved.prettier --checkon the touched paths: 0.--no-verify; hook stderr was 0 bytes.git status --porcelain --untracked-files=allafter the commit lists only.local/state/gh/device-id.Review-state labels are managed by the reconcile workflow, so nothing was set here; labels were read as empty.