damage: the command line says what a damage takes, not only that it exists - #96
Merged
Conversation
…xists The window drew the settings of a chosen damage from the declaration on the day damage arrived. The command line named the damages and stopped there, so learning that zero-head takes bytes, and that bytes runs from 4 to 4096, meant typing a wrong value and reading the refusal. The parity guard cannot see that: it counts recipe keys, formats and presets, and a damage parameter is none of the three. tfg damage lists what this build can break, with the smallest file each one takes and the settings it accepts, and tfg damage <id> describes one. Both have --json, carrying the parameters under the same key and in the same shape tfg preset show already uses, because a damage parameter is a format property. Three things it refuses to do quietly. The smallest file follows the settings, so the column is measured with the defaults and says so - the same column got this wrong once for formats, announcing a floor that runs refused. An unknown name ends with 2 rather than 4, which is the code the same mistake already got from --damage. And two names at once are refused rather than answered about the first. Four guards, four mutations, all caught. The last of them holds the list that watches --help against the dispatch itself, because adding this command meant remembering two hand kept lists in two files and nothing asked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
donislawdev
force-pushed
the
damage/tfg-damage-command
branch
from
September 9, 2026 10:24
2bbe959 to
e5f4e7c
Compare
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.
The window drew the settings of a chosen damage from the declaration on the day
damage arrived. The command line named the damages and stopped there, so
learning that
zero-headtakesbytes, and thatbytesruns from 4 to 4096,meant typing a wrong value and reading the refusal.
The parity guard cannot see that gap: it counts recipe keys, formats and
presets, and a damage parameter is none of the three.
What is here
The list carries a sentence rather than only a name, which is the difference
from
tfg formats:pngandzipsay what they are andzero-headdoes not,so a list of names would repeat what the
--damageflag help already says. In--jsonthe parameters ride under the keytfg preset showalready uses, inthe shape
tfg formatsalready uses, because a damage parameter is aformat.Property.Three things it does not do quietly
defaults and says so. That column got it wrong once for formats: until
2026-08-04
MINIMUMwas the structural floor andpdfannounced 3265 whileruns took 3286.
damage.UnknownErroris alreadyclassified that way tool-wide, because a recipe naming one is refused while
the recipe is read. One mistake, one code, matters more than matching the
neighbouring command.
tfg formats png svgdescribes png, ignores svg and ends with zero.formatsis notchanged here, because that is a visible behaviour change to a released
command.
Guards
Four, each with a mutation, all caught and re-proved after the refactor below.
The last one holds
commandsTakingHelpagainst the dispatch itself: adding thiscommand meant remembering two hand kept lists in two files, and nothing asked.
The rule is mechanical rather than a list of exceptions, so
version,licenseand
helpare not exempted - they simply do not hand onargs[1:].Flattening beat raising a ceiling again: the command pushed the count of
functions nesting three deep from 51 to 52, and lifting the list builder out put
it back at 51.
Verification
go test ./...green,gofmt,go vet,staticcheck@v0.8.1cleantools/journey.py300 of 300tools/mutate/staleness.py: 940 patterns, each occurring exactly oncebuilt binary
🤖 Generated with Claude Code