Skip to content

T0: warn on inert PiccoloOptions fields#255

Merged
aarontrowbridge merged 1 commit into
mainfrom
fix/t0-inert-options
Jul 9, 2026
Merged

T0: warn on inert PiccoloOptions fields#255
aarontrowbridge merged 1 commit into
mainfrom
fix/t0-inert-options

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

T0 defect from the API-ergonomics program (spec armonissima#33, tier T0). Piccolo is public/registered, so this is additive ([A]): a warning + docstring change, no signature or semantics change; the fields stay until v2.0.

What

Three PiccoloOptions fields are stored and documented as load-bearing but never consulted anywhere in Piccolo (verified by whole-tree grep of .rollout_integrator / .geodesic / .zero_initial_and_final_derivative):

  • rollout_integrator=expv — rollout algorithms are actually chosen by default_algorithm(system), so this is doubly misleading
  • geodesic=true
  • zero_initial_and_final_derivative=false

Change

  • Setting any of them to a non-default value now emits a @warn naming the real mechanism and the v2.0 removal. The default path stays silent.
  • Docstrings mark all three DEPRECATED (removed in v2.0). Fields retained until then for source compatibility.
  • Added a testitem: each warns on non-default; defaults and a genuinely-consulted field (bound_state=false) stay silent. (Required adding using TestItems to the Options submodule — sibling submodules already import it.)

Note

Visible @warn rather than the file's existing Base.depwarn (used for the verbose rename): Julia's default --depwarn=no hides depwarn from interactive users, and the whole point of this fix is that a silently-ignored option must not stay silent. Happy to switch to depwarn for consistency if you'd prefer.

Testing

TEST_FILTER="PiccoloOptions warns on deprecated" julia --startup-file=no --project=. <filtered runner>
→ Test Summary: Package | Pass 5  Total 5

🤖 Generated with Claude Code

…zero_initial_and_final_derivative)

T0 defect from the 2026-07-08 API-ergonomics audit (spec spec-20260708-140523,
armonissima#33). Three PiccoloOptions fields are stored and documented as
load-bearing but never consulted anywhere in Piccolo (verified by whole-tree
grep): `rollout_integrator` (rollout algorithms are actually chosen by
`default_algorithm(system)`), `geodesic`, and `zero_initial_and_final_derivative`.

Setting any of them to a non-default value now emits a warning naming the real
mechanism / the removal (v2.0); the default path stays silent. Docstrings mark
all three DEPRECATED. Fields retained until v2.0 for source compatibility.

Visible @warn rather than Base.depwarn: Julia's default --depwarn=no hides
depwarn from interactive users, and the point is that a silently-ignored option
must not stay silent. Added a testitem asserting each warns on non-default and
that defaults / genuinely-consulted fields (bound_state) stay silent; required
`using TestItems` in the Options submodule (siblings already import it).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@aarontrowbridge aarontrowbridge merged commit fcb10e0 into main Jul 9, 2026
8 checks passed
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