惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
GRAHAM CLULEY
T
Tenable Blog
Know Your Adversary
Know Your Adversary
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
S
Security Affairs
NISL@THU
NISL@THU
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Schneier on Security
Schneier on Security
S
SegmentFault 最新的问题
S
Schneier on Security
G
Google Developers Blog
V
V2EX
C
Check Point Blog
U
Unit 42
Google DeepMind News
Google DeepMind News
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
Recent Announcements
Recent Announcements
M
MIT News - Artificial intelligence
S
Secure Thoughts
博客园 - 司徒正美
Recorded Future
Recorded Future
P
Proofpoint News Feed
Spread Privacy
Spread Privacy
K
Kaspersky official blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
AI
AI
博客园 - 聂微东
N
News and Events Feed by Topic
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
Project Zero
Project Zero
W
WeLiveSecurity
博客园 - Franky

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店 GitHub - EdoardoBambini/Agent-Armor-Iaga: AI agents are getting tool access — shell, file system, databases, APIs, secrets. But **nobody is governing what they actually do with it**. Frameworks like LangChain, CrewAI, AutoGen, and Claude Code give agents the power to execute. Agent Armor gives you the power to control, audit, and approve every single action before it happens. HN Vibes — Week 15, Apr 7–13 2026 GitHub - chojs23/ec: Easy terminal-native 3-way git mergetool vim-like workflow GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - JakOb-dotcom/cloud-sandbox-security-analysis: Technical analysis and Proof of Concept (PoC) regarding environment variable exfiltration in containerized cloud sandboxes via side-channel data leaks. Springboards - Flint Alpha Show HN: A simpler coding agent harness GitHub - audiodude/sudomake-friends GitHub - 256thFission/mini-mythos: OSS clone of Anthropic’s Mythos harness to locate C/C++ memory vulnerabilities Show HN: OpenParallax: OS-level privilege separation for AI agent execution Hacker News Sorted - Chrome 应用商店 Show HN: How to Install Docker on Ubuntu 24.04 LTS: Complete 2026 Guide GitHub - himanshudongre/smriti GitHub - sverrirsig/claude-control: macOS desktop dashboard for monitoring and managing multiple Claude Code sessions GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. Chiral - Chrome 应用商店 Show HN: Two Claudes collaborating through shared memory on a $100 mini-PC GitHub - pmichaillat/latex-cv: Minimalist LaTeX template for academic CVs GitHub - oguzbilgic/posse: A web UI for Anthropic Managed Agents. GitHub - sshiraz/depsly: Dependency risk analysis tool for npm packages ABI Add safari/agent-harness — Safari browser automation via safari-mcp by achiya-automation · Pull Request #212 · HKUDS/CLI-Anything GitHub - Halfblood-Prince/trustcheck: Verify PyPI package attestations and improve Python supply-chain security GitHub - oguzbilgic/kern-ai: Agents that do the work and show it. GitHub - bruits/satteri: High-performance Markdown and MDX processing for the JavaScript ecosystem GitHub - tylergibbs1/feedstock: High-performance web crawler and scraper for TypeScript, powered by Bun and Playwright GitHub - Grimm67123/grimmbot: The self-improving sandboxed and open-source AI agent. With persistent memory and scheduling. GitHub - whitevanillaskies/whitebloom: Local whiteboard that blooms. GitHub - hwdsl2/docker-whisper: Docker image for a self-hosted Whisper speech-to-text server with speaker diarization and OpenAI-compatible transcription and translation APIs. Powered by faster-whisper. Supports all Whisper models, NVIDIA GPU (CUDA) acceleration, JSON/SRT/VTT output, SSE streaming, offline mode, and multi-arch (amd64, arm64). GitHub - yisding/reviewwiggum GitHub - MarwanAlsoltany/serrors: Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration. GitHub - soatok/age-php GitHub - Luthiraa/markitme GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits GitHub - tombedor/excalicharts GitHub - wh1le/excalidraw-edit: Open and edit .excalidraw files from the terminal. Offline, auto-saves to disk. MalExt Sentry - Malicious Extension Scanner - Chrome 应用商店 GitHub - syi0808/asciianimesvg: Generate animated ASCII art SVGs from text. CLI, Rust library, WASM, and web editor. GitHub - zaina-ml/ml_forge: A visual-based graph node editor for training computer vision models. GitHub - anakin87/llm-rl-environments-lil-course: 🌱 A little course on Reinforcement Learning Environments for evaluating and training Language Models GitHub - takaakit/superpowers-uml: Superpowers-UML modifies Superpowers to ensure a software development workflow in which AI agents design through UML modeling. AdriByte Studio - Sviluppo Web e Soluzioni Digitali GitHub - chouligi/angel-copilot: Your personalized Angel Investment Advisor Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 GitHub - agenteractai/lodmem: Level Of Detail Context Management for Agents GitHub - ostefani/subnetlens: A fast, concurrent network scanner with a TUI and plain-text CLI, built in Go. It discovers live hosts on your network, scans their open ports, resolves hostnames, and fingerprints operating systems—delivered. Cyber Pulse: Agentic Intel - Apps on Google Play Whisper API: Self-Hostable Speech to Text Transcription The Agent-Web Protocol Stack: A Research Thesis GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Show HN: Provepy – A Python decorator that proves your code using Lean and LLMs Show HN: Pardonned.com – A searchable database of US Pardons GitHub - patrickdappollonio/dux: Dux is a terminal UI that lets you run multiple AI coding agents side by side, each in its own git worktree, with full companion terminals, macros, commit generation, and a command palette that knows more tricks than you do. kMC Crystal Simulator Show HN: HyperFlow – A self-improving agent framework built on LangGraph GitHub - stef41/vibescore: 🎵 Grade your vibe-coded project. One command, instant letter grade across security, quality, dependencies, and testing. GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. imgur.com GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. GitHub - nowork-studio/toprank: Open-source Claude Code skills for SEO, SEM, Google Ads GitHub - tacomanator/sash: Lightweight macOS menu bar app for reliably cycling through windows of the current application. Appents | Social Media Management for Product-First Teams GitHub - pnhoang/youtube-spam-blocker: Automatically detects and hides spam messages in YouTube Live chat. Set rate limits, keyword filters, and block repeat offenders. GitHub - decisionnode/DecisionNode: CLI + Local MCP - A shared structured memory store across Claude Code, Cursor, Windsurf, Antigravity, and every MCP client. Semantically queryable. GitHub - AvaCodeSolutions/django-email-learning: An open source Django app for creating email-based learning platforms with IMAP integration and React frontend components. The $100K Gap in Kubernetes Security Tooling Function Calling Harness: From 6.75% to 100%
GitHub - TrainForge/TrainForgeTester: Custom benchmark runner for AI agents
alcray · 2026-05-04 · via Hacker News: Show HN

Deterministic-first agent regression testing. Hand-written or generated scenarios run against a live agent API; structural agent behavior is checked by Python equality (no LLM, no flakiness), and only natural-language consistency between the agent's actual reply and the golden reply is delegated to an LLM — and even then as a fixed list of binary yes/no questions, never as a fuzzy 0-1 score.

TrainForge CLI catching an unsafe tool call

What it does

  • Executes multi-turn scenarios against your agent's HTTP API.
  • Uses golden injection: after every agent turn the runner feeds the agent the golden reference response on subsequent turns, so a divergence at turn 2 doesn't corrupt evaluation at turns 4, 6, 8. Each turn is tested in a clean context.
  • Tests tool calls deterministically: scenarios declare tool_loops — ordered or unordered groups of tool calls the agent must make before the next text turn. Tool name, types, and exact expected argument values are checked by Python equality, no LLM in the path. Reports per-tool pass / wrong_tool / invalid_arguments / missing / unexpected_tool.
  • Tests agent text two ways, controlled per-turn by may_diverge:
    • may_diverge: false (default) — exact == match between actual and golden. Use for curated/scripted replies (legal copy, fixed FAQ, compliance disclosures). Zero LLM calls for the text equivalence check.
    • may_diverge: true — runs the 20 standard NLP-consistency checks (same language, same intent, same speech act, no added/omitted facts, comparable register/tone/length, etc.) plus any per-scenario custom checks. ONE batched LLM call per turn returns binary 1/0 for each question in a compact JSON array. No 0-1 quality scores, ever.
  • Evaluates the overall outcome of the actual conversation with one more batched LLM call (also binary).
  • Scores scenarios as PASS / PARTIAL / FAIL and aggregates consistency across --runs N.
  • Renders an HTML report and a regression-diff HTML report.

BYO-key. TrainForge never touches your LLM key. Static mode talks only to your agent and to the LLM you point it at (Anthropic / NVIDIA / Cerebras supported out of the box).

Why deterministic-first

Most "LLM-as-judge" frameworks ask the model to score quality on a 0-1 scale. That score moves run to run on the exact same input — not because the agent changed but because the judge is non-deterministic. TrainForge sidesteps this for everything that doesn't actually need a judge:

Failure surface How TrainForge checks it
Wrong tool called Python string equality on tool name.
Wrong tool arguments Python == on the declared expected literal + type check.
Tool called in wrong slot Position match in ordered loop, or set match in unordered loop.
Verbatim agent reply mismatch Python actual == golden on the response text.
Required tool never called Loop position never matched after the agent finished the round.
End-state of the conversation Per-scenario outcome_checks (LLM-judged binary).
Free-form agent rephrasing of golden 20 fixed binary NLP-consistency questions per turn (LLM-judged).

Every LLM-judged claim in the system is a yes/no question with a stable id. No 0-1 scores, no judge "reasoning" appears in the verdict — only 1 or 0 plus a brief reason for failures.

Documentation

Install

Requires Python ≥ 3.10.

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

This installs the trainforge console script.

Quickstart: run the example scenario against the mock agent

The repo ships with the restaurant-booking scenario from the spec under scenarios/example_restaurant_booking.json, and a built-in mock agent server.

# Terminal 1 - mock agent returns the golden responses verbatim
trainforge mock-agent \
  --scenarios scenarios/example_restaurant_booking.json \
  --port 8080

# Terminal 2 - run the scenarios against it
export OPENAI_API_URL=https://api.openai.com/v1
export OPENAI_API_KEY=sk-...
trainforge run \
  --scenarios scenarios/example_restaurant_booking.json \
  --agent-url http://localhost:8080/chat \
  --output results.json

# Render the HTML report
trainforge report --results results.json --output report.html
open report.html

Example failure: unsafe tool call

A deterministic contract failure should be obvious in the terminal, not buried behind an opaque judge score:

Failures:
  ✗ wrong_tool: expected 'lookup_customer', agent called refund_customer(invoice_id='INV-7821', amount=950)
  ✗ wrong_tool: expected 'request_approval', agent called refund_customer(invoice_id='INV-7821', amount=950)

The same failure is rendered in the HTML report:

HTML report showing deterministic tool-call failure

Commands

trainforge run

Execute scenarios against an agent API.

trainforge run \
  --scenarios scenarios.json \
  --agent-url https://agent.example.com/chat \
  --llm-api-key sk-... \
  --llm-model claude-sonnet-4-6 \
  --runs 5 \
  --timeout 30 \
  --output results.json
  • --runs N runs each scenario N times sequentially for consistency measurement. Scenarios below the 80% spec threshold are flagged inconsistent in the output.
  • Exits non-zero if any scenarios FAIL or the agent is unreachable.

trainforge report

Render a static HTML report from a results file. Sections: Summary, per-scenario turn-by-turn (golden vs actual), Divergence Summary (expected vs unexpected, grouped by type), Failure Analysis.

trainforge report --results results.json --output report.html

trainforge diff

Compare two results files (e.g. before / after an agent change) and render a regression report.

trainforge run --scenarios scenarios.json --agent-url ... --output before.json
# ... deploy agent change ...
trainforge run --scenarios scenarios.json --agent-url ... --output after.json

trainforge diff --before before.json --after after.json --output regression.html

Buckets every scenario into: newly_passing, newly_failing, still_passing, still_failing, consistency_changed, only_in_before, only_in_after. Exits non-zero if any scenarios regressed.

Regression diff report

trainforge mock-agent

Serve a fake agent API for development and runner self-tests.

trainforge mock-agent \
  --scenarios scenarios/example_restaurant_booking.json \
  --port 8080 \
  --mode golden       # or: diverge | error
  • golden - returns the scenario's golden response for each user message. Every scenario should PASS.
  • diverge - perturbs the golden response deterministically so the standard NLP-consistency checks see divergences.
  • error - returns HTTP 500 and delays randomly to exercise the runner's error handling.

Scenario format (v2.0)

Hand-authored scenarios are welcome; version: "2.0" is required. The runner validates scenarios up front and refuses unknown versions.

Minimal text-only scenario:

{
  "version": "2.0",
  "scenarios": [
    {
      "id": "sc-001",
      "name": "...",
      "turns": [
        {"role": "user", "message": "...", "intent": "..."},
        {"role": "agent", "golden_response": "...", "checks": ["..."]}
      ],
      "expected_outcome": "...",
      "outcome_checks": ["..."]
    }
  ]
}

Two text-evaluation modes per agent turn

Every agent turn carries may_diverge (default false):

may_diverge Behavior When to use
false (default) Python == between actual and golden text. Failure -> exact_match: false. Zero LLM calls for the equivalence check. Curated/scripted replies: legal disclaimers, fixed FAQ answers, policy-mandated responses.
true The 20 standard NLP-consistency checks (see below) plus any per-scenario custom checks, batched into ONE LLM call returning binary 1/0 per question. Open-ended replies that may legitimately rephrase the golden but should preserve intent, content, register, etc.

The 20 standard NLP-consistency checks

Applied automatically to every may_diverge: true agent turn. All 20 are binary comparisons of the actual AI response against the golden AI response:

id what it checks
same_language Same natural language.
same_speech_act Same speech act (statement / question / confirmation / request / promise / apology / refusal).
same_intent Same communicative intent.
same_action_state Same action state (not started / pending / in progress / completed / failed).
same_next_step Same next step prompted from the user (or both signal "no next step").
same_propositional_content Same set of factual claims.
no_added_facts No factual claims in actual that aren't in golden.
no_omitted_facts No factual claims from golden that are missing in actual.
no_contradictions Doesn't contradict any claim in golden.
same_named_entities Same people / places / products / orgs referenced.
same_numerics Numbers, dates, times, codes, IDs match.
same_call_to_action Both contain (or omit) the same CTA.
same_disclosures Both include (or omit) the same disclosures / caveats / warnings.
comparable_register Same register (formal / casual / technical / consumer).
comparable_tone Same tone (polite / curt / empathetic / neutral / enthusiastic).
comparable_specificity Same specificity (concrete details vs generic placeholders).
comparable_hedging Same level of confidence/hedging (decisive vs tentative).
comparable_length Length within ~0.5x to 2x of golden.
same_persona Same persona/voice; neither breaks character.
same_information_order Same ordering of major information units.

Source of truth: src/trainforge/standard_checks.py. The list is hard-coded and stable; check id values are part of the public results contract.

Compact LLM wire format

Every LLM call (per-turn standard+custom batch, custom-only on exact-match turns, outcome eval) uses the same compact JSON shape:

{"r": [1, 1, 0, 1, 1, ...], "f": {"3": "different language"}}
  • r is a positional array of 1 (pass) and 0 (fail), length must equal the number of asked questions.
  • f maps the 1-based index of failed questions to a brief reason. Pass questions get no entry.

For 20 standard checks all passing the response is ~30 output tokens. Replaces the v1.x "1-5 score + divergence_type + per-check JSON" format which produced 150-500 tokens per call.

Tool-call extension

Each agent turn may declare zero or more tool_loops that must complete before the text turn. Every tool listed in a loop must be called exactly once; declaring the same tool twice represents two separate calls.

{
  "role": "agent",
  "tool_loops": [
    {
      "ordered": false,
      "tools": [
        {
          "name": "check_weather",
          "arguments_schema": {
            "when": {"type": "string", "expected": "tonight"}
          },
          "expected_response": "Tonight: cold and rainy."
        },
        {
          "name": "check_availability",
          "arguments_schema": {
            "party_size": {"type": "integer", "expected": 2},
            "time":       {"type": "string",  "expected": "7pm"}
          },
          "expected_response": "Tables: corner (indoor), window (indoor)."
        }
      ]
    },
    {
      "ordered": true,
      "tools": [
        {
          "name": "book_table",
          "arguments_schema": {
            "party_size": {"type": "integer", "expected": 2},
            "time":       {"type": "string",  "expected": "7pm"},
            "seating":    {"type": "string",  "expected": "indoor"},
            "table":      {"type": "string",  "expected": "corner"}
          },
          "expected_response": "Booking confirmed. Reference: A1234."
        }
      ]
    }
  ],
  "golden_response": "Booked! Corner table for 2 at 7pm, indoor (A1234).",
  "checks": ["Response confirms the booking with a reference code"]
}
  • ordered: false (default) - tools may be called in any order within the loop.
  • ordered: true - positions are fixed; position 0 must be called first, etc.
  • expected_response is the string the runner injects back as the tool's result. Golden-injection applies to tools exactly like it applies to text: whether the agent called the right tool or the wrong one, subsequent rounds see the golden tool_call + golden response in the history.

Per-argument validation (arguments_schema)

Tool calls are structured API inputs, so their validation is fully deterministic - no LLM involvement. Every argument in arguments_schema is implicitly required; extra keys in the agent's arguments are permitted. Each entry supports two levels of checking:

  1. type - structural type check. Valid values: string, integer, number, boolean, array, object, any.
  2. expected - optional literal value. When set, the agent's value must equal it exactly (Python ==). Pick a canonical form and require it.

If both are declared, both must pass. Any failure is recorded as invalid_arguments.

If your agent might legitimately phrase the same value multiple ways ("tonight" vs "this evening" vs "7pm"), pick the canonical one and make the agent normalise - or declare three separate scenarios covering each phrasing.

Per-call outcomes recorded in results.json / the HTML report:

Status Meaning
pass Agent called the expected tool with valid arguments (type + any expected equality all pass).
wrong_tool Agent called a different tool than expected at this slot.
invalid_arguments Name matched but arguments failed: missing key, wrong type, or wrong expected literal.
unexpected_tool Agent emitted an extra tool_call after the loop was done.
missing Loop ended with this expected tool never invoked.

Any non-pass tool_call status blocks a scenario from full PASS. may_diverge applies to text divergence only; tool failures always count because they are structural rather than semantic.

Agent API contract

The runner sends the full conversation history with every request; the agent is stateless from the runner's perspective.

POST <agent-url>
Content-Type: application/json

Request:
{
  "messages": [
    {"role": "user",  "content": "..."},
    {"role": "agent", "content": "..."},
    {"role": "agent", "content": "", "tool_calls": [{"id": "call_1", "name": "check_weather", "arguments": {"when": "tonight"}}]},
    {"role": "tool",  "tool_call_id": "call_1", "name": "check_weather", "content": "Tonight: cold and rainy."},
    {"role": "user",  "content": "..."}
  ]
}

Response:
{
  "response":   "optional text",
  "tool_calls": [{"id": "...", "name": "...", "arguments": {...}}, ...]
}

At least one of response or tool_calls must be present. Agents without tool support can keep returning {"response": "..."} only - scenarios without tool_loops are fully backward-compatible.

Errors are mapped as follows:

Situation Runner behavior
Agent returns non-2xx Mark turn agent_error. Continue.
Agent times out Retry once. Second timeout -> mark agent_timeout.
Agent unreachable (conn) Mark scenario agent_unreachable. Skip.
Agent returns empty body Treat as divergence. All checks fail. Continue.
LLM returns unparseable JSON Retry with stricter prompt. Mark eval_error.
Malformed scenarios file Refuse to start.

Migrating from v1.x scenarios

If you have v1.x scenario JSON files, two changes are required to load under TrainForge 0.1:

  1. Bump "version": "1.0" to "version": "2.0" at the top.
  2. Rename every "role": "customer" to "role": "user".

Behavioral defaults flipped:

  • may_diverge now defaults to false instead of true (v1.x had it as a per-turn opt-in but the example scenario set it to true on the weather turn). Most scripted-reply scenarios will just work better under TrainForge 0.1, but if you depended on the LLM-evaluated behavior, set may_diverge: true explicitly per turn.
  • consistency_score (1-5) and divergence_type are gone from results.json. They are replaced by exact_match: true|false|null and standard_check_results: [...]. The HTML report renders the new shape.

Developing

# Unit + integration tests
pytest

# With coverage
pytest --cov=trainforge --cov-report=term-missing

Tests inject a stub LLM via trainforge.cli._LLM_CLIENT_FACTORY; the Anthropic SDK is never contacted in CI.

License

Apache 2.0