Repository navigation
Metadata namespace depends on PolyStore/OpenHCS import order #327
Description
Parent integration owner; reproduced while reviewing existing OpenHCS206 / PolyStore16. No duplicate issue found by exact filename search.
At normally integrated OpenHCS source e8d6d32, with PolyStore cb12a2acd91061d60cb6ec65981a9f5c01e18963 (includes application-recorded dc341739), importing polystore.metadata_writer before openhcs initializes METADATA_CONFIG.METADATA_FILENAME to polystore_metadata.json. The application then sets its environment default to openhcs_metadata.json, but the existing decoded dependency configuration remains unchanged.
Reproducer in a fresh Python process, with the application's checkout and its exact dependency source on PYTHONPATH:
import polystore.metadata_writer
import openhcs
import pytest
pytest.main([
'tests/unit/test_bioformats_microscope_handler.py::test_bioformats_handler_writes_normalized_workspace_metadata',
'-q', '--noconftest', '--import-mode=importlib', '-p', 'no:cacheprovider', '-o', 'addopts=',
])Actual failure: VirtualWorkspaceBackend._load_mapping raises FileNotFoundError: Metadata not found: .../polystore_metadata.json, while the application wrote its declared openhcs_metadata.json.
The same workspace test is included in a separately application-first bootstrapped run: 163 application controls pass in19.12s. Forty-eight standalone dependency controls also pass in0.82s with the dependency's generic filename. The negative control is1 failed in3.34s. An earlier negative-control invocation failed fixture setup because its scratch parent was missing; that error is retained separately and is not the product reproducer.
Scope: metadata declaration/configuration ownership at the application/dependency boundary, corresponding to the existing S8 formats/configuration refactor. Use existing typed metadata/workspace owners. Do not mutate another consumer's cached singleton, copy companion files, rename data, add filename readers/fallbacks, or weaken assertions. Preserve generic standalone PolyStore and application-owned OpenHCS namespaces and actual persisted contracts.
Acceptance: the supported fresh application path, dependency-first embedding path, standalone dependency path, persisted workspace reopen and native process handoff each use their declared namespace coherently. Exercise real filemanager/workspace owners and exact pixels/provenance. Preserve explicit custom namespace behavior. Live installed/MCP acceptance remains required, not implied by source tests.
Owner: parent integration agent. Existing206/16 implementation is preserved; their current installed candidate is not modified while the independently authored H003f blind trial remains frozen. Raw XML/logs are retained under /home/ts/wt/openhcs-issue-batch-20260929/input-parent-20261001.
Activity
trissim commentedon Oct 1, 2026
SOURCE-ONLY implementation owner: new isolated worktrees openhcs-metadata-namespace-327-20261001 and polystore-metadata-namespace-327-20261001 are based on pinned PR206 a3179b2 / PR16 4939979. Namespace configuration will extend the existing PolyStore MetadataConfig contract, be carried by VirtualWorkspaceBackend through connection params/native reconstruction, and be specialized by OpenHCSMetadataConfig. No singleton mutation or import bootstrap. Cross-file integration needed from parent owner ONLY: in microscope_base.py::_register_virtual_workspace_backend, construct VirtualWorkspaceBackend(plate_root=Path(plate_path), metadata_config=METADATA_CONFIG), importing the application METADATA_CONFIG from openhcs.core.virtual_workspace_metadata. This file is explicitly forbidden to my writes; please own that hunk on PR206. I will publish stacked source PRs and exact evidence. Installed/MCP acceptance remains parent-owned.
trissim commentedon Oct 1, 2026
SOURCE-ONLY handoff is published: OpenHCS draft328 (5660082, stacked on206) pins PolyStore draft20 (91fd7e8, stacked on16). Parent remains sole integration owner. Typed MetadataConfig ownership, persisted reopen and real native FileManager handoff are implemented; application inheritance replaces copied path/lock constants and ambient namespace bootstrap. 11 dependency checks pass; five application-declaration checks pass in each dependency-first/application-first/custom-environment variant, with exact pixels/axes/sample provenance. Unchanged original structural ratchet passes on both committed source surfaces and all three application roots; initial child raw-read+2 failure retained and fixed through constructor decoding (final-2), no waivers. Full NRA/R1 is not claimed. Original negative error and current unchanged microscope test failure are archived, not hidden: parent-only microscope_base.py::_register_virtual_workspace_backend must still pass metadata_config=application METADATA_CONFIG as requested above. I did not write that forbidden file or parent identity/profile/PR326 files. Source readiness for that actual microscope path is therefore still unresolved, separately from paired merge/install and installed native/MCP acceptance. Fresh extraction verified evidence archive; owned scratch/tool/native-build outputs cleaned, source WTs retained. No parent/shared/installed changes or UI/MCP/science operations.
trissim commentedon Oct 1, 2026
Completed on main by PR #328 integrated with the required parent microscope registration in PR #206. PR #206 now explicitly links this issue as a closing reference.
The application specializes the existing MetadataConfig declaration and passes it through workspace/native reconstruction; application bootstrap no longer mutates another consumer's namespace. The completed parent integration passed 29 current source controls in both import orders, five independent custom-filename controls, and actual private paired-wheel installed MCP health, persisted reopen and pixel sampling with the generic dependency filename independent of the OpenHCS declaration. Real ImageXpress generation, initialization/compile and persisted virtual sampling also passed. Installed input-preparation receipt records exact integration and limits.
Closing the import-order/metadata-namespace defect. Empty-step compile is initialization evidence; real Java/CZI execution and broader input/ROI scaling acceptance (#132) remain separate work.