Skip to content

chore(ci): the product gate ran a tool the product does not ship - #115

Merged
pitimon merged 1 commit into
mainfrom
chore/107-graph-out-of-product-ci
Jul 25, 2026
Merged

chore(ci): the product gate ran a tool the product does not ship#115
pitimon merged 1 commit into
mainfrom
chore/107-graph-out-of-product-ci

Conversation

@pitimon

@pitimon pitimon commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses #107's "if it must stay for now, at minimum split it out of the default ci:local chain".

scripts/graph/ is a SCIP code-graph indexer built for the maintainer's own agent tooling. It is not part of @ipv9/tokentracker-cli and ships to nobody, yet its 12 test files ran in every ci:local, on every PR, for every contributor.

The cost that matters is not the runtime. A tenth of the suite tested something users never run, so the repo looked well tested while four product parsers (hermes, codebuddy, craft, kimi) have no test at all — the inversion #104 is about.

What changed

  • test/graph-auto-index-*.test.jstest/graph/, which the flat test/*.test.js glob no longer picks up. Product suite drops 909 → 893.
  • New npm run test:graph.
  • New workflow running it in its own job, triggered only on scripts/graph/** or test/graph/**.
  • CONTRIBUTING.md says what the directory is and why it is not in the product gate.

Why a real job and not continue-on-error

A gate that cannot fail reports success it did not earn. Path filtering makes the job absent when irrelevant, not green when broken.

The trade, stated in the workflow file: a change elsewhere that breaks the indexer is caught on the next graph-touching PR rather than immediately. The tool has no runtime dependency on the product, so that is the accepted cost of taking it off the critical path.

Two path fixes the move required

Caught by running the tests, not by reading them:

  • the require("../scripts/graph/…") paths
  • one path.join(__dirname, "..", "scripts", …) in graph-auto-index-parse-scip.test.js that assumed the old depth

Test plan

  • ci:local exit 0 — 893 root tests, 256 dashboard
  • npm run test:graph — 16 pass, 0 fail
  • Nothing in the product imports scripts/graph — only the graph:auto-index and graph:scip npm scripts reference it
  • git mv used, so the moves show as renames in the diff

Still open on #107

The full move to its own repository. That needs a destination repo, which is a decision outside this PR.

Addresses #107's "at minimum" path. `scripts/graph/` is a SCIP code-graph
indexer for the maintainer's own agent tooling; it is not part of
@ipv9/tokentracker-cli and ships to nobody, yet its 12 test files ran in every
ci:local, on every PR, for every contributor.

The cost that matters is not the runtime. It is that a tenth of the suite
tested something users never run, so the repo looked well tested while four
product parsers (hermes, codebuddy, craft, kimi) have no test at all — the
inversion #104 is about.

test/graph-auto-index-*.test.js -> test/graph/, which the flat `test/*.test.js`
glob no longer picks up. Product suite drops 909 -> 893.

Two path fixes the move required: the `../scripts/graph/` requires, and one
path.join(__dirname, "..", "scripts", ...) in parse-scip that assumed the old
depth. Caught by running them, not by reading them.

They still run. A new workflow does it in its own job, triggered only on
scripts/graph/** or test/graph/**. Deliberately a real blocking job rather than
continue-on-error: a gate that cannot fail reports success it did not earn.
Path filtering makes it absent when irrelevant, not green when broken.

The trade, stated in the workflow file: a change elsewhere that breaks the
indexer is caught on the next graph-touching PR rather than immediately. The
tool has no runtime dependency on the product.

Nothing in the product imports scripts/graph — only the graph:auto-index and
graph:scip npm scripts reference it.

Full move to its own repository is still open on #107; this is the "if it must
stay for now" half.

ci:local exit 0: 893 root, 256 dashboard. test:graph: 16 pass.
@pitimon
pitimon merged commit dfb3ff7 into main Jul 25, 2026
2 checks passed
@pitimon
pitimon deleted the chore/107-graph-out-of-product-ci branch July 25, 2026 22:13
pitimon added a commit that referenced this pull request Jul 26, 2026
15 commits since v0.39.43. Tracker: #125.

User-facing:
- The Projects panel honours the date range. It read no query parameter at
  all, so picking "24h" narrowed every other card while Projects kept showing
  all-time totals with nothing on screen saying so (#118).
- Per-repo cost, with rows written before the change named as unpriced rather
  than shown as a confident $0 (#121).
- Sources with no per-repo attribution are named, instead of their absence
  reading as "that tool cost nothing here" (#118).
- A plan-value card answering what README:32 already promised, labelled as
  list-price-equivalent rather than a saving (#122).
- The Codex quota chip no longer vanishes on a 401 (#119).
- `sync --compact`, which reclaimed 34,924 lines to 5,636 on a real install
  (#117).

Behind the scenes: outbound-privacy validator hardening (#111, #114), avatar
proxy per-hop revalidation, port-aware allowlisting and a real download cap
(#109, #112), a parser conformance ratchet (#116, #120), scripts/graph out of
the product gate (#115), and a usage-limits fixture capture tool (#124).

Version bumped in all four lockstep locations by the `version` hook:
package.json, package-lock.json, both TokenTrackerBar targets, and the Windows
csproj. validate:version-lockstep passes.

WATCH AFTER SHIPPING: #121 migrates cursors.json on every user's first sync
after upgrading, re-keying project buckets from project|source|hour to
project|source|model|hour. Without that the old bucket strands and its usage is
counted twice. Verified read-only against a real 2,015-bucket state — every key
migrated, total_tokens preserved exactly at 6,281,653,062, and all 2,015
queuedKey markers survived, the loss of which would re-append every row. That
is one machine; a differently-shaped state is the residual risk.

ci:local exit 0: 972 root tests, 302 dashboard.

Co-authored-by: itarun.p <itarun.p@somapait.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant