From 46d828f16665d0ce15f86b5f6ec3401eaa2f0407 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Thu, 18 Jun 2026 13:45:06 -0500 Subject: [PATCH] fix(framework/tools): self-review fixes from defect survey (#546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two defects an independent survey of the tooling surface found in the new helpers, fixed pre-gate: - lane-brief.sh: label filter used jq contains() (substring) — `-l security` wrongly matched label `domain/6-security`. Now exact-token match against tea's space-separated labels string. Verified live: `-l security` -> 0, `-l domain/6-security` -> the real holders. - ci-wait.sh: unknown owner silently defaulted to the `usc` Woodpecker instance (wrong credentials, wrong pipelines). Now fails hard requiring `-a `, matching lane-brief's FATAL-on-unresolved behavior. Verified: usc owner still infers and exits 0; unknown owner exits 2 with guidance. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Kt2D8TsnDwhtzEAPijsNmR --- packages/mosaic/framework/tools/git/lane-brief.sh | 5 ++++- packages/mosaic/framework/tools/woodpecker/ci-wait.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/mosaic/framework/tools/git/lane-brief.sh b/packages/mosaic/framework/tools/git/lane-brief.sh index 167dd98..b1ff7b7 100755 --- a/packages/mosaic/framework/tools/git/lane-brief.sh +++ b/packages/mosaic/framework/tools/git/lane-brief.sh @@ -76,11 +76,14 @@ echo "LANE BRIEF — $filt · $ts (login=$LOGIN)" echo "(open issues only; closed are excluded by definition — that's the point)" echo +# Label match is exact-token against tea's space-separated labels string (so -l +# "security" does NOT match label "domain/6-security"). Caveat: label names that +# themselves contain spaces aren't distinguishable in tea's string form. printf '%s' "$ISSUES_JSON" | jq -r --arg ms "$MILESTONE" --arg lb "$LABEL" --arg prs "$PR_ISSUE_REFS" ' ($prs | split("\n") | map(select(length>0))) as $prrefs | map( select( ($ms=="" or .milestone==$ms) - and ($lb=="" or ((.labels//"") | contains($lb))) ) + and ($lb=="" or ((.labels//"") | split(" ") | index($lb) != null)) ) | . + { assigned: ((.assignees//"")|length>0), haspr: (.index as $ix | ($prrefs | index($ix)) != null) } ) diff --git a/packages/mosaic/framework/tools/woodpecker/ci-wait.sh b/packages/mosaic/framework/tools/woodpecker/ci-wait.sh index 412721a..34c38cf 100755 --- a/packages/mosaic/framework/tools/woodpecker/ci-wait.sh +++ b/packages/mosaic/framework/tools/woodpecker/ci-wait.sh @@ -49,7 +49,7 @@ if [[ -z "$INSTANCE" ]]; then case "${REPO%%/*}" in usc|USC) INSTANCE=usc ;; mosaicstack|mosaic) INSTANCE=mosaic ;; - *) INSTANCE=usc ;; + *) echo "FATAL: cannot infer Woodpecker instance for owner '${REPO%%/*}' — pass -a " >&2; exit 2 ;; esac fi