Skip to content

fix(op-bws-reconcile): pin stdin + check metadata-stamp return codes (#17142) - #18170

Merged
dezren39 merged 1 commit into
mainfrom
archer/17142-runner-stdin-rc-fix
Dec 1, 2026
Merged

dezren39 merged 1 commit into
mainfrom
archer/17142-runner-stdin-rc-fix

Conversation

@dezren39

@dezren39 dezren39 commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

What

Fixes the runner defect reported on #17142 (2026-12-01T08:23:36Z, found in the 02:05 CST reconcile pass on #13948): the seat-side reconcile runner reported BWS→OP copies as "read-back mismatch" when the copies had actually landed — the follow-up Sync-section op item edit calls had silently failed.

Changes (scripts/fleet/op-bws-reconcile/op_bws_reconcile.py only)

  1. Pin stdin on every subprocess call. run() now passes stdin=subprocess.DEVNULL whenever no explicit input is given, so a piped parent stdin can no longer make op item edit treat the pipe as a JSON template and fail with [ERROR] invalid JSON provided. Calls with explicit input (op item create -, the bulk op item get -) keep the input pipe unchanged.
  2. Check the metadata-stamp return codes. The op item edit and bws secret edit results in apply_copies_to_op are now captured; a failed stamp is recorded as its own failure (metadata stamp (op item edit) rc=… / metadata stamp (bws secret edit) rc=…) instead of surfacing later as a false read-back mismatch.
  3. The read-back op item get return code is checked before parsing, so a failed read-back reports as read-back rc=… rather than crashing on empty output.

Verification

  • py_compile clean.
  • Stubbed-subprocess harness (module imported, subprocess.run / run stubbed): (a) run() with no input passes stdin=DEVNULL, with input passes input= and no stdin override; (b) an edit returning rc=1 produces exactly metadata stamp (op item edit) rc=1 and no read-back attempt; (c) the happy path (create rc=0, edit rc=0, read-back hash + Sync last-hash equal) still lands the copy. All pass.
  • Full diff read against the issue's suggested fix before merge.

Refs #17142 (defect slice; W3 commandcode.api-key propagation is unchanged and out of scope).

🤖 Lane 0237-D (alpha DRIVE 2026-12-01), claim comment: #17142 (comment)


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 merged commit b0d3113 into main Dec 1, 2026
1 check passed
@dezren39
dezren39 deleted the archer/17142-runner-stdin-rc-fix branch December 1, 2026 09:01
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant