From c2c2073f48f9fa7ca9a9d5017ab4572eb1d0b1f1 Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:26:05 -0500 Subject: [PATCH 1/3] fix(upstream-drift): stop holding drift issues with needs-human The weekly filer labeled every created or reopened drift issue needs-human, a hold against our own actor that the owner's standing direction (section 10) takes off: a drift issue is an agent's re-audit, not an owner decision. Create and reopen now add no label. The contract bullet states what still keeps a drift issue out of intake on its own. Refs: #14215 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MWmASP1SzT1TZPQp8TTQf6 --- docs/contracts/upstream-drift/CHANGELOG.md | 11 +++++++++ docs/contracts/upstream-drift/README.md | 20 ++++++++-------- scripts/upstream-drift-issues.sh | 10 +++----- scripts/upstream-drift-issues.test.sh | 27 ++++++++++++---------- 4 files changed, 38 insertions(+), 30 deletions(-) diff --git a/docs/contracts/upstream-drift/CHANGELOG.md b/docs/contracts/upstream-drift/CHANGELOG.md index f31d9fb6c55..ace29c19c78 100644 --- a/docs/contracts/upstream-drift/CHANGELOG.md +++ b/docs/contracts/upstream-drift/CHANGELOG.md @@ -4,6 +4,17 @@ Notable changes to the upstream-drift contract (SemVer). Changing a required par name, or an enforceability verdict is a major bump; additive guidance is a minor bump; docs-only clarification is a patch. +## [6.3.0] - 2026-11-16 + +Changed guidance; minor under this contract's own rule. No required part, canonical name, or +enforceability tier changes. + +The filer no longer labels a created or reopened drift issue `needs-human`, by the owner's +standing direction that holds against our own actors come off (section 10, re-stated 2026-11-16): +a drift issue is an agent's re-audit, not an owner decision. A reopen no longer adds a label before +it reopens. Drift issues still enter no intake run on their own; the "No hold label" bullet says +what starts the re-audit. + ## [6.2.0] - 2026-11-16 Changed guidance; minor under this contract's own rule. No required part, canonical name, or diff --git a/docs/contracts/upstream-drift/README.md b/docs/contracts/upstream-drift/README.md index fff131fd4f5..d7253a113d8 100644 --- a/docs/contracts/upstream-drift/README.md +++ b/docs/contracts/upstream-drift/README.md @@ -512,17 +512,15 @@ After a failed write the other upstreams still run, and the run then exits nonze skill (`:` from a `plugins//skills//` path, else the id) and tells the reader to run the page's path, restore or re-vendor what it names, and read its output in the run's job summary. The re-audit footer is written only when a hex-pin page drifted. -- **`needs-human` on create and reopen.** A created issue carries the `needs-human` label. A - reopen adds the label first, then reopens, then replaces the body, so a failed reopen leaves a - labeled closed issue and a failed label add leaves the issue closed. An in-place edit of an open - issue adds no label. Removing `needs-human` does not admit a bot-authored issue to the issue - lane: the lane starts only when a listed person or the lanes App sets the issue's Work status to - agent-ready, and an issue this workflow's token opens starts no intake run. The label holds the - issue until a listed human lifts it, as the - [loop-lane label table](../loop-lane/README.md) says for `needs-human`. Lifting it and setting - Work status to agent-ready hands the issue to an agent for the re-audit described below; neither - step asks that person to mark each upstream change, and only a change to a skill's design comes - back to the owner. +- **No hold label.** The filer adds no label on create, reopen or edit: a drift issue is not an + owner decision, so it carries no `needs-human`, and a re-audit pull request that closes it meets + no `needs-human` hold at merge. A reopen reopens, then replaces the body, so a failed reopen + leaves the closed issue's body unchanged. The issue still does not enter the issue lane on its + own: an issue this workflow's token opens starts no intake run, the hourly triage sweep skips + github-actions[bot] issues because some quote fork-controlled text, and admission counts only + done-when text a listed human wrote. A session agent, or a listed human's issue naming the drift + issues, starts the re-audit described below; only a change to a skill's design comes back to the + owner. - **`untracked` and `unreachable` block close.** An upstream with any `untracked` or `unreachable` page is never closed as clean, even beside a `clean` page, and since the report names it, the sweep leaves its issue alone too. diff --git a/scripts/upstream-drift-issues.sh b/scripts/upstream-drift-issues.sh index 23e774497ab..319ac1882a1 100755 --- a/scripts/upstream-drift-issues.sh +++ b/scripts/upstream-drift-issues.sh @@ -24,8 +24,7 @@ # span with backticks replaced. The re-audit footer is written only when a # hex-pin page drifted. The body is cut at 60,000 characters with a pointer to # the run's job summary, written to a temp file and passed with --body-file. -# A created or reopened issue gets the `needs-human` label, added before the -# reopen; an in-place edit adds no label. No assignees or mentions. +# No run adds or removes a label, and none sets assignees or mentions. # # The whole report is parsed before any gh call. Each line follows the fixed # field order of the report (docs/contracts/upstream-drift/README.md, the @@ -262,7 +261,7 @@ for i in "${!REPOS[@]}"; do case "$action" in create) write_body "$i" "$body_file" - if url="$(gh issue create --title "$title" --body-file "$body_file" --label needs-human)"; then + if url="$(gh issue create --title "$title" --body-file "$body_file")"; then [[ "$url" =~ /issues/([0-9]+)$ ]] && ! gh api -X PATCH "repos/{owner}/{repo}/issues/${BASH_REMATCH[1]}" -f type=Task >/dev/null && printf '%s: could not set the Issue Type on %s\n' "$SELF" "$url" >&2 else @@ -275,10 +274,7 @@ for i in "${!REPOS[@]}"; do ;; reopen) write_body "$i" "$body_file" - # The label goes on first, so no reopened issue is ever unlabeled. - if ! gh issue edit "$num" --add-label needs-human >/dev/null; then - fail "label add failed for $repo" - elif ! gh issue reopen "$num" >/dev/null; then + if ! gh issue reopen "$num" >/dev/null; then fail "issue reopen failed for $repo" elif ! gh issue edit "$num" --body-file "$body_file" >/dev/null; then fail "issue edit failed for $repo" diff --git a/scripts/upstream-drift-issues.test.sh b/scripts/upstream-drift-issues.test.sh index 374125bb868..4187324e4de 100755 --- a/scripts/upstream-drift-issues.test.sh +++ b/scripts/upstream-drift-issues.test.sh @@ -148,7 +148,13 @@ expect_lacks "create: unchanged rows are left out" "$body" 'skills/gamma' expect_has "create: body names the pin" "$body" "\`$PIN\`" expect_has "create: body names the head" "$body" "\`$HEAD\`" expect_has "create: body names the run URL" "$body" 'https://github.com/acme/site/actions/runs/777' -expect_has "create: the issue gets the needs-human label" "$c" '--label needs-human' +create_call="$(grep '^issue create ' <<<"$c")" +if [[ "$create_call" =~ ^'issue create --title Upstream drift: acme/widgets --body-file '[^\ ]+$ ]]; then + pass "create: the create call carries only the title and body file, so no needs-human hold" +else + bad "create: the create call carries only the title and body file, so no needs-human hold" "$create_call" +fi +expect_lacks "create: no label is added" "$c" 'label' expect_lacks "create: no assignee flag" "$c" '--assignee' # --- a report with no unknown token keeps the record body byte for byte ------ @@ -268,11 +274,12 @@ expect_has "reopen: replaces its body from a body file" "$c" 'issue edit 12 --bo expect_lacks "reopen: creates nothing" "$c" 'issue create' expect_has "reopen: reports the action" "$OUT" 'action=reopen repo=acme/widgets' expect_has "reopen: the body lists the changed row" "$(body_of edit)" '`skills/alpha/SKILL.md`' -if [[ "$c" == *'issue edit 12 --add-label needs-human'*'issue reopen 12'*'issue edit 12 --body-file'* ]]; then - pass "reopen: labels, then reopens, then edits the body" +if [[ "$c" == *'issue reopen 12'*'issue edit 12 --body-file'* ]]; then + pass "reopen: reopens, then edits the body" else - bad "reopen: labels, then reopens, then edits the body" "$c" + bad "reopen: reopens, then edits the body" "$c" fi +expect_lacks "reopen: no label is added" "$c" 'label' closed_list 'null' run_sut "$DRIFT" expect_has "reopen, no state reason: reopens issue 12" "$(calls)" 'issue reopen 12' @@ -388,7 +395,7 @@ run_sut "$VENDORED" expect_code "unknown pin: accepted, exit 0" 0 c="$(calls)" expect_has "unknown pin: creates the id's issue" "$c" 'issue create --title Upstream drift: playwright/playwright --body-file' -expect_has "unknown pin: the issue gets the needs-human label" "$c" '--label needs-human' +expect_lacks "unknown pin: no label is added" "$c" 'label' body="$(body_of create)" expect_has "unknown pin: names the skill" "$body" '### `playwright:playwright`' expect_has "unknown pin: says what to run" "$body" 'Run `plugins/playwright/skills/playwright/scripts/update.sh`; restore or re-vendor what it names; its output is in the run'"'"'s job summary.' @@ -556,20 +563,16 @@ GH_STUB_FAIL=reopen run_sut "$DRIFT" if [[ "$CODE" != 0 ]]; then pass "failed reopen: exits nonzero"; else bad "failed reopen: exits nonzero" "$OUT"; fi c="$(calls)" -expect_has "failed reopen: the closed issue keeps the label added first" "$c" 'issue edit 12 --add-label needs-human' expect_lacks "failed reopen: does not edit the closed issue's body" "$c" 'issue edit 12 --body-file' -# A failed label add stops that issue's reopen; the next upstream still runs. +# A failed reopen stops that issue's body edit; the next upstream still runs. TWO_DRIFT="$TMP/two-drift.txt" printf '%s\n' \ "page repo=acme/widgets pin=$PIN head=$HEAD status=drift path=docs/upstream/widgets.md" \ "row line=7 status=M path=skills/alpha/SKILL.md" \ "page repo=other/tools pin=$PIN head=$HEAD status=drift path=docs/upstream/tools.md" >"$TWO_DRIFT" -GH_STUB_FAIL=edit run_sut "$TWO_DRIFT" -if [[ "$CODE" != 0 ]]; then pass "failed label add: exits nonzero"; else bad "failed label add: exits nonzero" "$OUT"; fi -c="$(calls)" -expect_lacks "failed label add: no reopen" "$c" 'issue reopen' -expect_has "failed label add: the next upstream still runs" "$c" 'issue create --title Upstream drift: other/tools' +if [[ "$CODE" != 0 ]]; then pass "failed reopen, two upstreams: exits nonzero"; else bad "failed reopen, two upstreams: exits nonzero" "$OUT"; fi +expect_has "failed reopen: the next upstream still runs" "$(calls)" 'issue create --title Upstream drift: other/tools' GH_STUB_FAIL="" # --- untrusted text never reaches shell evaluation (bash 5.1 semantics) ----- From 33bafe6d79f60bc9fa5e8152f293311b0510a8bb Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:32:35 -0500 Subject: [PATCH 2/3] fix(upstream-drift): strip a legacy needs-human when reopening a drift issue A drift issue filed before the label was dropped keeps needs-human through its close, so a reopen brought the hold back. The reopen's body edit now removes it. Refs: #14215 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MWmASP1SzT1TZPQp8TTQf6 --- docs/contracts/upstream-drift/CHANGELOG.md | 2 +- docs/contracts/upstream-drift/README.md | 4 ++-- scripts/upstream-drift-issues.sh | 7 +++++-- scripts/upstream-drift-issues.test.sh | 7 ++++++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/contracts/upstream-drift/CHANGELOG.md b/docs/contracts/upstream-drift/CHANGELOG.md index ace29c19c78..065eb19691c 100644 --- a/docs/contracts/upstream-drift/CHANGELOG.md +++ b/docs/contracts/upstream-drift/CHANGELOG.md @@ -12,7 +12,7 @@ enforceability tier changes. The filer no longer labels a created or reopened drift issue `needs-human`, by the owner's standing direction that holds against our own actors come off (section 10, re-stated 2026-11-16): a drift issue is an agent's re-audit, not an owner decision. A reopen no longer adds a label before -it reopens. Drift issues still enter no intake run on their own; the "No hold label" bullet says +it reopens, and removes the `needs-human` an issue filed before this change kept through its close. Drift issues still enter no intake run on their own; the "No hold label" bullet says what starts the re-audit. ## [6.2.0] - 2026-11-16 diff --git a/docs/contracts/upstream-drift/README.md b/docs/contracts/upstream-drift/README.md index d7253a113d8..43325ff50bc 100644 --- a/docs/contracts/upstream-drift/README.md +++ b/docs/contracts/upstream-drift/README.md @@ -514,8 +514,8 @@ After a failed write the other upstreams still run, and the run then exits nonze the run's job summary. The re-audit footer is written only when a hex-pin page drifted. - **No hold label.** The filer adds no label on create, reopen or edit: a drift issue is not an owner decision, so it carries no `needs-human`, and a re-audit pull request that closes it meets - no `needs-human` hold at merge. A reopen reopens, then replaces the body, so a failed reopen - leaves the closed issue's body unchanged. The issue still does not enter the issue lane on its + no `needs-human` hold at merge. A reopen reopens, then replaces the body and removes any + `needs-human` an earlier filer left, so a failed reopen leaves the closed issue unchanged. The issue still does not enter the issue lane on its own: an issue this workflow's token opens starts no intake run, the hourly triage sweep skips github-actions[bot] issues because some quote fork-controlled text, and admission counts only done-when text a listed human wrote. A session agent, or a listed human's issue naming the drift diff --git a/scripts/upstream-drift-issues.sh b/scripts/upstream-drift-issues.sh index 319ac1882a1..dad2e0b5600 100755 --- a/scripts/upstream-drift-issues.sh +++ b/scripts/upstream-drift-issues.sh @@ -24,7 +24,8 @@ # span with backticks replaced. The re-audit footer is written only when a # hex-pin page drifted. The body is cut at 60,000 characters with a pointer to # the run's job summary, written to a temp file and passed with --body-file. -# No run adds or removes a label, and none sets assignees or mentions. +# No run adds a label; a reopen removes `needs-human` with its body edit. No +# assignees or mentions. # # The whole report is parsed before any gh call. Each line follows the fixed # field order of the report (docs/contracts/upstream-drift/README.md, the @@ -276,7 +277,9 @@ for i in "${!REPOS[@]}"; do write_body "$i" "$body_file" if ! gh issue reopen "$num" >/dev/null; then fail "issue reopen failed for $repo" - elif ! gh issue edit "$num" --body-file "$body_file" >/dev/null; then + # Issues filed before drift issues stopped carrying needs-human keep it + # through a close, so the reopen strips it. + elif ! gh issue edit "$num" --body-file "$body_file" --remove-label needs-human >/dev/null; then fail "issue edit failed for $repo" fi ;; diff --git a/scripts/upstream-drift-issues.test.sh b/scripts/upstream-drift-issues.test.sh index 4187324e4de..89587023e40 100755 --- a/scripts/upstream-drift-issues.test.sh +++ b/scripts/upstream-drift-issues.test.sh @@ -279,7 +279,12 @@ if [[ "$c" == *'issue reopen 12'*'issue edit 12 --body-file'* ]]; then else bad "reopen: reopens, then edits the body" "$c" fi -expect_lacks "reopen: no label is added" "$c" 'label' +expect_lacks "reopen: no label is added" "$c" 'add-label' +if grep -Eq '^issue edit 12 --body-file [^ ]+ --remove-label needs-human$' <<<"$c"; then + pass "reopen: the body edit strips a needs-human hold left from before" +else + bad "reopen: the body edit strips a needs-human hold left from before" "$c" +fi closed_list 'null' run_sut "$DRIFT" expect_has "reopen, no state reason: reopens issue 12" "$(calls)" 'issue reopen 12' From c685fca6f0023b82867582e7520e0b24aa278352 Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:32:54 -0500 Subject: [PATCH 3/3] refactor(upstream-drift): drop a provenance comment on the reopen edit Refs: #14215 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MWmASP1SzT1TZPQp8TTQf6 --- scripts/upstream-drift-issues.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/upstream-drift-issues.sh b/scripts/upstream-drift-issues.sh index dad2e0b5600..9caae0a28eb 100755 --- a/scripts/upstream-drift-issues.sh +++ b/scripts/upstream-drift-issues.sh @@ -277,8 +277,6 @@ for i in "${!REPOS[@]}"; do write_body "$i" "$body_file" if ! gh issue reopen "$num" >/dev/null; then fail "issue reopen failed for $repo" - # Issues filed before drift issues stopped carrying needs-human keep it - # through a close, so the reopen strips it. elif ! gh issue edit "$num" --body-file "$body_file" --remove-label needs-human >/dev/null; then fail "issue edit failed for $repo" fi