Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Merge batch 11-06 k0620: #3283 (#3285)

0xken15e80012a8230b
diff --git a/.github/workflows/production-be-build.yaml b/.github/workflows/production-be-build.yaml
index 6d7a6902b..b28cafd79 100644
--- a/.github/workflows/production-be-build.yaml
+++ b/.github/workflows/production-be-build.yaml
@@ -66,7 +66,7 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
# A tag pushed by hand skips the release scripts, so the window is checked here too
- # (scripts/release-window.py). An urgent release carries `Release-Urgent: <reason>` in its tag message.
+ # (scripts/release-window.py). An emergency release carries `Emergency: <reason>` (or the scripts' `Release-Urgent: <reason>`) in its annotated tag.
- name: Release window
if: ${{ github.event_name == 'push' }}
env:
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index 78528badd..6951ed544 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -115,7 +115,7 @@ jobs:
fetch-depth: 1
# A tag pushed by hand skips the release scripts, so the window is checked here too
- # (scripts/release-window.py). An urgent release carries `Release-Urgent: <reason>` in its tag message.
+ # (scripts/release-window.py). An emergency release carries `Emergency: <reason>` (or the scripts' `Release-Urgent: <reason>`) in its annotated tag.
- name: Release window
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.prepare_only && !inputs.test_candidate_reuse && (inputs.metadata_path == '' || inputs.metadata_path == 'harness/desktop/metadata.json')) }}
env:
diff --git a/.github/workflows/release-web.yml b/.github/workflows/release-web.yml
index 0185a6902..64a95e0c6 100644
--- a/.github/workflows/release-web.yml
+++ b/.github/workflows/release-web.yml
@@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
# A tag pushed by hand skips the release scripts, so the window is checked here too
- # (scripts/release-window.py). An urgent release carries `Release-Urgent: <reason>` in its tag message.
+ # (scripts/release-window.py). An emergency release carries `Emergency: <reason>` (or the scripts' `Release-Urgent: <reason>`) in its annotated tag.
- name: Release window
if: ${{ github.event_name == 'push' }}
env:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 964630d7b..f7ed2962a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -94,7 +94,7 @@ jobs:
fetch-depth: 1
# A tag pushed by hand skips the release scripts, so the window is checked here too
- # (scripts/release-window.py). An urgent release carries `Release-Urgent: <reason>` in its tag message.
+ # (scripts/release-window.py). An emergency release carries `Emergency: <reason>` (or the scripts' `Release-Urgent: <reason>`) in its annotated tag.
- name: Release window
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && (inputs.metadata_path == '' || inputs.metadata_path == 'harness/cli/metadata.json')) }}
env:
diff --git a/scripts/release-window.py b/scripts/release-window.py
index a09131d86..15c881a20 100755
--- a/scripts/release-window.py
+++ b/scripts/release-window.py
@@ -11,7 +11,9 @@ release 09:00-10:00 VN, Ken 2026-11-05).
Exit 0: allowed. Exit 2: refused, with the next allowed time on stderr. An urgent release is recorded on its
tag as a `Release-Urgent: <reason>` line, which --from-tag reads, so the workflow honors the same override and
-a tag pushed by hand without one is refused.
+a tag pushed by hand without one is refused. A person tagging by hand names the emergency with an
+`Emergency: <reason>` line instead; either line counts only in an annotated tag (a lightweight tag's "message" is its
+commit's, which any push can write), and the reason goes to the job summary.
"""
import argparse
import json
@@ -25,7 +27,8 @@ from pathlib import Path
from zoneinfo import ZoneInfo
CONFIG_PATH = Path(__file__).resolve().parent / "release-window.json"
-URGENT_LINE = re.compile(r"^Release-Urgent: (.+)$", re.MULTILINE)
+# `Emergency: <reason>` is the line a person writes in a tag by hand; the release scripts write `Release-Urgent: <reason>`.
+URGENT_LINE = re.compile(r"^(?:Emergency|Release-Urgent):[ \t]*(\S.*)$", re.MULTILINE)
Verdict = namedtuple("Verdict", "allowed next_allowed message urgent_reason chat_line")
@@ -135,6 +138,8 @@ def tagged_at(repo, tag):
def urgent_reason_of_tag(repo, tag):
+ if not tagged_at(repo, tag):
+ return None # lightweight: `%(contents)` would be its commit's message, which any push can write
body = _git(repo, "tag", "-l", "--format=%(contents)", tag)
found = URGENT_LINE.search(body)
return found.group(1).strip() if found else None
diff --git a/scripts/tests/test_release_window.py b/scripts/tests/test_release_window.py
index b6ba8d665..36218a223 100644
--- a/scripts/tests/test_release_window.py
+++ b/scripts/tests/test_release_window.py
@@ -248,6 +248,60 @@ class GitAndCliTests(unittest.TestCase):
self.assertEqual(code, 0, err)
self.assertIn("P0: sign-out loop", out)
+ def run_tag_at(self, name, when_made, now, message="release", kind="cli"):
+ self.tag(name, when_made, message=message)
+ return self.run_cli("--kind", kind, "--now", now.isoformat(), "--from-tag", name, "--exclude-tag", name)
+
+ def test_a_tag_at_0320_vn_without_a_reason_is_refused(self):
+ # 2026-11-06 03:20 VN: the hour a CLI and a Desktop release went out from a tag push.
+ code, _, err = self.run_tag_at("v1.0.1_cli", at(6, 3, 20), at(6, 3, 21))
+ self.assertEqual(code, 2)
+ self.assertIn("RELEASE_WINDOW", err)
+
+ def test_a_tag_at_0320_vn_with_an_emergency_reason_runs_and_posts_the_reason(self):
+ summary = Path(self.tmp.name) / "summary.md"
+ os.environ["GITHUB_STEP_SUMMARY"] = str(summary)
+ self.addCleanup(os.environ.pop, "GITHUB_STEP_SUMMARY", None)
+ for kind in ["cli", "desktop", "backend", "web"]:
+ with self.subTest(kind=kind):
+ code, out, err = self.run_tag_at(f"v1.0.1_{kind}", at(6, 3, 20), at(6, 3, 21), kind=kind,
+ message="release\n\nEmergency: sign-in loop on every start")
+ self.assertEqual(code, 0, err)
+ self.assertIn("sign-in loop on every start", out)
+ self.assertIn(f"Urgent {kind} release", summary.read_text())
+ self.assertIn("sign-in loop on every start", summary.read_text())
+
+ def test_an_emergency_line_with_no_reason_does_not_open_the_window(self):
+ for line in ["Emergency:", "Emergency: ", "Emergency: "]:
+ with self.subTest(line=line):
+ code, _, err = self.run_tag_at("v1.0.1_cli", at(6, 3, 20), at(6, 3, 21), message=f"release\n\n{line}")
+ self.assertEqual(code, 2, err)
+ git(self.repo, "tag", "-d", "v1.0.1_cli")
+
+ def test_the_emergency_word_must_start_a_line_of_the_tag_message(self):
+ code, _, _ = self.run_tag_at("v1.0.1_cli", at(6, 3, 20), at(6, 3, 21),
+ message="release\n\nthis is not an Emergency: really")
+ self.assertEqual(code, 2)
+
+ def test_a_lightweight_tag_cannot_claim_an_emergency_through_its_commit_message(self):
+ # `git tag -l --format=%(contents)` returns the commit message for a lightweight tag, which any push can set.
+ for line in ["Emergency: not a real one", "Release-Urgent: not a real one"]:
+ with self.subTest(line=line):
+ git(self.repo, "commit", "-q", "--allow-empty", "-m", f"fix\n\n{line}")
+ git(self.repo, "tag", "v1.0.1_cli")
+ code, _, err = self.run_cli("--kind", "cli", "--now", at(6, 3, 21).isoformat(),
+ "--from-tag", "v1.0.1_cli", "--exclude-tag", "v1.0.1_cli")
+ self.assertEqual(code, 2, err)
+ git(self.repo, "tag", "-d", "v1.0.1_cli")
+
+ def test_the_window_edges_for_a_tag_push(self):
+ for hour, minute, expected in [(8, 59, 2), (9, 0, 0), (17, 59, 0), (18, 0, 2)]:
+ with self.subTest(at=f"{hour:02d}:{minute:02d}"):
+ # Tagged and started at the same minute, so the grace does not hide the edge.
+ code, _, err = self.run_tag_at("v1.0.1_cli", at(6, hour, minute), at(6, hour, minute))
+ self.assertEqual(code, expected, err)
+ git(self.repo, "tag", "-d", "v1.0.1_cli")
+
def test_tag_without_urgent_line_is_refused_at_night(self):
self.tag("v1.0.3_backend", at(5, 23, 0))
code, _, err = self.run_cli("--kind", "backend", "--now", at(5, 23, 1).isoformat(),