You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(fleet): restore-row-count-diff.sh missing option value crashes with an unbound-variable error instead of a usage error #12788
scripts/fleet/restore-row-count-diff.sh:41-56 (verified on origin/main 45191b4). The script runs under set -euo pipefail (line 32) and parses options as:
Also, --manifest --live /path silently consumes --live as the manifest value and then reports "unknown argument: /path" — a flag accepted as a filename is a misparse the operator cannot see from the error.
Why it matters
The operator-script argument contract (doc/agents/operator-script-argument-contract.md, #3352) requires the whole command line to be declared and strictly parsed before any work, with unaccounted input as a clean usage error at the script's established usage exit code. This script already uses exit 2 for its other usage errors (unknown argument, missing inputs, usage) — this case escapes as a raw bash error with exit 1, so automation cannot distinguish a usage mistake from a runtime failure, and the operator sees a shell internals message instead of usage.
Acceptance criteria
--manifest (or --live/--inventory) with no value prints the usage message and exits 2.
An option value that begins with -- is rejected as a usage error, not consumed as the value.
Dedupe
No open or closed issue/PR matches; sibling operator scripts that follow the strict pattern were checked for comparison.
Plan: reproduce the --manifest unbound-variable crash, fix the option parsing in scripts/fleet/restore-row-count-diff.sh so a missing value (or a value beginning with --) is a clean usage error at exit 2, and add a regression check that fails before and passes after. Branch: xaltha/12788-restore-row-count.
Progress — fix landed as PR #13040 (#13040), Closes #12788.
Evidence:
Before: bash scripts/fleet/restore-row-count-diff.sh --manifest → line 44: $2: unbound variable, exit 1; --manifest --live /path consumed --live as the value and reported unknown argument: /path.
After: --manifest / --live / --inventory with no value, and a value beginning with --, all print option <name> requires a value + the usage message and exit 2; a well-formed run still passes the gate.
Regression test scripts/tests/test_restore_row_count_diff.py (4 tests) failed before the fix and passes after; wired into scripts-test.yml and registered in .github/test-suite-registry.json (sibling pattern: provider-retirement-gate). check-suite-registry.sh reports no new violations.
Files: scripts/fleet/restore-row-count-diff.sh, scripts/tests/test_restore_row_count_diff.py, .github/workflows/scripts-test.yml, .github/test-suite-registry.json. Commit f3e9d659f on xaltha/12788-restore-row-count.
Shepherd claim — Lane QF (archer) taking PR #13040 to completion.
Ownership check (fresh REST reads, 2026-11-23 ~09:47Z): xaltha picked this up 07:30Z and landed the fix as PR #13040 with full evidence by 07:33Z; Codex review completed with no findings; no activity on the PR or this issue since 07:33Z and no record that xaltha reserved the finish. Treating the shepherd leg as idle and carrying it: verify at head f3e9d659fcc2719900fff935e7e109e20ab24e24 (run the declared oracle python3 -m unittest discover -s scripts/tests -p 'test_restore_row_count_diff.py' plus the suite-registry check), then merge SHA-guarded at that head if green.
bash .github/scripts/check-suite-registry.sh → exactly the 3 pre-existing unwired-suite violations the PR body named (atlas_content_profile_vectors.rs, location_ref.rs, exchange_lock_release.rs — the id: register the 36 test suites that no registry row names #12230 gaps, since fixed on main); the new suite is wired and adds no violation.
Mergeability re-read immediately before merging: mergeable: true, clean, head unchanged since xaltha's 07:33Z evidence post. Codex review on the PR: completed, no findings.
Credit: the fix and its evidence are xaltha's; this lane only verified and merged.
Activity
developing-today commentedon Nov 23, 2026
CODE-4690
dezren39 commentedon Nov 23, 2026
Pickup — xaltha lane taking this slice.
Plan: reproduce the
--manifestunbound-variable crash, fix the option parsing inscripts/fleet/restore-row-count-diff.shso a missing value (or a value beginning with--) is a clean usage error at exit 2, and add a regression check that fails before and passes after. Branch:xaltha/12788-restore-row-count.fix(fleet): restore-row-count-diff.sh missing option value is a usage…
dezren39 commentedon Nov 23, 2026
Progress — fix landed as PR #13040 (#13040),
Closes #12788.Evidence:
bash scripts/fleet/restore-row-count-diff.sh --manifest→line 44: $2: unbound variable, exit 1;--manifest --live /pathconsumed--liveas the value and reportedunknown argument: /path.--manifest/--live/--inventorywith no value, and a value beginning with--, all printoption <name> requires a value+ the usage message and exit 2; a well-formed run still passes the gate.scripts/tests/test_restore_row_count_diff.py(4 tests) failed before the fix and passes after; wired intoscripts-test.ymland registered in.github/test-suite-registry.json(sibling pattern: provider-retirement-gate).check-suite-registry.shreports no new violations.Files:
scripts/fleet/restore-row-count-diff.sh,scripts/tests/test_restore_row_count_diff.py,.github/workflows/scripts-test.yml,.github/test-suite-registry.json. Commitf3e9d659fonxaltha/12788-restore-row-count.dezren39 commentedon Nov 23, 2026
Shepherd claim — Lane QF (archer) taking PR #13040 to completion.
Ownership check (fresh REST reads, 2026-11-23 ~09:47Z): xaltha picked this up 07:30Z and landed the fix as PR #13040 with full evidence by 07:33Z; Codex review completed with no findings; no activity on the PR or this issue since 07:33Z and no record that xaltha reserved the finish. Treating the shepherd leg as idle and carrying it: verify at head
f3e9d659fcc2719900fff935e7e109e20ab24e24(run the declared oraclepython3 -m unittest discover -s scripts/tests -p 'test_restore_row_count_diff.py'plus the suite-registry check), then merge SHA-guarded at that head if green.dezren39 commentedon Nov 23, 2026
Done — shepherd complete. PR #13040 merged (
12903113342a819c228c6c49864e4274d9e65b46, head SHA-guarded atf3e9d659fcc2719900fff935e7e109e20ab24e24); #12788 verified CLOSED as completed.Verification at the PR head (laptop worktree, exact SHA):
python3 -m unittest discover -s scripts/tests -p 'test_restore_row_count_diff.py'→ 4 tests, OK.bash .github/scripts/check-suite-registry.sh→ exactly the 3 pre-existing unwired-suite violations the PR body named (atlas_content_profile_vectors.rs,location_ref.rs,exchange_lock_release.rs— the id: register the 36 test suites that no registry row names #12230 gaps, since fixed on main); the new suite is wired and adds no violation.mergeable: true, clean, head unchanged since xaltha's 07:33Z evidence post. Codex review on the PR: completed, no findings.Credit: the fix and its evidence are xaltha's; this lane only verified and merged.