Skip to content

Scope HolderSeenProbe to its test; repairs fixture writes scripts entry - #3240

Merged
trissim merged 3 commits into
mainfrom
fix/discover-members-package
Oct 25, 2026
Merged

trissim merged 3 commits into
mainfrom
fix/discover-members-package

Conversation

@trissim

@trissim trissim commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes three main reds (ci.yml, Linux):

  • test_module_layers_clients.py::test_outgoing_wire_matches_the_tree_that_declares_it
  • test_module_layers_clients.py::test_outgoing_wire_fails_on_a_renamed_field_or_a_missing_probe
  • test_repairs.py::test_a_local_import_moves_up_unless_a_load_time_import_leads_back

Cause of the OutgoingWire reds: test pollution. tests/test_install_worker_holds.py declared HolderSeenProbe(RuntimeProbe) at module level. __init_subclass__ put it in RuntimeProbe.__registry__ for the life of the xdist worker, so any later test on that worker that read the installer's probes (OutgoingWire, tools/module_layers.py:404) got a member declared under tests/, and relative_to blew up. The probe now lives inside the one test that uses it, and finally pops it from the registry (same pattern as tests/guards/test_coordination_ownership.py:62).

Not done, on purpose: narrowing DeclaredFamily.discover_members to members declared inside the package. That restates membership by file location beside the registry, and it broke test_new_declared_table_is_installed_without_schema_roster_edit, which is the contract (declare a table, get it installed). Reverted.

test_repairs: since #3184, Package needs the [project.scripts] entry; tree() now writes it.

Proof: nice -n 19 timeout 600 python -m pytest -q -p no:xdist tests/test_install_worker_holds.py tests/test_module_layers_clients.py tests/test_repairs.py tests/guards/test_coordination_ownership.py gives 17 passed.

Assumed:

  • Module-level bare TypedTable test members (tests/round2/test_typed_table.py, tests/test_table_mutation_capabilities.py) still sit in the registry, but no production scan reads the bare TypedTable family today, so they leak into nothing. If a scan ever reads it, they need the same scoped declaration.
  • The other main reds belong to Delete two main reds pinning what #3205 and #3131 changed #3229 and fork-reds3 (owners assigned by openhcs-99).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q8rVa3cPyXzpCKyR8XvM8W

trissim and others added 3 commits October 25, 2026 00:57
The probe was declared at module level in tests/test_install_worker_holds.py,
so it stayed in RuntimeProbe.__registry__ for every later test in the worker
and OutgoingWire read it as an installer probe outside the package. Declare it
inside the one test that uses it and pop it from the registry in finally.

test_repairs' tree() fixture now writes the pyproject.toml scripts entry
Package needs since #3184.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q8rVa3cPyXzpCKyR8XvM8W
@trissim trissim changed the title discover_members returns only the members its package declares Scope HolderSeenProbe to its test; repairs fixture writes scripts entry Oct 25, 2026
@trissim
trissim marked this pull request as ready for review October 25, 2026 05:06
Copilot AI balanced review requested due to automatic review settings October 25, 2026 05:06
@trissim
trissim enabled auto-merge October 25, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit 3e38f4e into main Oct 25, 2026
17 checks passed
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