From acd724079a5a41f2769da3422b27c4c61c7432bf Mon Sep 17 00:00:00 2001 From: "Claude (agent-stats)" Date: Thu, 24 Sep 2026 20:51:04 -0700 Subject: [PATCH] ci: run the repo-stats suite and a report-only push step in nix-build (improvise-1xfb.5.1) Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze --- .github/workflows/ci.yml | 27 ++++++++++++++++++++++++++- scripts/checkers.sh | 2 ++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dd44856..9544b2d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,13 +146,38 @@ jobs: # dependency crate each run. The NixOS runners substitute from titan's # harmonia first, and titan builds gh/main's `#improvise` hourly, so a PR that # leaves Cargo.lock alone rebuilds only the workspace crates it changed. + # + # The repo-stats pipeline runs here because it needs this job's binary: + # `nix shell .#improvise` reuses the build above instead of a second one. + # Its suite gates; the report on a push to main never fails the build, and + # its step fails only when improvise refuses the pipeline's input + # (context/code/tooling.md section 7). Full history is for the report. nix-build: - name: Nix build (crate2nix) + name: Nix build (crate2nix) and the repo-stats pipeline runs-on: [self-hosted, nixos, microvm] steps: - uses: actions/checkout@v7 + with: + fetch-depth: 0 - name: nix build .#improvise run: nix build --print-build-logs .#improvise + - name: The repo-stats pipeline computes what it claims to + run: nix shell .#improvise --command ./scripts/checkers.sh --ci nix-build + - name: Churn, coupling and doc-growth report (report only) + if: github.event_name == 'push' + continue-on-error: true + run: | + rc=0 + nix shell .#improvise --command ./scripts/repo-stats --out repo-stats > repo-stats.txt || rc=$? + { echo '```'; cat repo-stats.txt; echo '```'; } >> "$GITHUB_STEP_SUMMARY" + exit "$rc" + - name: Upload the repo-stats model and its CSVs + if: github.event_name == 'push' + uses: actions/upload-artifact@v7 + with: + name: repo-stats + path: repo-stats + retention-days: 30 wasm: name: wasm32 check (browser bundle crates) diff --git a/scripts/checkers.sh b/scripts/checkers.sh index bf837508..0a345c9b 100755 --- a/scripts/checkers.sh +++ b/scripts/checkers.sh @@ -101,6 +101,8 @@ ci_suites() { case "$1" in build) echo assemble-stamp ;; js) echo node-test ;; + # Needs the improvise binary, which only this job builds (tooling.md section 7). + nix-build) echo repo-stats ;; # check-harness-lock must never read "could not resolve" as "stale" (improvise-zs2r). kb) echo kb checkers pr-watch release-preflight pr-reviews fmt-workspaces bd-audit-ids check-harness-lock ;; *) return 1 ;;