diff --git a/.github/workflows/panel-board-refresh.yml b/.github/workflows/panel-board-refresh.yml new file mode 100644 index 00000000..74af4a35 --- /dev/null +++ b/.github/workflows/panel-board-refresh.yml @@ -0,0 +1,55 @@ +name: Panel board refresh + +# Weekly: refetch the public Bug Hunt board for the panel recommendations catalog and, only when it changed, +# push the regenerated snapshot and catalog to the branch panel-board-refresh and log its URL. The job opens no +# pull request (this repository does not allow Actions to create them): a maintainer opens one from the branch. +# Own results never enter this job (a fetch keeps the catalog's own entries). The job runs the catalog check +# and the skill tests itself before it pushes, because a branch pushed with the workflow token starts no CI. + +on: + schedule: + - cron: "17 14 * * 1" # Monday 14:17 UTC + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: panel-board-refresh + cancel-in-progress: false + +jobs: + refresh: + if: github.repository == 'bompus/house-rules' + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: write + env: + BRANCH: panel-board-refresh + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Always main, even for a manual run started from another branch, and the whole history, so the + # publish step can tell which commits the refresh branch has that main lacks. + ref: main + fetch-depth: 0 + persist-credentials: false + - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + with: + bun-version: 1.4.4 + - name: Install dependencies + run: bun install --frozen-lockfile + - name: Refetch the board and check the result + id: refresh + run: bash scripts/refresh-panel-board.sh + # The write token reaches only this step, never the install, the board fetch or the tests. + - name: Put the result on the refresh branch + id: publish + if: steps.refresh.outputs.changed == 'true' + env: + GH_TOKEN: ${{ github.token }} + run: | + git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" + bash scripts/publish-panel-board.sh + echo "The refresh branch holds the new board: https://github.com/${GITHUB_REPOSITORY}/tree/${BRANCH}" | tee -a "$GITHUB_STEP_SUMMARY" diff --git a/CHANGELOG.md b/CHANGELOG.md index 37a3c9c4..5c6c4070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Notable changes to house-rules. Versions follow [semantic versioning](https://se ## Unreleased -- `hr-code-review`'s panel recommendations catalog is generated: `scripts/refresh-recommendations.mjs` builds `panel-recommendations.json` from a source spec, a snapshot of the public Bug Hunt board (`--fetch` rewrites it) and the maintainer's own results (`--from-file` replaces them from a file of structured facts: a model and harness the spec lists, fixed choices and bounded numbers, with a deny file for private names; they live only in the catalog's own entries), and `--check` fails offline when the catalog is not what those inputs generate or the references folder holds a file the spec does not list or any symlink. The refresh no longer deletes inside a leftover transaction folder beyond the files it wrote, restores a file through a staged copy and keeps the before images when a restore fails, compares a stale lock's whole record before removing it, removes an interrupted run's before images, leaves the snapshot alone on an import, refuses malformed board rows and a repeated key in a fetched board, and states the board's planted total once. The one-time refresh moves the Opus, Sonnet and Muse figures to the board's current rows and adds GPT-6.2 Astra and Gemini 4 Neon entries; entries gain a `kind`. +- `hr-code-review`'s panel recommendations catalog is generated: `scripts/refresh-recommendations.mjs` builds `panel-recommendations.json` from a source spec, a snapshot of the public Bug Hunt board (`--fetch` rewrites it) and the maintainer's own results (`--from-file` replaces them from a file of structured facts: a model and harness the spec lists, fixed choices and bounded numbers, with a deny file for private names; they live only in the catalog's own entries), and `--check` fails offline when the catalog is not what those inputs generate or the references folder holds a file the spec does not list or any symlink. The refresh no longer deletes inside a leftover transaction folder beyond the files it wrote, restores a file through a staged copy and keeps the before images when a restore fails, compares a stale lock's whole record before removing it, removes an interrupted run's before images, leaves the snapshot alone on an import, refuses malformed board rows and a repeated key in a fetched board, and states the board's planted total once. A weekly workflow refetches the public board and pushes a branch for a maintainer's pull request only when it changed. The deny screen also folds a capital sharp s and a sigma's final form. The one-time refresh moves the Opus, Sonnet and Muse figures to the board's current rows and adds GPT-6.2 Astra and Gemini 4 Neon entries; entries gain a `kind`. - `hr-better-colors`' focus-ring table row says it gives the blue step and that other hues are measured (Radix yellow `9` is 1.26:1 on white); the paragraph under the table is split in three. - `hr-better-colors` puts the focus ring and input boundary on Radix step `9`, not `8`: Radix blue `8` (`#5eb1ef`) measures 2.33:1 on white, `9` measures 3.26:1 (Tailwind `500` stays 3.68:1). The previous entry's wording gave step `8`. - Five review points on the vendored jakubkrehel text (from the private reviewer on the pin adoption) are fixed in wording: `hr-better-accessibility` limits `novalidate` to forms whose submit handler renders the errors (a form that renders each error from the field's `invalid` event needs none) and carries the typed-name destructive-confirmation exception into `forms.md`, `semantics-and-aria.md` and the checklist; `hr-better-colors` stops giving the focus ring to the decorative `300` border step (`--blue-300` measures 1.80:1 on white) and gives the focus ring and input boundary their own table row on the first step that measures 3:1, and its class-based theme recipe resolves the theme in one function (a saved choice wins, System reads the current query value) run at startup, on a choice change and on the system `change` event; `hr-better-typography` says `65ch` and the `max-w-md` / `max-w-lg` mapping assume a proportional font (in single-width monospace text the range is `60ch`–`75ch` and `max-w-md` holds about 46 characters; full-width glyphs take two cells, so a mixed-width line needs a rendered count), with a separate cheat-sheet row for monospace. diff --git a/scripts/publish-panel-board.sh b/scripts/publish-panel-board.sh new file mode 100755 index 00000000..e4a6f59a --- /dev/null +++ b/scripts/publish-panel-board.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# Puts the regenerated snapshot and catalog on the refresh branch, without ever rewriting work that is not the job's +# own and without a new commit when the branch already holds this board. The branch is overwritten only when every +# commit on it that main lacks was made by the workflow bot and touches only the two generated files; it is then +# replaced with a lease on the SHA that was read. Run from a full clone of main with the regenerated files in place. +# +# Usage: BRANCH=panel-board-refresh scripts/publish-panel-board.sh +# Prints ready=true (the branch holds this board) or ready=false (the branch holds other work and was left alone; +# the script then exits 1, so the run is red) to $GITHUB_OUTPUT when set. REMOTE (default origin) names the remote. +set -euo pipefail +cd "$(dirname "$0")/.." + +branch="${BRANCH:?set BRANCH to the refresh branch}" +remote="${REMOTE:-origin}" +refs=skills/hr-code-review/references +files=("$refs/panel-board-snapshot.json" "$refs/panel-recommendations.json") +bot_email="41898282+github-actions[bot]@users.noreply.github.com" +out="${GITHUB_OUTPUT:-/dev/stdout}" + +# A JSON file from stdin without the dates every fetch rewrites. +shape() { + jq -S 'del(.fetched, .reviewed) | if .entries then .entries |= map(del(.checked)) else . end' +} + +# The branch holds work that is not the job's: leave it alone and fail the run, so a stuck refresh is seen. +refuse() { + echo "::error::$1; left alone. Delete or merge the branch so the weekly refresh can continue." + echo "ready=false" >>"$out" + exit 1 +} + +lease=() +if git ls-remote --exit-code --heads "$remote" "$branch" >/dev/null 2>&1; then + git fetch --no-tags "$remote" "$branch" + tip="$(git rev-parse FETCH_HEAD)" + # Every commit the branch has that main lacks must be the bot's and touch only the generated files. + while read -r commit; do + [ -n "$commit" ] || continue + # A merge commit (GitHub's "Update branch" makes one) lists no files of its own, so it is never the job's. + if [ "$(git log -1 --format=%ae "$commit")" != "$bot_email" ] \ + || [ "$(git rev-list --parents -n 1 "$commit" | wc -w)" -ne 2 ]; then + refuse "$branch has a commit that is not the workflow's, or is a merge ($commit)" + fi + while read -r name; do + [ -n "$name" ] || continue + if [ "$name" != "${files[0]}" ] && [ "$name" != "${files[1]}" ]; then + refuse "$branch has a commit that touches $name ($commit)" + fi + done < <(git diff-tree --no-commit-id --name-only -r "$commit") + done < <(git rev-list "$tip" "^HEAD") + same=true + for file in "${files[@]}"; do + if [ "$(shape <"$file")" != "$(git show "$tip:$file" | shape)" ]; then + same=false + fi + done + if [ "$same" = true ]; then + echo "$branch already holds this board; nothing pushed" + echo "ready=true" >>"$out" + exit 0 + fi + lease=("--force-with-lease=refs/heads/$branch:$tip") +fi + +git config user.name "github-actions[bot]" +git config user.email "$bot_email" +git checkout -B "$branch" +git add -- "${files[@]}" +git commit -m "Panel recommendations: refresh the board snapshot and catalog" +git push ${lease[@]+"${lease[@]}"} "$remote" "$branch" +echo "ready=true" >>"$out" diff --git a/scripts/refresh-panel-board.sh b/scripts/refresh-panel-board.sh new file mode 100755 index 00000000..ca908880 --- /dev/null +++ b/scripts/refresh-panel-board.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# Refetches the public Bug Hunt board for the panel recommendations catalog and says whether anything but the +# dates changed. When it did, the catalog is checked and the skill's tests run before the caller commits it. +# Own results are never read: a fetch keeps the catalog's own entries as they are. Only the snapshot and the +# catalog are touched, and when nothing but a date changed they are put back byte for byte from copies taken +# before the fetch, so other edits in the references folder are never discarded. +# +# Usage: scripts/refresh-panel-board.sh (prints changed=true or changed=false; to $GITHUB_OUTPUT when set) +# PANEL_BOARD_FILE: a saved board to read instead of fetching (a dry run; it must sit outside the skill folder). +set -euo pipefail +cd "$(dirname "$0")/.." + +refs=skills/hr-code-review/references +script=skills/hr-code-review/scripts/refresh-recommendations.mjs +snapshot="$refs/panel-board-snapshot.json" +catalog="$refs/panel-recommendations.json" +out="${GITHUB_OUTPUT:-/dev/stdout}" + +# The files without the dates every fetch rewrites (the fetch date, the review date, each entry's checked date). +shape() { + jq -S 'del(.fetched, .reviewed) | if .entries then .entries |= map(del(.checked)) else . end' "$1" +} +before_snapshot="$(shape "$snapshot")" +before_catalog="$(shape "$catalog")" +saved="$(mktemp -d)" +trap 'rm -rf "$saved"' EXIT +cp "$snapshot" "$saved/snapshot.json" +cp "$catalog" "$saved/catalog.json" + +args=(--fetch) +if [ -n "${PANEL_BOARD_FILE:-}" ]; then + args+=(--board-file "$PANEL_BOARD_FILE") +fi +bun "$script" "${args[@]}" + +if [ "$before_snapshot" = "$(shape "$snapshot")" ] \ + && [ "$before_catalog" = "$(shape "$catalog")" ]; then + cp "$saved/snapshot.json" "$snapshot" + cp "$saved/catalog.json" "$catalog" + echo "the board is unchanged" + echo "changed=false" >>"$out" + exit 0 +fi + +bun "$script" --check +bun test skills/hr-code-review test/doc-rules.test.mjs +echo "changed=true" >>"$out" diff --git a/skills/hr-code-review/references/panel-recommendations.md b/skills/hr-code-review/references/panel-recommendations.md index 9bb6106d..22c753d5 100644 --- a/skills/hr-code-review/references/panel-recommendations.md +++ b/skills/hr-code-review/references/panel-recommendations.md @@ -48,6 +48,12 @@ the catalog's own entries. `--check` runs offline, with no clock and no network, fails when the catalog is not what those inputs generate. A raw results file is never kept in this folder: the script refuses a leftover `panel-recommendations.own.json`. +A weekly workflow in the source repository (`.github/workflows/panel-board-refresh.yml`) +runs `--fetch` against the public board and, only when a row or the board's own update +changed, pushes the regenerated snapshot and catalog to the branch +`panel-board-refresh` and logs its URL; it opens no pull request, so a maintainer +opens one from that branch. It never reads own results, so those stay as the maintainer last imported them. + Check an entry again when a model, route, price or benchmark correction changes the choice, and when preparing a release. Only changed entries need new evidence. An update shows the old and suggested choices, the evidence date, the expected diff --git a/skills/hr-code-review/scripts/refresh-recommendations.mjs b/skills/hr-code-review/scripts/refresh-recommendations.mjs index 6ff362ee..31892755 100644 --- a/skills/hr-code-review/scripts/refresh-recommendations.mjs +++ b/skills/hr-code-review/scripts/refresh-recommendations.mjs @@ -51,14 +51,17 @@ const MAX_BOARD_BYTES = 20 * 1024 * 1024; const readJson = (path) => parseStrict(readFileSync(path, "utf8"), path); // Compared with case, spacing and punctuation removed, so "Internal Tool" and "internal_tool" match "internal-tool". -// Compatibility-normalized, upper then lower case (a sharp s matches SS, a final sigma its capital), normalized -// again, then only letters and digits kept. +// Compatibility-normalized, upper then lower case, normalized again; then the two letters whose lower case depends +// on context or has no single form are folded by hand (a final or medial sigma is one letter, and a sharp s, small or +// capital, is ss); then only letters and digits kept. const squash = (/** @type {string} */ s) => s .normalize("NFKC") .toUpperCase() .toLowerCase() .normalize("NFKC") + .replaceAll("ς", "σ") + .replaceAll("ß", "ss") .replace(/[^\p{L}\p{N}]/gu, ""); /** @param {unknown} v a finite number that is not negative */ const nonNegative = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0; diff --git a/skills/hr-code-review/test/panel-board-scripts.test.mjs b/skills/hr-code-review/test/panel-board-scripts.test.mjs new file mode 100644 index 00000000..6afff3f1 --- /dev/null +++ b/skills/hr-code-review/test/panel-board-scripts.test.mjs @@ -0,0 +1,295 @@ +// The weekly refresh's two shell scripts, against a bare remote and a copy of the committed references: the +// publish script never rewrites work that is not the job's own, and the refresh script never discards other edits. +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { + cpSync, + mkdirSync, + mkdtempSync, + readFileSync, + rmSync, + writeFileSync, + appendFileSync, +} from "node:fs"; +import { tmpdir } from "node:os"; +import { dirname, join, resolve } from "node:path"; +import { spawnSync } from "node:child_process"; +import { fileURLToPath } from "node:url"; + +const root = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", ".."); +const refs = "skills/hr-code-review/references"; +const BOT = "41898282+github-actions[bot]@users.noreply.github.com"; +const skip = process.platform === "win32" ? "needs bash, git and jq" : false; + +/** @param {string} cwd @param {string} cmd @param {string[]} args @param {Record} [env] */ +function run(cwd, cmd, args, env = {}) { + const out = spawnSync(cmd, args, { + cwd, + encoding: "utf8", + env: { ...process.env, GIT_CONFIG_GLOBAL: "/dev/null", GIT_CONFIG_NOSYSTEM: "1", ...env }, + }); + return { code: out.status, text: `${out.stdout}${out.stderr}` }; +} +/** @param {string} cwd @param {string[]} args */ +const git = (cwd, ...args) => { + const out = run(cwd, "git", args); + assert.equal(out.code, 0, `git ${args.join(" ")}: ${out.text}`); + return out.text.trim(); +}; + +/** + * A bare remote, a clone of it on main that holds the scripts and the committed references, and a second clone + * for a maintainer. + * @param {(ctx: { dir: string, work: string, other: string, remote: string }) => void} fn + */ +function inRepo(fn) { + const dir = mkdtempSync(join(tmpdir(), "panel-board-")); + try { + const remote = join(dir, "origin.git"); + git(dir, "init", "-q", "--bare", "-b", "main", remote); + const work = join(dir, "work"); + git(dir, "clone", "-q", remote, work); + git(work, "checkout", "-q", "-b", "main"); + git(work, "config", "user.name", "Maintainer"); + git(work, "config", "user.email", "maintainer@example.org"); + for (const path of [ + "scripts/publish-panel-board.sh", + "scripts/refresh-panel-board.sh", + "skills/hr-code-review/scripts/refresh-recommendations.mjs", + "skills/hr-code-review/scripts/refresh-files.mjs", + refs, + ]) { + mkdirSync(dirname(join(work, path)), { recursive: true }); + cpSync(join(root, path), join(work, path), { recursive: true }); + } + git(work, "add", "-A"); + git(work, "commit", "-q", "-m", "base"); + git(work, "push", "-q", "-u", "origin", "main"); + const other = join(dir, "other"); + git(dir, "clone", "-q", remote, other); + git(other, "config", "user.name", "Maintainer"); + git(other, "config", "user.email", "maintainer@example.org"); + fn({ dir, work, other, remote }); + } finally { + rmSync(dir, { recursive: true, force: true }); + } +} + +/** Change a row of the snapshot, as a refetch of a changed board would, and stamp a new fetch date. */ +function changeBoard(/** @type {string} */ work, /** @type {number} */ bump, date = "2026-12-01") { + const path = join(work, refs, "panel-board-snapshot.json"); + const snapshot = JSON.parse(readFileSync(path, "utf8")); + snapshot.rows[0].fixed += bump; + snapshot.fetched = date; + writeFileSync(path, `${JSON.stringify(snapshot, null, 2)}\n`); +} +const publish = (/** @type {string} */ work, /** @type {string} */ branch) => { + const output = join(work, "..", "output.txt"); + writeFileSync(output, ""); + const out = run(work, "bash", ["scripts/publish-panel-board.sh"], { + BRANCH: branch, + GITHUB_OUTPUT: output, + }); + return { ...out, output: readFileSync(output, "utf8") }; +}; +const tipOf = (/** @type {string} */ work, /** @type {string} */ branch) => + git(work, "ls-remote", "origin", `refs/heads/${branch}`).split(/\s/)[0]; + +test( + "publish: a new board is pushed once; the same board again, with only a new date, pushes nothing", + { skip }, + () => { + inRepo(({ work }) => { + changeBoard(work, 1); + const first = publish(work, "board-refresh"); + assert.equal(first.code, 0, first.text); + assert.match(first.output, /ready=true/); + const tip = tipOf(work, "board-refresh"); + assert.equal(git(work, "log", "-1", "--format=%ae", "board-refresh"), BOT); + // The next week: the same board, a later fetch date, a fresh checkout of main. + git(work, "checkout", "-q", "main"); + changeBoard(work, 1, "2026-12-08"); + const second = publish(work, "board-refresh"); + assert.equal(second.code, 0, second.text); + assert.match(second.output, /ready=true/); + assert.match(second.text, /nothing pushed/); + assert.equal(tipOf(work, "board-refresh"), tip); + // A board that changed again replaces the job's own commit, with a lease on what was read. + git(work, "checkout", "-q", "main"); + changeBoard(work, 2, "2026-12-15"); + const third = publish(work, "board-refresh"); + assert.equal(third.code, 0, third.text); + assert.notEqual(tipOf(work, "board-refresh"), tip); + }); + }, +); + +test( + "publish: a commit on the branch that is not the job's, or touches another file, is never overwritten", + { skip }, + () => { + inRepo(({ work, other }) => { + changeBoard(work, 1); + assert.match(publish(work, "board-refresh").output, /ready=true/); + // A maintainer adds a commit to the branch. + git(other, "fetch", "-q", "origin", "board-refresh"); + git(other, "checkout", "-q", "-b", "board-refresh", "origin/board-refresh"); + appendFileSync(join(other, refs, "panel-recommendations.md"), "\nA maintainer's note.\n"); + git(other, "commit", "-q", "-am", "note"); + git(other, "push", "-q", "origin", "board-refresh"); + const kept = tipOf(work, "board-refresh"); + git(work, "checkout", "-q", "main"); + changeBoard(work, 5, "2026-12-08"); + const refused = publish(work, "board-refresh"); + assert.equal(refused.code, 1, refused.text); + assert.match(refused.output, /ready=false/); + assert.match(refused.text, /not the workflow's, or is a merge/); + assert.equal(tipOf(work, "board-refresh"), kept); + // A commit made as the bot but touching another file is refused as well. + git(other, "checkout", "-q", "-b", "bot-work", "origin/main"); + appendFileSync(join(other, refs, "panel-recommendations.md"), "\nBot-made text.\n"); + git( + other, + "-c", + "user.name=github-actions[bot]", + "-c", + `user.email=${BOT}`, + "commit", + "-q", + "-am", + "bot", + ); + git(other, "push", "-q", "origin", "bot-work"); + git(work, "checkout", "-q", "main"); + changeBoard(work, 5, "2026-12-08"); + const second = publish(work, "bot-work"); + assert.match(second.output, /ready=false/); + assert.match(second.text, /touches .*panel-recommendations\.md/); + }); + }, +); + +test( + "refresh: when only the dates would change, nothing but the two files is touched and they come back byte for byte", + { skip }, + () => { + inRepo(({ dir, work }) => { + // A saved board that reduces to the committed snapshot. + const snapshot = JSON.parse( + readFileSync(join(work, refs, "panel-board-snapshot.json"), "utf8"), + ); + const board = { + meta: { planted_total: snapshot.plantedTotal, updated: snapshot.boardUpdated }, + runs: snapshot.rows.map((/** @type {any} */ r) => ({ + model: r.model, + vendor: "v", + harness: r.harness, + effort: r.effort, + n_runs: r.runs, + fixed: r.fixed, + wall_min: r.wallMinutes, + cost_usd: r.costUsd, + cost_kind: r.costUsd === null ? "unknown" : "list", + date: r.date, + superseded: null, + })), + }; + mkdirSync(join(dir, "outside")); + const saved = join(dir, "outside", "board.json"); + writeFileSync(saved, JSON.stringify(board)); + // Uncommitted work: a result imported into the catalog, and a note in another reference file. + writeFileSync( + join(dir, "outside", "own.json"), + JSON.stringify({ + version: 1, + results: [ + { + model: "gpt-6.2-astra", + harness: "Codex CLI", + effort: "medium", + found: 80, + of: 141, + falseSharePercent: 0.2, + wallMinutesPerReview: 2.7, + cases: 46, + caseSet: "held-out", + judging: "one-model", + checked: "2026-11-21", + }, + ], + }), + ); + writeFileSync(join(dir, "outside", "deny.txt"), "unrelated-name\n"); + const imported = run(work, "bun", [ + "skills/hr-code-review/scripts/refresh-recommendations.mjs", + "--from-file", + join(dir, "outside", "own.json"), + "--deny-file", + join(dir, "outside", "deny.txt"), + ]); + assert.equal(imported.code, 0, imported.text); + appendFileSync(join(work, refs, "panel-recommendations.md"), "\nAn uncommitted note.\n"); + const files = [ + "panel-board-snapshot.json", + "panel-recommendations.json", + "panel-recommendations.md", + ]; + const before = files.map((f) => readFileSync(join(work, refs, f), "utf8")); + const output = join(dir, "output.txt"); + writeFileSync(output, ""); + const out = run(work, "bash", ["scripts/refresh-panel-board.sh"], { + PANEL_BOARD_FILE: saved, + GITHUB_OUTPUT: output, + }); + assert.equal(out.code, 0, out.text); + assert.match(readFileSync(output, "utf8"), /changed=false/); + assert.deepEqual( + files.map((f) => readFileSync(join(work, refs, f), "utf8")), + before, + ); + assert.match(before[1] ?? "", /own-gpt-6\.2-astra-medium-held-out/); + }); + }, +); + +test( + "publish: a merge commit on the branch is never the job's, and the push is leased, never forced", + { skip }, + () => { + inRepo(({ work, other }) => { + changeBoard(work, 1); + assert.match(publish(work, "board-refresh").output, /ready=true/); + // Someone updates the branch with a merge of main (as GitHub's "Update branch" does). + git(other, "fetch", "-q", "origin", "board-refresh"); + git(other, "checkout", "-q", "-b", "board-refresh", "origin/board-refresh"); + git(other, "checkout", "-q", "main"); + git(other, "commit", "-q", "--allow-empty", "-m", "main moves on"); + git(other, "push", "-q", "origin", "main"); + git(other, "checkout", "-q", "board-refresh"); + git( + other, + "-c", + "user.name=github-actions[bot]", + "-c", + `user.email=${BOT}`, + "merge", + "-q", + "--no-ff", + "-m", + "Update branch", + "main", + ); + git(other, "push", "-q", "origin", "board-refresh"); + git(work, "checkout", "-q", "main"); + git(work, "pull", "-q", "origin", "main"); + changeBoard(work, 7, "2026-12-08"); + const refused = publish(work, "board-refresh"); + assert.equal(refused.code, 1, refused.text); + assert.match(refused.output, /ready=false/); + assert.match(refused.text, /is a merge/); + }); + const script = readFileSync(join(root, "scripts", "publish-panel-board.sh"), "utf8"); + assert.match(script, /--force-with-lease=/); + assert.doesNotMatch(script, /--force(?!-with-lease)/); + }, +); diff --git a/skills/hr-code-review/test/refresh-recommendations.test.mjs b/skills/hr-code-review/test/refresh-recommendations.test.mjs index 45539f8c..02e05350 100644 --- a/skills/hr-code-review/test/refresh-recommendations.test.mjs +++ b/skills/hr-code-review/test/refresh-recommendations.test.mjs @@ -1020,6 +1020,12 @@ test("member names are screened like values, and names fold the way a person rea ["Straße", "STRASSE"], ["ΟΔΥΣΣΕΥΣ", "Οδυσσευς"], ["Οδυσσεύς", "ΟΔΥΣΣΕΎΣ"], + // A capital sharp s, and a sigma whose form depends on what follows it in the published string. + ["Straße", "STRAẞE"], + ["STRAẞE", "Straße"], + ["ΟΔΥΣΣΕΥΣ", "ΟΔΥΣΣΕΥΣTOOL"], + ["ΟΔΥΣΣΕΥΣ", "ΟΔΥΣΣΕΥΣ.example"], + ["Οδυσσευς", "ΟΔΥΣΣΕΥΣ.example"], ]) { writeFileSync(paths.spec, serialize({ ...spec, own: { ...spec.own, task: published } })); writeFileSync(deny, `${listed}\n`);