Repository navigation
evidence(OMN-14223): OCC companion for omnibase_core #1412 core cleanup - #3787
Conversation
Appends independent-verification evidence to the existing (merged, append-only) OMN-14223 contract for omnibase_core PR #1412, which deletes the 6 OCC-stamp source files + 6 dedicated unit tests now canonical in omnibase_compat 0.5.6 (PR #173, bound by the original #3777 companion). Does not touch the 3 entries merged by #3777.
Rebind the dod-occ-companion-core-1412-self receipt's commit_sha from the placeholder (prior origin/dev tip) to the real commit that added it, so occ-preflight validates this companion PR's own eligibility.
📝 WalkthroughWalkthroughAdds OMN-14223 contract evidence and command receipts for independent verification of core PR ChangesOMN-14223 verification evidence
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Adds pr_number: 3787 (this OCC companion's own GitHub PR number, now known) to dod-occ-companion-core-1412-self as additional defense-in-depth alongside the existing commit_sha binding, per pr_ticket_mismatch hardening guidance.
The base dod-occ-companion-self receipt (merged in #3777) bound only a whole-file contract_sha256 with no pr_number, so appending this PR's two new dod_evidence entries broke is_bound_to_this_pr's grandfather clause and failed verify/verify on PR #3787 with "whole-file hash mismatch" (observed in CI run 29068074586). Add a net-new command.supersede.0001.yaml (no merged file edited) that rebinds the same historical PASS fact via a per-entry contract_entry_sha256, which is immune to future dod_evidence appends. Locally simulated validate_pr_receipts() for both this OCC PR (pr_number=3787) and omnibase_core PR #1412 (pr_number=1412): both now PASS all 5 checks.
…n skew) check_receipt_hardening.py runs against onex_change_control's own PyPI-pinned omnibase-core (>=0.45.0,<0.46.0), which predates the contract_entry_sha256 field (OMN-13888, only on the git-ref-pinned bleeding-edge omnibase_core used by the append-only-gate and receipt-gate @main reusable workflows). The CI "Pre-commit" job's receipt-hardening step failed with "Extra inputs are not permitted" for both new base receipts. Fix: drop contract_entry_sha256 from the two base receipts and rely on contract_sha256 + pr_number (matching the precedent dod-omnibase-compat-pr-173 / dod-local-verification entries) — the pr_number binding correctly grandfathers these receipts against future contract growth via is_bound_to_this_pr, so per-entry hashing isn't needed here. The command.supersede.0001.yaml replacement keeps contract_entry_sha256, since check_receipt_hardening.py skips .supersede. files entirely (only validated by the bleeding-edge validate_pr_receipts / append-only gate). Re-verified locally with env -u PYTHONPATH (the real venv, matching CI exactly, since ambient PYTHONPATH in my shell was shadowing the venv with the canonical clone and produced a false local pass): check_receipt_hardening.py 0 violations, Receipt Honesty Gate 0 violations, append-only clean, and validate_pr_receipts() against the bleeding-edge clone (matching the verify/verify @main reusable workflow) still PASSES all 5 checks for both pr_number=3787 (this OCC PR) and pr_number=1412 (omnibase_core PR) contexts.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@drift/dod_receipts/OMN-14223/dod-omnibase-core-pr-1412/command.yaml`:
- Around line 12-23: The reference scan can be skipped when the deleted-file
existence loop returns a nonzero status. In the probe_command chain, replace the
separator immediately after the for-loop’s done with a semicolon so git grep for
the deleted symbols always runs, while preserving the subsequent pytest
execution.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c609dd24-e87b-4ce2-a9c2-5fcc12b5196e
📒 Files selected for processing (4)
contracts/OMN-14223.yamldrift/dod_receipts/OMN-14223/dod-occ-companion-core-1412-self/command.yamldrift/dod_receipts/OMN-14223/dod-occ-companion-self/command.supersede.0001.yamldrift/dod_receipts/OMN-14223/dod-omnibase-core-pr-1412/command.yaml
| probe_command: >- | ||
| gh pr view 1412 --repo OmniNode-ai/omnibase_core --json headRefOid,isDraft,body,files && cd $OMNI_HOME/omni_worktrees/OMN-14223/omnibase_core-cleanup | ||
| && git rev-parse HEAD && for f in src/omnibase_core/enums/enum_pr_evidence_source_kind.py src/omnibase_core/models/validation/model_pr_body_section.py | ||
| src/omnibase_core/models/validation/model_pr_evidence_source.py src/omnibase_core/models/validation/model_pr_occ_metadata_stamp.py | ||
| src/omnibase_core/models/validation/model_pr_receipt_gate_skip_token.py src/omnibase_core/validation/pr_occ_metadata_stamp.py | ||
| tests/unit/enums/test_enum_pr_evidence_source_kind.py tests/unit/models/validation/test_model_pr_body_section.py | ||
| tests/unit/models/validation/test_model_pr_evidence_source.py tests/unit/models/validation/test_model_pr_occ_metadata_stamp.py | ||
| tests/unit/models/validation/test_model_pr_receipt_gate_skip_token.py tests/unit/validation/test_pr_occ_metadata_stamp.py; | ||
| do [ -e "$f" ] && echo "STILL EXISTS: $f"; done && git grep -nE "EnumPrEvidenceSourceKind|ModelPrBodySection|ModelPrEvidenceSource|ModelPrOccMetadataStamp|ModelPrReceiptGateSkipToken|parse_pr_occ_metadata_stamp|render_pr_occ_metadata_stamp" | ||
| -- src/ ; echo "grep exit: $?" && uv run pytest tests/unit/validation/test_receipt_gate_evidence_source.py | ||
| tests/unit/validation/test_receipt_gate_skip_token_allowlist.py tests/unit/validation/test_receipt_gate_skip_token_hardening.py | ||
| tests/unit/enums/test_enum_complexity.py tests/unit/models/validation -q |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the exact exit-code behavior of the for-loop/&& chain described above.
bash -c '
for f in /nonexistent_a /nonexistent_b; do
[ -e "$f" ] && echo "STILL EXISTS: $f"
done && echo "REACHED_GIT_GREP"
'
echo "outer exit: $?"Repository: OmniNode-ai/onex_change_control
Length of output: 183
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the receipt file and nearby fields.
file='drift/dod_receipts/OMN-14223/dod-omnibase-core-pr-1412/command.yaml'
wc -l "$file"
sed -n '1,220p' "$file"Repository: OmniNode-ai/onex_change_control
Length of output: 3977
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Probe the exact shell semantics of the reported command shape.
bash -c '
for f in /nonexistent_a /nonexistent_b; do
[ -e "$f" ] && echo "STILL EXISTS: $f"
done && echo "REACHED_NEXT_COMMAND"
echo "AFTER_CHAIN"
'
echo "outer exit: $?"Repository: OmniNode-ai/onex_change_control
Length of output: 195
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file='drift/dod_receipts/OMN-14223/dod-omnibase-core-pr-1412/command.yaml'
wc -l "$file"
sed -n '1,220p' "$file"Repository: OmniNode-ai/onex_change_control
Length of output: 3977
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file='drift/dod_receipts/OMN-14223/dod-omnibase-core-pr-1412/command.yaml'
# Show the full receipt so the command and checksum fields can be read directly.
cat -n "$file"Repository: OmniNode-ai/onex_change_control
Length of output: 4228
Run the reference scan unconditionally. In drift/dod_receipts/OMN-14223/dod-omnibase-core-pr-1412/command.yaml:20-23, the for ... done && git grep ... chain can short-circuit when the 12 deleted files are absent, so the git grep check is skipped. Change that && to ; so the no-src/ reference scan always runs; the later pytest command still executes as written.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@drift/dod_receipts/OMN-14223/dod-omnibase-core-pr-1412/command.yaml` around
lines 12 - 23, The reference scan can be skipped when the deleted-file existence
loop returns a nonzero status. In the probe_command chain, replace the separator
immediately after the for-loop’s done with a semicolon so git grep for the
deleted symbols always runs, while preserving the subsequent pytest execution.
Summary
Appends independent-verification evidence to the existing (merged, append-only)
OMN-14223contract soomnibase_corePR #1412 (core cleanup: deletes the 6 never-released OCC-stamp source files + their 6 dedicated unit tests, now canonical inomnibase_compat0.5.6) can passocc-preflight/verify/verify.This is a second OCC companion for
OMN-14223— the first (#3777, merged) bound theomnibase_compatPR #173 relocation. This PR does not touch any of the 3 entries #3777 added; it only appends two newdod_evidenceitems:dod-omnibase-core-pr-1412— independent verification ofomnibase_corePR chore(occ-deps): update rerun state after b08400b9 #1412 at head73f3046ba8464ec800ead319987b6de063e0ade8: all 12 files (6 source + 6 tests) confirmed deleted, zero remainingsrc/references to the deleted symbols (git grep), receipt-gate coupling tests confirmed decoupled, focused pytest (543 tests) green, full collection (9207 tests) green with no ImportError.dod-occ-companion-core-1412-self— self-binding receipt so this OCC companion PR passes its ownocc-preflighteligibility, independent of chore(occ-deps): update rerun state after b08400b9 #1412's commit set.I am an independent verifier, not the author of #1412 — per the no-self-authored-evidence policy the builder cited in that PR's body.
Verification (this PR)
append-onlygate: clean (existing 3 entries + their receipts untouched, confirmed viavalidator_occ_append_onlyagainstorigin/dev)check_receipt_hardening.pyon both new receipts: 0 violationsvalidator_receipt_honesty: 0 violationspre-commit run --all-files(withcheck-receipt-honesty/check-receipt-hardeningskipped, matching CI's own full-file-scope invocation): all hooks passCloses OMN-14223
Summary by CodeRabbit