In-cycle fixes for the independent review of the #319 package, RED-first for both Importants. A repeated --override path now refuses at the shared lexer (exit 2, path named) instead of panicking exit 101 through reopen_all — which also un-misattributes the campaign leg's collision prose for duplicates. override_paths' refusal points at aura graph introspect --params (the retired --list-axes reference swept from every live comment, one explicitly-historical mention remains). exec classifies file targets through a Result-bearing peek: unparseable JSON refuses neutrally before any leg is chosen. RunPresentation (single-variant) removed; run_campaign_returning's contract note names its one deliberate usage-class exit; C14's routing sentence and C20's family-builder paragraph amended to current truth (superseded text to the history sidecars); bench error strings and deletion blank-line runs tidied. refs #319
3.5 KiB
C14 — Headless core, two faces: history
FROZEN HISTORICAL RECORD. Each block below was true as of its cycle/date stamp and may be superseded; this file is NOT current truth and NOT a grounding surface. Current contract: c14-headless-two-faces.md.
Realization (cycles 0098/0099, #175 — the CLI meets GNU/clig.dev conventions
via clap). The programmatic/CLI face's argument surface moved from a hand-rolled
argv parser to a clap derive parser (admitted under the C16 per-case dependency
policy — research-side, a dev-loop/compile tax, never a frozen-artifact tax;
invariant 8 untouched, the change is confined to aura-cli, a leaf binary the
frozen deploy artifact cannot pick up). One declarative source now yields scoped
aura <sub> --help, --version/-V, a per-flag Options section, and GNU
--flag=value / -- / long-option abbreviation. The exit-code partition is a
durable part of the automation contract, so a caller can branch on the failure
class without parsing stderr: exit 0 = success; exit 2 = usage error — a
command-line fault (clap parse errors + aura's post-parse argument-structure
validations, including the content of an argv-named blueprint file, which is
itself an argument); exit 1 = runtime failure — a well-formed command whose
needed environment / recorded state is missing, or bad piped stdin data. The four
dual-grammar subcommands (run/sweep/walkforward/mc) keep both grammars under one
token via an optional [blueprint] positional + a post-parse is_file()
dispatch; the execution layer is unchanged (arg-plumbing via thin *_from
adapters). Error-message casing is normalized to the clap house style —
every hand-rolled usage line reads Usage: aura <verb> … (#179, cycle 0101);
refusal diagnostics stay unprefixed (diagnostics are not usage lines). The
machine-first help surface (JSON/manifest help, stdin op-scripts) stays on the
#157/C21 track, not this cycle (settled as human/GNU convention compliance).
Current-state "Dual grammar" section (superseded by the #319 sugar
retirement, 2026-07-25): "The four dual-grammar subcommands
(run/sweep/walkforward/mc) keep both grammars under one token via an
optional [blueprint] positional plus a post-parse is_file() dispatch; the
execution layer is unchanged (arg-plumbing via thin *_from adapters). The
machine-first help surface (JSON/manifest help, stdin op-scripts) is
deferred to the #157 / C21 track, distinct from this human/GNU-convention
compliance."
Current-state "Single document grammar" section's first-draft routing
sentence (superseded by the #319 sugar retirement, 2026-07-25): "one verb,
exec <target>, dispatches on is_blueprint_file (a first-positional
naming an existing .json file selects the loaded-blueprint leg; anything
else — a campaign file or a registered content id — the campaign leg)." This
undersold the routing by one layer: the code always also peeked the file's
top-level "kind" field (is_campaign_document_file) to tell a campaign
document ending in .json from a blueprint file — both being ordinary
readable .json files is_blueprint_file alone cannot distinguish — and,
after an independent review found a malformed campaign file was silently
misrouted to the blueprint leg's own JSON-parse error prose, gained a
neutral not-valid-JSON refusal ahead of the leg choice (review Minor-3,
2026-07-25's fix cycle). The current contract's "Single document grammar"
section names this real routing.