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
89 changes: 89 additions & 0 deletions docs/validation/diagnose-selected-discovery-release-022.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
"""Source-only installer/API witness; never installs or publishes a package."""

import argparse
import json
import subprocess
import sys
import tomllib
from pathlib import Path
from types import ModuleType
from packaging.requirements import Requirement

parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("dependency", type=Path)
parser.add_argument("--probe-index", action="store_true")
args = parser.parse_args()
root = Path(__file__).resolve().parents[2]
dependency = args.dependency.resolve()
sys.path[:0] = [str(root), str(dependency / "src")]

import metaclass_registry
from scripts import validate_local_release_floors as floors
from scripts.wait_for_pypi_release import probe_release

candidate = floors.read_release_candidate(dependency / "pyproject.toml")
project = floors.read_project(root / "pyproject.toml")
requirement = next(
item for item in project.dependencies if item.name == candidate.name
)
compatibility = floors.CandidateRequirementCompatibility(requirement, candidate)
original_project = tomllib.loads(subprocess.check_output(
["git", "-C", str(root), "show", "f2aabe45:pyproject.toml"], text=True,
))
original_requirement = next(
Requirement(item) for item in original_project["project"]["dependencies"]
if Requirement(item).name == candidate.name
)
assert original_requirement.specifier.contains("0.2.1")
assert not floors.CandidateRequirementCompatibility(
original_requirement, candidate,
).requires_candidate_floor
assert compatibility.accepts_candidate
assert compatibility.requires_candidate_floor
assert compatibility.excludes_next_breaking_series
assert not requirement.specifier.contains("0.2.1")
assert str(candidate.version) == metaclass_registry.__version__ == "0.2.2"

old_commit = subprocess.check_output(
["git", "-C", str(dependency), "rev-parse", "v0.2.1^{commit}"], text=True
).strip()
old_core_source = subprocess.check_output(
["git", "-C", str(dependency), "show", "v0.2.1:src/metaclass_registry/core.py"],
text=True,
)
# Execute the original core declaration, not a copied compatibility module.
# Its common imports resolve from the current source package: this is a narrow
# missing-method witness, not an installed old-wheel or whole-old-package proof.
old_core = ModuleType("metaclass_registry._release_021_core_probe")
old_core.__package__ = "metaclass_registry"
sys.modules[old_core.__name__] = old_core
try:
exec(compile(old_core_source, f"git:{old_commit}:core.py", "exec"), vars(old_core))
old_registry = old_core.LazyDiscoveryDict(enable_cache=False)
try:
old_registry.discover_matching(lambda module: False)
except AttributeError as error:
missing_api_error = str(error)
else:
raise AssertionError("original0.2.1 unexpectedly supplies selected discovery")
finally:
sys.modules.pop(old_core.__name__)

new_registry = metaclass_registry.LazyDiscoveryDict(enable_cache=False)
new_registry.discover_matching(lambda module: False)
output = {
"interpreter": sys.executable,
"dependency_module": metaclass_registry.__file__,
"candidate_version": str(candidate.version),
"openhcs_requirement": str(requirement),
"original_openhcs_requirement": str(original_requirement),
"original_accepts_api_incompatible_021": True,
"original_021_commit": old_commit,
"original_missing_api_error": missing_api_error,
"new_api_call": "passed; unconfigured registry performs no discovery",
"installed_or_published": False,
}
if args.probe_index:
probe = probe_release(candidate.name, str(candidate.version))
output["index_probe"] = {"available": probe.available, "detail": probe.detail}
print(json.dumps(output, indent=2), flush=True)
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Authorized metaclass-registry 0.2.2 publication
==============================================

Terminal publication and PR414 integration
------------------------------------------

Public release/index/artifact/API gate PASSED. Original publisher36946473814,
attempt1, job110649639675 completed SUCCESS at2026-10-02T00:58:17Z. Original
observer69246 exited0; orchestration cell207 completed after the one admitted
verification. workflow-terminal.json and workflow-watch.log retain the actual
terminal steps. The queued state below is the preserved predecessor observation.

Original OpenHCS wait_for_release/probe_release verified exact PyPI metadata AND
the normal installer index for metaclass-registry==0.2.2. Original
materialize_release_files downloaded one wheel/sdist set and verified the declared
SHA256 digests. No second download, environment or installation was performed.

Retained distributions in artifacts/:

* metaclass_registry-0.2.2-py3-none-any.whl,22522bytes,
SHA25667ae17c58d9d10cd58acf83ebe01833c1f1fe0a1a2e281924fab836958d592ed.
* metaclass_registry-0.2.2.tar.gz,30773bytes,
SHA256540bd730c52a535e08866c487b34aa4f9cb2fe857eb07a312882cdc43a15517c.

verify_publication.py compared all six packaged library Python sources in BOTH
distributions byte-for-byte with exact tagged393a7e03003cdc56df9013f932ed4f26e632d77a.
Wheel metadata/version and source inventory passed. The original read-only
Python3.12 imported metaclass_registry directly from the retained PUBLIC wheel,
not checkout/site-packages: version0.2.2; original selected/full discovery identity
and ImportError/ValueError negative controls all3passed in0.02s. Whole verification
exit0,0.59s,40040KiB peak RSS, CPU0/kernel512MiB/no swap/60s. Exact output and command
are artifact-verification.log and artifact-verification.resources.txt.

Normally merged OpenHCS main9a04107492ad90233394cf17524d0ca8e74062bb (including
418's root aggregate versus selected-plane capability) into the existing PR414
branch: mergec054f1674ff4cf4169f4cb175be27d2515711346. Updated ONLY the metaclass
gitlink from prepared4b7d491 to actual released393a7e0. Remaining production diff
against that main is pyproject.toml >=0.2.2,<0.3 and that gitlink; openhcs/ and
tests/ are identical to main. Dependency src/tests/pyproject are unchanged from
reviewed4b7d491. No submodule checkout was initialized or changed. Prior48source
checks/original pinnedR0 zero-positive remain retained; no identical source rerun,
full R1 retry, timeout increase or global qualification claim.

NRA catalog review: IMPL-12/13 retain original publisher/probe/materialization and
LazyDiscoveryDict importer/registration owner; MEMB-1/2 introduce no parallel
catalog/roster; TIME-3/4 require the actual published API through the package
minimum, not a compatibility alias or negotiated fallback. Original source376
new-declaration/cooperative capability tests remain unchanged. Published-wheel
new-case test creates independent Plugin declarations, exercises selected then
full registration through the original shared owner, and preserves exact identity
without generic consumer edits. No ornamental inheritance or new mechanism.

After all observer/verifier workers were terminal and no lsof/process handles
remained, removed ONLY owned
/home/ts/.cache/agent-scratch/metaclass-registry-022-publication-20261001 (56KiB).
Canonical root and pytest alias symlinks resolving inside it were checked first.
One durable artifact set and all original evidence/source/history remain.

PR414 is ready for parent review/merge; installed OpenHCS acceptance and package
installation remain parent-owned. No private/backing environment, native/viewer,
provider or scientific input/output changes. No persisted format changes.

Initial authorized publication checkpoint (historical)
------------------------------------------------------

Owner: Schrodinger. Explicit owner authorization: publish this dependency now
through original scripts/release.py and tag-triggered publisher. No authorization
for other releases or current private installation changes. Parent owns414 minimum
integration and safe fresh installed acceptance while live science remains active.

Normally fetched/fast-forwarded the clean owned dependency WT to exact merged
393a7e03003cdc56df9013f932ed4f26e632d77a; source/metadata match reviewed4b7d491.
Original annotated v0.2.2 absent before launch. Original installed Python3.12
executed scripts/release.py once under CPU0/512MiB/no swap/60s. Script reported
current0.2.2/PyPI0.2.1; answered y. Direct terminal exit0, no restart/replay.
Original release session66838 transcript is release-session.typescript.

Actual original publication handles
-----------------------------------

* Annotated tag object c88166848834c402b0a059db37ed8a141cd42147.
* Remote tag peel393a7e03003cdc56df9013f932ed4f26e632d77a verified.
* Publisher run36946473814, attempt1, push event v0.2.2/head393a7e0:
https://github.com/OpenHCSDev/metaclass-registry/actions/runs/36946473814
* Job110649639675, original Build and publish to PyPI, ubuntu-latest:
https://github.com/OpenHCSDev/metaclass-registry/actions/runs/36946473814/job/110649639675
* Check suite100077633915; check run matches original job, no annotations.
* Original gh run watch --interval10 observer session69246; workflow-watch.log.

Initial actual state queued, runner_id0, no steps, started_at2026-10-02T00:32:05Z.
Actions permissions enabled/all; pending_deployments empty. No specific cause
established for runner nonassignment. This is original publishing execution,
not optional CI validation or another permission wait. Do not cancel/replay it.

Artifact/index/API completion is still pending in this initial checkpoint.
No artifacts existed locally or were claimed available at this checkpoint;
one retained set will live in this directory's artifacts/ through the ORIGINAL
OpenHCS materialize_release_files helper, with its SHA256 validation intact.
verify_publication.py uses original probe_release for metadata+installer index,
compares packaged Python source in both wheel/sdist to exact tag393a7e0, and runs
original tests/test_selected_discovery.py directly from that retained PyPI wheel.
It refuses to overwrite or rematerialize an existing artifact directory.
Direct wheel import is not a private install/fresh normal OpenHCS journey.

Keep414 unmerged until actual index and API proof completes. Public minimum
requires a real0.2.2 distribution, not this tag alone. No package/API shim,
new publisher, new environment, native/viewer, science or provider expenditure.
Resource warning: RAM12.2GiB/home6.1GiB/root7.7GiB/swap10.3GiB; only small
source/metadata operations here. Dependency WT/source remains clean at393a7e0.

Orchestration cell207 observes the ORIGINAL session69246 rather than a second
publisher/status store. On watcher terminal, it records authoritative workflow
metadata; only actual completed/success/exact393a7e0 admits the verification
command. Original wait_for_release provides a bounded30s/10s index wait; original
materialize_release_files retains one wheel/sdist set; whole source verification
is CPU0/kernel512MiB/no swap/60s in the existing read-only Python3.12 interpreter.
Verification output is artifact-verification.log/resources.txt. Durable source
driver is retained; future disposable API fixtures are owned only at
/home/ts/.cache/agent-scratch/metaclass-registry-022-publication-20261001.
No automated private installation or minimum merge is scheduled. This initial
checkpoint remains pending until actual terminal/index/API observations arrive.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
45eee23e4ec97cefbfcad768f165e9e9ee8d58b035656e11b555db85d4eb6369 docs/validation/metaclass-registry-022-publication-20261001/RECEIPT.rst
9690d44f2e0426c5ffb19d80356df2f41c32b7ea5a24c144912e8632e5fc8960 docs/validation/metaclass-registry-022-publication-20261001/verify_publication.py
0231889209c76b3d9f6fe4c11dddba6d8cc91359010d82c3d83e967d27cb94ff docs/validation/metaclass-registry-022-publication-20261001/release-session.typescript
7b80e7b28ee1f3111fd7462853e15636d064a368726e6f1d3898ad465036c3f9 docs/validation/metaclass-registry-022-publication-20261001/workflow-initial.json
0422e1a4841db83e61d052634a80036358978812d6b07215d46c53553d34a177 docs/validation/metaclass-registry-022-publication-20261001/job-queued.json
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 docs/validation/metaclass-registry-022-publication-20261001/pending-deployments.json
13a18c7696575cf7ec50bbe4c0787637880fcf76471dc46570ad983a31e7598e docs/validation/metaclass-registry-022-publication-20261001/workflow-terminal.json
0470677218e39615ce28d29f1bd1747c4017ce4d6113bcf52a475a22933fd498 docs/validation/metaclass-registry-022-publication-20261001/workflow-watch.log
742a3ac59191573de6dc09097b9d7890776e950d28542d30b75185b232c2fab3 docs/validation/metaclass-registry-022-publication-20261001/github-release.json
0beee0649d3efa7468b4f630d1202595d0bdc81180fe08127d492e298c00f493 docs/validation/metaclass-registry-022-publication-20261001/artifact-verification.log
25afa796fc6061dd476f43347c8c74a3d8659ec1dc1f8955c5a0f08a905a0ff4 docs/validation/metaclass-registry-022-publication-20261001/artifact-verification.resources.txt
67ae17c58d9d10cd58acf83ebe01833c1f1fe0a1a2e281924fab836958d592ed docs/validation/metaclass-registry-022-publication-20261001/artifacts/metaclass_registry-0.2.2-py3-none-any.whl
540bd730c52a535e08866c487b34aa4f9cb2fe857eb07a312882cdc43a15517c docs/validation/metaclass-registry-022-publication-20261001/artifacts/metaclass_registry-0.2.2.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.3.5, pluggy-1.6.0
rootdir: /home/ts/wt/metaclass-registry-selected-discovery-376-20261001
configfile: pyproject.toml
collected 3 items

../metaclass-registry-selected-discovery-376-20261001/tests/test_selected_discovery.py . [ 33%]
.. [100%]

============================== 3 passed in 0.02s ===============================
{
"source_commit": "393a7e03003cdc56df9013f932ed4f26e632d77a",
"index": {
"available": true,
"detail": "PyPI metadata and installer index serve metaclass-registry==0.2.2 with an installable wheel",
"wheel_url": "https://files.pythonhosted.org/packages/0f/fd/4b3043710035b1c21c0edb5ca24ee7bee8b5fc61a2162d93f527326ab2ed/metaclass_registry-0.2.2-py3-none-any.whl#sha256=67ae17c58d9d10cd58acf83ebe01833c1f1fe0a1a2e281924fab836958d592ed"
},
"wheel_import": "/home/ts/wt/openhcs-knowledge-declaration-source-376-20261001/docs/validation/metaclass-registry-022-publication-20261001/artifacts/metaclass_registry-0.2.2-py3-none-any.whl/metaclass_registry/__init__.py",
"exact_source_files_checked_in_wheel_and_sdist": 6,
"api_controls": "original selected/full discovery and both failure controls passed",
"artifacts": [
{
"path": "/home/ts/wt/openhcs-knowledge-declaration-source-376-20261001/docs/validation/metaclass-registry-022-publication-20261001/artifacts/metaclass_registry-0.2.2-py3-none-any.whl",
"size": 22522,
"sha256": "67ae17c58d9d10cd58acf83ebe01833c1f1fe0a1a2e281924fab836958d592ed"
},
{
"path": "/home/ts/wt/openhcs-knowledge-declaration-source-376-20261001/docs/validation/metaclass-registry-022-publication-20261001/artifacts/metaclass_registry-0.2.2.tar.gz",
"size": 30773,
"sha256": "540bd730c52a535e08866c487b34aa4f9cb2fe857eb07a312882cdc43a15517c"
}
],
"installation": "none; direct retained-wheel import in original read-only interpreter"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Running as unit: run-p2726043-i15339559.scope; invocation ID: 6f8d248733e6475abd8d7760a69f4d91
Command being timed: "timeout 60s taskset -c 0 env PYTHONDONTWRITEBYTECODE=1 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 NUMBA_NUM_THREADS=1 /home/ts/wt/openhcs-generated-inputs-installed-parent-20261001/.venv/bin/python -I -B docs/validation/metaclass-registry-022-publication-20261001/verify_publication.py /home/ts/wt/metaclass-registry-selected-discovery-376-20261001 --scratch /home/ts/.cache/agent-scratch/metaclass-registry-022-publication-20261001"
User time (seconds): 0.28
System time (seconds): 0.06
Percent of CPU this job got: 58%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.59
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 40040
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 11156
Voluntary context switches: 119
Involuntary context switches: 65
Swaps: 0
File system inputs: 0
File system outputs: 152
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"tagName": "v0.2.2",
"targetCommitish": "main",
"publishedAt": "2026-10-02T00:57:52Z",
"url": "https://github.com/OpenHCSDev/metaclass-registry/releases/tag/v0.2.2",
"assets": [
{
"name": "metaclass_registry-0.2.2-py3-none-any.whl",
"apiUrl": "https://api.github.com/repos/OpenHCSDev/metaclass-registry/releases/assets/604473210",
"url": "https://github.com/OpenHCSDev/metaclass-registry/releases/download/v0.2.2/metaclass_registry-0.2.2-py3-none-any.whl",
"size": 22522,
"state": "uploaded",
"digest": "sha256:67ae17c58d9d10cd58acf83ebe01833c1f1fe0a1a2e281924fab836958d592ed"
},
{
"name": "metaclass_registry-0.2.2.tar.gz",
"apiUrl": "https://api.github.com/repos/OpenHCSDev/metaclass-registry/releases/assets/604473209",
"url": "https://github.com/OpenHCSDev/metaclass-registry/releases/download/v0.2.2/metaclass_registry-0.2.2.tar.gz",
"size": 30773,
"state": "uploaded",
"digest": "sha256:540bd730c52a535e08866c487b34aa4f9cb2fe857eb07a312882cdc43a15517c"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"completed_at":null,"conclusion":null,"id":110649639675,"labels":["ubuntu-latest"],"runner_group_name":"","runner_id":0,"runner_name":"","started_at":"2026-10-02T00:32:05Z","status":"queued","steps":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Script started on 2026-10-01 20:31:57-04:00 [COMMAND="systemd-run --user --scope -p MemoryMax=512M -p MemorySwapMax=0 -p CPUQuota=100% -- timeout 60s taskset -c 0 env PYTHONDONTWRITEBYTECODE=1 OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 NUMBA_NUM_THREADS=1 /home/ts/wt/openhcs-generated-inputs-installed-parent-20261001/.venv/bin/python -B scripts/release.py" TERM="dumb" TTY="/dev/pts/6" COLUMNS="80" LINES="24"]
Running as unit: run-p2677172-i15228715.scope; invocation ID: bbe88d2a6ed540829fe834ae3fc6fd65
Current package version: 0.2.2
Current PyPI version: 0.2.1
Create release for v0.2.2? [y/N] y
Enumerating objects: 1, done.
Counting objects: 100% (1/1)Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1)Writing objects: 100% (1/1), 173 bytes | 173.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/OpenHCSDev/metaclass-registry.git
* [new tag] v0.2.2 -> v0.2.2

Successfully created and pushed tag v0.2.2
GitHub Actions workflow should start automatically.
Monitor progress at: https://github.com/OpenHCSDev/metaclass-registry/actions

Script done on 2026-10-01 20:32:02-04:00 [COMMAND_EXIT_CODE="0"]
Expand Down
Loading
Loading