From 00ea14820aeaf44719e818c4f5124279d0a14d48 Mon Sep 17 00:00:00 2001 From: repo-worker-tmp-code-b Date: Wed, 11 Nov 2026 08:08:40 -0600 Subject: [PATCH] fix(pm-dispatch): canonical dezren39/darwin-nix in tests, README and github comment (#6940) config.ts already keys the nix repo canonically on main; the stale pre-rename spelling remained in the test suite, README and the github.ts header. auth.test.ts fixture allowlist, cross-repo and bearer cases and packet.test.ts canonical dedupe-key expectation now use dezren39/darwin-nix (the one remaining dezren39/nix in auth.test.ts is the rejects-a-repo-outside-the-allowlist case, where the old spelling is now correctly outside). README passages that used the nix repo as the app-not-installed example now use developing-today/zettel, matching APP_INSTALLED_REPOS. Full dispatch suite 190/190. --- pm-stack/dispatch/README.md | 12 ++++++------ pm-stack/dispatch/src/github.ts | 2 +- pm-stack/dispatch/test/auth.test.ts | 10 ++++++---- pm-stack/dispatch/test/packet.test.ts | 4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pm-stack/dispatch/README.md b/pm-stack/dispatch/README.md index e4656cd2d3..edb56f16f9 100644 --- a/pm-stack/dispatch/README.md +++ b/pm-stack/dispatch/README.md @@ -51,7 +51,7 @@ Flow: issue, task, or session created (issue #2903). 1. Create the tracking GitHub issue (`source/dispatch` label; body = the prompt + a dispatch footer). Skipped with a `warnings` entry for - dezren39/nix, where the pm-stack GitHub App is not installed. + developing-today/zettel, where the pm-stack GitHub App is not installed. 2. Enqueue a repo-task/v1 queue task (`small_fix` with the canonical `repo-health:v1:fix::issue:` dedupe key when an issue exists, else `triage` with a unique `repo-health:v1:triage::dispatch:` @@ -117,10 +117,10 @@ comment naming the task id plus the `queue/queued` and `source/dispatch` labels. The response is `201 {task_id, issue_number, issue_url, queue}`, where `issue_url` is `https://github.com//issues/`. `issue_number` -takes precedence over `issue` when both are sent. For dezren39/nix, -where the GitHub App is not installed, the attach is skipped with a -`warnings` entry; the task is still enqueued and `issue_number` is -still returned. +takes precedence over `issue` when both are sent. For +developing-today/zettel, where the GitHub App is not installed, the +attach is skipped with a `warnings` entry; the task is still enqueued +and `issue_number` is still returned. ### `GET /v1/tasks/:id` — task status (issue #5555) @@ -518,7 +518,7 @@ touching any caller. | `GITHUB_APP_ID` / `GITHUB_APP_PRIVATE_KEY_BASE64` | — | rendered by install.sh from `~/secrets/pm-stack.sops.yaml` | GitHub issue creation uses the pm-stack GitHub App (installed on code, -opencode, openchamber and dezren39/nix — **not** developing-today/zettel +opencode, openchamber and dezren39/darwin-nix — **not** developing-today/zettel or dezren39/dezren39, where issue creation is skipped with a warning). If the app route is unusable, the laptop's authenticated `gh` CLI is the fallback; if both fail, the request diff --git a/pm-stack/dispatch/src/github.ts b/pm-stack/dispatch/src/github.ts index d14d4716d7..ea1ce62169 100644 --- a/pm-stack/dispatch/src/github.ts +++ b/pm-stack/dispatch/src/github.ts @@ -4,7 +4,7 @@ // the app id + private key rendered into the service env from // ~/secrets/pm-stack.sops.yaml — the same material connect-repo.sh uses). // The installations cover developing-today/code, developing-today-forks/opencode -// and dezren39/nix; callers skip repos with no +// and dezren39/darwin-nix; callers skip repos with no // installation (developing-today/zettel, dezren39/dezren39) before reaching // here. // diff --git a/pm-stack/dispatch/test/auth.test.ts b/pm-stack/dispatch/test/auth.test.ts index 26c7a4d364..5a66314e7f 100644 --- a/pm-stack/dispatch/test/auth.test.ts +++ b/pm-stack/dispatch/test/auth.test.ts @@ -134,6 +134,8 @@ describe("OIDC verification", () => { }); test("rejects a repo outside the allowlist", async () => { + // The pre-rename spelling is exactly such a repo now (#6940): + // only the canonical dezren39/darwin-nix is allowlisted. const token = signJwt({ ...baseClaims, repository: "dezren39/nix" }); await expect(verifyOidcToken(token, oidcOpts)).rejects.toThrow(/allowlist/); }); @@ -144,7 +146,7 @@ describe("cross-repo grants (assertCallerRepo)", () => { "developing-today/code", "developing-today/opencode", "developing-today/openchamber", - "dezren39/nix", + "dezren39/darwin-nix", "developing-today/zettel", "dezren39/dezren39", ]; @@ -158,10 +160,10 @@ describe("cross-repo grants (assertCallerRepo)", () => { expect(() => assertCallerRepo(openchamberCaller, "developing-today/opencode", allowlist)).not.toThrow(); }); - test("cross-repo allowed: a zettel token may target dezren39/dezren39 and dezren39/nix", () => { + test("cross-repo allowed: a zettel token may target dezren39/dezren39 and dezren39/darwin-nix", () => { const zettelCaller = { type: "oidc" as const, repository: "developing-today/zettel", actor: "dezren39" }; expect(() => assertCallerRepo(zettelCaller, "dezren39/dezren39", allowlist)).not.toThrow(); - expect(() => assertCallerRepo(zettelCaller, "dezren39/nix", allowlist)).not.toThrow(); + expect(() => assertCallerRepo(zettelCaller, "dezren39/darwin-nix", allowlist)).not.toThrow(); }); test("same-repo still allowed", () => { @@ -179,7 +181,7 @@ describe("cross-repo grants (assertCallerRepo)", () => { test("bearer callers are unaffected by caller/target repo pairing: an allowlisted target passes", () => { expect(() => assertCallerRepo({ type: "bearer" }, "developing-today/opencode", allowlist)).not.toThrow(); - expect(() => assertCallerRepo({ type: "bearer" }, "dezren39/nix", allowlist)).not.toThrow(); + expect(() => assertCallerRepo({ type: "bearer" }, "dezren39/darwin-nix", allowlist)).not.toThrow(); }); test("bearer callers are rejected for a non-allowlisted target", () => { diff --git a/pm-stack/dispatch/test/packet.test.ts b/pm-stack/dispatch/test/packet.test.ts index 9c1bae2be8..4c97c24a9e 100644 --- a/pm-stack/dispatch/test/packet.test.ts +++ b/pm-stack/dispatch/test/packet.test.ts @@ -16,8 +16,8 @@ describe("dedupe keys", () => { expect(canonicalDedupeKey("triage", "developing-today/opencode", 7)).toBe( "repo-health:v1:triage:developing-today/opencode:issue:7", ); - expect(canonicalDedupeKey("ci_investigation", "dezren39/nix", 9)).toBe( - "repo-health:v1:triage:dezren39/nix:issue:9", + expect(canonicalDedupeKey("ci_investigation", "dezren39/darwin-nix", 9)).toBe( + "repo-health:v1:triage:dezren39/darwin-nix:issue:9", ); expect(canonicalDedupeKey("pr_shepherd", "developing-today/code", 3)).toBeNull(); });