Skip to content

Graph quality: fix 7 deselected CI tests before v5.0.0 release #28

@Simon-McIntosh

Description

@Simon-McIntosh

Context

The graph-quality CI job in docker-build-push.yml gates the release pipeline. 7 tests are currently deselected (not continue-on-error) because the IMAS-only graph data pushed to GHCR has known issues. These must be resolved before the final v5.0.0 release.

Failing Tests & Resolution Paths

1. test_facility_nodes_exist (IMAS-only structural)

Error: No Facility nodes in graph
Root cause: IMAS-only graph has no Facility nodes by design.
Fix: Skip this test when running against IMAS-only graph. Add a @pytest.mark.skipif that checks for GraphMeta.facilities == [] or add a --imas-only pytest flag.

2. test_unit_nodes_have_relationships (361 orphaned Unit nodes)

Error: 361 Unit nodes are orphaned (no HAS_UNIT)
Root cause: Unit nodes created during DD build but not linked to IMASNode via HAS_UNIT relationship.
Fix: In the DD build pipeline (imas_codex/graph/dd/), ensure every Unit node created is linked to at least one IMASNode. Rebuild and re-push the graph.

3. test_cocos_reference_nodes (0 COCOS nodes, expected 16)

Error: assert 0 == 16
Root cause: COCOS reference data not built into the IMAS-only graph package.
Fix: Include COCOS build step in the IMAS DD build pipeline. The COCOS reference nodes define sign conventions for magnetic field quantities. Rebuild and re-push.

4. test_dd_versions_linked_to_cocos (0 DDVersions linked)

Error: Expected >=17 DDVersions linked to COCOS, got 0
Root cause: Same as #3 — no COCOS data in graph.
Fix: Same as #3.

5. test_all_labels_in_schema (EmbeddingChange undeclared)

Error: Graph contains labels not in schema: {'EmbeddingChange'}
Root cause: EmbeddingChange nodes exist in the graph but are not declared in schemas/imas_dd.yaml.
Fix: Either add EmbeddingChange class to the LinkML schema, or clean up these nodes from the graph before pushing.

6. test_no_undeclared_properties (cluster_input_hash, test_case, test_prop)

Error: Undeclared properties on DDVersion, IMASNode, IMASSemanticCluster
Root cause: Properties written to graph during development/testing but not declared in schemas.
Fix:

  • DDVersion.cluster_input_hash → add to schemas/imas_dd.yaml (legitimate property for cluster build tracking)
  • IMASNode.test_case, IMASNode.test_prop → remove from graph (test artifacts)
  • IMASSemanticCluster.tags → add to schema or remove from graph

7. test_enum_values_valid (invalid physics_domain values)

Error: Invalid enum values including plasma_profiles, summary, core_profiles, etc.
Root cause: IMASNode physics_domain values don't match PhysicsDomain enum in schema. Old/stale values remain from earlier DD builds.
Fix: Run migration to normalize physics_domain values to match the enum. Invalid values should be mapped to valid enum members or cleared.

Execution Plan

  1. Schema fixes (tag image for ACR deployment #5, move main run-server cli within package #6): Add EmbeddingChange and cluster_input_hash to LinkML schemas → uv run build-models --force
  2. Graph migration (deploy containers #2, move main run-server cli within package #6, propagate ids_set amongst tools #7): Run Cypher to fix orphaned units, remove test artifacts, normalize physics_domain values
  3. COCOS build (Main #3, Server rewrite. Focused semantic search with cached embedings. #4): Ensure COCOS data is included in DD build pipeline
  4. Test skip (stdio and streamable-http containers #1): Add conditional skip for IMAS-only graph structural test
  5. Re-push graph: uv run imas-codex graph push --dev for imas-codex-graph-imas
  6. Remove deselects: Update CI workflow to run all tests
  7. Verify: Full CI pass with no deselects or continue-on-error

Priority

Blocking for v5.0.0 final release (not blocking RC1).

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