From 3676f979b1fe29fba3a7d28562aaa68be1a9e9a3 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 22:54:17 +0000 Subject: [PATCH 1/3] fix(frontend): pass an explicit initial value to useRef so tsc passes on React 18 and 19 types React 19's @types/react makes the argument of useRef required, so useRef() in TreeView.tsx fails with TS2554 (Dependabot #332). useRef(undefined) typechecks on both 18 and 19 and keeps the same runtime behaviour. No other argument-less useRef in src. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01J4QvDiW8qD4f2JDQJ4buGo --- frontend/src/views/TreeView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/TreeView.tsx b/frontend/src/views/TreeView.tsx index c0778282..b95f7028 100644 --- a/frontend/src/views/TreeView.tsx +++ b/frontend/src/views/TreeView.tsx @@ -183,7 +183,7 @@ function TreeCanvas({ source, tree, src, toast }: { // Autosave the view document. const firstSave = useRef(true) - const saveTimer = useRef() + const saveTimer = useRef(undefined) const saveNow = useCallback(() => { const doc: TreeViewDoc = { version: 1, @@ -228,7 +228,7 @@ function TreeCanvas({ source, tree, src, toast }: { el.addEventListener('wheel', onWheel, { passive: false }) return () => el.removeEventListener('wheel', onWheel) }, []) - const scrollTimer = useRef() + const scrollTimer = useRef(undefined) const onScroll = () => { const el = scrollRef.current if (!el) return From 6ca65cc376759aacedeca880af5c7d2fd5aae493 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:18:57 +0000 Subject: [PATCH 2/3] ci: emit the required CI/gate check from ci.yml Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01J4QvDiW8qD4f2JDQJ4buGo --- .github/workflows/ci.yml | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d635192a..caff08b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -922,3 +922,75 @@ jobs: exit 1 fi echo 'The full Julia suite passed, including the two-thread vsearch experiment and fresh empirical grade validation.' >> "$GITHUB_STEP_SUMMARY" + + # The account ruleset "Branch-Floor" requires a status check named exactly + # `CI/gate`. The check context is this job's `name:`, so it must stay a fixed + # string (no interpolation, no matrix). It waits for every other job in this + # workflow and runs even when one fails, is skipped or is cancelled. + # + # A job may be `skipped` only where this workflow skips it by design: the + # detector that governs it succeeded and reported `relevant == 'false'`. + # test, standards and agda are governed by `gate`; occupancy and disagreement + # by `occupancy_gate`. A job skipped while its detector failed, was cancelled + # or was itself skipped fails this gate, as does any failure, cancellation or + # missing/unknown result. Only `run:` shell is used: nothing here needs pinning. + ci-status: + name: CI/gate + runs-on: ubuntu-24.04 + timeout-minutes: 5 + permissions: {} + needs: [gate, occupancy_gate, test, standards, agda, occupancy, disagreement] + if: always() + steps: + - name: Require every job to succeed, or to be skipped by design + env: + NEEDS_JSON: ${{ toJSON(needs) }} + run: | + set -euo pipefail + summary="${GITHUB_STEP_SUMMARY:-/dev/null}" + result() { jq -r --arg j "$1" '.[$j].result // "missing"' <<< "$NEEDS_JSON"; } + relevant() { jq -r --arg j "$1" '.[$j].outputs.relevant // "missing"' <<< "$NEEDS_JSON"; } + failures=0 + total=0 + { + echo '### CI/gate' + echo + echo 'Each result below is the aggregate result of that job. This workflow has no matrix jobs.' + echo + echo '| job | result | expected | verdict |' + echo '| --- | --- | --- | --- |' + } >> "$summary" + check() { + local job="$1" expected="$2" actual verdict=ok + actual="$(result "$job")" + total=$((total + 1)) + if [[ "$actual" != "$expected" ]]; then + verdict=FAIL + failures=$((failures + 1)) + echo "::error::$job result is '$actual', expected '$expected'" + fi + printf '%-16s %-10s expected %-8s %s\n' "$job" "$actual" "$expected" "$verdict" + echo "| $job | $actual | $expected | $verdict |" >> "$summary" + } + # What a detector-governed job must be: success when the detector + # (itself successful) says the change is relevant, skipped when it + # says it is not. Anything else, including a detector that did not + # succeed or reported no usable output, expects success and so fails. + expect_for() { + local detector="$1" + if [[ "$(result "$detector")" != success ]]; then echo success; return; fi + case "$(relevant "$detector")" in + true) echo success ;; + false) echo skipped ;; + *) echo success ;; + esac + } + check gate success + check occupancy_gate success + for job in test standards agda; do check "$job" "$(expect_for gate)"; done + for job in occupancy disagreement; do check "$job" "$(expect_for occupancy_gate)"; done + if [[ "$failures" -ne 0 ]]; then + echo "CI/gate FAILED: $failures of $total jobs not as expected." | tee -a "$summary" + exit 1 + fi + echo "CI/gate passed: $total jobs checked; skipped only where the successful detector reported nothing relevant." | tee -a "$summary" From dab6c8584d1a2c5b75f0e8be12b7dcf701341e90 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 23:33:21 +0000 Subject: [PATCH 3/3] ci: name the positional parameter in the CI/gate helper functions SonarCloud rule githubactions:S7679 flags $1 used directly in result and relevant. Each is now assigned to a named local. No change in behaviour: the gate's decision logic was re-run locally over seven cases (all success, a failure, a cancellation, designed skips, skips with a failed detector, a skip the detector did not allow, and mixed relevance) with the same exit codes as before. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01J4QvDiW8qD4f2JDQJ4buGo --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caff08b4..be95a42c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -948,8 +948,8 @@ jobs: run: | set -euo pipefail summary="${GITHUB_STEP_SUMMARY:-/dev/null}" - result() { jq -r --arg j "$1" '.[$j].result // "missing"' <<< "$NEEDS_JSON"; } - relevant() { jq -r --arg j "$1" '.[$j].outputs.relevant // "missing"' <<< "$NEEDS_JSON"; } + result() { local job="$1"; jq -r --arg j "$job" '.[$j].result // "missing"' <<< "$NEEDS_JSON"; } + relevant() { local job="$1"; jq -r --arg j "$job" '.[$j].outputs.relevant // "missing"' <<< "$NEEDS_JSON"; } failures=0 total=0 {