You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vis.discover() is a wrapper, not a thin delegate — ADR-0002 Principle 2 drift #66
Three ways this violates Principle 2 ("client is exposed, not wrapped"):
Arg renaming: `metallic` → `metalness` (py-mat's internal name vs
mat-vis-client's name).
`auto_set=True` side-effects the Vis — that's a mutation disguised
as a search.
The underlying `mat_vis_client.search` already takes roughness +
metalness as ranges (widened in `pymat.vis.search`). `Vis.discover`
passes scalars through; they hit a different code path.
Decision
Option A — relocate: move `discover` to a module function
`pymat.vis.discover_for(material, ...)` that takes a material
explicitly, and delete the method. Leaves `Vis` as pure
identity + scalars + delegate sugar.
Option B — footnote the ADR: acknowledge `discover` as the one
exception where py-mat does translation, because it's a search layered
over the client and the tag-aware semantics are genuinely py-mat-side.
Recommendation
(B). `discover` has been in `Vis` since pre-3.0 and the
`auto_set=True` convenience is genuinely useful on a Material.
Moving it to a module function loses the dotted sugar
(`steel.vis.discover(...)`) without a clear win. Footnote in
ADR-0002 Principle 2 describing `.discover` as the "tag-aware
convenience wrapper" exception.
Labels
`question` — behavior stays the same either way; this is about
the documentation contract.
Activity
feat: 3.1.2 — milestone 1 audit follow-ups (13 issues closed)