Skip to content

Selected declaration discovery rejects packaged native modules before benchmark preparation #415

Closed

Description

@trissim

Fresh main f2aabe45a84d9834eef37d1862f0d0290ba73b63 cannot prepare the Advanced benchmark with the packaged native granularity extension present. Selected declaration discovery raises:

ImportError: No declaration source for 'openhcs.processing.backends.cellprofiler._granularity_native'

OpenHCSFunctionCatalogDeclaration.discover_source_declarations treats InspectLoader.get_source() == None as an import failure. Native extension and bytecode-only loaders legitimately have no Python source. Source literals are only an eligibility filter; lack of source must retain normal registry discovery so valid sourceless declarations can still register. Actual loader/import failures must continue to propagate.

The failure occurs in prepare_cellprofiler_input_workspace before server startup or pipeline execution. It also causes the existing ExampleHuman and pixel-classification selected-knowledge tests to fail: 52 passed, 2 failed on clean main with the main-declared metaclass-registry gitlink 3294a69dabc9f99dd646c32571b8f97cc139d378.

This is the new selected-discovery boundary introduced by PR #377, related to #376. The older source-decoding bug in #235 was already fixed; this reproducer does not decode a binary as text.

Local evidence: /var/tmp/openhcs-measurement-query-request-capture-20261001/controller.log and /var/tmp/openhcs-latest-main-registry-smoke-corrected-20261001.log.

Acceptance: preserve the native extension, admit sourceless modules through the existing nominal registry, retain source filtering and authoritative import errors, and pass the existing selected-source tests plus a real bytecode-only declaration control. Do not disable the binary, add a second discovery registry, or catch internal imports.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions