Skip to content
Closed
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
44 changes: 44 additions & 0 deletions contracts/OMN-12635.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-12635"
title: "fix: node_dirty_canonical_sweep crashes on untracked directories (read_bytes IsADirectoryError)"
summary: >-
Epic OMN-7466 / skill /onex:ship_dirty_canonical. The Step 2 dirty-file copy loop in HandlerDirtyCanonicalSweep._ship_repo
(omnimarket/src/omnimarket/nodes/node_dirty_canonical_sweep/handlers/handler_dirty_canonical_sweep.py)
called read_bytes() on each dirty path. git status --porcelain reports an untracked DIRECTORY as a single
entry (e.g. evidence/OMN-12584/); read_bytes() on a directory raises "[Errno 21] Is a directory" and
the ship aborts with status=failed, producing no rescue PR. Observed 2026-06-03 on onex_change_control
(had an untracked evidence/OMN-12584/ dir) — the sweep crashed and the repo had to be shipped manually.
Fix (omnimarket PR #1023): when a dirty path is a directory, recurse (rglob) and copy every contained
file with preserved relative paths; no directory ever has read_bytes() called on it. Shipped in the
same omnimarket PR as OMN-12636 (stale-base diff); the primary OCC contract and Evidence-Ticket for
that PR is OMN-12636.
is_seam_ticket: false
interface_change: false
interfaces_touched: []
emergency_bypass:
enabled: false
justification: ""
follow_up_ticket_id: ""
dod_evidence:
- id: "dod-tdd-reproduction"
description: >-
TDD red->green. test_dirty_untracked_directory_is_expanded_to_files was added first and confirmed
failing against the pre-fix code with the exact production error "[Errno 21] Is a directory" and
repos_failed=1. After the directory-expansion fix the same test ships with repos_shipped=1 and no
"Is a directory" error.
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' "$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-12635/dod-tdd-reproduction/command.yaml"
- id: "dod-occ-pr-self"
description: "Self-binding receipt for the OCC PR carrying the OMN-12635 (paired with OMN-12636) central
contract and receipt."
source: "manual"
status: "verified"
checks:
- check_type: "command"
check_value: >-
grep -q '^status: PASS$' "$CONTRACT_REPO_DIR/drift/dod_receipts/OMN-12635/dod-occ-pr-self/command.yaml"
25 changes: 25 additions & 0 deletions drift/dod_receipts/OMN-12635/dod-occ-pr-self/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-12635"
evidence_item_id: "dod-occ-pr-self"
check_type: "command"
check_value: "uv run validate-yaml contracts/OMN-12635.yaml"
contract_sha256: "sha256:8cd4ebdd5f68d2812dadfe783db6b0caf5633574bf3e1e5f1899d73796a31924"
status: PASS
run_timestamp: "2026-06-03T15:30:00Z"
commit_sha: "234ffac19fa6146321e28818d46ebd3fc3f5cdd1"
branch: "jonah/omn-12636-occ-contract-receipts"
pr_number: 2119
runner: "claude-code"
verifier: "claude-code-subagent"
probe_command: "uv run validate-yaml contracts/OMN-12635.yaml"
probe_stdout: |
[INFO] Validating 1 file(s)...
[OK] contracts/OMN-12635.yaml (ticket_contract)
[OK] All 1 file(s) valid
actual_output: >-
PASS: the OMN-12635 central contract validates against ModelTicketContract; this OCC PR carries the
contract and the dod-tdd-reproduction and dod-occ-pr-self receipts. Paired with OMN-12636 in the same
OCC PR backing omnimarket PR #1023.
exit_code: 0
working_dir: "/Users/jonah/Code/omni_home/omni_worktrees/OMN-12636/onex_change_control"
32 changes: 32 additions & 0 deletions drift/dod_receipts/OMN-12635/dod-tdd-reproduction/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
schema_version: "1.0.0"
ticket_id: "OMN-12635"
evidence_item_id: "dod-tdd-reproduction"
check_type: "command"
check_value: "uv run pytest tests/unit/nodes/node_dirty_canonical_sweep/test_handler_dirty_canonical_sweep.py::test_dirty_untracked_directory_is_expanded_to_files
-v"
contract_sha256: "sha256:8cd4ebdd5f68d2812dadfe783db6b0caf5633574bf3e1e5f1899d73796a31924"
status: PASS
run_timestamp: "2026-06-03T15:25:00Z"
commit_sha: "234ffac19fa6146321e28818d46ebd3fc3f5cdd1"
branch: "jonah/omn-12636-dirty-canonical-handler-fixes"
pr_number: 1023
runner: "claude-code"
verifier: "claude-code-subagent"
probe_command: "uv run pytest tests/unit/nodes/node_dirty_canonical_sweep/test_handler_dirty_canonical_sweep.py
-v -p no:cacheprovider"
probe_stdout: |
# RED (pre-fix):
test_dirty_untracked_directory_is_expanded_to_files FAILED
E AssertionError: [Errno 21] Is a directory: '.../omni_home/myrepo/evidence/OMN-12584'
E assert 0 == 1 # repos_shipped == 0, repos_failed == 1

# GREEN (post-fix):
test_dirty_untracked_directory_is_expanded_to_files PASSED
6 passed in 0.05s
actual_output: >-
PASS: the untracked-directory reproduction failed pre-fix with the exact production error "[Errno 21]
Is a directory" and repos_failed=1. After the copy loop was changed to recurse directory entries (rglob)
and copy each constituent file, the repo ships with repos_shipped=1 and no IsADirectoryError.
exit_code: 0
working_dir: "/Users/jonah/Code/omni_home/omni_worktrees/OMN-12636/omnimarket"
Loading