From ab78b4ac8fff53e16ab8e0861b8a6a2721402476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Contreras=20Guill=C3=A9n?= Date: Fri, 13 Nov 2026 17:29:04 -0800 Subject: [PATCH 01/11] fix(release): accept normalized Python package versions Python package metadata normalizes numeric padding while release tags can retain padded CalVer spelling Root cause: The release gate compared version-file strings literally, rejecting equivalent Python versions such as 26.11.8 and 26.11.08 Compare numeric components only for pyproject.toml and preserve the requested tag; retain exact matching for VERSION and package.json Verified: 13 release and rule tests passed on Python 3.9.6 and 3.15.2; positive regression failed baseline; independent review and security scan passed; full local CI still running Refs: https://github.com/fireflyframework/fireflyframework-pyfly/pull/245 --- CHANGELOG.md | 8 ++++++++ docs/git-and-github.md | 3 +++ lib/devkit/gitx.py | 13 ++++++++++++- tests/test_gitx.py | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e84a8c8e..3ad8f288 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to devkit. Versions follow CalVer `YY.MM.PATCH` (PATCH restarts at 0 each month); tags are `vYY.MM.PATCH`. Sections follow [Keep a Changelog](https://keepachangelog.com/). +## [Unreleased] + +### Fixed + +- **Releases.** `dev release` accepts Python versions with equivalent numeric components despite different zero + padding, such as `pyproject.toml` version `26.11.8` for `--version 26.11.08`. The tag keeps the requested spelling; + `VERSION` and `package.json` still require an exact match. + ## [26.11.17] - 2026-11-12 This release lets crew members combine their lane commands with other commands on Claude Code, keeps review lanes diff --git a/docs/git-and-github.md b/docs/git-and-github.md index 40fb6e94..b0f57414 100644 --- a/docs/git-and-github.md +++ b/docs/git-and-github.md @@ -451,6 +451,9 @@ failed jobs (`--all-jobs` for all of them). 3. The version is `--version`, or the next CalVer version. A project with another scheme (recorded in its policy, or visible in its tags and version files) needs `--version X.Y.Z`. The tag must not exist yet. 4. `VERSION`, `package.json`, and `pyproject.toml` say the same version; if not, bump them on the release branch first. + Python numeric versions may differ in zero padding: `pyproject.toml` version `26.11.8` matches + `--version 26.11.08`, and the tag stays `v26.11.08`. Each of the three numeric components must match; + `VERSION` and `package.json` still require the exact spelling. 5. HEAD has local CI evidence (or `--ci-passed`), and its CI on GitHub is not failing or still running. 6. The notes are `--notes-file`, or the version's section of `CHANGELOG.md` (or `CHANGES.md`, `HISTORY.md`), or GitHub's generated notes. diff --git a/lib/devkit/gitx.py b/lib/devkit/gitx.py index 609ca468..85d13506 100644 --- a/lib/devkit/gitx.py +++ b/lib/devkit/gitx.py @@ -4459,6 +4459,17 @@ def version_files(top) -> dict: return {k: v for k, v in out.items() if v != "0.0.0"} +def _release_version_matches(filename: str, actual: str, requested: str) -> bool: + """Python numeric metadata may omit zero padding; other files must match literally.""" + if actual == requested: + return True + if filename != "pyproject.toml" or not all( + re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+", v) for v in (actual, requested)): + return False + return tuple(p.lstrip("0") or "0" for p in actual.split(".")) == tuple( + p.lstrip("0") or "0" for p in requested.split(".")) + + def delivery_policy(top) -> dict: """The project's recorded delivery policy (`dev delivery`), or {}.""" try: @@ -4733,7 +4744,7 @@ def _release(a, c) -> int: tag = "v" + version if _ref_sha(c.top, f"refs/tags/{tag}"): return refuse(f"tag {tag} already exists", f"next version: {nxt}" if scheme == "calver" else None) - wrong = {f: v for f, v in version_files(c.top).items() if v != version} + wrong = {f: v for f, v in version_files(c.top).items() if not _release_version_matches(f, v, version)} if wrong: f, v = next(iter(wrong.items())) return refuse(f"{f} says {v}, not {version}", diff --git a/tests/test_gitx.py b/tests/test_gitx.py index 56e8fe33..1484cb71 100644 --- a/tests/test_gitx.py +++ b/tests/test_gitx.py @@ -2043,6 +2043,46 @@ def test_tags_pushes_and_publishes_with_changelog_notes(self): self.assertIn("--verify-tag", call) self.assertIn("verify the artefact", out) + def test_python_version_padding_keeps_the_requested_release_tag(self): + for metadata, requested in (("26.11.8", "26.11.08"), ("26.1.8", "26.01.08"), + ("26.01.08", "26.1.8")): + with self.subTest(metadata=metadata, requested=requested), Sandbox() as s: + s.commit("chore(release): prepare Python release", { + "pyproject.toml": f'[project]\nname = "widget"\nversion = "{metadata}"\n', + "CHANGELOG.md": f"# Changelog\n\n## [{requested}]\n\n- Publish the widget\n"}) + git(s.repo, "push", "-q", "origin", "main") + dev("ci", "--mark-passed") + s.gh.on(["run", "list"], []) + s.gh.on(["release", "create"], f"https://github.com/acme/widget/releases/tag/v{requested}\n") + rc, out, err = dev("release", "--version", requested, "--dry-run") + self.assertEqual(rc, 0, err) + self.assertIn(f"tag v{requested}", out) + self.assertEqual(git(s.repo, "tag", "--list").split(), []) + rc, _, err = dev("release", "--version", requested) + self.assertEqual(rc, 0, err) + self.assertEqual(git(s.origin, "tag", "--list").split(), [f"v{requested}"]) + self.assertEqual(s.head(f"v{requested}^{{commit}}", repo=s.origin), s.head()) + call = s.gh.called("release", "create")[0] + self.assertEqual(call[2], f"v{requested}") + self.assertEqual(call[call.index("--notes") + 1], "- Publish the widget") + + def test_release_refuses_different_versions_and_non_python_padding(self): + cases = [("pyproject.toml", f'[project]\nversion = "{version}"\n', version) + for version in ("26.11.9", "26.10.8", "25.11.8")] + cases += [("VERSION", "26.11.8\n", "26.11.8"), + ("package.json", '{"version": "26.11.8"}\n', "26.11.8")] + for filename, content, version in cases: + with self.subTest(filename=filename, version=version), Sandbox() as s: + s.commit("chore(release): prepare version", {filename: content}) + git(s.repo, "push", "-q", "origin", "main") + for flags in (("--dry-run",), ()): + rc, _, err = dev("release", "--version", "26.11.08", *flags) + self.assertEqual(rc, 2, err) + self.assertIn(f"{filename} says {version}, not 26.11.08", err) + self.assertEqual(git(s.repo, "tag", "--list").split(), []) + self.assertEqual(git(s.origin, "tag", "--list").split(), []) + self.assertEqual(s.gh.called("release", "create"), []) + class ReconcileTests(unittest.TestCase): def test_only_merges_that_reached_the_default_branch_on_origin_count(self): From 5fa434e85899fa8927d51b29b105ebabb603778c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Contreras=20Guill=C3=A9n?= Date: Fri, 13 Nov 2026 17:59:46 -0800 Subject: [PATCH 02/11] fix(release): distinguish Dependabot updates from CI GitHub dependency update automation can fail while the committed release passes its required workflows Root cause: Release CI collection treated every run associated with a commit as a delivery check, including GitHub internal Dependabot update jobs Exclude only updater runs verified through authenticated API identity, repository and exact commit metadata; preserve real workflow checks and fail closed on missing or failed API responses Verified: Independent review approved; 152 affected tests passed and all four new cases passed on Python 3.9; three regressions fail baseline; full local suites remain in progress Refs: https://github.com/fireflyframework/fireflyframework-pyfly/pull/245 --- CHANGELOG.md | 4 ++ docs/git-and-github.md | 9 +++ lib/devkit/gitx.py | 32 ++++++++++- tests/test_gitx.py | 123 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 166 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ad8f288..764bc490 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ All notable changes to devkit. Versions follow CalVer `YY.MM.PATCH` (PATCH resta ### Fixed +- **Releases.** `dev release` excludes verified GitHub Dependabot update automation from release CI, so a failed + dependency update proposal does not block a commit whose CI passed. The API must confirm the exact run, + repositories, commit, event, path, and bot actor; uncertain details and repository workflows still count. + General CI status and watches continue to show the updater. - **Releases.** `dev release` accepts Python versions with equivalent numeric components despite different zero padding, such as `pyproject.toml` version `26.11.8` for `--version 26.11.08`. The tag keeps the requested spelling; `VERSION` and `package.json` still require an exact match. diff --git a/docs/git-and-github.md b/docs/git-and-github.md index b0f57414..bf811ed2 100644 --- a/docs/git-and-github.md +++ b/docs/git-and-github.md @@ -458,6 +458,15 @@ failed jobs (`--all-jobs` for all of them). 6. The notes are `--notes-file`, or the version's section of `CHANGELOG.md` (or `CHANGES.md`, `HISTORY.md`), or GitHub's generated notes. +The release check excludes GitHub's Dependabot update automation only when the authenticated run API confirms +the run ID, the `dynamic` event, the `dynamic/dependabot/dependabot-updates` path, the `dependabot[bot]` actor, +both repositories matching this repository, and the exact commit SHA. The displayed workflow name grants no +exception. Repository CI, including workflows triggered by Dependabot pull requests, still counts. Missing, +malformed, or unavailable run details keep the run in the check. Inspect a blocked run with +`dev run view --failed`; restore API access if needed, then retry `dev release --dry-run`. +The updater remains visible in general CI status and watches. A matching-tree pull request still needs successful +repository workflows and jobs to stand in for CI running on the default branch. + Then it creates the annotated tag `v` (signed with `--sign` or when git's `tag.gpgSign` is on), pushes it, and creates the GitHub release (`--draft` and `--prerelease` are passed on). It ends by asking you to download the published artifact, install it, and smoke-test it. `--dry-run` prints every step and the evidence without doing any of diff --git a/lib/devkit/gitx.py b/lib/devkit/gitx.py index 85d13506..92d22d67 100644 --- a/lib/devkit/gitx.py +++ b/lib/devkit/gitx.py @@ -4513,10 +4513,38 @@ def changelog_section(top, version: str): def _ci_runs(c, sha): - """The GitHub Actions runs of commit `sha` (as `gh run list --commit` lists them), or None when gh cannot say.""" + """Release CI for commit `sha`, excluding verified Dependabot update automation; None when gh cannot list it. + + General CI status/watch still includes the updater. Pull request twins use this same release-only view, but + must still supply their own successful repository workflow runs and jobs in `_passed_twin`.""" runs, _ = gh_json(["run", "list", "-R", c.slug, "--commit", sha, "--json", "databaseId,status,conclusion,workflowName,workflowDatabaseId,event"], c) - return runs if isinstance(runs, list) else None + return [r for r in runs if not _dependabot_update_run(c, r, sha)] if isinstance(runs, list) else None + + +def _dependabot_update_run(c, run, sha) -> bool: + """Only authenticated run details can establish that this is GitHub's updater, not repository CI.""" + if not isinstance(run, dict) or run.get("event") != "dynamic": + return False + rid = run.get("databaseId") + if type(rid) is not int or rid <= 0: + return False + # gh_json accepts JSON on a nonzero exit for PR checks. Here a failed API request is never evidence. + rc, out, _ = GH(["api", f"repos/{c.slug}/actions/runs/{rid}"], cwd=c.top, timeout=60) + if rc != 0: + return False + try: + data = json.loads(out) + except (ValueError, TypeError): + return False + if not isinstance(data, dict) or type(data.get("id")) is not int or data["id"] != rid: + return False + actor, repo, head_repo = data.get("actor"), data.get("repository"), data.get("head_repository") + return (data.get("event") == "dynamic" and data.get("path") == "dynamic/dependabot/dependabot-updates" + and isinstance(actor, dict) and actor.get("login") == "dependabot[bot]" + and isinstance(repo, dict) and repo.get("full_name") == c.slug + and isinstance(head_repo, dict) and head_repo.get("full_name") == c.slug + and data.get("head_sha") == sha) def _run_jobs(c, run): diff --git a/tests/test_gitx.py b/tests/test_gitx.py index 1484cb71..33e20b0b 100644 --- a/tests/test_gitx.py +++ b/tests/test_gitx.py @@ -2084,6 +2084,129 @@ def test_release_refuses_different_versions_and_non_python_padding(self): self.assertEqual(s.gh.called("release", "create"), []) +class ReleaseAutomationTests(unittest.TestCase): + def prepare(self, s): + version = f"{YY}.{MM}.0" + s.commit("chore(release): prepare the widget", { + "VERSION": version + "\n", + "CHANGELOG.md": f"# Changelog\n\n## [{version}]\n\n- Publish the widget\n"}) + git(s.repo, "push", "-q", "origin", "main") + dev("ci", "--mark-passed") + ci = {"databaseId": 749, "status": "completed", "conclusion": "success", + "workflowName": "CI", "workflowDatabaseId": 7, "event": "push"} + bot = {"databaseId": 43536834877, "status": "completed", "conclusion": "failure", + "workflowName": "Dependabot Updates", "event": "dynamic"} + detail = {"id": 43536834877, "event": "dynamic", "path": "dynamic/dependabot/dependabot-updates", + "actor": {"login": "dependabot[bot]"}, "repository": {"full_name": "acme/widget"}, + "head_repository": {"full_name": "acme/widget"}, "head_sha": s.head()} + s.gh.on(["run", "list"], [ci, bot]) + s.gh.on(["api", "repos/acme/widget/actions/runs/43536834877"], detail) + s.gh.on(["release", "create"], f"https://github.com/acme/widget/releases/tag/v{version}\n") + return version, ci, bot, detail + + def assert_no_release(self, s): + self.assertEqual(git(s.repo, "tag", "--list").split(), []) + self.assertEqual(git(s.origin, "tag", "--list").split(), []) + self.assertEqual(s.gh.called("release", "create"), []) + + def test_release_ignores_verified_update_automation_without_using_its_name(self): + for status in ("completed", "in_progress"): + with self.subTest(status=status), Sandbox() as s: + version, ci, bot, _ = self.prepare(s) + bot.update(status=status, workflowName="Renamed dependency updater") + s.gh.on(["run", "list"], [ci, bot]) + rc, out, err = dev("release", "--dry-run") + self.assertEqual(rc, 0, err) + self.assertIn("remote CI: passing", out) + self.assert_no_release(s) + rc, _, err = dev("release") + self.assertEqual(rc, 0, err) + self.assertEqual(s.head(f"v{version}^{{commit}}", repo=s.origin), s.head()) + call = s.gh.called("release", "create")[0] + self.assertEqual(call[2], f"v{version}") + self.assertEqual(call[call.index("--notes") + 1], "- Publish the widget") + + def test_release_keeps_unverified_or_spoofed_update_runs(self): + with Sandbox() as s: + _, ci, bot, detail = self.prepare(s) + cases = [(key, {**detail, key: value}) for key, value in ( + ("id", 123), ("id", "43536834877"), ("event", "pull_request"), + ("path", ".github/workflows/dependabot.yml"), ("actor", {"login": "someone"}), + ("repository", {"full_name": "other/widget"}), + ("head_repository", {"full_name": "fork/widget"}), ("head_sha", "0" * 40), + ("actor", []), ("repository", None), ("head_repository", "acme/widget"))] + cases += [("missing " + key, {k: v for k, v in detail.items() if k != key}) for key in detail] + cases += [("null", None), ("array", []), ("malformed JSON", "{broken")] + for label, response in cases: + with self.subTest(label=label): + s.gh.on(["api", "repos/acme/widget/actions/runs/43536834877"], response) + for flags in (("--dry-run",), ()): + rc, _, err = dev("release", *flags) + self.assertEqual(rc, 2, err) + self.assertIn("CI failed", err) + self.assert_no_release(s) + for response in ("", detail): + with self.subTest(api_error=response): + s.gh.on(["api", "repos/acme/widget/actions/runs/43536834877"], response, rc=1, + err="API unavailable") + self.assertEqual(dev("release")[0], 2) + self.assert_no_release(s) + s.gh.on(["api", "repos/acme/widget/actions/runs/43536834877"], detail) + for event in ("push", "pull_request", None): + with self.subTest(list_event=event): + s.gh.on(["run", "list"], [ci, {**bot, "event": event}]) + self.assertEqual(dev("release")[0], 2) + self.assert_no_release(s) + for rid in (None, 0, True, "43536834877", "../749"): + with self.subTest(list_id=rid): + s.gh.on(["run", "list"], [ci, {**bot, "databaseId": rid}]) + self.assertEqual(dev("release")[0], 2) + self.assert_no_release(s) + + def test_verified_update_automation_cannot_replace_passing_repository_ci(self): + with Sandbox() as s: + _, ci, bot, _ = self.prepare(s) + for event in ("push", "pull_request", "dynamic"): + with self.subTest(event=event): + s.gh.on(["run", "list"], [{**ci, "event": event, "conclusion": "failure", + "workflowName": "Dependabot Updates"}, bot]) + rc, _, err = dev("release") + self.assertEqual(rc, 2, err) + self.assertIn("CI failed", err) + self.assert_no_release(s) + s.gh.on(["run", "list"], [{**ci, "status": "in_progress", "conclusion": ""}, bot]) + rc, _, err = dev("release") + self.assertEqual(rc, 2, err) + self.assertIn("still running", err) + self.assert_no_release(s) + + def test_a_twin_still_needs_real_passing_pr_jobs_after_excluding_the_updater(self): + with Sandbox() as s: + version, ci, bot, _ = self.prepare(s) + twin = s.head() + git(s.repo, "commit", "-q", "--allow-empty", "-m", "chore: merge the verified tree") + git(s.repo, "push", "-q", "origin", "main") + dev("ci", "--mark-passed") + s.gh.on(["run", "list"], [{**ci, "status": "in_progress", "conclusion": ""}], + when=lambda args: s.head() in args) + s.gh.on(["run", "view", "749"], {"jobs": [{"name": "test", "status": "in_progress"}]}) + s.gh.on(["run", "list"], [bot], when=lambda args: twin in args) + rc, _, err = dev("release") + self.assertEqual(rc, 2, err) + self.assertIn("still running", err) + self.assert_no_release(s) + s.gh.on(["run", "list"], [{**ci, "databaseId": 750, "event": "pull_request"}, bot], + when=lambda args: twin in args) + s.gh.on(["api", "repos/acme/widget/actions/runs/750"], + {"id": 750, "repository": {"id": 1}, "head_repository": {"id": 1}}) + s.gh.on(["run", "view", "750"], + {"jobs": [{"name": "test", "status": "completed", "conclusion": "success"}]}) + rc, out, err = dev("release") + self.assertEqual(rc, 0, err) + self.assertIn(f"tree passed the pull request run on {twin[:7]}", out) + self.assertEqual(s.head(f"v{version}^{{commit}}", repo=s.origin), s.head()) + + class ReconcileTests(unittest.TestCase): def test_only_merges_that_reached_the_default_branch_on_origin_count(self): with Sandbox() as s: From 93b0c2054d8d7e21bc35e1610323d62c202f0311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Contreras=20Guill=C3=A9n?= Date: Fri, 13 Nov 2026 18:30:19 -0800 Subject: [PATCH 03/11] test(continuity): keep request fixtures within retention Allow the release validation suite to run after the fixed fixture date without treating test requests as expired; retain real CLI and hook behavior and the dedicated expiry checks Verified: Both tests failed before the change; 56 affected tests pass, Python3.9 affected scopes pass, local CI resume and all five security stages pass; independent review approved --- tests/test_continuity.py | 2 +- tests/test_continuity_wiring.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_continuity.py b/tests/test_continuity.py index de57e706..ddd17cc6 100644 --- a/tests/test_continuity.py +++ b/tests/test_continuity.py @@ -842,7 +842,7 @@ def test_c2_another_provider_gets_the_ids_and_senders_but_no_free_text(self): def test_c3_an_agent_reads_another_providers_session_without_its_text_whatever_provider_it_names(self): # Seraph's review of 85e37de: a Claude session asked for a Codex session's brief with --provider codex - self.prompt("MARKERCODEX port the exporter", "x1", T0 - 100, sid="cx1", agent="codex") + self.prompt("MARKERCODEX port the exporter", "x1", time.time() - 100, sid="cx1", agent="codex") claude_main = {"caller": "main", "agent": "claude", "session": SID, "how": "env", "calls": []} with mock.patch.object(pg, "caller", lambda *a, **k: claude_main): for argv in (["--provider", "codex"], ["--provider", "openai"], []): diff --git a/tests/test_continuity_wiring.py b/tests/test_continuity_wiring.py index 1646ba6a..d3cc7d3c 100644 --- a/tests/test_continuity_wiring.py +++ b/tests/test_continuity_wiring.py @@ -95,7 +95,7 @@ def test_pre_compact_gives_the_summarizer_devkits_instructions_and_a_member_gets def test_post_compact_prints_nothing_and_the_next_prompt_names_first_what_the_summary_left_out(self): self.make_run(lanes=()) - self.prompt("rename the flag in `lib/flags.py`", "d1", T0 - 300) + self.prompt("rename the flag in `lib/flags.py`", "d1", time.time() - 300) self.hook("pre-compact", self.payload("PreCompact.manual")) self.assertEqual(self.hook("post-compact", self.payload("PostCompact.manual", compact_summary=SUMMARY_WITHOUT_REQUESTS)), "") From 615fa7a9f6b2a8bc4114adda981a10214c3c78e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Contreras=20Guill=C3=A9n?= Date: Fri, 13 Nov 2026 18:58:30 -0800 Subject: [PATCH 04/11] chore(release): prepare 26.11.18 Publish the verified Python version normalization and authenticated Dependabot release gate fixes as an official patch release. Update VERSION, desktop and plugin manifest versions, and the dated changelog heading together. Verified: Prior full-suite/resumed evidence for tree b59cff17 carried forward with tech lead approval; metadata delta: 64 tests each on Python 3.15 and 3.9, version consistency, compile, 48 changelog links and five workflow scans exit 0 (Semgrep has rule-timeout warnings); strict CI audit has no high or medium findings. Refs: https://github.com/fireflysoftwaresolutions/devkit --- CHANGELOG.md | 2 +- VERSION | 2 +- desktop/manifest.json | 2 +- plugin/.claude-plugin/plugin.json | 2 +- plugin/.codex-plugin/plugin.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 764bc490..b5b60ce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to devkit. Versions follow CalVer `YY.MM.PATCH` (PATCH restarts at 0 each month); tags are `vYY.MM.PATCH`. Sections follow [Keep a Changelog](https://keepachangelog.com/). -## [Unreleased] +## [26.11.18] - 2026-11-13 ### Fixed diff --git a/VERSION b/VERSION index 44dd515d..74b253d4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -26.11.17 +26.11.18 diff --git a/desktop/manifest.json b/desktop/manifest.json index 1493c168..3f5ae458 100644 --- a/desktop/manifest.json +++ b/desktop/manifest.json @@ -2,7 +2,7 @@ "manifest_version": "0.4", "name": "devkit", "display_name": "devkit", - "version": "26.11.17", + "version": "26.11.18", "description": "Every repo in its place. Every agent on the same page. Your devkit portfolio, project status, tasks, CI and team, in Claude Desktop chat and Cowork.", "long_description": "devkit connects Claude Desktop to **devkit** from Firefly Software Solutions Inc.: every repository in its place under ~/Development, one handoff repository that keeps each project's status, tasks, plans, lessons and session log, and the same rules for Claude Code, Codex and the team. Claude Code already uses devkit through its plugin; this extension brings it to Desktop chat and Cowork.\n\n**What you can ask**\n\n- **Where things stand:** the portfolio overview, one project's status, its tasks, a standup of the last days, and a status report for the team or management.\n- **Delivery:** live CI/CD runs with job progress and an ETA, and a project's delivery policy (versioning, test gate, release flow) with its gaps.\n- **Team and history:** who is working on what, devkit's crew of specialist agents and the decisions waiting for you, lessons learned, devkit's audit trail, its scheduled jobs, and a health check of the whole setup.\n- **Tasks:** add a task, or start, finish, block, unblock or release one. Changes go through the `dev` command, so devkit's guard and audit trail apply exactly as they do in the terminal.\n\nWhen Claude reports a project's status, it starts with the devkit status block (**[Firefly> DevKit]**), the same one Claude Code and Codex use.\n\n**Setting it up.** devkit must be installed on this Mac: run `./install.sh` in the devkit repository, which runs `dev setup`. The extension finds devkit on its own; set the devkit folder only if devkit is not where `dev setup` put it. The tools come from your devkit checkout, so `dev update` updates them without reinstalling the extension. It needs Python 3.9 or later, which comes with the macOS Command Line Tools.\n\n**Privacy.** Everything runs on your Mac through the `dev` command and reads your workspace and handoff repository. The project status, CI status and doctor tools ask GitHub or your CI provider through your existing sign-in (for example `gh auth login`); task changes are pushed to your own handoff repository. No token is stored by the extension.", "author": { diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 8cb24c24..86d5f7c2 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "devkit", - "version": "26.11.17", + "version": "26.11.18", "description": "Every repo in its place, every agent on the same page: project context and handoff notes, tasks, a portfolio overview, local-first delivery (one push, one CI run), backend methodology, managed worktrees and a guard.", "icon": "./assets/icon.png", "author": { diff --git a/plugin/.codex-plugin/plugin.json b/plugin/.codex-plugin/plugin.json index bd65e760..4f5080c2 100644 --- a/plugin/.codex-plugin/plugin.json +++ b/plugin/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "devkit", - "version": "26.11.17", + "version": "26.11.18", "description": "Every repo in its place, every agent on the same page: project context and handoff notes, tasks, a portfolio overview, local-first delivery (one push, one CI run), backend methodology, managed worktrees and a guard.", "author": { "name": "Firefly Software Solutions Inc.", From e28a906882f2f74a2c869c384e599b5ad827dcf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Contreras=20Guill=C3=A9n?= Date: Fri, 13 Nov 2026 19:54:34 -0800 Subject: [PATCH 05/11] fix(git): resolve the default branch of empty GitHub origins Initial feature commits were refused because an empty origin made every current branch appear to be the protected default. Root cause: Without remote refs, default-branch discovery fell back to the current branch and the commit gate treated that fallback as authoritative. Validate GitHub repository metadata before using its declared default branch. Preserve conservative refusal on unavailable or malformed metadata and avoid an extra lookup when origin refs exist. Verified: 28 focused unittest checks passed on Python3.15 and3.9; all3 new regressions fail without the change and pass5 repeated runs. Independent review approved protected-default and malformed-metadata controls. Refs: https://github.com/fireflysoftwaresolutions/devkit/pull/34 --- docs/git-and-github.md | 4 ++ lib/devkit/gitx.py | 16 +++++++ tests/test_empty_repository.py | 86 ++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 tests/test_empty_repository.py diff --git a/docs/git-and-github.md b/docs/git-and-github.md index bf811ed2..d27843ba 100644 --- a/docs/git-and-github.md +++ b/docs/git-and-github.md @@ -218,6 +218,10 @@ Refs: PROJ-142 - **Not on the default branch.** In a repository with an `origin`, a commit on `main` is refused with `dev branch new`, which takes your changes along. A branch with a non-conforming name is refused with `dev branch rename`. +- **An empty GitHub origin.** When no local remote references exist, devkit reads GitHub's declared default + branch. A valid feature branch can receive its first commit before the remote has any commits. `main`, `master`, + and the declared default remain protected. Missing, invalid, or mismatched metadata keeps the conservative + refusal; check GitHub CLI authentication or fetch the remote default once it exists, then retry. - **Not in the middle of another git operation.** While git's own marks show a revert, cherry-pick, merge, rebase, or `git am` stopped halfway, `dev commit` refuses before it stages anything, names the operation, and says how the one who started it finishes it. A commit then would finish that operation for them, which matters in a checkout that diff --git a/lib/devkit/gitx.py b/lib/devkit/gitx.py index 92d22d67..9e7d6449 100644 --- a/lib/devkit/gitx.py +++ b/lib/devkit/gitx.py @@ -151,6 +151,22 @@ def ctx(cwd=None): slug = None if provider == "github": slug = f"{owner}/{repo}" if host == "github.com" else f"{host}/{owner}/{repo}" + if (default == branch + and not core.gitout(top, "symbolic-ref", "--quiet", "refs/remotes/origin/HEAD") + and not core.gitout(top, "for-each-ref", "--format=%(refname)", "refs/remotes/origin/")): + # An empty origin has no refs. The registry's local-branch fallback is not evidence that this + # branch is protected. REST retains the declared default even when defaultBranchRef is null. + rc, out, _ = GH(["api", f"repos/{owner}/{repo}", "--hostname", host], cwd=top, timeout=10) + try: + metadata = json.loads(out) if rc == 0 else None + except (ValueError, TypeError): + metadata = None + if (isinstance(metadata, dict) + and str(metadata.get("full_name", "")).lower() == f"{owner}/{repo}".lower()): + declared = metadata.get("default_branch") + if (isinstance(declared, str) and declared and not declared.startswith("-") + and core.git(top, "check-ref-format", f"refs/heads/{declared}")[0] == 0): + default = declared pid = core.project_identity(main, remote)[0] return SimpleNamespace(top=top, main=str(main), remote=remote, has_origin=has_origin, host=host, owner=owner, repo=repo, slug=slug, provider=provider, pid=pid, branch=branch, default=default) diff --git a/tests/test_empty_repository.py b/tests/test_empty_repository.py new file mode 100644 index 00000000..b79cc75e --- /dev/null +++ b/tests/test_empty_repository.py @@ -0,0 +1,86 @@ +# Copyright (c) 2026 Firefly Software Solutions Inc. +# SPDX-License-Identifier: Apache-2.0 +"""Initial commits with an empty GitHub origin, using real Git and offline API responses.""" +import os +import tempfile +import unittest +from pathlib import Path +from unittest import mock + +from tests import _sandbox +from tests.test_gitx import FakeGH, ISOLATE, dev, git +from devkit import core, gitx, guard + + +class EmptyRepositoryTests(unittest.TestCase): + def setUp(self): + folder = tempfile.TemporaryDirectory() + self.addCleanup(folder.cleanup) + self.repo = Path(folder.name).resolve() + env = _sandbox.env(**ISOLATE) + patch = mock.patch.dict(core.GIT_ENV, env) + patch.start() + self.addCleanup(patch.stop) + self.gh = FakeGH() + patch = mock.patch.object(gitx, "GH", self.gh) + patch.start() + self.addCleanup(patch.stop) + cwd = os.getcwd() + self.addCleanup(os.chdir, cwd) + git(self.repo, "init", "-q", "-b", "chore/bootstrap") + git(self.repo, "remote", "add", "origin", "https://github.com/acme/empty.git") + os.chdir(self.repo) + (self.repo / "README.md").write_text("# Empty repository\n") + + def test_first_and_followup_commits_use_declared_default_not_local_branch(self): + self.gh.on(["api", "repos/acme/empty"], {"full_name": "acme/empty", "default_branch": "main"}) + # A valid name alone cannot fix the bug: without origin refs every local name became the default. + self.assertIsNone(guard.branch_violation("chore/bootstrap")) + rc, _, err = dev("commit", "-m", "chore: initialize repository", "README.md") + self.assertEqual(rc, 0, err) + self.assertEqual(git(self.repo, "log", "-1", "--format=%s"), "chore: initialize repository") + (self.repo / "README.md").write_text("# Repository\nReady for development.\n") + rc, _, err = dev("commit", "-m", "docs: describe repository", "README.md") + self.assertEqual(rc, 0, err) + self.assertEqual(git(self.repo, "rev-list", "--count", "HEAD"), "2") + self.assertEqual(git(self.repo, "for-each-ref", "refs/remotes"), "") + # Once a fetched default exists, ordinary context checks remain offline. + git(self.repo, "update-ref", "refs/remotes/origin/main", "HEAD") + self.gh.calls.clear() + self.assertEqual(gitx.ctx().default, "main") + self.assertEqual(self.gh.calls, []) + # An explicit symbolic default also takes precedence, including an unborn target. + git(self.repo, "symbolic-ref", "refs/remotes/origin/HEAD", "refs/remotes/origin/chore/declared") + self.assertEqual(gitx.ctx().default, "chore/declared") + self.assertEqual(self.gh.calls, []) + + def test_declared_default_controls_refusal_even_with_a_feature_style_name(self): + self.gh.on(["api", "repos/acme/empty"], {"full_name": "acme/empty", "default_branch": "chore/default"}) + self.assertEqual(gitx.ctx().default, "chore/default") + for branch in ("main", "master", "chore/default"): + with self.subTest(branch=branch): + git(self.repo, "symbolic-ref", "HEAD", "refs/heads/" + branch) + rc, _, err = dev("commit", "-m", "chore: initialize repository", "README.md") + self.assertEqual(rc, 2, err) + self.assertIn("changes go through a branch and a PR", err) + self.assertEqual(git(self.repo, "diff", "--cached", "--name-only"), "") + + def test_failed_or_invalid_metadata_keeps_the_conservative_default(self): + for rc, response in ((1, ""), (0, "invalid json"), (0, "null"), (0, "{}"), + (0, '{"full_name": "acme/empty", "default_branch": null}'), + (0, '{"full_name": "acme/empty", "default_branch": 42}'), + (0, '{"full_name": "other/repo", "default_branch": "main"}'), + (0, '{"full_name": "acme/empty", "default_branch": "bad..branch"}')): + with self.subTest(rc=rc, response=response): + self.gh.on(["api", "repos/acme/empty"], response, rc=rc) + result, _, err = dev("commit", "-m", "chore: initialize repository", "README.md") + self.assertEqual(result, 2, err) + self.assertEqual(git(self.repo, "diff", "--cached", "--name-only"), "") + # Recovering the same API is sufficient; no branch rename or remote mutation is necessary. + self.gh.on(["api", "repos/acme/empty"], {"full_name": "acme/empty", "default_branch": "main"}) + result, _, err = dev("commit", "-m", "chore: initialize repository", "README.md") + self.assertEqual(result, 0, err) + + +if __name__ == "__main__": + unittest.main() From c37a251f40e8cfbba7223c604fac312d5e27110c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Contreras=20Guill=C3=A9n?= Date: Fri, 13 Nov 2026 19:54:59 -0800 Subject: [PATCH 06/11] fix(dashboard): contain roadmap labels on narrow screens The initiatives page overflowed a390px phone viewport when UTC advanced the roadmap into a new month. Root cause: An absolutely positioned month label extended beyond the right edge of its track, and the fixed title column left insufficient mobile space. Align end-of-axis labels inward and share mobile row space between title and timeline while preserving desktop columns. Cover the month boundary with a fixed-date browser regression. Verified: 30 browser behavior tests passed on Python3.15 and3.9. Final UTC overflow and fixed-date checks passed on both interpreters and failed against the old layout. Independent review inspected4 theme/viewport screenshots and passed both regressions on each interpreter. Refs: https://github.com/fireflysoftwaresolutions/devkit/pull/34 --- lib/devkit/web/app.js | 6 ++++-- lib/devkit/web/base.css | 2 ++ tests/test_dashboard.py | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/lib/devkit/web/app.js b/lib/devkit/web/app.js index 0a582605..fb85af9b 100644 --- a/lib/devkit/web/app.js +++ b/lib/devkit/web/app.js @@ -1173,8 +1173,10 @@ function roadmap(items) { while (d.getTime() / 1000 < end) { ticks.push([d.getTime() / 1000, d.toLocaleDateString(undefined, {month: "short"})]); d.setMonth(d.getMonth() + 1); } const track = (kids) => h("div", {class: "road-track"}, ticks.map(([t]) => h("span", {class: "road-tick", style: "left:" + pct(t).toFixed(2) + "%"})), h("span", {class: "road-today", style: "left:" + pct(t0).toFixed(2) + "%"}), kids); const tp = pct(t0); - const rows = [h("div", {class: "road-row road-axis"}, h("span"), h("div", {class: "road-track"}, ticks.filter(([t]) => Math.abs(pct(t) - tp) > 7).map(([t, l]) => h("span", {class: "road-tl", style: "left:" + pct(t).toFixed(2) + "%", text: l})), - h("span", {class: "road-tl today", style: "left:" + pct(t0).toFixed(2) + "%", text: "Today"})))]; + const axisLabel = (p, text, today = false) => h("span", {class: "road-tl" + (today ? " today" : "") + (p > 72 ? " r" : ""), + style: (p > 72 ? "right:" + (100 - p).toFixed(2) : "left:" + p.toFixed(2)) + "%", text}); + const rows = [h("div", {class: "road-row road-axis"}, h("span"), h("div", {class: "road-track"}, ticks.filter(([t]) => Math.abs(pct(t) - tp) > 7).map(([t, l]) => axisLabel(pct(t), l)), + axisLabel(tp, "Today", true)))]; for (const x of items.sort((a, b) => a.due.localeCompare(b.due))) { const p = pct(ts(x.due)), over = x.status !== "done" && x.due < lkey(new Date()), right = p > 72; rows.push(h("div", {class: "road-row", "data-nav": "", tabindex: "0", role: "link", "aria-label": x.label + ", due " + x.due, onclick: x.open, onkeydown: e => { if (e.key === "Enter") x.open(); }}, diff --git a/lib/devkit/web/base.css b/lib/devkit/web/base.css index b3f6bae7..77011e3e 100644 --- a/lib/devkit/web/base.css +++ b/lib/devkit/web/base.css @@ -448,6 +448,7 @@ dialog.modal .md{padding:0} .road-tick{position:absolute;top:0;bottom:0;width:1px;background:var(--line-soft)} .road-today{position:absolute;top:-2px;bottom:-2px;width:1px;background:var(--ink-strong);z-index:1} .road-tl{position:absolute;top:2px;transform:translateX(4px);font-size:var(--fs-1);color:var(--ink-2);white-space:nowrap} +.road-tl.r{transform:translateX(-4px)} .road-tl.today{color:var(--ink-strong);font-weight:600} .road-m{position:absolute;top:50%;width:9px;height:9px;margin:-5px 0 0 -5px;transform:rotate(45deg);background:var(--mark);border-radius:1px;z-index:2} .road-m.over{background:var(--alert)} .road-m.done{background:var(--ok)} @@ -745,6 +746,7 @@ table.raci td,table.raci th[scope="row"]{height:auto;padding-top:var(--s2);paddi .views{order:3;flex:1 1 100%;height:40px;gap:var(--s4)}.search{order:2;flex:1 1 100%}#palbtn{display:none}.livew{margin-left:auto} .navmore{position:static}.navmore .menu{right:var(--s4)} .banner{padding:var(--s3) var(--s4) 0} .head .sub{overflow-wrap:anywhere;min-width:0} + .road-row{grid-template-columns:repeat(2,minmax(0,1fr))} table.jt thead,table.crew thead{display:none} table.bt thead{display:none} table.bt,table.bt tbody,table.bt tr,table.bt td,table.bt th[scope="row"]{display:block;width:100%;min-width:0;max-width:none} table.bt tr{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding:var(--s3) var(--s2);border-bottom:1px solid var(--line-soft)} diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py index 1163f0c1..28417ce7 100644 --- a/tests/test_dashboard.py +++ b/tests/test_dashboard.py @@ -1831,6 +1831,24 @@ def test_every_view_fits_a_phone_and_tables_keep_their_words(self): self.assertLessEqual(w, 390, view) self.assertLess(max(out["cells"]), 3 * out["line"] + 20) # words wrap whole, never letter by letter + def test_roadmap_month_labels_stay_inside_the_track_at_its_end(self): + # November 14 puts January 1 at the very end of the roadmap. A rightward label used to overflow the phone. + now = time.mktime((2026, 11, 14, 12, 0, 0, 0, 0, -1)) + for width in (390, 1440): + with self.subTest(width=width): + out = browse(self.page, """out.width = document.documentElement.scrollWidth; + out.separated = $$(".road-tl").map(el => el.getBoundingClientRect()).sort((a, b) => a.left - b.left) + .every((r, i, rects) => !i || rects[i - 1].right <= r.left); + out.labels = $$(".road-tl").map(el => { const r = el.getBoundingClientRect(), track = el.parentElement.getBoundingClientRect(); + return {text: text(el), inside: r.left >= track.left && r.right <= track.right, whole: el.scrollWidth <= el.clientWidth}; });""", + width, "#/initiatives", now=now) + self.assertIsNone(out.get("probeError")) + self.assertIsNone(out.get("pageError")) + self.assertIn("Jan", [label["text"] for label in out["labels"]]) + self.assertLessEqual(out["width"], width) + self.assertTrue(all(label["inside"] and label["whole"] for label in out["labels"]), out["labels"]) + self.assertTrue(out["separated"], out["labels"]) + def test_a_run_whose_crew_reports_is_running_though_its_lead_was_quiet(self): # the live run of 2026-11-06: the lead's last update 47 min ago, a lane reported 3 min ago, the session not in presence def change(d): From 1578db2d21ccec1ecd65b4ae84b797ee85153462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Contreras=20Guill=C3=A9n?= Date: Fri, 13 Nov 2026 20:48:38 -0800 Subject: [PATCH 07/11] fix(guard): bind approvals and crew actions to their owners Keep approvals attached to the intended repository and prevent missing or stale Codex crew registration from granting write access. Root cause: Approval evidence inherited the startup repository, native launch labels ignored task_name, and missing or reassigned lanes retained inappropriate write authority. Add explicit repository scopes to decisions and grants, authenticate native child launch linkage, recover compatible pending labels, and revoke obsolete ownership. Preserve the exact local Chrome tab exception and update source documentation, skills, instructions, and completions. Verified: python3 -m unittest tests.test_codex_launch tests.test_lane_binding tests.test_codex_admission tests.test_codex_lifecycle: 77 passed; python3 -m unittest tests.test_codex_patch_scope tests.test_scope_links_write tests.test_guard_crew tests.test_guard_lane_router: 48 passed; both sets also passed with /usr/bin/python3. Independent code/security reviews approved; 13 behavioral regressions fail the baseline and pass five repeats. Online documentation checks resolve 269 links with no errors. Full Python 3.9/3.13 CI is still running; the corrected acceptance fixture retains every assertion. Refs: https://github.com/fireflysoftwaresolutions/devkit/pull/34 --- CHANGELOG.md | 15 ++ agents/AGENTS.md | 9 + docs/agents.md | 29 ++++ docs/commands.md | 12 ++ docs/crew.md | 39 +++++ docs/delivery.md | 6 + docs/guard.md | 15 +- lib/devkit/codexlaunch.py | 229 +++++++++++++++---------- lib/devkit/crew.py | 14 +- lib/devkit/guard.py | 17 +- lib/devkit/hooks.py | 17 ++ lib/devkit/progress.py | 226 +++++++++++++++++++----- plugin/skills/crew/SKILL.md | 15 ++ plugin/skills/release-policy/SKILL.md | 10 ++ plugin/skills/using-devkit/SKILL.md | 14 ++ shell/completions/_dev | 1 + shell/completions/dev.bash | 2 +- tests/test_acceptance_crew_sessions.py | 32 +++- tests/test_browser_tab_guard.py | 18 ++ tests/test_codex_launch.py | 122 +++++++++++-- tests/test_evidence.py | 22 ++- tests/test_lane_binding.py | 24 +++ tests/test_scoped_grants.py | 163 ++++++++++++++++++ 23 files changed, 884 insertions(+), 167 deletions(-) create mode 100644 tests/test_browser_tab_guard.py create mode 100644 tests/test_scoped_grants.py diff --git a/CHANGELOG.md b/CHANGELOG.md index b5b60ce2..227330f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,21 @@ All notable changes to devkit. Versions follow CalVer `YY.MM.PATCH` (PATCH resta ### Fixed +- **Codex crew.** A child tool hook can recover a missed registration when the parent launch and child metadata + agree. Reopened work keeps its valid owner, while reassignment revokes obsolete write scope and old launches + cannot acquire a new run's assignments. Missing or conflicting evidence grants no ownership; recovery still + requires a genuine child lifecycle or tool hook from Codex. +- **Dashboard.** Keep month and current-day labels inside roadmap timelines at phone widths, + including month boundaries reached in a different timezone. +- **Approvals.** Decisions and typed grants can name another repository with `--repo owner/repository`. + The displayed approval and its verified evidence retain that scope; legacy approvals keep their original + repository. Scope mismatches explain both repositories and leave the approval unused. +- **Browser tools.** Opening a local tab with Claude in Chrome no longer requires an external-message grant. + The exact tool remains subject to write-lane controls; other external operations remain guarded. +- **Initial commits.** An empty GitHub origin no longer makes every current feature branch look like the + protected default. Devkit validates GitHub's declared default; unavailable or invalid metadata remains guarded. +- **Tests.** Continuity fixtures use recent request timestamps when their readers use the real clock, so the + seven-day retention policy no longer makes unrelated provider-isolation and hook tests expire. - **Releases.** `dev release` excludes verified GitHub Dependabot update automation from release CI, so a failed dependency update proposal does not block a commit whose CI passed. The API must confirm the exact run, repositories, commit, event, path, and bot actor; uncertain details and repository workflows still count. diff --git a/agents/AGENTS.md b/agents/AGENTS.md index 1f263606..8b14f1d7 100644 --- a/agents/AGENTS.md +++ b/agents/AGENTS.md @@ -249,6 +249,10 @@ step, never the words of the request, so the developer's language does not matte pre-approved them. Only an open decision needs the developer: one whose asking member ended and that blocks no step is moot, and ending the run closes the rest. `dev crew withdraw --why "…"` closes a decision that no longer applies; it is never the developer's answer, so never use it to skip one that still matters. + Approval stays in the session's original repository unless the irreversible decision or typed grant names a + literal `--repo owner/repository`. Changing directories does not move it. Global GitHub API operations still + require their reported repository approval scope. Typed grants belong in ordinary chat, not an asynchronous + question widget; auto mode still checks the action, target, repository, expiration, and remaining uses. **The crew talks through devkit, never around it.** Every member records each finished step with `dev progress step "…" --check "…"` (its own lane), posts `dev progress note` while a long step runs, asks with `dev crew ask` (a @@ -435,6 +439,11 @@ Follow the devkit `backend` skill for the detailed checklists. Always: event, armed the right way for each agent). - **Code intelligence:** use the LSP tools (TypeScript, Python, Java, PHP) to find definitions, references, and type errors rather than grepping when they are available. +- **Native Codex registration:** a delivered child hook can recover a missed start only with matching native + launch evidence (`using-devkit` has the retry procedure). Missing or conflicting proof grants no step or scope. + If hooks remain absent or identity unresolved, stop and report it; never supply an identity override, edit lane + records, or have the parent stand in for a blocked member's completion or review. Normal shell routing is + unchanged; live recovery still needs verification after the developer installs the fix and restarts sessions. - **Design and architecture:** `domain-modeling`, `codebase-design`, `architecture`, `system-design`, `likec4-dsl` (C4 diagrams). `grill-with-docs` and `improve-codebase-architecture` are the developer's own slash commands (`/grill-with-docs`, `/improve-codebase-architecture`): a model cannot load them, so suggest them and never put diff --git a/docs/agents.md b/docs/agents.md index f7320c86..0205978f 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -308,6 +308,35 @@ same checks as a Claude Code member's. Two spawns of one member at once, before started, take no step, and the tech lead is told. Codex's own helpers, such as a review or a compaction, get no launch record. +### Codex identity failures + +A genuine Codex SubagentStart hook can register a child, and a delivered child PreToolUse hook can recover a missed +start. Both require unique canonical parent and child rollouts: the parent's exact spawn call and started result +must agree with the child's metadata, task, and role. Missing, partial, or conflicting evidence leaves the child +unbound with no step, scope, or write authority; safe reads remain available. The lead receives a notice, and a +later genuine hook retries registration through the normal crew slot and depth checks. + +The native `task_name` selects the plan step, not the brief's message text. Recovery can repair an older pending +message-derived label only after the immutable call, parent, role, child, and run agree. It does not rewrite an +existing contradictory registration. + +Existing lanes are checked against the current run, role, and owner before admission. A prior run's launch cannot +take a new run's assignment. Reassignment uses recorded prior ownership and revokes the old member's write access +before a replacement starts, including scored or abbreviated labels and lanes without a restricted file scope. +Legacy lanes whose ownership cannot be recovered remain read-only until explicitly assigned. Legitimate same-role +reopenings, ad hoc work, and queued assignments remain supported. + +This recovery requires a delivered hook. It does not infer CLI caller identity from command text or change the +normal [routing rules](crew.md#who-is-calling), tool matchers, or shell wrapper syntax. If registration evidence is +still incomplete, wait for the native launch records and retry the child's tool call. If hooks remain absent or +identity remains unresolved, stop the affected operation and report the command, directory, installed devkit +version, and exact error. Do not edit session or lane records, run hooks manually, or have the parent submit a +member's completion or review as its own. + +Source checks do not prove that a particular live host delivers these hooks. The developer first installs the +fixed release from a normal terminal and restarts the affected sessions. Then verify child registration and lane +ownership in that host before calling the live issue resolved. + ### The session context At session start (or at the first prompt) the agent receives: diff --git a/docs/commands.md b/docs/commands.md index fce085fc..10738dfa 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -421,6 +421,13 @@ devkit's specialist agents. See [The crew](crew.md). | `dev crew mode [guided\|auto] [--approve "push feat/*, release v26.11.4"]` · `dev crew decide ""` · `dev crew decisions [--pending] [--ask […] [--json]]` | The mode (`--approve` names each action with its target; publish and deploy never), the developer's answers (recorded by the tech lead (Morpheus) only, in the session whose run holds the decision: `dev crew decide` and `dev crew withdraw` take `D3` or your own run's `D3@`, and refuse another session's), and every decision with who took it. `--ask` prints the pending decisions (or the ones named) as question tool calls, at most 4 per call and an irreversible one alone in its call, the recommended option first, `--json` for the tool's input; the tech lead may reword a reversible one. Only an answer to a question with `D ·` up front (or the header `D`) that picks one of its options by letter or words, or a typed `approve [: