Tracegate CI

io.github.davidscotttufts由 GitHub 帳號 davidscotttufts 發布v0.10.1更新於 Nov 3, 2026

面向編碼代理的本機 CI 代理與測試影響帳本:佇列、通道模式與失敗執行資料包。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Local CI broker and test-impact ledger for coding agents: queue, lane modes and red-run packets.

概覽

Tracegate CI 的本機 MCP 服務;無需登入;STDIO。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Tracegate CI,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Tracegate CI

Local CI for TypeScript that runs only the tests a change can affect, and has to earn the right to skip the rest.

Tracegate records what each test file touches when it runs: the functions it executes, the modules it loads, and the files it reads. When you change code, a test whose recorded inputs didn't change can reuse its last green result. The rest run.

It doesn't skip anything until that has been shown to be safe:

  • Shadow first. Every test still runs, and Tracegate logs what it would have skipped.
  • Entry bar. A lane starts skipping only after 20 runs over 14 days, with no untriaged miss in the last 14 days.
  • Random audits. 5% of the skippable tests run anyway.
  • A miss suspends it. If a test predicted safe to skip fails anyway, the lane runs everything for 14 days, unless someone triages the miss as a flaky test.

It can't turn a red into a green. A failing test's record is dropped, and no record older than 72 hours is reused.

Tracegate came out of a private TypeScript monorepo with about 3,700 test files, where it gates every merge. Its measured miss rate there is published in docs/evidence/.

Install

sh
npm install --save-dev tracegate-cinpx tracegate init --write --mcp   # writes tracegate.config.json and wires the recordernpx tracegate doctor --canary      # checks the setup by recording one test filenpx tracegate run                  # runs the lane; in shadow, everything still runsnpx tracegate savings              # what skipping would have saved so far

init without --write only prints what it would do. It never overwrites an existing config, and it tells you which Vitest configs to edit by hand.

Requirements: Node 22+, git, Vitest 4.1–5.x or Jest 30, and TypeScript 5 or 6 in your repository. On TypeScript 7, also install 6 under an alias Tracegate looks for: npm i -D tracegate-typescript@npm:typescript@6.

Claude Code plugin

/plugin marketplace add davidscotttufts/tracegate-ci/plugin install tracegate@tracegate

The plugin adds an MCP server, two subagents (red-reader, deps-oracle), two skills, and a hook. In a Tracegate repository, the hook stops agents from running a bare vitest or npm test outside the queue, and from triaging misses or approving skipped tests themselves. TRACEGATE_HOOK=off turns it off.

What the plugin runs and touches (also in PRIVACY.md):

  • Runs: node on its own files (the MCP server over stdio, and the hook), git, your test runner, the commands you give tracegate lease, and ssh-keygen or gpg when you run attest.
  • Reads: your repository and its history, test coverage, and this machine's load and memory (ps, vm_stat, sysctl and pmset on macOS; /proc on Linux).
  • Writes: its ledger in .git/tracegate/, temporary files and a socket in the OS temp directory, git notes under refs/notes/tracegate when you run attest, and the files init --write lists.
  • Sends: nothing by default: no telemetry and no network calls. Two features you turn on yourself use the network through your own login: attest --status posts a GitHub commit status with gh, and the release bus reads and writes a GCS bucket you name, with gcloud.
  • Installs: nothing. The package has no runtime dependencies.

How it decides

A test reuses its last green result when nothing it depends on has changed since. That means no change to:

  • a function it executed, a constant it uses, or a module it loaded;
  • a file it read;
  • the test file itself;
  • a global input, such as package.json, a lockfile or the Vitest config;
  • the repository's history, for a test that runs git on it.

Uncommitted edits count. Edits inside functions the test never ran don't.

What a recording can't see is the clock, environment variables, the network, and other processes. The 72-hour limit, the random audit, and a full run at least once a day cover those. The full rules are in How a decision is made.

Commands

CommandWhat it does
tracegate runSelect, run the tests, record, and learn from the result.
tracegate statusEach lane's mode and progress toward the entry bar.
tracegate savingsWhat skipping would have saved so far.
tracegate report-cardMiss rates with 95% confidence intervals.
tracegate triageMark a miss as a flaky test or a recorder bug.
tracegate leaseRun a command when the machine has room for it.
tracegate trainGate a queue of branches and land the green ones.
tracegate daemonRun full lanes at night and pre-test queued branches.
tracegate busSee what another machine is gating or deploying.
tracegate attest / verifySign, and check, what was tested on a commit.
tracegate mcpThe MCP server for agents.

tracegate --help lists every command and flag.

Configuration

tracegate init --write creates tracegate.config.json. A lane is one test project:

json
{  "lanes": {    "api": { "dir": "packages/api", "src": "src", "globals": ["test/setup/"] },    "web": { "dir": "packages/web", "src": "src" }  }}

List your test setup directory under globals: every test loads it, so a change there runs the whole lane. All settings are in the guide.

What else is in the box

FeatureWhat it's for
BrokerOne queue for the machine. Gates, background jobs and every agent's test runs share the CPU and memory instead of fighting over them.
Merge trainGates a batch of branches as their real merge commit, bisects a red batch, and lands only exactly what passed.
Red ReaderAn agent reads each failed run and can mark a "flaky" failure as a real bug. It can never do the reverse.
Silence guardFails a change that skips, focuses or deletes tests, until a person approves it.
ConductorRuns the tests most likely to fail first, and advises which branches to gate alone.
Dependency changesA lockfile change re-runs only the tests that loaded a changed package.
Keyed inputsAn edit to one string in a translation file re-runs only the tests that used it.
DaemonUses idle hours for full runs and for pre-testing queued branches.
Release busLets two machines see each other's trains and deploys.
AttestationA signed record of what ran on a commit's exact tree.

Why not Vitest's recordDependencies? The comparison runs both on the same commits. Tracegate selects per function, sees files read at run time, and audits its own skips.

More

  • Guide: the full reference.
  • Roadmap and changelog.
  • Background: the research and measurements behind the design.
  • Recipes: with claude-code-merge-queue, edit-level guards, worktrees, and a bin/ci script.

Apache-2.0. See LICENSE and NOTICE.

來源:README.md,提交 b19ddd9

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.10.1最新Nov 3, 2026
  2. v0.9.1Oct 31, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分