From eba3449e607f7c4d18c29e140a26bd1704d75964 Mon Sep 17 00:00:00 2001 From: oleks Date: Thu, 30 Jul 2026 15:48:27 +0300 Subject: [PATCH] ci: fetch cc-tokens from token-budget for the suites step kotkan/claude-plugin-inference-arbitrage#20 -- the bare alpine:3 CI container has neither the Claude Code plugin cache nor `claude plugin install`, so bin/offload-scan's cc-tokens PATH lookup always failed. Per design decision 0.1 this plugin never vendors token-budget's pricing/token-accounting logic, so fetch the single cc-tokens file straight from kotkan/claude-plugin-token-budget's raw main branch and put it on PATH before running tests/run-all.sh, rather than mocking its behavior. --- .woodpecker/test.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 1e0674b..edb3e5c 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -14,13 +14,26 @@ steps: - name: suites image: alpine:3 commands: - - apk add --no-cache bash python3 >/dev/null + - apk add --no-cache bash python3 wget >/dev/null + # bin/offload-scan (design decision 0.1) deliberately never vendors + # token-budget's pricing/token-accounting logic -- it imports the real + # cc-tokens module and fails loudly if it's missing. This bare alpine + # container has neither the Claude Code plugin cache nor `claude + # plugin install`, so fetch the one file it needs straight from + # token-budget's own repo and put it on PATH. See + # kotkan/claude-plugin-inference-arbitrage#20. + - mkdir -p /tmp/ci-tools + - >- + wget -q -O /tmp/ci-tools/cc-tokens + https://git.oleks.space/kotkan/claude-plugin-token-budget/raw/branch/main/bin/cc-tokens + - chmod +x /tmp/ci-tools/cc-tokens + - export PATH="/tmp/ci-tools:$PATH" - timeout 600 bash tests/run-all.sh - name: shellcheck image: koalaman/shellcheck-alpine:stable commands: - # bin/ mixes python and bash (plugin-inventory is python) — filter by + # bin/ mixes python and bash (plugin-inventory is python) -- filter by # actual shebang, not just the executable bit or a *.sh glob, or # shellcheck chokes on the python entries (SC1071). - >- -- 2.54.0