From b67527c93228732276f690448667b9491e2d69ef Mon Sep 17 00:00:00 2001 From: jmlweb Date: Fri, 20 Nov 2026 04:05:50 +0100 Subject: [PATCH] chore(backlog): file and triage RPT-011 multi-tool heat neutralization File RPT-011 (low bug): the transform neutralizes the inactive tool's M104/M109 T after tier 0, so in the multi-tool golden T1 extrudes a layer unheated, while the warning says only the active tool changes. Triage it into TSK-018 (P4). Co-Authored-By: Claude Opus 5.5 --- ...ti-tool-output-neutralizes-the-inactive.md | 52 +++++++++++++++++++ .backlog/tasks/index.md | 3 +- ...8-fix-multi-tool-output-neutralizes-the.md | 39 ++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 .backlog/reports/complete/RPT-011-multi-tool-output-neutralizes-the-inactive.md create mode 100644 .backlog/tasks/pending/TSK-018-fix-multi-tool-output-neutralizes-the.md diff --git a/.backlog/reports/complete/RPT-011-multi-tool-output-neutralizes-the-inactive.md b/.backlog/reports/complete/RPT-011-multi-tool-output-neutralizes-the-inactive.md new file mode 100644 index 0000000..8acd451 --- /dev/null +++ b/.backlog/reports/complete/RPT-011-multi-tool-output-neutralizes-the-inactive.md @@ -0,0 +1,52 @@ +--- +id: RPT-011 +title: Multi-tool output neutralizes the inactive tool's heat command, so it prints cold while the warning says only the active tool changes +type: bug +severity: low +status: triaged +created: 2026-11-20 +triaged: 2026-11-20 +task-id: TSK-018 +--- + +## Summary + +The `multi-tool` warning (ADR-0004) tells the user that "only the active tool's temperature is changed". The transform does more than that. It neutralizes every `M104`/`M109` after the tier 0 command, whatever its `T` word. That includes the heat command of a tool that is not active yet. The tier commands carry no `T` word, so they only reach the tool that is active at each tier start. A tool selected mid-print can therefore extrude before anything heats it, and the download is still offered because `multi-tool` is only a warning. + +## Where + +- `packages/core/src/transform.ts:140-143` — the neutralize loop ignores `temperatureLine.tool`; any non-turn-off line after the tier 0 line is neutralized. +- `packages/core/src/transform.ts:94` — tier commands are `M109 R` / `M104 S` with no `T`, so they target the active tool only. +- `packages/core/src/validation.ts:173` — warning text: `only the active tool's temperature is changed`. +- `docs/adr/0004-validation-gate-and-change-report.md:11` — "multi-tool G-code (only the active tool is changed)". +- `fixtures/prusaslicer/multi-tool.golden.gcode:7-8,290-301` — committed golden output showing the effect. + +## Observed output + +`fixtures/prusaslicer/multi-tool.golden.gcode` (written by `pnpm fixture`, passes `pnpm test`): + +``` +7: M104 S215 ; set extruder temp <- start G-code heats the active tool (T0) only +8: M109 S215 ; wait for extruder temp +16: T0 +18: M109 R230 ; [temptower] tier 0 +... +290: T1 +291: ; [temptower] neutralized: M104 S230 T1 <- T1's only heat command is removed +292: G1 X100 Y100 F9000 +293: G1 X120 Y100 E1 F1200 <- T1 extrudes the whole Z7 layer unheated +... +301: M104 S225 ; [temptower] tier 1 <- first temperature T1 receives, one layer later +``` + +The report for this fixture (`multi-tool.report.json`) has only the `multi-tool` warning, and `canDownload` is true. On Marlin and Prusa firmware, cold-extrusion protection blocks or skips the T1 moves. The user was told that only the active tool would be changed. + +## Impact + +Low. Multi-tool towers are uncommon in Phase 1, and the fixture is synthetic. Real Prusa XL start G-code usually heats every used tool before tier 0, and those lines are kept. But any tool heated after tier 0 (a later tool change, or a standby/preheat `M104 T` before a tool change) loses that command. The warning text does not tell the user this happens. + +## Suggested fix + +Pick one of these: +- Keep `M104`/`M109` lines whose `T` word names a tool other than the active one. This needs a new ADR, because ADR-0002 lists tool-indexed variants as neutralized. +- Reword the `multi-tool` warning, and ADR-0004's description of it, to say that every tool's temperature commands after tier 0 are neutralized and that tiers reach only the active tool. diff --git a/.backlog/tasks/index.md b/.backlog/tasks/index.md index d45872b..8a5a822 100644 --- a/.backlog/tasks/index.md +++ b/.backlog/tasks/index.md @@ -4,7 +4,7 @@ | Status | Count | |--------|-------| -| Pending | 2 | +| Pending | 3 | | Active | 2 | | Blocked | 0 | | Complete | 13 | @@ -20,6 +20,7 @@ |----|-------|----------|------|---------| | TSK-007 | Public launch with counter and physical print gate | P3 | release, community | 2026-10-18 | | TSK-017 | Fix: Tower config accepts heights the STL name cannot encode, breaking the lossless round trip | P4 | | 2026-11-17 | +| TSK-018 | Fix: Multi-tool output neutralizes the inactive tool's heat command, so it prints cold while the warning says only the active tool changes | P4 | | 2026-11-20 | ## Recently Completed diff --git a/.backlog/tasks/pending/TSK-018-fix-multi-tool-output-neutralizes-the.md b/.backlog/tasks/pending/TSK-018-fix-multi-tool-output-neutralizes-the.md new file mode 100644 index 0000000..f985ddf --- /dev/null +++ b/.backlog/tasks/pending/TSK-018-fix-multi-tool-output-neutralizes-the.md @@ -0,0 +1,39 @@ +--- +id: TSK-018 +title: Fix: Multi-tool output neutralizes the inactive tool's heat command, so it prints cold while the warning says only the active tool changes +status: pending +priority: P4 +tags: [] +created: 2026-11-20 +source: report/RPT-011 +depends-on: [] +--- + +# Fix: Multi-tool output neutralizes the inactive tool's heat command, so it prints cold while the warning says only the active tool changes + +## Description + +### Context + +From RPT-011. The transform neutralizes every `M104`/`M109` after tier 0, including the heat command of a tool that is not active yet (`packages/core/src/transform.ts:140-143`). Tier commands carry no `T` word. In `fixtures/prusaslicer/multi-tool.golden.gcode:290-301`, T1 extrudes a full layer after its only heat command was neutralized. Meanwhile the warning (`packages/core/src/validation.ts:173`) says only the active tool's temperature is changed. + +### Approach + +1. Decide whether to keep tool-indexed lines for non-active tools. That needs a new ADR, because ADR-0002 neutralizes tool-indexed variants. The alternative is to reword the warning and ADR-0004. +2. Change the transform or the warning to match the decision. +3. Run `pnpm fixture` and review the multi-tool golden and report diff by hand. + +## Acceptance Criteria + +- [ ] A decision is recorded: either inactive-tool M104/M109 T lines after tier 0 are kept (new ADR amending ADR-0002) or the multi-tool warning and ADR-0004 text describe that all tools are neutralized +- [ ] The multi-tool warning text in packages/core/src/validation.ts matches what the transform does +- [ ] The multi-tool fixture golden no longer shows a tool extruding before any heat command reaches it, or its report states that this can happen +- [ ] pnpm test and pnpm typecheck pass + +## Notes + +## Learnings + +## Progress Log + +- [2026-11-20] Created \ No newline at end of file