Reject CLI options that do not belong to the selected mode

Mode validation ran in one direction only. Under --ecosystem, --ticks was
accepted and then ignored; without it, --episodes and --tick-limit were
accepted and then ignored. Either way the process exited zero while
running the other workload, so a measurement script could report success
for a run it never performed.

Record which options were actually supplied and reject any that belong to
the other mode, in both directions. An option that is accepted and then
ignored is now a parse error rather than a silent substitution.

Six CLI cases cover this. cli-ecosystem-rejects-ticks and
cli-episodes-require-ecosystem are the genuine regressions, reproducing
the two reported invocations; the entities, save and verify-replay cases
were already rejected and add coverage. The remaining shared options were
audited: --seed and --output are valid in both modes, and --load
conflicts were already enforced.

Native Release, clang-tidy analysis, ASan and format checks pass 16/16.
The ecosystem report is unchanged: 32 episodes still fingerprint
2cd4a15f9fbe9949, and golden d61ad5bf0c928c76 is intact.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-22 18:36:46 -04:00
co-authored by Claude Opus 5
parent eaf58f2b85
commit 22fb904c3e
3 changed files with 37 additions and 5 deletions
+12
View File
@@ -342,6 +342,18 @@ out: the producer always retains captured energy, so its whole inventory never
reaches zero. The elapsed time is one uncontrolled wall-clock observation, not a
performance threshold.
Review of `eaf58f2` found one defect (2026-09-22): the CLI validated mode options
in one direction only. `--ticks` was accepted and ignored under `--ecosystem`, and
`--episodes`/`--tick-limit` were accepted and ignored without it, so a measurement
script could exit zero while running the other workload. The parser now records
which options were supplied and rejects any that do not belong to the selected
mode, in both directions. Six CLI cases cover this; `cli-ecosystem-rejects-ticks`
and `cli-episodes-require-ecosystem` are the two genuine regressions, while the
entities, save and verify-replay cases were already rejected and add coverage.
The remaining shared options were audited: `--seed` and `--output` are valid in
both modes, and `--load` conflicts were already enforced. CTest is now 16 cases,
all four native configurations were rerun, and `2cd4a15f9fbe9949` is unchanged.
This measures arithmetic conservation and turnover, not ecological plausibility.
Strategy constants, lifespans and the targeting rule are chosen inputs. There is
no maintenance cost, starvation rule, perception, spatial gate, genome or