Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/validation/paired_field_csv_314_20260930/PREFLIGHT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"command": "/home/ts/bin/agent-resource-check --assert-headroom",
"exit_code": 2,
"actual_result": {"free_gib": {"/": 8.2, "/dev/shm": 15.5, "/home": 12.5, "/tmp": 11.3}, "level": "warning", "ram_available_gib": 15.6, "reasons": ["/home free 12.5 GiB", "swap used 8.7 GiB"], "swap_used_gib": 8.7},
"admission": "20GiB warning only; bounded source worker/scratch",
"worker_memory_limit_bytes": 536870912,
"cpu_quota_percent": 100,
"numeric_threads": 1,
"owned_scratch_limit_bytes": 268435456,
"owned_scratch": "/home/ts/.cache/agent-scratch/issue314-russell"
}
36 changes: 36 additions & 0 deletions docs/validation/paired_field_csv_314_20260930/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
09bc36d6a804f1601315bb842a3c67852ed5d08f5a71b6fc632dd6f7c7a1e12a docs/validation/paired_field_csv_314_20260930/PREFLIGHT.json
e935c5bcb0d0bf4da40c68f855bff5afa484c6b1a6e667405004cb06164f0cd7 docs/validation/paired_field_csv_314_20260930/checkpoint.rst
f7a149a70dd9f82cadd4b1b43eae69a6c70354d04c870113bae2e80d6c697fcf docs/validation/paired_field_csv_314_20260930/core-census.json.gz
abcc421cce2ad109a4be6f9bae9c7ffdb80c48725a416bf4db5f60266fe610d5 docs/validation/paired_field_csv_314_20260930/core-census.log
22a3cbbcc9ac4d15b10c6ae38d5b930fb2a37a687f832f978d29543d803f399b docs/validation/paired_field_csv_314_20260930/core-overlay.json.gz
f842402ed5c9f2eb35f5a9abeb97ee7342e1e0269233d2149aab2a3b03ba4318 docs/validation/paired_field_csv_314_20260930/core-overlay.log
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 docs/validation/paired_field_csv_314_20260930/effective-imports-error.log
6260f67c73bdbb1e138b9733e3100f9c3b82daa032beaa1ab821891a830b8d68 docs/validation/paired_field_csv_314_20260930/effective-imports.json
2d22257b758889c28b6cc68e230075176e81e94b8b3eb5b93f0c8c0458040102 docs/validation/paired_field_csv_314_20260930/final-policy-exporter.log
4e6b60bb28c884fddf203e176e39b6b2a8fec79b0db065e2d3fb87bfc11967a1 docs/validation/paired_field_csv_314_20260930/merged-main-census.json
2a91055d7bc8f70cd70a234c0970babbf0bedf15cfce723dfecd4e028032cbb1 docs/validation/paired_field_csv_314_20260930/merged-main-census.log
bf1aee9710d476cd67ea9ef6e6a03805d50498d1dd38eb1f3f7e325e7fd2a1bd docs/validation/paired_field_csv_314_20260930/merged-main-owner.log
ef34e28b0d9ebe85c9a364f9d64bcba276f1af3de33c782a5452c74d8dd665b5 docs/validation/paired_field_csv_314_20260930/merged-main-related.log
45bb910ec84bccf47c98eab8d48668058c32f888bf3337eadf6af54ebdcc69a0 docs/validation/paired_field_csv_314_20260930/nra-original-resources.log
76efdf6231fe3d520aa5aad4ed07aa619696ed0a1bbc0d9ac58207439fbc1d1c docs/validation/paired_field_csv_314_20260930/nra-original.json
ca8e2518377ceb506f4b6616de041d8e5901d3abb7d53499aacacd284927f365 docs/validation/paired_field_csv_314_20260930/nra-owner-loop-resources.log
85fa34cc7c9365e1433cf13cfde3728b93e826212a862d5a896ee50f24215587 docs/validation/paired_field_csv_314_20260930/nra-owner-loop.json
0ef110ed10150278f09ba7ea4abf837c87f163d834794a99f26731ec3b722a69 docs/validation/paired_field_csv_314_20260930/owned-disposable.tar.gz
4068fc6aebd829bde62c38c9fd8a9c980ff2480214f9e68d638684cb643d6bef docs/validation/paired_field_csv_314_20260930/owner-census-delta.json
d221f41dafd990a5434428d86703b59b1eec66fb99c6537fb40a0c52bdd1205f docs/validation/paired_field_csv_314_20260930/owner-census-delta.log
8db82b08046f81c30100fe92751276352cef7f8a444a3297ec4df82ce2d95c0b docs/validation/paired_field_csv_314_20260930/owner-fixed-corrected.log
d50a0ddd323c80c4992f46e4a96c8a3a1515c6787ee2ad5f86191357ac964989 docs/validation/paired_field_csv_314_20260930/owner-fixed.log
d8375d089d79fb532af311d7d3b8f1509d0f21e9e045b7cd14a9ed04a132f509 docs/validation/paired_field_csv_314_20260930/ownership-receipt.rst
17988389f4355b8274b59fd1141bb8aa5757b6cb6adf94fe879c0b199ca023e3 docs/validation/paired_field_csv_314_20260930/policy-import.log
6b76484efe7c0bcd2634c61337c0f73018d457338bfb077c05c836ec42e3b481 docs/validation/paired_field_csv_314_20260930/pr-body.md
77b93b241966cb96c7e7e8e2adc7964d488abbaa14fb2ab94e74ddb1598c3673 docs/validation/paired_field_csv_314_20260930/related-owner-contracts.log
63ad8bd8fac5a6a06141b607f4d6bd51145a8952ee63bbc9c27c844c07724dcb docs/validation/paired_field_csv_314_20260930/reproducer-original-built.log
9aa5f6c2c1dd4b980dc653be3b1fca951a5eb42ba05e2a99709140190f08ffd0 docs/validation/paired_field_csv_314_20260930/reproducer-original.log
93abbe5307fdb809eae183b7e3fd79f276fb1044b1e889cf95ae3ec754dd36aa docs/validation/paired_field_csv_314_20260930/ruff-focused.log
9a5daa28530cfdb8a9a5dfaf7e4469862c7755067be421ee89f83f824ac2a6d7 docs/validation/paired_field_csv_314_20260930/source-anchors-base-empty-snapshot.log
05d26c97cc6db8b17026c5dfb984b13f5cc667479d0962613118c6d764edc22e docs/validation/paired_field_csv_314_20260930/source-anchors-base-verified.log
89e8f8287e324c431d734ec1f3dbb247459ed329ec939cc9478143cf239ccba3 docs/validation/paired_field_csv_314_20260930/source-anchors-base.log
5e739265347dec1ea5319579c3575f0ca9d4ba12a0a6c4209cbab692196c0b50 docs/validation/paired_field_csv_314_20260930/source-build.log
1b5332ef5d7e47ae6518191ef1e2564dd03ba02c716ded316439f5103b2b4e25 openhcs/core/source_matching.py
8eb0468a59f7545bbdbc86e12e0314899942dae444d57cb10bbf1ece2cd10d5b tests/unit/test_cellprofiler_spreadsheet_export.py
f106cb03132c41485c6c3dc065481abe80eac0682d25fb3a27cf0e1be093832c tests/unit/test_source_image_set_identity_policy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
"""Read-only verification of the installed two-well synthetic export control."""

import csv
import json
from pathlib import Path

import numpy as np
import tifffile

from openhcs.core.source_workspace_projection import (
VirtualWorkspacePathLookup,
VirtualWorkspaceSourceProjection,
)
from openhcs.runtime.zmq_execution_observation import ZMQRuntimeExecutionObservationExport


def main(root: Path) -> None:
receipts = root / "mcp-image-copy-reconnected"
status = json.loads((receipts / "receipt-017.json").read_text())
execution = status["payload"]["results"][0]["payloads"][0]
assert status["returncode"] == 0
assert execution["status"] == "complete"
assert execution["response"]["execution"]["error"] is None
inventory_receipt = json.loads((receipts / "receipt-020.json").read_text())
inventory = inventory_receipt["payload"]["results"][0]["payloads"][0]
assert inventory_receipt["returncode"] == 0
assert inventory["total_count"] == inventory["returned_count"] == 16
assert inventory["truncated_count"] == 0
cells_record = next(record for record in inventory["records"] if record["key"] == "Cells.csv")
assert cells_record["preview"]["truncated"] is False
cells = cells_record["preview"]["csv_rows"]
assert len(cells) == 4
assert {(row["image_number"], row["object_label"]) for row in cells} == {
("1", "1"), ("1", "2"), ("2", "1"), ("2", "2"),
}
for row in cells:
assert row["Parent_Nuclei"] == row["object_label"]
assert float(row["AreaShape_Area"]) == 52.0
assert float(row["Location_Center_X"]) == float(row["AreaShape_Center_X"])
assert float(row["Location_Center_Y"]) == float(row["AreaShape_Center_Y"])
assert all(value != "" for value in row.values())

