@biffo/cli 0.301.9 → 0.301.11
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.
|
@@ -11,6 +11,7 @@ overrides:
|
|
|
11
11
|
undici@<7.29.0: '>=7.29.0'
|
|
12
12
|
js-yaml@<4.3.1: '>=4.3.1 <5'
|
|
13
13
|
nanoid@<3.3.17: '>=3.3.17 <4'
|
|
14
|
+
browserslist@<4.28.7: '>=4.28.7'
|
|
14
15
|
|
|
15
16
|
importers:
|
|
16
17
|
|
|
@@ -1230,8 +1231,8 @@ packages:
|
|
|
1230
1231
|
base64-js@1.5.1:
|
|
1231
1232
|
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
|
1232
1233
|
|
|
1233
|
-
baseline-browser-mapping@2.
|
|
1234
|
-
resolution: {integrity: sha512-
|
|
1234
|
+
baseline-browser-mapping@2.11.20:
|
|
1235
|
+
resolution: {integrity: sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw==}
|
|
1235
1236
|
engines: {node: '>=6.0.0'}
|
|
1236
1237
|
hasBin: true
|
|
1237
1238
|
|
|
@@ -1246,8 +1247,8 @@ packages:
|
|
|
1246
1247
|
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
|
1247
1248
|
engines: {node: '>=8'}
|
|
1248
1249
|
|
|
1249
|
-
browserslist@4.28.
|
|
1250
|
-
resolution: {integrity: sha512-
|
|
1250
|
+
browserslist@4.28.8:
|
|
1251
|
+
resolution: {integrity: sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==}
|
|
1251
1252
|
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
|
1252
1253
|
hasBin: true
|
|
1253
1254
|
|
|
@@ -1273,6 +1274,9 @@ packages:
|
|
|
1273
1274
|
caniuse-lite@1.0.30001800:
|
|
1274
1275
|
resolution: {integrity: sha512-MMHtuAz9Ys840zAY5F4k6fV5GaivZ9sPk+nz0mY+GYVzRBnYkN0mpqkSR92oWRQ19yQWo4HvBV/FnC16AJX8MA==}
|
|
1275
1276
|
|
|
1277
|
+
caniuse-lite@1.0.30001810:
|
|
1278
|
+
resolution: {integrity: sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==}
|
|
1279
|
+
|
|
1276
1280
|
chai@6.2.2:
|
|
1277
1281
|
resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==}
|
|
1278
1282
|
engines: {node: '>=18'}
|
|
@@ -1380,8 +1384,8 @@ packages:
|
|
|
1380
1384
|
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
|
|
1381
1385
|
engines: {node: '>= 0.4'}
|
|
1382
1386
|
|
|
1383
|
-
electron-to-chromium@1.5.
|
|
1384
|
-
resolution: {integrity: sha512-
|
|
1387
|
+
electron-to-chromium@1.5.420:
|
|
1388
|
+
resolution: {integrity: sha512-2yD6XreGusOfNV+dUcvipJEXc3n/n7fgr7996aszTG+YY5E4mqM4tOq/3uhP129cazL9YHbVWSpc79ePotWtPA==}
|
|
1385
1389
|
|
|
1386
1390
|
emoji-regex@9.2.2:
|
|
1387
1391
|
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
|
|
@@ -2031,8 +2035,8 @@ packages:
|
|
|
2031
2035
|
encoding:
|
|
2032
2036
|
optional: true
|
|
2033
2037
|
|
|
2034
|
-
node-releases@2.0.
|
|
2035
|
-
resolution: {integrity: sha512-
|
|
2038
|
+
node-releases@2.0.54:
|
|
2039
|
+
resolution: {integrity: sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==}
|
|
2036
2040
|
engines: {node: '>=18'}
|
|
2037
2041
|
|
|
2038
2042
|
object-assign@4.1.1:
|
|
@@ -2465,11 +2469,11 @@ packages:
|
|
|
2465
2469
|
unrs-resolver@1.12.2:
|
|
2466
2470
|
resolution: {integrity: sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==}
|
|
2467
2471
|
|
|
2468
|
-
update-browserslist-db@1.2
|
|
2469
|
-
resolution: {integrity: sha512-
|
|
2472
|
+
update-browserslist-db@1.3.2:
|
|
2473
|
+
resolution: {integrity: sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==}
|
|
2470
2474
|
hasBin: true
|
|
2471
2475
|
peerDependencies:
|
|
2472
|
-
browserslist: '>=
|
|
2476
|
+
browserslist: '>=4.28.7'
|
|
2473
2477
|
|
|
2474
2478
|
uri-js@4.4.1:
|
|
2475
2479
|
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
|
@@ -2705,7 +2709,7 @@ snapshots:
|
|
|
2705
2709
|
dependencies:
|
|
2706
2710
|
'@babel/compat-data': 7.29.7
|
|
2707
2711
|
'@babel/helper-validator-option': 7.29.7
|
|
2708
|
-
browserslist: 4.28.
|
|
2712
|
+
browserslist: 4.28.8
|
|
2709
2713
|
lru-cache: 5.1.1
|
|
2710
2714
|
semver: 6.3.1
|
|
2711
2715
|
|
|
@@ -3665,7 +3669,7 @@ snapshots:
|
|
|
3665
3669
|
|
|
3666
3670
|
base64-js@1.5.1: {}
|
|
3667
3671
|
|
|
3668
|
-
baseline-browser-mapping@2.
|
|
3672
|
+
baseline-browser-mapping@2.11.20: {}
|
|
3669
3673
|
|
|
3670
3674
|
bidi-js@1.0.3:
|
|
3671
3675
|
dependencies:
|
|
@@ -3679,13 +3683,13 @@ snapshots:
|
|
|
3679
3683
|
dependencies:
|
|
3680
3684
|
fill-range: 7.1.1
|
|
3681
3685
|
|
|
3682
|
-
browserslist@4.28.
|
|
3686
|
+
browserslist@4.28.8:
|
|
3683
3687
|
dependencies:
|
|
3684
|
-
baseline-browser-mapping: 2.
|
|
3685
|
-
caniuse-lite: 1.0.
|
|
3686
|
-
electron-to-chromium: 1.5.
|
|
3687
|
-
node-releases: 2.0.
|
|
3688
|
-
update-browserslist-db: 1.2
|
|
3688
|
+
baseline-browser-mapping: 2.11.20
|
|
3689
|
+
caniuse-lite: 1.0.30001810
|
|
3690
|
+
electron-to-chromium: 1.5.420
|
|
3691
|
+
node-releases: 2.0.54
|
|
3692
|
+
update-browserslist-db: 1.3.2(browserslist@4.28.8)
|
|
3689
3693
|
|
|
3690
3694
|
buffer@4.9.2:
|
|
3691
3695
|
dependencies:
|
|
@@ -3714,6 +3718,8 @@ snapshots:
|
|
|
3714
3718
|
|
|
3715
3719
|
caniuse-lite@1.0.30001800: {}
|
|
3716
3720
|
|
|
3721
|
+
caniuse-lite@1.0.30001810: {}
|
|
3722
|
+
|
|
3717
3723
|
chai@6.2.2: {}
|
|
3718
3724
|
|
|
3719
3725
|
chalk@4.1.2:
|
|
@@ -3816,7 +3822,7 @@ snapshots:
|
|
|
3816
3822
|
es-errors: 1.3.0
|
|
3817
3823
|
gopd: 1.2.0
|
|
3818
3824
|
|
|
3819
|
-
electron-to-chromium@1.5.
|
|
3825
|
+
electron-to-chromium@1.5.420: {}
|
|
3820
3826
|
|
|
3821
3827
|
emoji-regex@9.2.2: {}
|
|
3822
3828
|
|
|
@@ -3976,8 +3982,8 @@ snapshots:
|
|
|
3976
3982
|
'@typescript-eslint/parser': 8.62.1(eslint@9.39.4)(typescript@5.9.3)
|
|
3977
3983
|
eslint: 9.39.4
|
|
3978
3984
|
eslint-import-resolver-node: 0.3.10
|
|
3979
|
-
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4)
|
|
3980
|
-
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4)
|
|
3985
|
+
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4))(eslint@9.39.4)
|
|
3986
|
+
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4))(eslint@9.39.4))(eslint@9.39.4)
|
|
3981
3987
|
eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.4)
|
|
3982
3988
|
eslint-plugin-react: 7.37.5(eslint@9.39.4)
|
|
3983
3989
|
eslint-plugin-react-hooks: 5.2.0(eslint@9.39.4)
|
|
@@ -3996,7 +4002,7 @@ snapshots:
|
|
|
3996
4002
|
transitivePeerDependencies:
|
|
3997
4003
|
- supports-color
|
|
3998
4004
|
|
|
3999
|
-
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4):
|
|
4005
|
+
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4))(eslint@9.39.4):
|
|
4000
4006
|
dependencies:
|
|
4001
4007
|
'@nolyfill/is-core-module': 1.0.39
|
|
4002
4008
|
debug: 4.4.3
|
|
@@ -4007,22 +4013,22 @@ snapshots:
|
|
|
4007
4013
|
tinyglobby: 0.2.17
|
|
4008
4014
|
unrs-resolver: 1.12.2
|
|
4009
4015
|
optionalDependencies:
|
|
4010
|
-
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4)
|
|
4016
|
+
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4))(eslint@9.39.4))(eslint@9.39.4)
|
|
4011
4017
|
transitivePeerDependencies:
|
|
4012
4018
|
- supports-color
|
|
4013
4019
|
|
|
4014
|
-
eslint-module-utils@2.14.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4):
|
|
4020
|
+
eslint-module-utils@2.14.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4))(eslint@9.39.4))(eslint@9.39.4):
|
|
4015
4021
|
dependencies:
|
|
4016
4022
|
debug: 3.2.7
|
|
4017
4023
|
optionalDependencies:
|
|
4018
4024
|
'@typescript-eslint/parser': 8.62.1(eslint@9.39.4)(typescript@5.9.3)
|
|
4019
4025
|
eslint: 9.39.4
|
|
4020
4026
|
eslint-import-resolver-node: 0.3.10
|
|
4021
|
-
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.4)
|
|
4027
|
+
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4))(eslint@9.39.4)
|
|
4022
4028
|
transitivePeerDependencies:
|
|
4023
4029
|
- supports-color
|
|
4024
4030
|
|
|
4025
|
-
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4):
|
|
4031
|
+
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4))(eslint@9.39.4))(eslint@9.39.4):
|
|
4026
4032
|
dependencies:
|
|
4027
4033
|
'@rtsao/scc': 1.1.0
|
|
4028
4034
|
array-includes: 3.1.9
|
|
@@ -4033,7 +4039,7 @@ snapshots:
|
|
|
4033
4039
|
doctrine: 2.1.0
|
|
4034
4040
|
eslint: 9.39.4
|
|
4035
4041
|
eslint-import-resolver-node: 0.3.10
|
|
4036
|
-
eslint-module-utils: 2.14.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.4)
|
|
4042
|
+
eslint-module-utils: 2.14.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-node@0.3.10)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.62.1(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4))(eslint@9.39.4))(eslint@9.39.4)
|
|
4037
4043
|
hasown: 2.0.4
|
|
4038
4044
|
is-core-module: 2.16.2
|
|
4039
4045
|
is-glob: 4.0.3
|
|
@@ -4637,7 +4643,7 @@ snapshots:
|
|
|
4637
4643
|
dependencies:
|
|
4638
4644
|
whatwg-url: 5.0.0
|
|
4639
4645
|
|
|
4640
|
-
node-releases@2.0.
|
|
4646
|
+
node-releases@2.0.54: {}
|
|
4641
4647
|
|
|
4642
4648
|
object-assign@4.1.1: {}
|
|
4643
4649
|
|
|
@@ -5187,9 +5193,9 @@ snapshots:
|
|
|
5187
5193
|
'@unrs/resolver-binding-win32-ia32-msvc': 1.12.2
|
|
5188
5194
|
'@unrs/resolver-binding-win32-x64-msvc': 1.12.2
|
|
5189
5195
|
|
|
5190
|
-
update-browserslist-db@1.2
|
|
5196
|
+
update-browserslist-db@1.3.2(browserslist@4.28.8):
|
|
5191
5197
|
dependencies:
|
|
5192
|
-
browserslist: 4.28.
|
|
5198
|
+
browserslist: 4.28.8
|
|
5193
5199
|
escalade: 3.2.0
|
|
5194
5200
|
picocolors: 1.1.1
|
|
5195
5201
|
|
package/package.json
CHANGED
package/scripts/claim.sh
CHANGED
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
# sh scripts/claim.sh 1234 --as <token> --check # report only, change nothing
|
|
44
44
|
# sh scripts/claim.sh 1234 --as <token> -R owner/repo
|
|
45
45
|
# sh scripts/claim.sh 1234 --release <token> # only the holder may clear it
|
|
46
|
+
# sh scripts/claim.sh 1234 --reaffirm <token> # keep a claim alive past session-stop
|
|
46
47
|
# sh scripts/claim.sh --guard <branch> # pre-push gate — see below
|
|
47
48
|
#
|
|
48
49
|
# 0 free — and claimed, unless --check
|
|
@@ -148,6 +149,29 @@
|
|
|
148
149
|
# collision caught early (see "What it cannot do" above). Set
|
|
149
150
|
# `BIFFO_CLAIM_STRICT=1` to make this script itself collapse cannot-tell
|
|
150
151
|
# into exit 1 instead, for anyone who would rather block than guess.
|
|
152
|
+
#
|
|
153
|
+
# ## `--reaffirm <token>` — keep a claim alive past this session's own stop (#1849)
|
|
154
|
+
#
|
|
155
|
+
# AGENTS.md's own convention is "release it... on merge, or if you stop" —
|
|
156
|
+
# every session, unconditionally, regardless of what it just shipped. That is
|
|
157
|
+
# right for the overwhelming majority of sessions, and wrong for the one that
|
|
158
|
+
# ships a `Refs`-only PR whose whole point is a multi-day review window during
|
|
159
|
+
# which the issue must stay claimed. Nothing distinguished the two: a PR could
|
|
160
|
+
# write, in its own body, "nothing here touches that label or that claim", and
|
|
161
|
+
# the same session's ordinary end-of-session `--release` fired seconds later
|
|
162
|
+
# regardless — the written promise and the actual mechanism disagreed, and
|
|
163
|
+
# nothing reconciled them (biffo-template#1849; the same guard-vs-authority
|
|
164
|
+
# shape already tracked with 8 other instances in this estate).
|
|
165
|
+
#
|
|
166
|
+
# `--reaffirm` gives that session something to actually RUN as a required last
|
|
167
|
+
# step, instead of a promise the next reader has to take on faith. It is
|
|
168
|
+
# deliberately not a fresh claim: it always re-applies the label and posts a
|
|
169
|
+
# comment for `$HOLDER`, whether or not the four signals below would call the
|
|
170
|
+
# issue free — that is the point, the caller is asserting "stays taken", not
|
|
171
|
+
# asking "is this taken". The one thing it refuses is overwriting a DIFFERENT
|
|
172
|
+
# live holder's claim: if the label is already present and the claim-holder
|
|
173
|
+
# comment names someone other than `$HOLDER`, it exits 1 exactly like a
|
|
174
|
+
# mismatched `--release`, rather than silently taking over.
|
|
151
175
|
|
|
152
176
|
set -u
|
|
153
177
|
|
|
@@ -155,6 +179,7 @@ ISSUE=""
|
|
|
155
179
|
REPO=""
|
|
156
180
|
HOLDER=""
|
|
157
181
|
RELEASE=""
|
|
182
|
+
REAFFIRM=""
|
|
158
183
|
HOLDER_MARK="claim-holder:"
|
|
159
184
|
BRANCH_MARK="claim-branch:"
|
|
160
185
|
CHECK_ONLY=""
|
|
@@ -237,6 +262,17 @@ while [ $# -gt 0 ]; do
|
|
|
237
262
|
*) HOLDER="$2"; shift 2 ;;
|
|
238
263
|
esac
|
|
239
264
|
;;
|
|
265
|
+
--reaffirm)
|
|
266
|
+
# Mirrors --release's own parsing exactly, and for the identical reason
|
|
267
|
+
# (#826, the FLAG-IS-NOT-A-TOKEN fix above): `--reaffirm --as <token>`
|
|
268
|
+
# must not swallow `--as` as the token and push the real token into
|
|
269
|
+
# ISSUE's positional slot.
|
|
270
|
+
REAFFIRM=1
|
|
271
|
+
case "${2:-}" in
|
|
272
|
+
-*|'') shift ;;
|
|
273
|
+
*) HOLDER="$2"; shift 2 ;;
|
|
274
|
+
esac
|
|
275
|
+
;;
|
|
240
276
|
--guard)
|
|
241
277
|
[ $# -ge 2 ] || missing_value "$1"
|
|
242
278
|
GUARD_BRANCH="$2"
|
|
@@ -255,7 +291,7 @@ while [ $# -gt 0 ]; do
|
|
|
255
291
|
# Refusing here, at the point the flag is actually unrecognized, says
|
|
256
292
|
# what is really wrong instead of a confusing knock-on error.
|
|
257
293
|
echo "${RED}claim: unrecognized flag '$1'${OFF}" >&2
|
|
258
|
-
echo "${DIM} Known flags: -R/--repo, --check, --as, --release, --guard, -h/--help.${OFF}" >&2
|
|
294
|
+
echo "${DIM} Known flags: -R/--repo, --check, --as, --release, --reaffirm, --guard, -h/--help.${OFF}" >&2
|
|
259
295
|
exit 2
|
|
260
296
|
;;
|
|
261
297
|
*)
|
|
@@ -1029,6 +1065,65 @@ if [ "$state" != "OPEN" ]; then
|
|
|
1029
1065
|
exit 1
|
|
1030
1066
|
fi
|
|
1031
1067
|
|
|
1068
|
+
# --- --reaffirm: keep the claim taken, regardless of what the four signals
|
|
1069
|
+
# below would say (#1849) --------------------------------------------------
|
|
1070
|
+
#
|
|
1071
|
+
# Runs here rather than as an early short-circuit like --release/--guard,
|
|
1072
|
+
# specifically so it gets the SAME "--as <token> is required" gate those two
|
|
1073
|
+
# are exempted from (above) and the same OPEN-issue check just above: a
|
|
1074
|
+
# reaffirm with no identifying token, or of an issue that is already closed,
|
|
1075
|
+
# should fail exactly the way a fresh claim would, not slip through on a
|
|
1076
|
+
# lighter check because it front-ran the validation.
|
|
1077
|
+
#
|
|
1078
|
+
# Deliberately does NOT consult the lease/label/PR/branch signals below to
|
|
1079
|
+
# decide whether to act — a reaffirm is an assertion ("this stays taken"),
|
|
1080
|
+
# not a question ("is this taken"). The one thing it will not do is clobber
|
|
1081
|
+
# a claim that already names a DIFFERENT live holder: that would turn
|
|
1082
|
+
# "restore my own claim" into "silently steal someone else's".
|
|
1083
|
+
if [ -n "$REAFFIRM" ]; then
|
|
1084
|
+
case ",$labels," in
|
|
1085
|
+
*",$LABEL,"*)
|
|
1086
|
+
claim_held_by "$ISSUE" "$HOLDER"
|
|
1087
|
+
_reaffirm_held=$?
|
|
1088
|
+
if [ "$_reaffirm_held" -eq 1 ]; then
|
|
1089
|
+
echo "${RED}claim: #$ISSUE is already labeled '$LABEL', held by someone other than '$HOLDER'.${OFF}" >&2
|
|
1090
|
+
echo "${DIM} --reaffirm restores YOUR OWN claim; it does not take over someone else's.${OFF}" >&2
|
|
1091
|
+
echo "${DIM} If that claim is genuinely stale, say so in a comment and steal it via${OFF}" >&2
|
|
1092
|
+
echo "${DIM} the ordinary claim path instead (AGENTS.md: over an hour, no activity).${OFF}" >&2
|
|
1093
|
+
exit 1
|
|
1094
|
+
fi
|
|
1095
|
+
if [ "$_reaffirm_held" -eq 2 ]; then
|
|
1096
|
+
echo "${RED}claim: cannot tell whether #$ISSUE's '$LABEL' label is yours${OFF} — comments unreadable." >&2
|
|
1097
|
+
echo "${DIM} Not reaffirming on an unreadable read: that could overwrite someone else's claim.${OFF}" >&2
|
|
1098
|
+
exit 2
|
|
1099
|
+
fi
|
|
1100
|
+
;;
|
|
1101
|
+
esac
|
|
1102
|
+
|
|
1103
|
+
# Make sure the label exists before applying it — same idempotent,
|
|
1104
|
+
# non-fatal create as the fresh-claim path below.
|
|
1105
|
+
gh_label create "$LABEL" \
|
|
1106
|
+
-c FBCA04 \
|
|
1107
|
+
-d "Claimed by a running agent session -- do not start work on this" \
|
|
1108
|
+
>/dev/null 2>&1 || true
|
|
1109
|
+
|
|
1110
|
+
_claim_branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '')
|
|
1111
|
+
case "$_claim_branch" in
|
|
1112
|
+
'' | HEAD) _claim_branch='' ;;
|
|
1113
|
+
esac
|
|
1114
|
+
gh_issue edit "$ISSUE" --add-label "$LABEL" >/dev/null 2>&1 || {
|
|
1115
|
+
echo "${RED}claim: could not apply the '$LABEL' label.${OFF}" >&2
|
|
1116
|
+
echo "${DIM} Not reaffirmed — do not treat #$ISSUE as still claimed.${OFF}" >&2
|
|
1117
|
+
exit 2
|
|
1118
|
+
}
|
|
1119
|
+
gh_issue comment "$ISSUE" \
|
|
1120
|
+
--body "Reaffirmed at $(date -u +%FT%TZ) by \`$(git config user.name 2>/dev/null || echo agent)\`. ${HOLDER_MARK}${HOLDER}${_claim_branch:+ ${BRANCH_MARK}${_claim_branch}} This is a REAFFIRMED claim, not a fresh one and not a release: a PR or session referencing this issue has stated it must stay claimed beyond this session's own lifetime (e.g. a review-window experiment, or a Refs-only PR that is not yet finished). Do not run --release on ordinary session-stop while that stated condition holds — release only once it genuinely resolves." \
|
|
1121
|
+
>/dev/null 2>&1
|
|
1122
|
+
|
|
1123
|
+
echo "${GREEN}Reaffirmed.${OFF} ${DIM}(#$ISSUE stays claimed by $HOLDER)${OFF}"
|
|
1124
|
+
exit 0
|
|
1125
|
+
fi
|
|
1126
|
+
|
|
1032
1127
|
# --- 0.5. THE LEASE. The one authority for "is this being worked on" ---------
|
|
1033
1128
|
#
|
|
1034
1129
|
# ADR-0008: "The lease decides. A unit with no live lease is available, whatever
|