-
fix(#20): heid-bug-hunt fixups — CLI open-world container-type hardening (slice-5)
released this
2026-07-19 11:29:10 -07:00 | 51 commits to main since this releasePanel (Gróa + Hulda + Regin, source-verified by Heid): adapter/route-map/
ConnectFailed-at-call-sites sound against the declared invariants; 4 real
robustness findings, all in the CLI open-world presenter/probe paths — the
container-type layer BELOW the null/element holes the code-review already fixed.Fixed (findings 1-3):
_format_whoami(cli.py): a non-iterablescopes/allowed_rolesscalar
({"scopes": 123}) madex or []yield123→for s in 123TypeError. New
_display_seqhelper degrades any non-list (scalar / bare string / null / absent)
to empty; applied to bothscopesandallowed_roles._characters_probe(cli.py): same class on the model catalogitems({"items": 123}) — now guardsmodelsis a Mapping anditemsis a list before iterating._characters_probe: the top-level open-world readscreated/stateare now
isinstance(_, Mapping)-guarded before any.get— a non-mapping SDK passthrough
(created=[...]) aborts cleanly (exit 20) / renderspad=Noneinstead of an
AttributeError.
Accepted (finding 4, documented in contract § slice-5 notes): the
--characters
probe leaks its transient character on a mid-lifecycle failure. PRE-EXISTING (the
retired probe had the identical linear no-finallystructure — cutover did not
worsen it), TTL-bounded, one-shot diagnostic; atry/finallywould swallow a
happy-path delete-failure (delete is both teardown and a tested step). Gróa + Heid
concur accept is defensible.Dismissed (finding 5): Hulda flagged
sessions.pydroppingget_me/etc. as a
caller-contract break — it is the intended DEC-3 no-backwards-compat migration (all
in-repo callers rewired same-diff); Heid labels it intended-surface-change.Added CLI tests for the three hardened paths (scalar scopes/roles; scalar items +
non-mapping state; non-mapping create abort). Suite 488 green; ruff clean; live
smoke re-run clean (identical happy-path output). Patch bump 0.21.17 → 0.21.18.Downloads