Skip to content

feat(cli): fiberpath plan --profile for a calibrated machine profile (#327) - #353

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/cli-machine-profile
Aug 8, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/cli-machine-profile

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Part of #327 (Stage 3b Phase 2). PR 3b — operator reachability for the slip limit (the final #327 code slice).

PR3a made slipLimit (μ) a real field that bounds a layer's frictionLambda, but every caller used the bundled default profile — so μ was unsettable and the calibration loop was fiction. This adds the flag that makes μ operator-settable.

What's here

  • fiberpath plan --profile <path> loads a machine profile via load_machine_profile and threads it through PlanOptions(profile=...). A bad/missing/invalid profile surfaces as a typer.BadParameter (exit 2) — user input, not a planner crash. No flag → the bundled marlin-xab.
  • Docs: machine-profile "Using a profile", getting-started CLI usage, CHANGELOG.

Tests (both threading directions, non-vacuous)

  • --profile with a strict μ=0.1 rejects the example's frictionLambda=0.15 (which the default μ=0.2 accepts) → proves it can lower μ.
  • A frictionLambda=0.25 layer is rejected by the default μ=0.2 but accepted by a loose --profile μ=0.3 → proves it can raise μ.
  • A missing --profile file → BadParameter (exit 2).

Adversarial review — SHIP

Verified all load_machine_profile failure modes (missing/unreadable/bad-JSON/schema/version/range) map to a clean BadParameter with no traceback leak; the exit-code contract (1 for a slip rejection, 2 for BadParameter) holds; and the strict test genuinely proves μ is threaded (default would accept). Its one LOW finding — the original loose case was a vacuous discriminator — is fixed here (the loose case now accepts a λ the default rejects).

Gate

Full backend 332 passed (CLI suite 12); ruff/format clean; --profile renders in --help. No non-CLI behaviour touched.

This completes #327's code. Remaining: the cross-repo org-pages hosted wind.schema.json sync (tracked follow-up; $id is major-only so the URL is unchanged).

…327)

Close the operator-reachability gap for the non-geodesic slip limit (PR3b, the
final #327 code slice). Until now every caller used the bundled default machine
profile, so mu (slipLimit) was unsettable and the calibration loop was fiction.

- `fiberpath plan --profile <path>` loads a machine profile via load_machine_profile
  and threads it through PlanOptions(profile=...); a bad/missing file surfaces as a
  typer.BadParameter (user input), not a planner crash. No flag => bundled marlin-xab.
- This is how an operator supplies a calibrated slipLimit so a layer's frictionLambda
  is validated against their own machine rather than the default 0.2.
- Docs: machine-profile "Using a profile" + getting-started CLI usage + CHANGELOG.

Tests: --profile with a strict slipLimit (0.1) rejects the frictionLambda=0.15
example; a loose one (0.3) plans it; a missing --profile file is a BadParameter (exit 2).
@CameronBrooks11
CameronBrooks11 merged commit 0e8f880 into main Aug 8, 2026
21 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/cli-machine-profile branch August 8, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant