Skip to content

ref: keep add decisions in core and extract command registration - #40

Merged
Chemaclass merged 2 commits into
mainfrom
ref-add-decisions-into-core
Oct 31, 2026
Merged

Chemaclass merged 2 commits into
mainfrom
ref-add-decisions-into-core

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

📚 Description

Two quality fixes after the recent bug fixes. No behavior change.

🔖 Changes

  • add kept domain decisions in the command: it parsed every token twice and checked integer overflow itself. These now live in the pure sum-tokens in core/adder, which returns the total, the bad tokens, or an overflow flag. The command only prints.
  • The scaffolder carried a 15-line PHP program inside single-quoted shell. It is now bin/register-command, a small PHP script with named parts, and bin/new-command calls it.

Verification

  • composer check passes (48 assertions, up from 36 with new sum-tokens unit tests).
  • add output and exit codes are the same for bad input, overflow, -- -1 2 and a plain sum.
  • Scaffolder cases re-run: say-hi, hi, t and der register in order; a repeated name, an oddly shaped file and a read-only file print the manual steps and exit 0.
  • shellcheck bin/new-command and php -l bin/register-command are clean.

@Chemaclass Chemaclass added the enhancement New feature or request label Oct 31, 2026
@Chemaclass Chemaclass self-assigned this Oct 31, 2026
@Chemaclass
Chemaclass merged commit af7e26d into main Oct 31, 2026
1 check passed
@Chemaclass
Chemaclass deleted the ref-add-decisions-into-core branch October 31, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant