Skip to content

Add guarded M5 BactoTraits finalization and producer verification helpers - #1871

Merged
realmarcin merged 4 commits into
masterfrom
verify/m5-bactotraits-release-20261116
Nov 19, 2026
Merged

realmarcin merged 4 commits into
masterfrom
verify/m5-bactotraits-release-20261116

Conversation

@realmarcin

@realmarcin realmarcin commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

The retained BactoTraits replay stopped before finalization. Add a bounded helper that runs the producer and finalizer on the same object, checks the complete audit and zero graph rows, and invokes strict merge admission. Add a guarded launcher for one native CLI source with exclusive outputs, shared-input pins, private caches and explicit raw-write declarations.

Independent adversarial review found and repaired four verification gaps: ambient Python import routing could select another checkout; interrupted copies could publish partial inputs; undeclared raw changes were recorded but accepted; and the bounded finalizer did not compare the preceding replay's complete code and consumed-policy identities. Regression tests cover the actual isolated child, competing targets, interrupted copies, recursive additions/changes/deletions, and provenance drift.

Add a preservation-only helper for the requested worktree cleanup. It plans from ignored-inclusive status, preserves one canary before the remaining artifacts using exclusive same-volume renames, and verifies exact checkout identity and all source/archive inventories before certifying completion. Its independent review also found and repaired a late-writer completion gap. Caller quiescence and outside-consumer checks remain required; the helper does not delete data or remove worktrees.

The original M5 evidence remains historical: a bounded pair changed 21 edges / 22 nodes to 0/0 with one complete row 8521 / BacDive 17851 audit. Later original-helper runs completed canonical ontology, BacDive and full BactoTraits units; their strict BactoTraits-only candidate had 9,757 nodes / 87,788 edges and zero target-SPO occurrences. Archive SHA256: d217563f5d29ca2bc7ac729253acf5f83d23519d02a22ed91a5cc974ccf49976. Evidence: CultureBotAI/EdgeMech#151. These receipts are not relabeled as runs of the revised guards. A new native unit is required before any larger production run.

Validation at a46e0f616f00a2b71ecb4a6d524abdbf7ea2ed1b: all four standard local gate stages passed on the clean committed candidate; the full suite reported 10,011 passed and 56 skipped. Required Python 3.10, 3.11 and 3.12 CI jobs all passed. The first gate attempt stopped at six missing test-callback docstrings before running pytest; #1878 records the documentation-only repair, and its failed receipt is retained. Independent review: #1871 (review).

The original populated-M5 result (9,974 passed / 33 failed / 17 skipped) remains preserved; its 33 NCIT fixture failures are tracked separately in #1873. Code checks do not establish a complete canonical graph, scientific acceptance or publication. No release is published by this PR.

Closes #1869
Closes #1870
Closes #1874
Closes #1875
Closes #1876
Closes #1877
Closes #1878

Refs #887, #1872, #1873 and CultureBotAI/EdgeMech#143.

Resolve adversarial findings #1870 and #1874 through #1877 with bound CLI imports, atomic staging, declared raw effects, exact replay provenance and verified artifact preservation.
Fixes #1878 without changing test behavior.

@realmarcin realmarcin left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Independent adversarial review of candidate a46e0f616f00a2b71ecb4a6d524abdbf7ea2ed1b is complete. Separate read-only passes covered the launcher, replay/finalization provenance, preservation helper, tests and scientific claims. No material finding remains in the revised change, subject to the required local gate and CI completing successfully.

Findings and dispositions:

  • #1874: bind the actual isolated child package/CLI imports to the reviewed checkout; a real child regression exercises competing PYTHONPATH/PYTHONSAFEPATH routing.
  • #1875: copy privately, verify complete bytes, then publish without clobbering a competing file or symlink. Partial-copy evidence remains private.
  • #1870: enforce explicitly declared raw additions, modifications and deletions with recursive inventory and retained failure diagnostics.
  • #1876: compare the preceding candidate's complete code inventory and consumed policy path/SHA256, including missing, extra and malformed identities.
  • #1877: reconcile source membership, checkout identity and all retained metadata after moves and on no-op resume before certifying preservation.
  • #1878: add the six callback docstrings required by the standard gate; this follow-up changes no test behavior.

Focused validation: the combined selection produced 63 passes and one fixture failure. That fixture used an empty .git directory, which is not a nested repository; replacing it with a real repository containing uncommitted work made its unchanged refusal assertion pass. All 64 selected cases have therefore passed across the run and recheck. Required format/spelling preparation and complete docstring coverage now pass. The first standard-gate attempt stopped at docstring coverage before running pytest; its receipt remains retained. The corrected clean candidate is running the standard gate once and the three supported-Python CI jobs.

Evidence boundary: original M5 receipts remain historical runs of their original helper bytes. The revised guards do not establish a new canonical graph or release. Existing NCIT fixture isolation issue #1873 and publication blockers remain separate. The cleanup dry run correctly refused 97 nested repositories in retained pytest artifacts; no artifact move has occurred pending a narrowly scoped preservation decision. This operational refusal is not a reason to weaken the helper's guard.

@realmarcin

Copy link
Copy Markdown
Collaborator Author

Final validation is complete at a46e0f616f00a2b71ecb4a6d524abdbf7ea2ed1b:

The repository owner explicitly authorized this merge. Because the PR is self-authored, the recorded independent agent review is a GitHub comment rather than a self-approval. The merge uses the repository's existing administrator exemption; all required test checks are green and no protection settings are changed.

Source archives, verified recovery bundles and the reviewed preservation tool are retained outside the worktrees. The local preservation dry run succeeded. The M5 dry run correctly refuses nested repositories in the retained pytest fixture tree; preserving that exact tree remains subject to the separately requested narrow exception. No M5 artifact move has occurred.

@realmarcin
realmarcin merged commit eea8742 into master Nov 19, 2026
3 checks passed
@realmarcin
realmarcin deleted the verify/m5-bactotraits-release-20261116 branch November 19, 2026 08:23
@realmarcin

Copy link
Copy Markdown
Collaborator Author

Merged as eea874265c1a08d02aa84ed55f61350b30eb4407. The reviewed tree passed all four local standard-gate stages (10,011 passed, 56 skipped) and required Python 3.10/3.11/3.12 CI. The addressed issues #1869, #1870 and #1874–#1878 are closed; #1873 remains a separate NCIT fixture-isolation issue.

Cleanup is verified: the remote feature branch, both local copies of that branch, and the M1/M5 PR worktrees are removed. All untracked and ignored artifacts were preserved first. The 97 nested M5 pytest fixture repositories were retained under the owner's explicit exception, with complete file-hash and metadata verification. Source archives, Git recovery bundles, move receipts and deletion manifests remain in durable storage. Other checkouts and their existing changes were preserved. No graph release was published by this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment