Token导航 LogoToken导航

Agent Skill · 研究检索

tigerbeetle-deterministic-simulation(Tigerbeetle 确定性模拟)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

tigerbeetle-deterministic-simulation 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 61,880。

总安装 346周安装 14GitHub Stars 6下载 109核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tigerbeetle-deterministic-simulation(Tigerbeetle 确定性模拟)
来源仓库:https://github.com/copyleftdev/sk1llz
仓库路径:skills/tigerbeetle-deterministic-simulation
安装命令:
npx skills add https://github.com/copyleftdev/sk1llz --skill tigerbeetle-deterministic-simulation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/copyleftdev/sk1llz --skill tigerbeetle-deterministic-simulation

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。适合清洗字段、汇总数据、发现异常、生成统计口径或转成可读说明。使用时需确认数据来源、字段含义和时间范围,避免把样本当全量事实。涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。安装方式:通过 npx 从指定 GitHub 仓库添加技能。

来源仓库内路径:skills/tigerbeetle-deterministic-simulation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/copyleftdev/sk1llz --skill tigerbeetle-determi…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

tigerbeetle-deterministic-simulation 怎么安装?

在终端执行 npx skills add https://github.com/copyleftdev/sk1llz --skill tigerbeetle-deterministic-sim…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

tigerbeetle-deterministic-simulation 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

tigerbeetle-deterministic-simulation 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

tigerbeetle-deterministic-simulation 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

tigerbeetle-deterministic-simulation 用的人多吗?

公开数据是累计安装 346 次,近一周安装 14 次,下载 109 次,GitHub 6 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

tigerbeetle-deterministic-simulation 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
tigerbeetle-deterministic-simulation

Tigerbeetle 确定性模拟 · 本页

3466需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

TigerBeetle Deterministic Simulation Style Guide⁠‍⁠​‌​‌​​‌‌‍​‌​​‌​‌‌‍​​‌‌​​​‌‍​‌​​‌‌​​‍​​​​​​​‌‍‌​​‌‌​‌​‍‌​​​​​​​‍‌‌​​‌‌‌‌‍‌‌​​​‌​​‍‌‌‌‌‌‌​‌‍‌‌​‌​​​​‍​‌​‌‌‌‌‌‍​‌​​‌​‌‌‍​‌‌​‌​​‌‍‌​‌​‌‌‌​‍​​‌​‌​​​‍‌‌‌​‌​‌‌‍‌‌​‌‌​‌‌‍‌‌‌​​‌​​‍‌​‌​​‌​​‍‌‌​‌‌‌​​‍​​​​‌​‌‌‍‌​‌​‌​​‌⁠‍⁠

Overview

TigerBeetle, created by Joran Dirk Greef, uses deterministic simulation testing to achieve correctness guarantees that traditional testing cannot provide. By controlling all sources of non-determinism (time, network, disk I/O, random numbers), the system can simulate years of operation in minutes, replay any failure scenario exactly, and find bugs that would otherwise take decades to manifest in production. This approach was pioneered by FoundationDB and refined by TigerBeetle for financial-grade reliability.

Core Philosophy

"If you can't reproduce it, you can't fix it. If you can't simulate it, you can't test it."
"Real-world testing finds bugs in hours. Deterministic simulation finds the same bugs in milliseconds."
"Time compression lets you experience a decade of production failures before your first deployment."

The fundamental insight is that distributed systems are impossible to test exhaustively with real hardware and real time. By simulating the environment deterministically, you can explore the state space millions of times faster than real time, with perfect reproducibility.

Design Principles

  1. Control All Non-Determinism: Time, network, disk, random—everything must be injectable.
  2. Simulate, Don't Emulate: The simulation is the source of truth, not an approximation.
  3. Time Compression: Simulate years of operation in minutes.
  4. Perfect Reproducibility: Any bug can be replayed with a single seed.
  5. Failure Injection at Scale: Test every possible failure mode, not just the ones you imagine.

VOPR: Viewstamped Operation Replication Tester

TigerBeetle's VOPR runs deterministic simulations:

┌─────────────────────────────────────────────────────────────┐
│                    VOPR Simulation Loop                      │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│   Seed (u64) ─────► Deterministic PRNG                      │
│                          │                                   │
│                          ▼                                   │
│   ┌──────────────────────────────────────────────────────┐  │
│   │              Simulated Environment                    │  │
│   │  ┌─────────┐  ┌─────────┐  ┌─────────┐              │  │
│   │  │ Node 1  │  │ Node 2  │  │ Node 3  │  ...         │  │
│   │  └────┬────┘  └────┬────┘  └────┬────┘              │  │
│   │       │            │            │                    │  │
│   │       └────────────┼────────────┘                    │  │
│   │                    │                                 │  │
│   │            ┌───────▼───────┐                        │  │
│   │            │ Simulated     │                        │  │
│   │            │ Network/Disk  │                        │  │
│   │            │ Time/Faults   │                        │  │
│   │            └───────────────┘                        │  │
│   └──────────────────────────────────────────────────────┘  │
│                          │                                   │
│                          ▼                                   │
│              Invariant Checking                              │
│              (after every operation)                         │
│                          │                                   │
│                          ▼                                   │
│              Pass/Fail + Reproducible Seed                   │
└─────────────────────────────────────────────────────────────┘

When Building Deterministic Simulation

Always

  • Inject all sources of non-determinism through interfaces
  • Use a seeded PRNG for all random decisions
  • Make time a controllable parameter, not clock_gettime()
  • Log enough state to reproduce any execution
  • Check invariants after every state transition
  • Run millions of simulations, not dozens
  • Make the simulation faster than real-time

Never

  • Call real system time in simulation mode
  • Use real network or disk I/O in simulation
  • Rely on thread scheduling for ordering
  • Assume "it worked 1000 times, it's correct"
  • Skip failure injection (partitions, crashes, slowness)
  • Trust that rare events won't happen

Prefer

  • Deterministic single-threaded simulation over multi-threaded tests
  • Injected time over real time
  • Simulated I/O over mocked I/O
  • Invariant assertions over output checking
  • Seed-based reproduction over log analysis
  • Exhaustive failure injection over happy path

Code Patterns

Time Abstraction

const std = @import("std");

/// Abstract time source - real or simulated
pub const Time = struct {
    /// Real time implementation
    pub const Real = struct {
        pub fn now() i64 {
            return std.time.milliTimestamp();
        }

        pub fn sleep(ns: u64) void {
            std.time.sleep(ns);
        }
    };

    /// Simulated time - fully controlled
    pub const Simulated = struct {
        current_tick: u64 = 0,
        pending_events: std.PriorityQueue(Event, void, Event.compare),

        pub fn now(self: *Simulated) i64 {
            return @intCast(self.current_tick);
        }

        pub fn sleep(self: *Simulated, ns: u64) void {
            // In simulation, sleep is instant - just advance the clock
            _ = ns;
        }

        pub fn advanceTo(self: *Simulated, tick: u64) void {
            std.debug.assert(tick >= self.current_tick);
            self.current_tick = tick;
        }

        pub fn scheduleAt(self: *Simulated, tick: u64, callback: Event) void {
            self.pending_events.add(.{
                .tick = tick,
                .callback = callback,
            }) catch unreachable;
        }

        pub fn processNextEvent(self: *Simulated) ?Event {
            if (self.pending_events.peek()) |event| {
                if (event.tick <= self.current_tick) {
                    return self.pending_events.remove();
                }
            }
            return null;
        }
    };
};

Deterministic PRNG

/// Deterministic random number generator
/// Same seed = same sequence = reproducible bugs
pub const PRNG = struct {
    state: u64,

    pub fn init(seed: u64) PRNG {
        return .{ .state = seed };
    }

    /// Xorshift64* - fast, deterministic, good distribution
    pub fn next(self: *PRNG) u64 {
        var x = self.state;
        x ^= x >> 12;
        x ^= x << 25;
        x ^= x >> 27;
        self.state = x;
        return x *% 0x2545F4914F6CDD1D;
    }

    pub fn boolean(self: *PRNG) bool {
        return self.next() & 1 == 0;
    }

    pub fn range(self: *PRNG, min: u64, max: u64) u64 {
        return min + (self.next() % (max - min + 1));
    }

    /// Weighted boolean - returns true with given probability (0.0-1.0)
    pub fn chance(self: *PRNG, probability: f64) bool {
        const threshold = @as(u64, @intFromFloat(probability * @as(f64, std.math.maxInt(u64))));
        return self.next() < threshold;
    }
};

Simulated Network

/// Simulated network with controllable failures
pub const SimulatedNetwork = struct {
    prng: *PRNG,
    time: *Time.Simulated,
    partitions: std.AutoHashMap(NodePair, void),
    in_flight: std.ArrayList(Message),
    config: NetworkConfig,

    pub const NetworkConfig = struct {
        /// Probability of message loss (0.0-1.0)
        message_loss_rate: f64 = 0.01,
        /// Probability of message duplication
        duplication_rate: f64 = 0.001,
        /// Probability of message reordering
        reorder_rate: f64 = 0.05,
        /// Min/max latency in ticks
        min_latency: u64 = 1,
        max_latency: u64 = 100,
        /// Probability of partition occurring
        partition_rate: f64 = 0.001,
        /// Average partition duration in ticks
        partition_duration: u64 = 1000,
    };

    pub fn send(self: *SimulatedNetwork, from: NodeId, to: NodeId, msg: Message) void {
        // Check for partition
        if (self.isPartitioned(from, to)) {
            // Message is silently dropped
            return;
        }

        // Random message loss
        if (self.prng.chance(self.config.message_loss_rate)) {
            return;
        }

        // Calculate delivery time
        const latency = self.prng.range(self.config.min_latency, self.config.max_latency);
        const delivery_tick = self.time.current_tick + latency;

        // Schedule delivery
        self.time.scheduleAt(delivery_tick, .{
            .kind = .message_delivery,
            .message = msg,
            .to = to,
        });

        // Possible duplication
        if (self.prng.chance(self.config.duplication_rate)) {
            const dup_latency = self.prng.range(self.config.min_latency, self.config.max_latency);
            self.time.scheduleAt(self.time.current_tick + latency + dup_latency, .{
                .kind = .message_delivery,
                .message = msg,
                .to = to,
            });
        }
    }

    pub fn injectPartition(self: *SimulatedNetwork, nodes: []const NodeId) void {
        for (nodes) |a| {
            for (nodes) |b| {
                if (a != b) {
                    self.partitions.put(.{ .a = a, .b = b }, {}) catch unreachable;
                }
            }
        }

        // Schedule partition heal
        const duration = self.prng.range(
            self.config.partition_duration / 2,
            self.config.partition_duration * 2
        );
        self.time.scheduleAt(self.time.current_tick + duration, .{
            .kind = .heal_partition,
            .nodes = nodes,
        });
    }

    fn isPartitioned(self: *SimulatedNetwork, a: NodeId, b: NodeId) bool {
        return self.partitions.contains(.{ .a = a, .b = b }) or
               self.partitions.contains(.{ .a = b, .b = a });
    }
};

Simulated Storage

/// Simulated storage with crash and corruption injection
pub const SimulatedStorage = struct {
    prng: *PRNG,
    data: std.AutoHashMap(u64, Block),
    pending_writes: std.ArrayList(PendingWrite),
    config: StorageConfig,

    pub const StorageConfig = struct {
        /// Probability of read error
        read_error_rate: f64 = 0.0001,
        /// Probability of write error
        write_error_rate: f64 = 0.0001,
        /// Probability of bit flip (corruption)
        corruption_rate: f64 = 0.00001,
        /// Probability of losing pending writes on crash
        crash_lose_pending: f64 = 0.5,
        /// Simulate torn writes
        torn_write_enabled: bool = true,
    };

    pub fn read(self: *SimulatedStorage, block_id: u64) !Block {
        // Simulate read error
        if (self.prng.chance(self.config.read_error_rate)) {
            return error.ReadError;
        }

        const block = self.data.get(block_id) orelse return error.NotFound;

        // Simulate corruption
        if (self.prng.chance(self.config.corruption_rate)) {
            var corrupted = block;
            const bit_position = self.prng.range(0, block.data.len * 8 - 1);
            const byte_idx = bit_position / 8;
            const bit_idx: u3 = @intCast(bit_position % 8);
            corrupted.data[byte_idx] ^= (@as(u8, 1) << bit_idx);
            return corrupted;
        }

        return block;
    }

    pub fn write(self: *SimulatedStorage, block_id: u64, block: Block) !void {
        // Simulate write error
        if (self.prng.chance(self.config.write_error_rate)) {
            return error.WriteError;
        }

        // Add to pending (not yet durable)
        self.pending_writes.append(.{
            .block_id = block_id,
            .block = block,
        }) catch unreachable;
    }

    pub fn fsync(self: *SimulatedStorage) !void {
        // Move pending writes to durable storage
        for (self.pending_writes.items) |write| {
            self.data.put(write.block_id, write.block) catch unreachable;
        }
        self.pending_writes.clearRetainingCapacity();
    }

    pub fn simulateCrash(self: *SimulatedStorage) void {
        // Decide which pending writes survive
        var survivors = std.ArrayList(PendingWrite).init(self.pending_writes.allocator);

        for (self.pending_writes.items) |write| {
            if (!self.prng.chance(self.config.crash_lose_pending)) {
                // This write survived the crash
                if (self.config.torn_write_enabled and self.prng.chance(0.1)) {
                    // Torn write - partial data written
                    var torn = write;
                    const tear_point = self.prng.range(0, torn.block.data.len);
                    @memset(torn.block.data[tear_point..], 0);
                    survivors.append(torn) catch unreachable;
                } else {
                    survivors.append(write) catch unreachable;
                }
            }
        }

        // Apply survivors
        for (survivors.items) |write| {
            self.data.put(write.block_id, write.block) catch unreachable;
        }

        self.pending_writes.clearRetainingCapacity();
    }
};

The Simulation Harness

