Skip to content

--help calls --commits the price of a lit day; it prices only the brightest shade #93

Description

@vyncint

Today

$ mossaic-art --help | grep -- '--commits'
  --commits N         commits per lit day (default 4)

$ mossaic-art --template dragon --year 2027 --no-colour --plan /dev/null | grep -E 'Dragon|level|^      [024]'
Dragon  ·  2027  ·  53 of 53 columns  ·  146 days  ·  442 commits
  level  days   commits each
      4    75   4
      2    71   2
      0   225   must stay dark

$ echo "146 lit days x 4 = $((146*4)); 75*4 + 71*2 = $((75*4+71*2))"
146 lit days x 4 = 584; 75*4 + 71*2 = 442

It is wrong for text too, once --background is set:

$ mossaic-art VYNCINT --year 2027 --background 1 --commits 4 --no-colour --plan /dev/null | head -1
VYNCINT  ·  2027  ·  41 of 53 columns  ·  75 days  ·  590 commits
# "commits per lit day" x 75 days = 300; the tool prints 590 (75x4 letters + 290x1 field).

Everything else words it correctly:

$ grep -n 'prices the' docs/ART.md
244:`--commits N` prices the **brightest** day, and every darker shade is priced
$ sed -n '628,629p' src/bin/mossaic-art.rs
    // `--commits` prices the *brightest* day, and every darker level is priced

Why it is worth fixing — the number a planner exists to produce is what the art will cost, and the help produces a different one. Applied to the shipped dragon it predicts 584 where the tool prints 442, a 32% overestimate arrived at by doing exactly the multiplication the help describes. It goes the other way too: someone budgeting a five-shade picture at --commits 100 prices every lit day at 100, when a level-1 day costs 25. Nobody reconciles the two, because the report never restates the flag and the whole point of the level table is that the reader takes it on trust.

The wrong wording is also the only description most users get: Cargo.toml:25 excludes docs/* from the published archive and README never mentions --commits at all, so a cargo install user has the help line and nothing else. It reads as a leftover from 0.6.3's help rewrite — the changelog entry says "the colour-theory paragraph that lived inside --background moved to docs/ART.md", and the pricing sentence went with it, leaving behind a one-line summary that was true only while a plan was letters at level 4.

Fix — one line in the help block in src/bin/mossaic-art.rs: --commits N commits for the brightest day; darker shades are priced against it (default 4). Text art with no background is unaffected, because a letter day is always level 4. The --commits 1 refusal message and docs/ART.md already word it correctly, so this is the only surface that needs changing.

Done whenmossaic-art --help | grep -- --commits describes --commits as pricing the brightest shade, and a reader who applies that description to --template dragon --year 2027 arrives at the 442 the command prints. A test in tests/art_cli.rs checks the help line against a report, the way the_readme_lists_every_glyph_the_font_has already checks a document against the code that owns the fact.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions