
falsepass
io.github.Super-Eric由 GitHub 帳號 Super-Eric 發布v0.14.0更新於 Nov 7, 2026
Find RL environment graders that pay wrong answers: probes reward code, returns reproducible leads
概覽
透過 stdio 提供 falsepass,讓助理探測強化學習環境的評分器與獎勵函式,找出誤判通過與誤判失敗。
- 可以做什麼
- 初始化並執行對強化學習環境、獎勵函式、OpenEnv 空間、Inspect AI 任務與 HUD 環境的稽核
- 查詢稽核狀態並讀取結果,包括完整檢視單一完成內容
- 對原始碼做靜態掃描,並找出近期維護的 Hub 環境
- 衡量某個失敗探針涵蓋多少任務,並產生獨立的重現腳本
- 草擬候選問題報告,並將環境與其上游儲存庫比對
- 用已保存的重現腳本驗證修補
- 適用情境
- 適合在建置或審查強化學習環境、獎勵函式或基準評分器時,想在訓練之前找出錯誤答案也能拿到獎勵的漏洞。也適合環境作者在發布前自我檢查,以及需要執行稽核而不被用戶端逾時中斷的代理。
- 執行需求
- 以 stdio 在本機執行,透過 uvx 從帶 mcp 附加項的 falsepass 套件啟動。需要 PATH 中有 uv 以及 Python 3.11 或更新版本;每次稽核都在獨立的臨時虛擬環境中執行。取得 Hub 環境、Hugging Face 資料集與上游儲存庫需要網路;載入時需要登入或 API 金鑰的資料集,缺少該金鑰就無法稽核。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 falsepass,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
falsepass
English | 中文
[CI] [License: Apache-2.0] [PyPI] [Python 3.11+]
Probe RL environment verifiers for false passes (a known-bad completion is rewarded) and false fails (a known-good completion is not).
Website and docs: https://super-eric.github.io/falsepass/ · write-up: Your reward function is an assertion
In one public environment, echoing the question back earned full reward on every task: each question listed all of its candidate answers, and the grader only checked that the right one appeared somewhere in the reply, so a policy could collect full reward by listing everything. falsepass finds this kind of hole before training does.
[falsepass demo: a planted grading defect found from two sides]
An RL environment is a task dataset plus a verifier that turns a model's output into
reward. falsepass treats that verifier as the system under test: it calls the
environment's own reward code on completions whose correctness is known in advance and
reports every disagreement. No model, no rollouts, no GPU.
It works with four frameworks and with plain reward functions, published or still in a local folder:
Install
Needs uv on the PATH (every audit runs in its own throw-away virtualenv) and Python 3.11 or newer.
Quick start
demo writes the toy environment to ./falsepass-demo and audits it. Its grader pays
when the reference appears anywhere in the answer, and the summary shows that one line
from several sides: the static scan points at it, and the probes that list several
answers (P5), retract the answer (P9) or deny it inside the answer slot (P15) are paid.
A condensed excerpt of the real output (full file: examples/toy-env/summary.md):
Reward functions (TRL GRPOTrainer style)
Many graders are not packaged as an environment: a training script defines functions such
as accuracy_reward(completions, solution, **kwargs) and hands them to GRPOTrainer with a
dataset. falsepass calls each function the way the trainer does, one completion at a time,
with every dataset column as a keyword argument (prompts, completions, completion_ids,
trainer_state, log_extra, log_metric too), and sums the results with their weights, a
None counting as nothing. A completion is a one-message list when the dataset's prompts are
conversations or a function reads completion[0]["content"], else text. The reference column
is the one a function names (solution), else answer, solution, ground_truth, ...
(--answer-column to choose); a worked solution is reduced to its last \boxed{} or what
follows #### for the probes, while the functions always receive the column as it is. The
dataset is a .jsonl/.json/.csv/.parquet file, hf:owner/name (streamed through
datasets), or call:function in the file. The file's third-party imports are installed
for the audit (--with adds, --without drops). examples/reward-toy/ has one planted defect.
OpenEnv
An OpenEnv environment computes its reward in step(), so falsepass drives the
environment class the way a session on its server does: reset() to a task, then step()
with the reply as the action, in-process, with the Space's own requirements installed and no
Docker. (The server's HTTP /reset and /step routes build a fresh environment per request,
so they cannot grade a reset followed by a step.) Tasks: audits/<name>/tasks.json lists the
keyword sets reset() is called with (most environments pick a task through task_id,
task_name, difficulty or a seed; each set may carry an answer), else the Task API when
the environment implements it, else repeated reset() calls, one task per distinct prompt;
an environment that draws a task at random is reset again until the recorded one comes up.
Without a reference answer only the answer-free probes run. A plain reply goes into the
action's free-text field; other required fields (a decision enum, a flag) are filled with a
constant, and O1 plays every value of such a decision field (a fixed strategy, reported as
the lazy-policy reward) while O2 moves a self-reported field (confidence, score) between
its minimum and maximum. A reply that is a JSON object naming the action's fields is the
action itself: an adapter, or an answers file of such objects, fills several fields that way.
examples/openenv-toy/ has one planted defect to try.
Inspect AI and HUD
Inspect: the scripted model replaces only the call to generate(); prompt templates,
system messages and answer parsing (multiple_choice()) are the task's own code. A
solver or scorer that calls a model itself (self-critique, model_graded_qa) is flagged
on every row instead of being scored. Tasks that need a sandbox are not supported.
HUD: a task template keeps its expected answer inside the grader, so without
--answers only answer-free probes run: an empty reply, the prompt echoed back, and
replies that list every integer from 0 to 1000, every letter, yes/no words or the
prompt's words (A1; it also runs, with every other probe, when answers are given). A
grader that pays those is a substring test in practice. The answers file is JSON: an
object from task slug to answer ({"add-2-3": "5"}) or a list in task order
(["5", "12"]). To add answers to an existing audit, rerun init with --force.
examples/inspect-toy/ and examples/hud-toy/ each have one planted defect to try.
For environment authors: check before you publish
Run falsepass init ./your-env && falsepass audit your-env locally, or add the GitHub
Action to the environment's repository so every push is checked:
The step summary shows the probe table. Gate names: ceiling (highest reward any
known-bad completion got), lazy (best average reward of one fixed strategy that never
uses the answer), false_fail (share of correct answers refused), errors. Datasets that
need a login or an API key at load time cannot be audited in CI without that secret.
For coding agents
- MCP server.
falsepass mcpserves the commands as tools (falsepass_scan,_init,_audit,_audit_status,_results,_completion,_reach,_repro,_draft,_upstream,_verify_fix,_discover) over stdio. Audits run in the background, so a client's tool-call timeout never cuts one off; failures come back as tool errors with the reason. Any MCP client starts it withuvx --from "falsepass[mcp]" falsepass mcp; in Claude Code, for example:claude mcp add falsepass -- uvx --from "falsepass[mcp]" falsepass mcp. - Skill. skills/falsepass/SKILL.md is a ready-made audit procedure in the Agent
Skills format: how to run an audit, how to tell a defect from a design choice, and how
to write it up for a maintainer. Copy the folder into the agent's skills directory
(for Claude Code,
~/.claude/skills/). - Plain CLI. Every command is non-interactive and writes files;
init --json,results --jsonandscan --jsonprint JSON;results --completion IDprints one completion in full;audit --fail-on ...exits 1 when a condition is met. The output formats are described in docs/OUTPUT.md.
Whatever drives it, the output is a list of leads. An agent should reproduce a lead and read the reward code before calling it a defect, and should not report an environment as broken on the strength of a probe table.
All commands
Each audit runs in a throw-away virtualenv pinned by audits/<env>/env.toml, because
Hub environments are built for mutually incompatible verifiers versions. Output:
audits/<env>/probe-results.json and summary.md. In a clone of this repository, prefix
the commands with uv run; uv run pytest runs the kit's own tests.
Checks
Search (--search N) is a seeded beam search over chains of small named mutations.
A hit is reported as a minimised recipe, e.g. nothing + pad_think. S2 hits are
brittleness candidates and need a human eye: whether "B" in quotes should count as
B is a judgement call.
Static pre-scan runs with every audit on audits/<env>/src and on its own with
falsepass scan. Narrow AST rules, each derived from a defect found in a real audit;
every hint is printed with the verdict of the probe that tests it
(confirmed: P6 failed 25/25, not confirmed, not checked).
Adapter inference. Without an adapter.py, the answer format is found by scoring
the reference answer in each candidate format (from the parser and the prompt text) and
keeping the one the environment's own reward code pays best. Wrong answers come from the
label set, a shifted number, or another row. This covers environments with reference
answers, single- or multi-turn; tool-use and sandbox environments, and games whose rows
carry no answer, need policies: falsepass init --policies writes a skeleton (or --manual for Q&A). A tag that the
prompt uses to enclose its input (<conversation>…</conversation>) is not taken for an
answer format, and when every format scores the same the plain answer is used. As a
control, automatic mode compares the reference with an empty completion and marks the
whole result inconclusive when the reward does not separate them.
Multi-turn. Multi-turn environments are scored by running their own rollout loop
with a scripted stand-in for the model (V0RolloutScorer), so follow-up prompts, stop
conditions and per-episode state are exercised. Search mutates every turn of a script.
A script entry can also carry tool calls ({"tool_calls": [{"name": …, "arguments": {…}}]}),
which the environment executes with its real tools. Automatic mode also accepts tool-use
environments whose tools run in-process: there is no answer format to infer, so it plays
the seven T6 policies and T5 and says in the summary that no control was possible.
Policies that have to read the task to find a hole are still hand work
(falsepass.model.Policy: a function from the conversation so far to the next reply).
v1 tool and multi-turn tasksets (verifiers.v1 with tool servers, its own Env
episode loop, or a scripted user) are played as whole episodes through the taskset's own
loop, as vf-eval (vf-run from verifiers 0.4.1) runs them: its harness, tool servers, scripted user, stop conditions and
rewards (V1EpisodeScorer). The model is a local endpoint on 127.0.0.1 that answers with
the policy, so nothing is billed or uploaded. Automatic mode plays T5 and T6 this way;
falsepass init <env> --policies writes a v1 skeleton with a solver as the control, and
repro replays each recorded episode turn by turn without falsepass. The harness runs in
verifiers' subprocess runtime unless env.toml says runtime = "docker". Outside hosts are
blocked during episodes (proxies to a closed port; network = ["host"] allows one), so an
environment that registers with or posts to a live service does not act there.
Rollout check. falsepass rollout <env> sends a sample of tasks to a model behind
an OpenAI-compatible endpoint — a local Ollama server by default, so nothing is billed —
and scores the model's own replies with the same scorer the probes use. It flags rows
for reading (paid without the reference in the reply; reference in the reply but not
paid in full; paid more than the reference; cut off at the token cap) and never calls a
flag a finding. For tool-use environments the model is driven through verifiers' own
client, so it receives the tool schemas and its tool calls are executed. --endpoint,
--model and --tag run a second model next to the first.
Model-written wrong answers. falsepass propose <env> asks the model for a reply
that is on the subject and wrong, scores it, and has it rewritten a few times with the
grader's score as feedback. For closed answers the reference must not occur in the
reply (checked in code); for open-ended ones the wrongness is the model's own opinion,
so every row is something to read, not a finding.
Discovery. falsepass discover lists Hub environments updated recently with more
than one published version, and reads each wheel to say what it needs (sandbox, tools,
LLM judge, API key, reference answers). It needs the prime CLI for the listing.
--hub hf lists OpenEnv Spaces on the Hugging Face Hub instead (likes, last update, tags,
and the hf:owner/space target for init), from the public listing alone.
Three headline numbers per environment: the false-pass ceiling (highest reward any
known-bad completion received), the lazy-policy reward (best average reward of one
fixed wrong strategy across examples) and the false-fail rate (share of known-good
completions denied full reward). summary.md also shows which reward term paid on
known-bad completions.
From a probe run to a report
A probe run produces leads, not findings. To turn one into a finding:
falsepass repro <env>writes a script that depends only on verifiers and the environment package and re-scores the exact completions (kept incompletions.json). Run it twice from a clean virtualenv; the output must be identical.- Read the reward code and find the line that causes it. Decide whether it is a defect or a design choice: a grader that is exploitable on purpose is an observation.
falsepass draft <env>writesREPORT.draft.mdwith each failing probe group as a candidate, the confirmed static hints attached, and the places marked where a person has to judge. Rate what holds with docs/SEVERITY.md.- Have someone who did not write the report check every number against the stored output.
From a report to a fix upstream
falsepass upstream <env> searches GitHub for the environment's source (repositories the
package names itself in its project URLs or a github.com link in its source or docstrings,
then the package name in a pyproject.toml, then its most distinctive class and function names), compares every
audited file with the repository's default branch, line endings ignored, and prints what
a contributor needs: default branch, licence, last push, open pull requests, how many
recent merges came from outside. falsepass verify-fix <env> --source <patched folder>
reruns the stored repro with the patched package (or a patched copy of the audit's src/,
laid over the release) and prints the lines that changed, storing an unpatched baseline
first if there is none; a fix is ready when only the finding's lines move. It reruns the
repro script only; falsepass audit <env> --source <patched folder> runs the whole probe
suite on the patch.
Adding an environment
falsepass init owner/environment writes audits/<name>/env.toml (package, version,
module, index, verifiers pin — all read from the Hub wheel) and unpacks the wheel's source
into audits/<name>/src for the static scan. falsepass init ./folder does the same from a
local pyproject.toml and records the folder as source, so the folder itself is
installed and scanned on every run. An installed Inspect task (inspect_evals/gsm8k) has
no wheel to unpack: the audit copies the task's own folder and the modules of the scorers
it uses into src/ instead. For Q&A environments that is all.
Otherwise add --manual and fill in the generated adapter.py: how to load examples, how
to write an answer the way the prompt asks, and what a wrong answer looks like.
Track record
Used on a few dozen public Hub environments in October 2026. Every finding kept was reproduced twice from a clean virtualenv and confirmed by reading the reward code; fixes are being sent to the maintainers as pull requests. Individual environments and counts are not published here until those fixes are in.
Limits
- Leads need a person. The tool finds where a grader pays the wrong thing; deciding whether that is a defect, and how bad, is manual.
- Search is shallow: fixed text mutations, a few hundred scorer calls. It does not train a model against the reward.
- Container tasks have no automatic mode, and environments on hosted sandboxes or with a paid LLM judge are not covered without credentials.
- Supported frameworks: verifiers (v1 tool tasksets: generic tool policies automatically,
task-aware ones written as policies), OpenEnv (environments whose
step()grades a reply or a structured action; MCP tool environments and hand-written servers without anEnvironmentclass need policies or an adapter), Inspect AI (no sandboxed tasks) and HUD (answer-graded templates; tasks graded on what an agent did in a workspace need hand-written policies).
Related tools
- rewardlint — adversarial corpus for single
reward functions.
falsepassruns it through an environment's reward code when the reference can be substituted, and prints its verdict insummary.md. - ratctl — static and LLM-assisted scanner of environment source for sandbox exploit patterns.
- VerifierLab — attack campaigns against a wrapped grader under a declared budget, with a ground-truth oracle.
- vlabs-integrity — mutation-kill and isomorphic-relabelling audit for coding rewards with a trusted reference.
- harden-v0 — LLM hacker–fixer loop that hardens Harbor-format agent benchmark verifiers.
Layout
Licence
Apache-2.0, see LICENSE.
來源:README.md,提交 c4620b8
工具
0版本歷史
10- v0.14.0最新Nov 7, 2026
- v0.13.0Nov 3, 2026
- v0.12.0Oct 30, 2026
- v0.11.0Oct 19, 2026
- v0.10.0Oct 18, 2026
- v0.9.0Oct 18, 2026
- v0.8.0Oct 17, 2026
- v0.7.0Oct 17, 2026
- v0.6.0Oct 17, 2026
- v0.5.0Oct 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分