Skip to content

Fix CI failures: pyarrow guards, DSL API contract drift, UQ reducer keying#1349

Merged
SkBlaz merged 3 commits intocopilot/find-coverage-gapsfrom
copilot/sub-pr-1347-again
Apr 15, 2026
Merged

Fix CI failures: pyarrow guards, DSL API contract drift, UQ reducer keying#1349
SkBlaz merged 3 commits intocopilot/find-coverage-gapsfrom
copilot/sub-pr-1347-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Three dominant failure clusters in CI (71491626052) after the coverage/test additions in the previous PR.

Changes

Missing pyarrow in CI

  • tests/test_roundtrip_invariants.py: Guard TestArrowRoundtripZeroLoss with @pytest.mark.skipif(not _PYARROW_AVAILABLE, ...) — skips cleanly when pyarrow absent
  • .github/workflows/tests.yml: Add pyarrow to primary test job install; bump coverage job to .[tests,arrow]

DSL/AST contract drift

Fixes 'Query' object has no attribute 'summary', 'list' object has no attribute '_to_ast', and Target.NODES in ['nodes', 'edges'] failures:

  • py3plex/dsl/ast.py: Add Query.summary() returning a stable structural dict with a 16-char ast_hash (SHA-256 of canonical JSON AST); change Target to class Target(str, Enum) so string membership tests work
  • py3plex/dsl/builder.py: from_layers() now accepts list[str] → converts to LayerExpr; non-string elements raise ValueError
# Before: AttributeError: 'Query' object has no attribute 'summary'
q = Q.nodes().where(degree__gt=5)
print(q.to_ast().summary()["ast_hash"])  # "a3f8c2e1b9d4..."

# Before: 'list' object has no attribute '_to_ast'
Q.nodes().from_layers(["social", "work"])  # now works

assert_network_semantic_equal layer comparison

get_layers() returns visualization objects, not layer names — switched to .layer_names / .layers with a node-attribute fallback.

UQ reducer keying

MockReducer in tests/test_uncertainty_runner.py defined a broken @property def __class__ to fake __name__. Replaced with a plain .name attribute that runner.py's getattr(reducer, "name", None) already expects.

Copilot AI and others added 2 commits April 15, 2026 18:28
…ts, get_layers helper

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/c6cfd34e-410c-41d4-8ed4-6457769782a6

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>
…h clear ValueError

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/c6cfd34e-410c-41d4-8ed4-6457769782a6

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add high-ROI coverage targets for tests and CI Fix CI failures: pyarrow guards, DSL API contract drift, UQ reducer keying Apr 15, 2026
Copilot AI requested a review from SkBlaz April 15, 2026 18:31
@SkBlaz SkBlaz marked this pull request as ready for review April 15, 2026 20:39
@SkBlaz SkBlaz merged commit e3063b1 into copilot/find-coverage-gaps Apr 15, 2026
SkBlaz added a commit that referenced this pull request Apr 18, 2026
…lper-level visualization+registry tests, and CI coverage job (#1347)

* Add focused coverage tests and dedicated CI coverage job

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Fix new tests and validate focused coverage targets

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Refine tests from review feedback and simplify coverage job setup

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Address validation feedback and finalize coverage-target changes

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Incorporate final validation feedback and tighten determinism checks

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Add type hints to new tests and finalize quality cleanup

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Polish test naming and fixture typing from final review

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Initial plan (#1348)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Fix CI failures: pyarrow guards, DSL API contract drift, UQ reducer keying (#1349)

* Initial plan

* Fix CI failures: pyarrow guards, reducer keying, NoNoise identity tests, get_layers helper

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/c6cfd34e-410c-41d4-8ed4-6457769782a6

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Tighten from_layers() list validation: reject non-string elements with clear ValueError

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/c6cfd34e-410c-41d4-8ed4-6457769782a6

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Make coverage CI non-blocking while preserving coverage artifact output

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/ab8ed629-10ed-403d-aaea-5ce9d18f94e8

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.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.

2 participants