Repository navigation
R1: only serving readiness completes registries (fixes selected-source discovery regressed by #763) - #1217
Merged
Conversation
…e does not Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RegistryService asks CallablePreparation.prepare_for_serving, which prepares every callable and then completes the registries their modules use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iscovery Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
tests/unit/agent/test_declaration_selected_discovery.py::test_examplehuman_selected_source_uses_same_declaration_ownerfails on main. The test is not stale.91f05c26b(#763) madeCellProfilerModuleaCompilerPreparedAutoRegisterFamilywhose hook reads every registry member, and_scan_module_registriesalso counted the members of every prepared family. Pipeline import prepares callables, so retrieving one knowledge-base example imported all 91 CellProfiler declarations.Change
CallablePreparation.prepare_for_serving(new,openhcs/core/processing_preparation.py) prepares every callable and then completes the lazy registries their modules use, once, throughAutoRegisterRegistryPreparation.discover_module_registries(previously uncalled).RegistryService.prepare_in_current_processcalls it. This keeps Complete CellProfiler measurement registry discovery before READY #763's requirement that registries are discovered before READY.tests/unit/test_callable_contract.py::test_only_serving_readiness_reads_the_members_of_a_registry.Deletions
CellProfilerModule.prepare_registered_familyand itsCompilerPreparedAutoRegisterFamilybase: derived (serving readiness now completes the registry).AutoRegisterRegistryPreparationReportand its counts,_scan_module_registries: unused (only a test readprepared_family_count).Verification (local, Linux, merged with
origin/mainae6ddace5, head6b9398566; the later commit changes the receipt only)test_callable_contract.pyandtest_library_registry_discovery.py:62 passed in 91.34s.test_processing_preparation,test_execution_server_startup_preparation,test_fork_compiler_preparation,test_preparation_admission,test_callable_abi_preparation,test_registry_owner_iteration,test_registry_library_boundary,test_colocalization_preparation_readiness,test_cellprofiler_kernel_preparation,test_cellprofiler_callable_kernel_preparation,test_cellprofiler_strategy_registries,test_func_registry_projection):114 passed in 188.37s.guardrails_local.sh:guardrails rc=0.SMOKE_SKIP_GUI=1 smoke_local.sh:5 passed,smoke rc=0.1 failedwith 27 of 30 cases equivalent (0 differences each).ExampleYeastPatches,cp_tutorial_advanced_segmentation_finalandcp_tutorial_beginner_segmentation_finalendedExecution was cancelled(two at compilation, one at execution), with no value comparison. Two other worktrees started execution servers on the same port (7849) 59 s and 72 s before the first two failures, and one of those servers logged a cancellation 5 s before the second. Those three cases, rerun alone under the lock through the test's own helper on a different port, were equivalent with 0 differences. So all 30 cases were observed equivalent, across two runs; a single clean 30/30 run was not observed.Out of scope, found
The parity lock covers parity runs only.
_free_zmq_port_pairintests/integration/test_cellprofiler_official30_zmq.pypicks the same first free port as other ZMQ tests on the machine, so an unlocked ZMQ test in another worktree can cancel a parity case.Note: PR #1213 adds the same receipt file; whichever merges second needs a trivial merge of that document.
R1 (item 4) · PR #1217 · guards 1/1 · production −52 +47 · tests −17 +60
🤖 Generated with Claude Code