Skip to content

fix/generate-structure-validation - #1087

Draft
thomashebrard wants to merge 3 commits into
devfrom
fix/generate-structure-validation
Draft

fix/generate-structure-validation#1087
thomashebrard wants to merge 3 commits into
devfrom
fix/generate-structure-validation

Conversation

@thomashebrard

@thomashebrard thomashebrard commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary by cubic

Fixes structure generation and PipeFunc validation. codegen types/build structures now project concepts only (no @pipe_func import, no model deck), and a PipeFunc can return the generated structure class (bare or qualified).

  • Bug Fixes

    • Accept both names for a concept’s structure class in PipeFunc return types: the runtime’s qualified name and the generated bare name. Works for scalar and Concept[]; unrelated names still reject.
  • Refactors

    • Added load_crate_for_concept_projection with is_loading_pipes=False to load domains+concepts only; skips importing/registering @pipe_func modules and avoids caching fingerprints for partial loads.
    • Switched both CLIs to this path for codegen types/build structures, and boot without model decks (offline). resolve/codegen inputs/validate/run remain strict.
    • Docs clarified this skips validation for ALL pipe types and is not a validation gate; fixed stale references and updated the agent-CLI codegen types row. Added tests asserting identical outputs with/without implementations and the new return-type acceptance.

Written for commit b54c32f. Summary will update on new commits.

Review in cubic

thomashebrard and others added 3 commits August 5, 2026 15:59
…drift contract

`codegen types` now projects the concept set through
`load_crate_for_concept_projection`: it never instantiates a pipe, never
imports the customer's `@pipe_func` module, and needs no model deck. The
agent-CLI contract table still described it as resolving the closure, which
overstates what runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ot just PipeFunc

Skipping pipe instantiation skips pipe validation for every pipe type.
PipeFunc is the motivating case, not the boundary: a PipeSequence naming a
nonexistent step also passes `codegen types` / `build structures` now, so
neither is a validation gate. Verified against dev with a PipeFunc-free bundle.

Also fixes two stale references left by this branch: the codegen types module
docstring credited `load_normalized_crate_or_exit` (no longer called), and
`load_from_crate` pointed at a nonexistent `load_crate_for_structure_generation`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
thomashebrard added a commit to Pipelex/pipelex-api that referenced this pull request Aug 6, 2026
Temporarily git-source pipelex at b54c32f (the head of Pipelex/pipelex#1087,
fix/generate-structure-validation) instead of the released 0.42.0 from PyPI, so
the hosted runner can exercise the sandbox structure-generation fix on dev.

This reintroduces a git source for pipelex, which uv propagates into
pipelex-api-hosted's resolution and overrides its PyPI pin. Repoint to a plain
`pipelex[...]==X.Y.Z` once the PR is merged and released.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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