Repository navigation
feat(OMN-14462): scripts/merge-proof local-proof env wrapper (F-20) - #1805
Conversation
Local proof gates (topic-naming lint) resolve their validator from a sibling omnibase_infra checkout. Under the mandated worktree layout the naive ../omnibase_infra sibling path does not exist, so a correct change fails locally until the hidden environment is reconstructed by hand — the natural workaround pressure being --no-verify, which rule #10 bans. scripts/merge-proof resolves OMNI_HOME + OMNIBASE_INFRA_PATH deterministically from its own on-disk location (rule #8) and, when it cannot, prints the exact export lines to run rather than proceeding on a silent wrong path. Modes: --check, --print-env, -- CMD, default (run topic-lint proof). Test: tests/scripts/test_merge_proof.py drives the real script via subprocess in an isolated tmp location (git env stripped per OMN-14746/14744).
📝 WalkthroughWalkthroughChangesThe PR adds a Bash Merge proof wrapper
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant merge-proof
participant Filesystem
participant TopicLint
User->>merge-proof: invoke proof mode
merge-proof->>Filesystem: resolve omni_home and omnibase_infra
Filesystem-->>merge-proof: return paths and validator status
merge-proof->>TopicLint: run topic-lint validator
TopicLint-->>merge-proof: return validation result
merge-proof-->>User: report status
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@scripts/merge-proof`:
- Line 95: Update scripts/merge-proof lines 95-95 to emit RESOLVED_OMNI_HOME
with Bash printf '%q' in the guidance export, and lines 155-156 to shell-quote
both emitted export values. Update tests/scripts/test_merge_proof.py lines
122-132 to evaluate the generated output with a whitespace/metacharacter path
and assert exact round-tripping.
- Around line 137-140: Clear inherited GIT_DIR, GIT_INDEX_FILE, and
GIT_WORK_TREE in scripts/merge-proof before dispatching either delegated
commands or the default proof execution, while preserving the existing
OMNIBASE_INFRA_PATH and OMNI_HOME setup. In tests/scripts/test_merge_proof.py,
add a contract test that seeds all three variables and verifies the delegated
child receives none.
🪄 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: dbbe18f7-ae58-4796-87c2-92bdf4374633
📒 Files selected for processing (2)
scripts/merge-prooftests/scripts/test_merge_proof.py
✅ Architectural Review — PASSEDErrors: 0 What this checks
No architectural violations found. Static architectural lint — no model inference (OMN-14176). |
✅ Hostile Reviewer — PASSEDBlocking findings (critical/error): 0 Gate semantics (pilot phase)
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524) |
…imarket#1805 (#4372) * evidence(OMN-14462): author OCC companion for OmniNode-ai/omnimarket#1805 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 5dbcfc3f4a9e1283885443f6f639ef96816ad02c. * evidence(OMN-14462): self-bind OCC#4372 + rebind contract_sha256 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
OMN-14462 (F-20): local-proof env wrapper
Closes OMN-14462 (partial — omnimarket half; omnibase_infra half is a sibling PR under the same ticket).
Friction
Local proof gates (topic-naming lint) resolve their validator from a sibling
omnibase_infracheckout. Under the mandated worktree layout ($OMNI_HOME/omni_worktrees/<ticket>/omnimarket) the naive../omnibase_infrasibling path does not exist, so a correct change fails locally until the hidden environment is reconstructed by hand — the natural workaround pressure being--no-verify, which rule #10 bans. Source:docs/tracking/friction/2026-07-16-overnight-merge-sweep-friction-report.md(F-20).Change
scripts/merge-proofresolvesOMNI_HOME+OMNIBASE_INFRA_PATHdeterministically from its own on-disk location (rule #8 — Path-relative resolution, never a hardcoded default) and, when it cannot, prints the exactexportlines to run rather than proceeding on a silent wrong path. Modes:--check— resolve, verify the validator exists, print resolved paths, exit 0 (non-zero + guidance if unresolved).--print-env— eval-ableexportlines.-- CMD ...— run any gate with env guaranteed (e.g.scripts/merge-proof -- pre-commit run --files X).dod_evidence
tests/scripts/test_merge_proof.py(7 tests, all green locally + on pre-push smart selector) drives the real script via subprocess in an isolated tmp location, asserting:export OMNI_HOME=/export OMNIBASE_INFRA_PATH=guidance is present (assert-on-absence => FAIL, so a silent wrong-path can't pass);/Users/or/Volumes/hardcoded path (rule feat: PostgresDataSource adapter for data verification [OMN-7624] #6).GIT_DIR/GIT_INDEX_FILE/GIT_WORK_TREE) stripped from the child env per the OMN-14746/14744 worktree-safety lesson.--severity=styleclean.Rule #5 note
F-20 is an ergonomic wrapper, not a detector; its correctness is enforced by the committed pytest (runs in CI), not by a new advisory sweep.
DO NOT MERGE — Codex owns the merge.
Summary by CodeRabbit
New Features
Tests
Evidence-Ticket: OMN-14462
Evidence-Source: OCC#4380
Evidence-Commit: 9991acf3294a6c8f99fb4bf8d9cf0cfb6e593422
Evidence-Head: 5119adc82a0fee7eec5f5951c51320f28fa5af64