output = root / "outputs-input-source-fixed" / "synthetic_openhcs"
with (output / "results" / "Cells.csv").open(newline="") as handle:
assert list(csv.DictReader(handle)) == cells
projection = VirtualWorkspaceSourceProjection.from_openhcs_metadata(
output, json.loads((output / "openhcs_metadata.json").read_text()),
)
assert len({(ref.backend, ref.backend_address)
for ref in projection.source_refs_by_virtual_path.values()}) == 4
for well in ("A01", "B01"):
for channel, name, step in (("1", "Nuclei", 0), ("2", "Cells", 1)):
relative = f"results/{well}_w{channel}_{name}_step{step}.labels.tif"
lookup = VirtualWorkspacePathLookup(relative, str(output / relative))
source_projection = projection.require_source_projection_for(lookup)
assert source_projection.ref.backend == "disk"
assert source_projection.ref.backend_address == relative
assert source_projection.image_metadata.source_spatial_domain.source_shape_yx == (32, 32)
nuclei = tifffile.imread(output / "results" / f"{well}_w1_Nuclei_step0.labels.tif")
expected_nuclei = np.zeros((32, 32), dtype=np.int32)
expected_nuclei[5:9, 5:9] = 1
expected_nuclei[22:26, 22:26] = 2
np.testing.assert_array_equal(nuclei.squeeze(), expected_nuclei)
cell_labels = tifffile.imread(output / "results" / f"{well}_w2_Cells_step1.labels.tif")
assert set(np.unique(cell_labels)) == {0, 1, 2}
assert np.count_nonzero(cell_labels == 1) == np.count_nonzero(cell_labels == 2) == 52
dna = tifffile.imread(root / "synthetic" / "TimePoint_1" / f"{well}_s001_w1_z001_t001.tif")
expected_dna = np.zeros((32, 32), dtype=np.uint16)
expected_dna[5:9, 5:9] = 12000
expected_dna[22:26, 22:26] = 18000
np.testing.assert_array_equal(dna, expected_dna)
actin = tifffile.imread(root / "synthetic" / "TimePoint_1" / f"{well}_s001_w2_z001_t001.tif")
np.testing.assert_array_equal(actin, np.full((32, 32), 24000, dtype=np.uint16))

observation = ZMQRuntimeExecutionObservationExport.read(
root / "runtime-observation-input-source-fixed.json",
)
assert observation.execution_id == "bb932c48-de7a-4867-bbb2-5a090a5aa928"
assert dict(observation.execution_success_by_axis) == {"A01": True, "B01": True}
close_receipt = json.loads((receipts / "receipt-021.json").read_text())
outcome = close_receipt["payload"]["results"][0]["payloads"][0]["outcome"]
assert outcome["request_attempted"] and outcome["acknowledged"] and outcome["process_exited"]
print("PASS: installed COMPLETE; four complete paired cell rows; four label projections; "
"known source pixels unchanged; native export reopens; exact worker closed. "
"Physical calibration and biological accuracy are not assessed by this control.")


if __name__ == "__main__":
import argparse

parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("root", type=Path)
main(parser.parse_args().root)
124 changes: 124 additions & 0 deletions docs/validation/paired_field_csv_314_20260930/checkpoint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
Tested source checkpoint
========================

Base702b2c2c9563da2636db251f8b734cff215596b8. Source repair only;
parent owns final integration and actual installed/MCP acceptance.

Production change is confined to SourceImageSetIdentityPolicy.from_source_bindings.
Shared singleton coordinates across paired primary declarations stay field
identity. Explicit stacks/grouping keep precedence. Existing component_values()
owns biological assignment versus physical selector precedence. No exporter,
shape/secondary module, provenance schema, scope, registry or global package edit.

Original built-source synthetic exporter failed:8 partial rows instead of4
complete rows for2 fields x2 cells. Corrected source passes100 tests in15.52s
(wall17.07s, maximumRSS455620KiB) under512MiB cgroup/oneCPU/threads1.
Includes the real CSV exporter/counts, source binding/provenance contracts,
measurement source-group alignment, two-versus-three channels, site/well/z/time
negative controls, explicit stacked/grouped constant axes, physical-selector
versus biological-coordinate precedence and path fallback without metadata.
No scientific image read, segmentation, JVM, MCP/server/viewer startup,
installed-entrypoint or external CellProfiler oracle was performed.

Original failures retained: fresh checkout missing compiled tabular extension
(reproducer-original.log); real baseline split (reproducer-original-built.log);
initial production patch had a misplaced generator comma and failed collection
(owner-fixed.log). Corrected that syntax, not assertions or behavior, before the
passing owner-fixed-corrected.log. Existing extension declarations were built
locally without installation or package/source dependency changes (source-build.log).
The failed complete-context NRA attempt (exit124, maximumRSS524536KiB) returned
deadline_incomplete JSON: complete=false, deadline_exceeded=true, stage
parse_python_module, internal budget20s and elapsed22.054s. This corrects the
earlier empty-JSON description; the raw original was preserved. It remains in
nra-original.json/nra-original-resources.log; it is not a complete
R1/semantic proof. Do not repeat with greater global limits. Core syntax census
and source-witness review are evidence at their actual scope, not global health.

Ruff's initial all-rule check exposes13 inherited findings (import order and
quoted annotations). Keep unrelated source debt out of this repair; compare
changed-owner metrics against exact base rather than claiming a clean repository.
The new test module itself has no Ruff findings. Source/test git diff --check
passes. Published raw diagnostic logs retain original trailing whitespace;
an unrestricted evidence-inclusive diff --check flags that whitespace.

Coordination: all7 then-open PR file lists checked. Shared source_bindings.py
(#206), runtime_image_values.py/runtime_plane_projection.py (#217) remain
read-only. Direct message addressed to Avicenna on their PR:
https://github.com/OpenHCSDev/openhcs/pull/217#issuecomment-5920836946.
No response or coordinated shared edit is claimed; no waiting or new agent call.

H003e immutable REJECT remains untouched. Issue314 is not closed by source tests.
Source/wheel/MCP continuity and external semantics acceptance remain separate
parent gates.

Additional source checkpoint before main integration
---------------------------------------------------

131 distinct source tests pass across the focused owner/exporter and related
CellProfiler shape, secondary-distance and module-scope shards. The final
policy/exporter shard is41 passed,4.91s, maximumRSS378400KiB and includes the
normal from_pipeline_config path. The related shard is30 passed/8 failed,
maximumRSS518188KiB (below512MiB). Its eight matched-anchor fixture failures
all reach MeasurementsArtifactType.require_output_subject before this policy:
legacy synthetic fixtures lack MeasurementSubjectRelation. All eight also fail
on unmodified main702b2c2c9 (source-anchors-base-verified.log:8 failed/3 passed).
Parent integration owns disposition of that inherited fixture mismatch; acceptance
requires properly typed subjects, not weakening the guard. No fixture/assertion
was relaxed. Earlier baseline snapshot assembly attempts (empty snapshot and
missing pytest_integration_options) are retained separately as harness failures.

The lightweight one-file NRA loop completed in2.97s/77176KiB, zero findings;
its actual scan_status is exact_compact_global,79 analyzed detectors,0 omitted,
complete=true. This is complete ONLY for the selected source_matching.py input,
not a complete OpenHCS context scan or formal equivalence proof. Full-context
failure remains retained. Changed-core census at source commit6f636c2afe6d98cc
adds16 code lines and zero in every other measured syntax category.

Effective OpenHCS imports resolve this worktree (source version0.8.7), not the
installed distribution metadata0.8.6. Existing editable PolyStore resolves
/home/ts/wt/openhcs-custom-function-admission-20260929/external/PolyStore,
clean at1209068f5fc9e4f7025a24ada8a73ef30dd1ddd7. This dependency is unmodified;
these checks do not prove a frozen gitlink dependency closure or installed parity.
Exact other effective imports/versions are retained in effective-imports.json.

Merged current main and final handoff
------------------------------------

Main2b7969f700c33eb7f73f891d975afd1efc0628bb was integrated normally with merge
commit e3d991e9cf02c496daa7c9df32c73bfde4a7ad00. It changes viewer owners, not
the repaired policy. Core tree025c72d3ce07962cfbe57c181819bdc6d081e5f3 is byte
identical between original702b2c2c9 and new main; the changed branch core tree
is a10ecc8bcf0b4e68576eaa52b6479bd4f661999a. The original fixture and strict
artifact owner are also unchanged between those main revisions.

Reran both shards on that exact merged head under the same512MiB/oneCPU bounds:
merged-main-owner.log:101 passed,14.13s, maximumRSS406828KiB;
merged-main-related.log:30 passed/8 inherited failures,6.01s,387968KiB.
No budget escalation or stopped-shard replay. These139 distinct selected tests
therefore have131 passes and8 failures, not a green broad suite. Shape/module/
secondary contracts pass; the remaining failures occur at the existing strict
subject guard before the changed policy and have an original-source control.
Parent integration is the named disposition owner for those fixture failures;
no active repair by another agent or final acceptance is invented.

merged-main-census.json/log measures exact merged head against new main:
16 added core code lines and zero other measured syntax-count changes, no parse
failures, maximumRSS20304KiB. Earlier compact NRA input remains byte-identical.
No parent viewer/MCP acceptance is attributed to this source-only repair.

Disposal: owned scratch860KiB and build objects400KiB were archived together as
owned-disposable.tar.gz (309648 bytes,124 archive entries, gzip integrity checked),
then only /home/ts/.cache/agent-scratch/issue314-russell and this worktree's build/
were removed. SHA2560ef110ed10150278f09ba7ea4abf837c87f163d834794a99f26731ec3b722a69.
Removal is recoverable from that archive. Local compiled extensions remain in
the owned checkout for reproduction; no task-owned persistent worker is active.
Durable .issue314/ retains instruction extraction and original-source controls.
SHA256SUMS seals published source/tests/evidence (excluding the manifest itself).

Reproduce from this checkout using the existing Python entrypoint and the exact
bounded commands retained in merged-main-owner.log/merged-main-related.log.
The baseline control command and original failing assertions remain in their
logs; no held-out TIFF, frozen CSV or scientific trial artifact is involved.
Draft PR317 contains the coherent source repair and original failures. Parent
owns merge, source-closure/installed/MCP/external-parity acceptance; no installation,
runtime launch, issue closure or frozen-file mutation is requested or claimed.
Binary file not shown.
Loading
Loading