/// Main simulation harness - runs millions of deterministic simulations
pub const Simulator = struct {
    seed: u64,
    prng: PRNG,
    time: Time.Simulated,
    network: SimulatedNetwork,
    storage: []SimulatedStorage,
    nodes: []Node,
    invariant_checker: InvariantChecker,
    stats: SimulationStats,

    pub fn init(seed: u64, node_count: usize) Simulator {
        var prng = PRNG.init(seed);
        var time = Time.Simulated{};

        return .{
            .seed = seed,
            .prng = prng,
            .time = time,
            .network = SimulatedNetwork.init(&prng, &time),
            .storage = allocateStorages(node_count, &prng),
            .nodes = allocateNodes(node_count),
            .invariant_checker = InvariantChecker.init(),
            .stats = .{},
        };
    }

    /// Run simulation for given number of ticks
    pub fn run(self: *Simulator, max_ticks: u64) SimulationResult {
        while (self.time.current_tick < max_ticks) {
            // Process all events at current tick
            while (self.time.processNextEvent()) |event| {
                self.processEvent(event);

                // Check invariants after every state change
                if (self.invariant_checker.check(self.nodes)) |violation| {
                    return .{
                        .outcome = .invariant_violation,
                        .seed = self.seed,
                        .tick = self.time.current_tick,
                        .violation = violation,
                    };
                }
            }

            // Random fault injection
            self.maybeInjectFault();

            // Advance time
            self.time.advanceTo(self.time.current_tick + 1);
            self.stats.ticks_simulated += 1;
        }

        return .{
            .outcome = .success,
            .seed = self.seed,
            .tick = self.time.current_tick,
            .stats = self.stats,
        };
    }

    fn maybeInjectFault(self: *Simulator) void {
        // Network partition
        if (self.prng.chance(0.001)) {
            const partition_size = self.prng.range(1, self.nodes.len / 2);
            var partition = std.ArrayList(NodeId).init(allocator);
            // Randomly select nodes for partition
            for (0..partition_size) |_| {
                partition.append(@intCast(self.prng.range(0, self.nodes.len - 1))) catch {};
            }
            self.network.injectPartition(partition.items);
            self.stats.partitions_injected += 1;
        }

        // Node crash
        if (self.prng.chance(0.0001)) {
            const node_id = self.prng.range(0, self.nodes.len - 1);
            self.crashNode(@intCast(node_id));
            self.stats.crashes_injected += 1;
        }

        // Disk corruption
        if (self.prng.chance(0.00001)) {
            const node_id = self.prng.range(0, self.nodes.len - 1);
            // Corruption happens in storage simulation
            self.stats.corruptions_injected += 1;
        }
    }

    fn crashNode(self: *Simulator, node_id: NodeId) void {
        // Simulate crash: lose in-memory state, maybe lose pending writes
        self.storage[node_id].simulateCrash();
        self.nodes[node_id].restart();
    }

    fn processEvent(self: *Simulator, event: Event) void {
        switch (event.kind) {
            .message_delivery => {
                self.nodes[event.to].receiveMessage(event.message);
            },
            .timeout => {
                self.nodes[event.node].handleTimeout(event.timeout_id);
            },
            .heal_partition => {
                for (event.nodes) |a| {
                    for (event.nodes) |b| {
                        self.network.partitions.remove(.{ .a = a, .b = b });
                    }
                }
            },
        }
    }
};

/// Run millions of simulations with different seeds
pub fn runSimulationCampaign(config: CampaignConfig) CampaignResult {
    var results = CampaignResult{};

    var seed: u64 = config.starting_seed;
    while (seed < config.starting_seed + config.num_simulations) : (seed += 1) {
        var sim = Simulator.init(seed, config.node_count);
        const result = sim.run(config.ticks_per_simulation);

        if (result.outcome != .success) {
            results.failures.append(.{
                .seed = seed,
                .tick = result.tick,
                .violation = result.violation,
            }) catch {};
        }

        results.total_ticks += result.tick;
        results.simulations_run += 1;

        if (results.simulations_run % 10000 == 0) {
            std.debug.print("Completed {} simulations, {} failures\n", .{
                results.simulations_run,
                results.failures.items.len,
            });
        }
    }

    return results;
}

Invariant Checking

/// Invariant checker - validates system correctness after every operation
pub const InvariantChecker = struct {
    /// All invariants that must hold
    pub fn check(self: *InvariantChecker, nodes: []Node) ?Violation {
        // Invariant 1: Consensus safety - no two nodes disagree on committed values
        if (self.checkConsensusSafety(nodes)) |v| return v;

        // Invariant 2: Replication - committed data exists on quorum
        if (self.checkReplication(nodes)) |v| return v;

        // Invariant 3: Monotonicity - committed log only grows
        if (self.checkMonotonicity(nodes)) |v| return v;

        // Invariant 4: Linearizability - operations appear atomic
        if (self.checkLinearizability(nodes)) |v| return v;

        return null;
    }

    fn checkConsensusSafety(self: *InvariantChecker, nodes: []Node) ?Violation {
        // For each log index, all nodes must agree on committed value
        var max_commit_index: u64 = 0;
        for (nodes) |node| {
            max_commit_index = @max(max_commit_index, node.commit_index);
        }

        for (0..max_commit_index) |index| {
            var reference_value: ?Entry = null;

            for (nodes, 0..) |node, node_id| {
                if (node.commit_index > index) {
                    const entry = node.log.get(index);

                    if (reference_value) |ref| {
                        if (!std.mem.eql(u8, &entry.data, &ref.data)) {
                            return Violation{
                                .kind = .consensus_disagreement,
                                .message = "Nodes disagree on committed value",
                                .index = index,
                                .nodes = .{ node_id, 0 },  // First disagreement
                            };
                        }
                    } else {
                        reference_value = entry;
                    }
                }
            }
        }

        return null;
    }

    fn checkLinearizability(self: *InvariantChecker, nodes: []Node) ?Violation {
        // Track operation history and verify linearizability
        // This requires a history of all operations and their results
        // Using a linearizability checker like Jepsen's Knossos

        const history = self.buildOperationHistory(nodes);

        if (!isLinearizable(history)) {
            return Violation{
                .kind = .linearizability,
                .message = "Operation history is not linearizable",
                .history = history,
            };
        }

        return null;
    }
};

Time Compression Demonstration

# Conceptual demonstration of time compression value

def time_compression_analysis():
    """
    Why deterministic simulation is so powerful.
    """

    # Real-world testing
    real_time = {
        'ticks_per_second': 1,
        'test_hours_per_day': 8,
        'test_days_per_year': 250,
        'ticks_per_year': 8 * 3600 * 250,  # 7.2M ticks/year
    }

    # Deterministic simulation (TigerBeetle achieves ~1M ticks/second)
    simulation = {
        'ticks_per_second': 1_000_000,
        'seconds_to_simulate_year': real_time['ticks_per_year'] / 1_000_000,
        # 7.2 seconds to simulate a year of real testing
    }

    # Bug that occurs once per million operations
    rare_bug = {
        'occurrence_rate': 1 / 1_000_000,
        'real_time_to_find': '~139 days of continuous testing',
        'simulation_time_to_find': '~1 second',
    }

    # Run 1000 different seeds
    coverage = {
        'seeds': 1000,
        'ticks_per_seed': 10_000_000,
        'total_ticks': 10_000_000_000,
        'real_time_equivalent': '1,389 years of testing',
        'simulation_time': '~3 hours',
    }

    return {
        'compression_ratio': simulation['ticks_per_second'] / real_time['ticks_per_second'],
        'years_simulated_per_hour': 500,  # Approximate
        'reproducibility': 'Perfect - same seed = same execution',
    }

Mental Model

TigerBeetle approaches testing by asking:

  1. Can I reproduce this? If not, make it deterministic
  2. Am I testing time? Compress it—simulate years in seconds
  3. Am I testing failure? Inject it—don't wait for it
  4. Am I checking invariants? Every operation, not just at the end
  5. How many scenarios? Millions, not hundreds

The Simulation Checklist

□ All non-determinism abstracted (time, network, disk, random)
□ PRNG seeded and reproducible
□ Time is injectable and compressible
□ Network failures simulated (partition, loss, reorder, duplicate)
□ Disk failures simulated (crash, corruption, torn writes)
□ Invariants checked after every state transition
□ Simulation faster than real-time (1M+ ticks/sec target)
□ Millions of seeds tested, not dozens
□ Any failure reproducible with just the seed
□ Bug report includes seed for exact reproduction

Signature TigerBeetle Moves

  • VOPR (Viewstamped Operation Replication tester)
  • Time compression (years in minutes)
  • Deterministic single-threaded simulation
  • Seed-based perfect reproducibility
  • Continuous invariant checking
  • Simulated network partitions and message loss
  • Crash recovery testing with torn writes
  • Million-seed simulation campaigns

平台分布

Codex

34.46%
按下载量换算38

Claude

28.65%
按下载量换算31

Cursor

19.72%
按下载量换算21

Gemini CLI

9.63%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills