Repository navigation
fix(fork): batch 13 server leftovers (stdin closed by Node, unknown playtest fields, neutral fork-ci names) - #962
Conversation
…k-ci names, dedupe kinds in config - processRunner: a write to a child's stdin that Node already closed (ERR_STREAM_DESTROYED, ERR_STREAM_PREMATURE_CLOSE) counts as a closed stdin, like EPIPE; tested with a write after a real child exited. - playtest settings: a field this build does not know (also in a step) reads as off when the settings file is read, so a newer build's limit is never dropped quietly. - docs-scope and gradle-cache READMEs and tests use neutral names; ci-demand says which config name its examples use. - cleaner dedupe: one game's save-file kinds move from the code to the machine file (dedupe.writtenInPlace, a "keeps more" key). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: state · reviewer: lens agent · read at: 84616c7 🤖 Generated with Claude Code |
|
lens: state · reviewer: lens agent · read at: 84616c7 🤖 Generated with Claude Code |
|
lens: merge-path · reviewer: lens agent (Claude Code) · read at: 84616c7 🤖 Generated with Claude Code |
|
lens: merge-path · reviewer: lens agent (Claude Code) · read at: 84616c7 🤖 Generated with Claude Code |
|
lens: code · reviewer: lens agent · read at: 84616c7 Checked and fine: #842 has both points (all three codes matched; a live test writes after a real child exited). Treating ERR_STREAM_DESTROYED and ERR_STREAM_PREMATURE_CLOSE as a closed stdin hides no real write error. Node only gives those codes once the child's stdin is gone: it is destroyed when the child exits, or after an earlier stream error, which surfaces first. An interrupt or timeout is not an error, so the catch does not see it. The runner still waits for the exit code and returns it. ci-demand: 🤖 Generated with Claude Code |
|
lens: code · reviewer: lens agent · read at: 84616c7 Checked and fine: #842 has both points (all three codes matched; a live test writes after a real child exited). Treating ERR_STREAM_DESTROYED and ERR_STREAM_PREMATURE_CLOSE as a closed stdin hides no real write error. Node only gives those codes once the child's stdin is gone: it is destroyed when the child exits, or after an earlier stream error, which surfaces first. An interrupt or timeout is not an error, so the catch does not see it. The runner still waits for the exit code and returns it. ci-demand: 🤖 Generated with Claude Code |
…t saves - cleaner dedupe: a machine file with dedupe folders but no `dedupe.writtenInPlace` (older than this cleaner) links nothing; each folder is kept with "could not read" naming the key (exit 1), the other rules run. An explicit [] links as before. README: the upgrade order and what an older cleaner does with the new key. - playtest: the server and project save patches refuse a field this build does not know (as handoff's do), instead of dropping it. - go-live report test: a playtest value with an unknown key now reads as off, as the load does. - docs: playtest's unknown-field and downgrade behaviour; a typo in the docs-scope test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: state r2 · reviewer: lens agent · read at: 0049d6d 🤖 Generated with Claude Code |
|
lens: merge-path r2 · reviewer: lens agent (Claude Code) · read at: 0049d6d 🤖 Generated with Claude Code |
|
lens: code r2 · reviewer: lens agent (Claude Code) · read at: 0049d6d 🤖 Generated with Claude Code |
Small server and fork-tooling leftovers, one PR (batch 13).
Fixes #842
Part of #811
Fixes #872
#842: stdin that Node already closed
isClosedStdinmatched only EPIPE. When Node has already seen the child exit it closes the child's stdin itself, and a later write fails withERR_STREAM_DESTROYEDorERR_STREAM_PREMATURE_CLOSE. Both now count as a closed stdin.Tests (
processRunnerFork.closedStdin.test.ts), all failing on main:ERR_STREAM_PREMATURE_CLOSEhere); the error counts as a closed stdin;ERR_STREAM_DESTROYEDends with the child's exit code;#811 item 2: unknown playtest settings fields
The settings-file read of
playtestnow decodes withonExcessProperty: "error"(as handoff and placement already do), so a field this build does not know, at the top or inside a step, reads as off with the existing warning, never as enabled without a newer build's limit. Two rows added to the existing "reads a bad value as off" test (failing on main). The go-live report reads the same decode, so its pinned row now expects such a value to read as off.A save refuses such a field too: the server and project patches use a new strict
PlaytestSettingsPatch(as handoff'sHandoffSettingsPatch), so a newer client's limiting field is never dropped while the setting stays on. Test rows (a newer field, a typo, a newer field in a step; server and project patch) fail without it.docs/fork/README.mdsaid such fields are dropped; it now says what happens, and warns about a downgrade (below).Left: item 1 (the calling thread read twice per
playtestcall). As the issue recommends, it stays untilMcpToolAccess.ts(an upstream file) changes for another reason.#872: neutral names in fork code
docs-scopeREADME and tests,gradle-cacheREADME and tests: one project's job, module, folder and file names replaced by neutral ones (core,core-module,plugins/alpha,plugins/beta,plugins/shared,RELEASE-NOTES.md,org.example:core). Renames only.ci-demandREADME: keeps.github/fleet.json, the name the other fork-ci examples (fleet-route) use, and says the name is the project's choice.dedupe: the game's save-file kinds leave the built-in "written in place" list. A new machine-file keydedupe.writtenInPlace(name patterns without/, case-insensitive, KEY_KINDSkeeps more) adds a program's own kinds. New test (failing on main) plus a red-check row for the new refusal.dedupe.foldersnamed anddedupe.writtenInPlacemissing (a machine file older than this cleaner), the dedupe rule links nothing. Each folder is kept withcould not read: dedupe.writtenInPlace is missing from the machine file ..., the run exits 1 (as for a missing zstd), and the other rules run. An explicit[]is the owner's word and links as before. Test (missing key: nothing linked, twice; listed kinds kept and the rest linked, then nothing new;[]links), failing on main, with two red-check rows.Owner step, in this order: on a machine whose
cleaner.dedupesection has folders, first add"writtenInPlace": [...](the kinds a program there writes in place, for example its save files, or[]), then install this cleaner. Until the new cleaner is in, the older one refuses the machine file (unknown key 'writtenInPlace'): every rule stops and every daily run exits 2, nothing is touched. The other order is safe too: the new cleaner links nothing and exits 1 until the key is added. The cleaner README's "What happens when ..." now says both.Not in this PR: #817
packages/contracts/src/orchestratorMcp.tsandapps/server/src/mcp/OrchestratorMcpService.tsare bothpendingfiles in.github/fork-seams.json, which take no new fork line, and neither has a seat these fields could use. The seam steps indocs/fork/updates.mdneed a list-only PR (move the files to seam entries and announce the lines) merged first, then the change.Review fixes (lens reports on 84616c7)
forkReport.test.tspinned playtest as on for an unknown key: fixed, expects off (playtest: two small leftovers from the #809 lens (double caller read, unknown settings fields) #811).reviewRulesdoes (anunreadablecopy in the setting's type, sent back by clients, checked by the server against the stored text), which touches PlaytestService, the web editor and the shared patch merge: too wide for this PR. Documented indocs/fork/README.md(copy the value before moving back).an "core-module"comment typo indocs-scope.test.py: fixed.Follow-up (not in this PR)
enginejob in fleet-route/fleet-watch (README and tests) and the check names inpr-queue/testdata/lens-corpus.jsonl.*.mcaexample kind (a neutral one such as*.savwould do).Checks
vp run check:changed: format, lint, knip, typecheck (43 packages) pass; tests 108 of 109 pass. The one failure isforkReport.test.ts"exits 0 only when the running server says it is quiet": it serves on 127.0.0.1, which this machine blocks (unreachable). CI runs it.playtest,forkSettings,handoff(47) and sharedforkSettingsPatch(70) pass; webplaytestSettings.logic,forkRowReset.logic,forkProjectOverrides(20) pass; server: 13 of 15 files pass;forkReport.test.tspasses apart from the local-socket test above (71 of 72 in the file).mcpT3ToolFilter.test.tsfails all its tests with a connect timeout to its own 127.0.0.1 server (blocked here), andForkPanels.browser.test.tsxcannot start Chromium here (missinglibnspr4.so). CI runs both.fork-kit/golive/tests/rehearse.test.pyOK.dedupe.test.py84 OK (red check included),engine,daily,guard,install,reportOK;common/tests/machine_file.test.pyandagent-guards/tests/config.test.py(they loadmachine.example.json) OK.compress.test.pyfails here because zstd is not installed, the same as on main.scratch.test.pyfails 1 or 2 timing tests on some runs, on main too; this PR does not touch it.docs-scope.test.py(86) OK.gradle_cache.test.py: 42 OK, 1 error intest_the_token_is_never_sent_on_a_redirect(a 127.0.0.1 server, blocked here; the test is unchanged). CI runs it.processRunnerFork.closedStdin.test.ts(6) pass.🤖 Generated with Claude Code