- evaluation.py: annotate input_dataset_collections dict with HDCA|DCE union
- runtime.py: refine InpDataCollectionsDictT from dict[str, Any] to proper union
- test_runtime.py: add assert-not-None guards for Optional[Type] returns from
build_collection_model_for_type, hasattr narrowing for dynamic model elements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rebase note: squash into 52035c6d1a (YAML tools specify a minimum
profile of 24.2 so test requests load).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add gx_data_collection_list_paired_or_list_list and
gx_data_collection_list_or_list_paired tool definitions + specs
- Add job_runtime valid/invalid specs for comma-separated type unions
- Add E2E test for list:list:paired, record:paired dynamic models
- Tighten nested collection assertions to use dynamic model types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add dict_type() helper to _types.py for symmetric type construction
- Replace CollectionRuntimeT union with DataCollectionInternalJsonBase
in all runtime.py annotations (dynamic models aren't in the union)
- Consolidate parallel routing tables: both _runtime_model_for_collection_type
and _validate_collection_runtime_dict now delegate to
build_collection_model_for_type, single source of truth is
_LEAF_COLLECTION_MODELS
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add build_collection_model_for_type() that recursively generates precise
Pydantic models for nested collection types (e.g. list:paired, list:list:paired).
Dynamic models use Literal[collection_type] and narrowed elements types so
inner type mismatches and depth mismatches are caught structurally by Pydantic
rather than requiring runtime model_validators.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Pydantic discriminated unions to enforce that collection_type
matches element structure:
- Add Literal types to simple models (list, paired, record, etc.)
- Add DataCollectionSampleSheetRuntime as separate model
- Split DataCollectionNestedRuntime into NestedList and NestedRecord
- Add collection_runtime_discriminator() for routing validation
- Create CollectionRuntimeDiscriminated tagged union
- Add structure mismatch tests (list with object elements, etc.)
- Add gx_data_collection_list_or_paired test tool
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- List type rejects paired-shaped data (object elements)
- Paired type rejects list-shaped data (array elements)
- Paired type rejects incomplete data (missing reverse)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove duplicate DataCollectionRecordRuntime class definition
- Add explicit branches for record, paired_or_unpaired, sample_sheet
- Include all 5 collection runtime types in fallback union
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add job_runtime_valid/job_runtime_invalid test specs for all scalar
types: int, boolean, float, text, select, genomebuild, directory_uri,
hidden, drill_down, and structural types (conditionals, repeats,
sections) containing only scalars.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add validate_job_runtime to validation layer and test runner. Add
job_runtime_valid/invalid specs for data, data_multiple, data_collection,
and typed collection (list/paired) params. New gx_data_collection_paired
test tool for paired collection_type coverage.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
DataCollectionInternalJson, RecursiveDataCollectionInternalJson,
and DataCollectionPaired replaced by new normalized models in
6c92826bfa but not cleaned up at the time.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removes NotImplementedError for DataCollectionParameterModel in
runtimeify() by implementing full collection-to-runtime conversion.
Collections produce normalized representations with class, name,
collection_type, tags, and elements. List-like types (list,
sample_sheet) get array elements; record-like types (paired,
paired_or_unpaired, record) get object elements.
Adds DataCollectionElementInternalJson subtype of DataInternalJson
for stronger typing of files within collections (adds
element_identifier, columns fields).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow passing pre-parsed parameters to parse_tool_test_descriptions()
to avoid re-calling input_models_for_tool_source() when the caller
already has the parameters.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>