Repository navigation
fix(fork): cleaner dedupe and playtest round-2 follow-ups - #1026
Conversation
- cleaner: dedupe.writtenInPlace is a 'picks' key (missing links nothing, [] turns linking on), not 'keeps more'; README: it has no default (missing gives exit 1, not a refused machine file), one upgrade note with one install order, and a part file stays while the key is missing (pinned in the half-way test). - cleaner tests: the machine-file kinds example uses *.sav. - playtest: the "read as off" warning names what is wrong, such as the unknown field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: code · reviewer: lens agent · read at: 0da874d 🤖 Generated with Claude Code |
Collapse every whitespace run in the dropped-settings warning to one space, and pin in the test that a bad argv value never reaches the log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round-2 follow-ups from #962: cleaner
dedupe.writtenInPlacedocs and key kind, and the playtest "read as off" warning.What changed, per item
config.pylabelsdedupe.writtenInPlace"keeps more"; README says only two keys free more. The key is nowpicksinKEY_KINDS. Its patterns do keep more, but with the key missing nothing is linked, and[]turns linking on, so it also turns the rule on. The comment beside it says this. The README sentence now reads "Two keys take a refusal away" (layered,regenerable, the twoloosenskeys). "Free more" was ambiguous, because anypickskey that turns a rule on also frees more. No test:KEY_KINDSis a table, and a test asserting one value would only copy it. The existing engine test still checks that every key is placed and that theloosensset is the same.writtenInPlace"required". The default column now saysnone. The paragraph that lists the in-place kinds now says that, whilededupe.foldersnames a folder and the key is missing, the rule links nothing and the run exits 1. A missing key does not make the cleaner refuse the machine file (exit 2).dedupeorwrittenInPlace. Until the key is added, the dedupe rule does nothing (nodedupe) or links nothing and exits 1 (nowrittenInPlace), and the other rules still run. The other order stops every rule: an older cleaner refuses the unknown key, and every daily run exits 2 until the new cleaner is in..cleaner-linkpart file stays while the key is missing. Fixed in the README and in thededupe.pydocstring, not in code. Removing the part on the refused path would mean walking folders the rule has just declined to read, only to drop one extra name of a file it keeps anyway. The half-way test (test_killed_between_the_link_and_the_rename_the_next_run_finishes) now pins the documented answer. With the key missing, a run exits 1 and every name, the part included, stays. With the key back, the next run removes the part and links. This assertion passes on main too, because it pins behaviour the docs now describe.PlaytestSettingsFromSettingsFilenow decodes to aResultand puts the schema issue in the warning, for examplesettings: invalid playtest settings read as off (Expected no excess property at ["claim"]["maxRuns"]); the next settings save replaces them. The test was shown failing first:expected 'settings: invalid playtest settings r…' to contain '["claim"]["maxRuns"]'. It passes with the fix. The settings guide (docs/fork/README.md,server.playtest) now says the warning names what is wrong.*.mcaas its example kind. It now uses*.sav, like the newer test, and still checks that matching ignores case (slot1.SAV).Left
reviewRules-style keep mechanism across PlaytestService, the web editor and the shared patch merge. The workaround is already documented indocs/fork/README.md,server.playtest: copy the playtest value before moving back to an older build.General vs project
fork-kit/cleaner(key kind, README, docstring, tests). It names no machine, project or program, and the example kind is a generic*.sav. The playtest warning text is also general. It names whatever the schema reports..github/fork-seams.jsonis unchanged.packages/contracts/src/playtest*anddocs/fork/are fork files.State question
What a cleaner run does in each case, as the README says:
.cleaner-linkpart that is one more name of the kept file. The next run that reads the folders removes that part (only one the cleaner wrote down that still has other names) and links again. WithwrittenInPlacemissing, the rule reads no folder, so the part stays until the key is added. Both cases are pinned in the half-way test.dedupesection, the rule does nothing. With adedupesection but nowrittenInPlacekey, each folder is kept withcould not read: dedupe.writtenInPlace is missing ..., nothing is linked, the run exits 1, and the other rules still run. With an empty list,[], every candidate that passes the built-in refusals is linked (test_an_older_machine_file_without_written_in_place_links_nothing).Checks run
python3 -I -B fork-kit/cleaner/tests/dedupe.test.py: 84 OK.python3 -I -B fork-kit/cleaner/tests/engine.test.py: 55 OK.vp test run src/playtest.test.tsinpackages/contracts: 22 passed, after showing the new case red first.doc_check.py --base origin/main: 2 files, 0 problems.vp run check:changed: format, lint, knip, typecheck (43 packages), test all pass.Round 1
playtest.ts:185warning kept the formatter's indent (three spaces)playtest.test.tspinsExpected no excess property at ["claim"]["maxRuns"]and no double space (red before the fix)playtest.test.ts:213nothing pinned that a bad value stays out of the warning--token=SECRETVALUEargument logs the warning withoutSECRETVALUEThe long-lines nit is dropped.
Fixes #971
🤖 Generated with Claude Code