fix(author): the 2026-11-09 skill eval's and code review's findings
Merged
AL
11d ago+231+231+012345678901234567890123456789-82-82-01234567890123456789
Closes #162: every finding of the 2026-11-09 skill eval and code review, in one PR as asked.
The skill (skills/h5p-author/SKILL.md)
- Step 3: build in a working folder of one's own, rebuild a failed source under the same name, and copy the package handed over to the asked name; never delete a file to free a name. One eval run had
rm -rf'd the user's file to reuse its name. - Step 4: says where the report lands (
<name>.verify/,--out), what to read in it, and that one run is enough:--untrustedfinds nothing more, the design's call of 2026-11-01. - Step 5:
--no-openonly with a browser tool the agent already has, never a script of its own. One run spent four of its six minutes writing one. - The hand-over paragraph is a list now, without the over-long line.
- "Never read a library's semantics" gives its reason.
The code (packages/author), each with a test that fails on main
infollowed the prototype chain: a field namedtoStringorconstructorwent unreported, and a file namedx.constructorpassed as a known type.Object.hasOwnnow (generator.mjs,media.mjs).- A multiple of a fractional step is accepted within a rounding error. The editor's
%refuses 0.3 in steps of 0.1. No library in the pack has such a step, and the content check checks none, so the departure is recorded ingenerator.mjsanddesign/author.md. - A downloaded address with a broken escape (
%zz) keeps its name as written, instead of ending the build with a bareURIError. sync-skillrefuses a type file whose markers are broken (one only, either twice, the end first) instead of appending a second section. The logic moved tolib/schema.mjs(withSection) so the test can import it without running the script.- A source's
typewith a version,"H5P.Blanks 1.14", is refused with the reason: the version is the pack's newest.loadLibrariestakes one because saved content names one. The pack holds no two majors of any content type, so pinning one would pin nothing. - The CLI parses with
node:utilparseArgs, as h5p-verify and h5p-embed do:--libraries=dir,-hand-vwork.
The five the review raised without checking
- Confirmed and fixed: the page's build wrote the install-only libraries before the media.
writePackagenow takes the media and writes them between the content and those libraries, in both builds, and the page's result hasinstallas Node's does. - Confirmed and fixed: the media cache was keyed by source alone. The same file named in an image field and in a file field got the first kind's folder, type and size. It is keyed by kind and source now.
- Dropped: a non-object copyright turning into
Usilently. The generator already reports it, andMediaStoreis not exported. - Dropped:
schemaof an unknown type opening every part. It takes 0.39 s against 0.11 s for a known type. - Left as is: the page holding a download of up to 1 GiB as a Blob. Chromium keeps a large Blob on disk rather than in the page's memory, and most hosts refuse a page's download under CORS anyway. Firefox and Safari were not measured.
After the AI review (ddd94df, all four of its findings)
- The fractional step's bound is four
Number.EPSILONof the quotient, the error of three roundings. The first cut's 1e-9 let 50000000.05 pass in steps of 0.1. No on-step decimal among 800,000 sampled up to 1e9 is refused, and no half-step one passes. - The skill copies the package with
cp -n. Where the asked name is taken, it asks, or takes a new name and says so. - It reads the report's
reasons, where a failed run may be the only field that says why. - It hands over the report, screenshot and revision of the run that passed, or none, with the package called unverified, where the verifier could not run.
Checks
pnpm typecheckandpnpm testinpackages/author, the Chromium page test included.apps/skills' tests.sync-skill --check: 0 files out of date.- All ten changed or new tests fail with the library code of main.
The page build's result type gains a field and the CLI accepts more forms, so the release is an h5p-author minor. Not bumped here.