Skip to content

fix(export): parity/margins functions accept list or string precisions - #153

Merged
ronaldtse merged 1 commit into
mainfrom
parity-entrypoint-contract
Sep 3, 2026
Merged

fix(export): parity/margins functions accept list or string precisions#153
ronaldtse merged 1 commit into
mainfrom
parity-entrypoint-contract

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Why

The watchdog launched parity via the ::parity entrypoint and the run
crashed instantly: the entrypoint passes precisions.split(",") (a
list) into parity_model, which called .split(",") on it —
AttributeError. Every entrypoint invocation (::parity, ::margins)
has been broken since PR #145 taught the function bodies to split;
only direct ::parity_model CLI calls worked.

What

  • normalize_precisions(precisions): accepts str | list[str],
    strips whitespace, drops empties.
  • parity_model and margin_model iterate normalize_precisions(...);
    entrypoints need no change (list passes through).

Evidence

  • 2 new tests (list-from-entrypoint skips completed stage; string input
    with spaces normalizes)
  • Full suite: 124 passed

The parity/margins entrypoints pass precisions.split(",") — a list —
into the remote functions, which then called .split again and crashed
with AttributeError. Every entrypoint invocation has been broken since
the loops learned to split; only direct ::parity_model CLI calls
worked. normalize_precisions accepts both forms.
@ronaldtse
ronaldtse merged commit 7277570 into main Sep 3, 2026
7 of 10 checks passed
@ronaldtse
ronaldtse deleted the parity-entrypoint-contract branch September 3, 2026 15:30
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