@biffo/cli 0.298.11 → 0.298.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.298.11",
3
+ "version": "0.298.12",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -58,26 +58,41 @@
58
58
  # `Deploy Infrastructure` dispatch left at the default `action: plan` really did
59
59
  # succeed at planning, and that can be entirely deliberate (an operator running
60
60
  # a dry run). What it must never do is share the plain `ok` label a real apply
61
- # gets: `conclusion` is "success" either way, so the ONLY signal that tells them
62
- # apart is the run's own title (`displayTitle`), which #1678 made carry a
63
- # `PLAN ONLY ... (nothing applied)` marker for exactly this. This script fails
64
- # CLOSED on that signal going missing — see the summary query below, where
65
- # `displayTitle`'s absence collapses the whole `gh run list` call to empty
66
- # output, which is already handled as exit 2 ("cannot tell"), not as a silent
67
- # `ok`.
61
+ # gets: `conclusion` is "success" either way, so the ONLY signal that told them
62
+ # apart, on the OLD `deploy-infra.yml`, was the run's own title (`displayTitle`),
63
+ # which #1678 made carry a `PLAN ONLY ... (nothing applied)` marker for exactly
64
+ # this. This script fails CLOSED on that signal going missing — see the summary
65
+ # query below, where `displayTitle`'s absence collapses the whole `gh run list`
66
+ # call to empty output, which is already handled as exit 2 ("cannot tell"), not
67
+ # as a silent `ok`.
68
68
  #
69
- # **This bucket is transitional, and is deliberately kept.** From core 0.298.0
70
- # `deploy-infra.yml` can no longer produce a plan-only run at all: its `action`
71
- # input is required, defaults to nothing, and accepts only `apply`, so the
72
- # dispatch that used to yield this title is now an HTTP 422 and previews live in
73
- # a separate `Deploy Infrastructure Plan` workflow whose own name says so. The
74
- # bucket is therefore permanently unreachable **for any repo past 0.298.0** —
75
- # but this script is run with `-R owner/repo` against arbitrary repos in the
76
- # estate, and an instance that has not yet taken that upgrade still emits
77
- # exactly this title for exactly the ambiguous run. Deleting the bucket now
78
- # would fail open on those repos. Retire it once every instance is past
79
- # 0.298.0, and check the `Instance Adoption Report` workflow
80
- # (`.github/workflows/instance-adoption-report.yml`) rather than assuming.
69
+ # **This bucket is transitional, and the title-marker half is deliberately
70
+ # kept.** From core 0.298.0 `deploy-infra.yml` can no longer produce a
71
+ # plan-only run at all: its `action` input is required, defaults to nothing,
72
+ # and accepts only `apply` (#1700), so the dispatch that used to yield this
73
+ # title is now an HTTP 422. The title-marker branch is therefore permanently
74
+ # unreachable **for any repo past 0.298.0** — but this script is run with `-R
75
+ # owner/repo` against arbitrary repos in the estate, and an instance that has
76
+ # not yet taken that upgrade still emits exactly this title for exactly the
77
+ # ambiguous run. Deleting it now would fail open on those repos. Retire it
78
+ # once every instance is past 0.298.0, and check the `Instance Adoption
79
+ # Report` workflow (`.github/workflows/instance-adoption-report.yml`) rather
80
+ # than assuming.
81
+ #
82
+ # **Previews now live in their own workflow, and #1702 is that half.** A
83
+ # preview dispatch is `deploy-infra-plan.yml` — a workflow with NO apply job
84
+ # at all, ever, so its `conclusion: success` can only ever mean "the plan
85
+ # computed cleanly", never "something was applied" (see that file's own
86
+ # header). Its `run-name` says `... (preview only)`, not `PLAN ONLY`, so the
87
+ # title-marker check above never fires for it — it would render as plain
88
+ # `ok` otherwise, identical to a real apply, which is the exact ambiguity
89
+ # #1582 exists to remove. Detected instead by `workflowName`, which is
90
+ # structural: it is the workflow's own `name:` field, reported by every `gh
91
+ # run list` call with no extra authoring effort, rather than a marker string
92
+ # someone has to remember to keep embedded in one specific templated field. A
93
+ # repo would have to rename the workflow itself — a change everyone touching
94
+ # it would see in the Actions UI — to lose this signal, unlike a run-name
95
+ # template that can silently stop emitting a substring nobody is watching for.
81
96
  #
82
97
  # ## Usage
83
98
  #
@@ -92,7 +107,13 @@ BRANCH=""
92
107
  QUIET=""
93
108
 
94
109
  usage() {
95
- sed -n '2,73p' "$0" | sed 's/^# \{0,1\}//'
110
+ # #1582's own issue title warned "keep --help's line-range in step with the
111
+ # growing header" — and #1702's header growth immediately re-triggered it:
112
+ # this range was still '2,73p', 28 lines short of the header's real end
113
+ # (line 101, just above `set -uo pipefail`), so --help was truncating
114
+ # mid-sentence in the middle of the (now even longer) plan-only section.
115
+ # Fixed to the current end rather than left to drift again next time.
116
+ sed -n '2,101p' "$0" | sed 's/^# \{0,1\}//'
96
117
  exit 2
97
118
  }
98
119
 
@@ -206,16 +227,29 @@ while IFS="$TAB" read -r state name sha when url event title; do
206
227
  [ -n "$name" ] || continue
207
228
  case "$state" in
208
229
  success)
209
- # A literal, upper-case "PLAN ONLY" is the #1678 run-name marker
210
- # (`format('PLAN ONLY {0} (nothing applied)', ...)`) never something a
211
- # commit-subject-derived title produces by coincidence (this repo's own
212
- # history has "plan-only" and "plan-time" in commit subjects, always
213
- # lower-case, and grep confirms zero for the exact upper-case phrase).
214
- # A "success" run whose title carries it applied nothing and must not
215
- # collapse into the same "ok" bucket as a real apply.
216
- case "$title" in
217
- *"PLAN ONLY"*) planonly="${planonly}${name}\n" ;;
218
- *) ok="${ok}${name}\n" ;;
230
+ # Two independent plan-only signals, checked in order #1702's
231
+ # structural one first, then #1582's legacy title marker. Either one
232
+ # routes the run away from the plain "ok" bucket a real apply gets.
233
+ case "$name" in
234
+ "Deploy Infrastructure Plan")
235
+ # The workflow's own `name:` (deploy-infra-plan.yml line 1) this
236
+ # workflow has no apply job at all, so a "success" here can only
237
+ # mean the plan computed cleanly, never that something applied.
238
+ planonly="${planonly}${name}\n"
239
+ ;;
240
+ *)
241
+ # A literal, upper-case "PLAN ONLY" is the #1678 run-name marker
242
+ # (`format('PLAN ONLY {0} (nothing applied)', ...)`) — never something
243
+ # a commit-subject-derived title produces by coincidence (this repo's
244
+ # own history has "plan-only" and "plan-time" in commit subjects,
245
+ # always lower-case, and grep confirms zero for the exact upper-case
246
+ # phrase). Kept for repos on `deploy-infra.yml` pre-#1700, which can
247
+ # still emit it — see the header for why this stays.
248
+ case "$title" in
249
+ *"PLAN ONLY"*) planonly="${planonly}${name}\n" ;;
250
+ *) ok="${ok}${name}\n" ;;
251
+ esac
252
+ ;;
219
253
  esac
220
254
  ;;
221
255
  failure | timed_out | startup_failure)