Skip to content

Declare native output defaults through existing typed dtype policy (#213) - #2

Merged
trissim merged 3 commits into
fix/durable-decorator-context-20260929from
feat/callable-native-dtype-20260929
Sep 30, 2026
Merged

trissim merged 3 commits into
fix/durable-decorator-context-20260929from
feat/callable-native-dtype-20260929

Conversation

@trissim

@trissim trissim commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Refs OpenHCSDev/openhcs#213; paired OpenHCS draft
OpenHCSDev/openhcs#217. Linnaeus owns this backend/dtype
integration. Stacked on PR1 (retained history/runtime-handle ownership), base
fix/durable-decorator-context-20260929; do not merge/install either without
coordinator acceptance. The PR diff adds only the dtype default and regressions.

Concrete defect / reproducer

ArrayBridge direct decorators default to PRESERVE_INPUT even when a callable
naturally produces floating measurements. Removing a BaSiC wrapper's own
astype(input.dtype) is insufficient: the outer dtype wrapper rescales/casts
its first output. Input uint16 plus output [-1.25, 12.5, 70000.5] loses values
unless an explicit native runtime config is passed. OpenHCS pipelines already
default to native via DtypeConfig, but direct calls are a distinct real entrypoint.

Existing owner extension

dtype_config_default accepts the existing DtypeConversionConfig owner. Its
runtime default and reflected signature use the same object; explicit
runtime dtype_config still overrides it through existing conversion runners.
No extra policy registry, special BaSiC name dispatch, wrapper bypass, module
global config mutation, fallback or new config schema. Framework/GPU wrapping
and undeclared preserve-input behavior are retained. OpenHCS declares its own
existing DtypeConfig native default on the BaSiC callable.

Evidence / scope

  • Python3.14 AST parse: changed module + regression file pass, no imports.
  • Focused Ruff E9/F63/F7/F82 and git diff --check pass.
  • Four real NumPy wrapper regressions added: native fractional/negative/large
    range; explicit override with float sidecar retained; existing undeclared
    preserve behavior; untyped default rejected. Not executed yet under the
    serialized runtime schedule. This is a source checkpoint, not live readiness.
  • No installed package/environment changed. Parent #151/#212 acceptance finished;
    Lovelace currently owns finite heavy slot, Confucius prepare-only next.

Focused catalog review: BOUND-2 existing typed config owns policy; IMPL-13 one
existing conversion mechanism handles both defaults and overrides; TIME-7 no
copied framework policy. New conversion modes still extend their existing runner
family, not new consumer branches. Source/AST/catalog only, no global NRA proof.

Remaining: focused regressions, exact paired OpenHCS direct and compiled/MCP fit
journey, retained history compatibility, current installed entrypoint acceptance
after reviewed integration. Keep draft and no issue-closing claim.

trissim and others added 2 commits September 30, 2026 07:54
@trissim

trissim commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Parent integrated PR2 normally with current main409b1e0, published d6d92a7 without editing the original worktree. All four real callable dtype tests passed as part of the paired15-test OpenHCS/BaSiCPy source run: native fractions/negative/large output, explicit runtime override, unchanged undeclared preserve-input behavior, untyped default rejection. Actual source paths asserted, existing Python3.12 environment, no install/download. Original receipts in the persistent issue-batch/basicpy-parent-numeric-20260930 ledger. Parent owns the paired PR217 integration and installed/MCP acceptance separately; this is not a live activation claim.

@trissim
trissim marked this pull request as ready for review September 30, 2026 19:07
@trissim
trissim merged commit 821696e into fix/durable-decorator-context-20260929 Sep 30, 2026
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