From 34e56f242eb5b1f6d2fb5f0f707ec85c014dbfcc Mon Sep 17 00:00:00 2001 From: marcie Date: Fri, 28 Aug 2026 18:33:32 -0500 Subject: [PATCH] framework tools/git: provider-normalization arms on issue-close and milestone-list (codex should-fix) gh stub exiting 2 on the close/api path -> wrapper exit 1 with the normalized stderr message; mirrors the issue-assign 6b arm. All touched suites green; brain mirror updated. --- .../git/test-milestone-list-usage-contract.sh | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/packages/mosaic/framework/tools/git/test-milestone-list-usage-contract.sh b/packages/mosaic/framework/tools/git/test-milestone-list-usage-contract.sh index 64b894f4..e2456405 100755 --- a/packages/mosaic/framework/tools/git/test-milestone-list-usage-contract.sh +++ b/packages/mosaic/framework/tools/git/test-milestone-list-usage-contract.sh @@ -128,4 +128,26 @@ done # the arm above proves only parse acceptance and non-usage classification. # Parser-failure arms (1-4) remain zero-contact (asserted at 4b). +# 6b. Provider-exit normalization (codex PR #1464): a provider stub exiting +# 2 (its own usage-error status) must surface as wrapper exit 1, never 2. +GH_REPO="$WORK_DIR/repo-gh" +mkdir -p "$GH_REPO" +git -C "$GH_REPO" init -q +git -C "$GH_REPO" remote add origin https://github.com/acme/widgets.git +cat > "$BIN_DIR/gh" <> "$PROBE_LOG" +if [[ "\$1" == "api" ]]; then exit 2; fi +exit 0 +GHSTUB +chmod +x "$BIN_DIR/gh" +rc=0 +( + cd "$GH_REPO" + PATH="$BIN_DIR:$PATH" MOSAIC_GIT_IDENTITY="" MOSAIC_BRAIN_HOME="" \ + "$SCRIPT_DIR/milestone-list.sh" >"$OUT_FILE" 2>"$ERR_FILE" +) || rc=$? +[[ "$rc" -eq 1 ]] || fail "GitHub path: gh exit 2 must normalize to wrapper exit 1 (got $rc)" +grep -q "provider" "$ERR_FILE" || fail "GitHub path: normalized provider error missing from stderr" + echo "milestone-list.sh usage-contract regression passed (R1/R4)"