跳转到正文
报告库
用途分类 / 文档处理

Minimal Run And Audit Skill 安全审计

作者说它能做什么(原文)

Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized `repro_outputs/` files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper loo

第三方安全检查结论

先别安装或运行

已检查文件
21
发现的风险
5
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。发现 1 项风险
高风险

自动选择并执行仓库 README 中提取的命令会把仓库内容转化为本机代码执行

原文依据:5 处
发现了什么

确定性编排器从 README 及最多三个本地链接文档提取命令,自动选择评分较高的目标;启用 `--run-selected` 后,该命令会直接交给本机进程运行。README 中“已文档化”并不代表命令可信。

为什么需要注意

恶意或被篡改的仓库可借安装、评测或推理命令读取或修改用户文件、启动下载、访问网络服务,或消耗大量计算资源。原生 shell 模式还会启用重定向、管道等 shell 行为。

该风险成立,但仅在用户显式启用 `--run-selected` 时发生。编排器从 README(以及最多三个本地链接文档)提取命令并自行选择目标,随后把选中的命令交给本机运行时。被写入 README 的命令并不因此可信,可能读取或修改用户文件、使用凭据或联网。用户可要求作者在执行前展示最终 argv,并仅在隔离环境中运行不受信仓库。

ai-research-reproduction/scripts/orchestrate_repro.py:1167来自代码打开原文件
    scan_data = run_json(scan_script, ["--repo", str(repo_path), "--json"])    readme_path = scan_data.get("readme_path")    command_data: Dict[str, Any] = {"commands": [], "counts": {}, "warnings": []}    if readme_path:        command_data = run_json(extract_script, ["--readme", readme_path, "--json"])        command_data = delegate_to_docs(readme_path, extract_script, command_data)
查看另外 4 个位置
ai-research-reproduction/scripts/orchestrate_repro.py:1237来自代码打开原文件
    chosen = choose_goal(command_data.get("commands", []), repo_path)    dataset_hint = derive_dataset_hint(asset_data)    checkpoint_hint = derive_checkpoint_hint(asset_data)    run_data: Dict[str, Any] = {
ai-research-reproduction/scripts/orchestrate_repro.py:1292来自代码打开原文件
            )        else:            run_data = maybe_run_command(                repo_path,                chosen["documented_command"],                args.timeout,                args.user_language,                args.shell_mode,                runtime_root,                model_adapter,                args.monitor_gpu,            )
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:497来自代码打开原文件
        creationflags = subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0        process = subprocess.Popen(            argv,            env=environment,            cwd=repo,            stdout=subprocess.PIPE,            stderr=subprocess.PIPE,            text=True,            encoding="utf-8",            errors="replace",            bufsize=1,            creationflags=creationflags,            start_new_session=os.name != "nt",        )    except (FileNotFoundError, ShellSyntaxRequired, OSError, ValueError) as exc:
ai-research-reproduction/scripts/orchestrate_repro.py:1272来自代码打开原文件
        )    elif args.run_selected:        if chosen["selected_goal"] == "training":            run_data = maybe_run_training(                repo_path=repo_path,                command=chosen["documented_command"],                train_script=train_execute_script,                lane=args.lane,                user_language=args.user_language,                full_training_authorized=args.full_training_authorized,                train_timeout=args.train_timeout,                dataset_hint=dataset_hint,                checkpoint_hint=checkpoint_hint,                resume_from=args.resume_from,                max_train_steps=args.max_train_steps,                shell_mode=args.shell_mode,                runtime_root=runtime_root,                model_profile_json=args.model_profile_json,                required_model_capabilities=args.require_model_capability,                gpu_monitor_enabled=not args.no_gpu_monitor,            )        else:            run_data = maybe_run_command(                repo_path,                chosen["documented_command"],                args.timeout,                args.user_language,                args.shell_mode,                runtime_root,                model_adapter,                args.monitor_gpu,            )
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 2 项风险
高风险

可选模型运行器会把模型请求的私有仓库文件内容发送到配置的 Anthropic 端点

原文依据:4 处
发现了什么

模型可以调用 `read_file` 获取仓库文件片段;工具结果随后加入消息历史,并通过 `provider.complete` 发送到模型端点。路径限制可阻止读取仓库外文件,但不能阻止仓库内源码离开本机。

为什么需要注意

私有源码、内部配置、实验数据片段或 README 中的敏感信息可能披露给第三方模型供应商或自定义网关,并同时保存在本地轨迹中。

可选模型运行器允许模型读取初始清单中的仓库文件,每次最多读取 12000 个字符;工具结果随后进入消息历史并传给 Anthropic provider。仓库外路径和 `.env` 有限制,但普通仓库源码、配置或数据仍可能离开本机。只有使用该可选入口且模型调用 `read_file` 时触发。用户应审查端点和仓库敏感性,并限制可发送文件。

ai-research-reproduction/scripts/run_agent.py:438来自代码打开原文件
                    try:                        if name == "list_files":                            value = {"files": sorted(files)}                        elif name == "read_file":                            if args["path"] not in files:                                raise ValueError("File was not in the permitted initial inventory")                            offset = max(0, int(args.get("offset", 0)))                            with safe_file(repo, args["path"]).open("r", encoding="utf-8") as handle:                                handle.seek(offset)                                value = {"path": args["path"], "text": handle.read(12000), "next_offset": handle.tell()}                        elif name == "update_plan":
查看另外 3 个位置
ai-research-reproduction/scripts/run_agent.py:495来自代码打开原文件
                        value = {"error": str(exc)}                    event("tool_result", tool=name, result=value)                    state["tool_results"].append({"type": "tool_result", "tool_use_id": call["id"],                        "content": json.dumps(value, ensure_ascii=False), "is_error": "error" in value})                    state["pending"].pop(0)                    tools_this_turn += 1                    save()                    if pause_after_tools and tools_this_turn >= pause_after_tools and state["status"] == "running":                        state["status"] = "paused"                        event("paused", reason="Explicit test/session checkpoint")                    continue                if state["tool_results"]:                    state["messages"].append({"role": "user", "content": state.pop("tool_results")})                    state["tool_results"] = []
ai-research-reproduction/scripts/run_agent.py:514来自代码打开原文件
                    break                state["model_calls"] += 1                state["model_pending"] = True                state["usage_complete"] = False                save()                event("model_request", call=state["model_calls"], reserved_tokens=reserve)                response = provider.complete(state["messages"], SYSTEM, TOOLS, budget["max_output_tokens"], min(60, remaining))                if not isinstance(response, dict):
ai-research-reproduction/scripts/run_agent.py:518来自代码打开原文件
                save()                event("model_request", call=state["model_calls"], reserved_tokens=reserve)                response = provider.complete(state["messages"], SYSTEM, TOOLS, budget["max_output_tokens"], min(60, remaining))                if not isinstance(response, dict):
高风险

普通命令运行器默认把完整环境变量交给被执行程序

原文依据:5 处
发现了什么

当调用方未传入专门的 `child_env` 时,运行器复制整个 `os.environ` 给子进程。确定性编排器和 `scripts/run_command.py` 没有提供过滤后的环境;文档也明确说明获准程序可以访问主机和网络。

为什么需要注意

被执行的仓库程序可以读取 API 密钥、云凭据、代理令牌和其他环境变量,并通过网络或生成文件泄露它们。stdout/stderr 还会完整持久化,因此程序打印的凭据会留在证据目录。

通用运行时在未传 `child_env` 时把完整 `os.environ` 交给子进程。确定性编排器调用它时没有传过滤环境,因此选中程序可能读取当前进程中的 API 密钥、令牌或其他环境配置;文档同时说明获准程序可访问主机和网络。模型驱动的 `run_agent.py` 另有环境过滤,所以风险不适用于那个调用路径。用户可要求默认使用最小环境白名单并在隔离环境中执行。

ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:487来自代码打开原文件
    try:        argv = build_command(command, shell_mode)        environment = dict(os.environ if child_env is None else child_env)        spec["requested_argv"] = list(argv)        atomic_write_json(run_dir / "spec.json", spec)        if shell_mode == "direct":            argv = resolve_direct_argv(argv, repo, environment)        spec["argv"] = list(argv)        atomic_write_json(run_dir / "spec.json", spec)        creationflags = subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0        process = subprocess.Popen(            argv,            env=environment,            cwd=repo,
查看另外 4 个位置
scripts/run_command.py:194来自代码打开原文件
    selected_runtime_root = (runtime_root or (repo / "repro_outputs" / "_runtime")).resolve()    execution = run_persistent_command(        repo=repo,        command=command,        timeout=timeout,        runtime_root=selected_runtime_root,        shell_mode=shell_mode,        model_adapter=model_adapter,        monitor_gpu=monitor_gpu,    )    after_status, after_capture = git_status_snapshot(repo)
ai-research-reproduction/references/agent-runner.md:16来自说明文档打开原文件
This is local execution with credential environment filtering, not an OS sandbox.Approved programs can access the host and network; use only trusted repositoriesuntil an isolated executor is configured. Commands that change scientificconditions must be explicitly reviewed. P1 targets small evaluations, not full
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:256来自代码打开原文件
    total_chars = 0    with log_path.open("w", encoding="utf-8", newline="") as log:        while True:            chunk = stream.read(4096)            if not chunk:                break            log.write(chunk)            log.flush()            capture.append(chunk)            total_chars += len(chunk)
ai-research-reproduction/scripts/orchestrate_repro.py:513来自代码打开原文件
    selected_runtime_root = (runtime_root or (repo_path / "repro_outputs" / "_runtime")).resolve()    result = run_persistent_command(        repo=repo_path,        command=command,        timeout=timeout,        runtime_root=selected_runtime_root,        shell_mode=shell_mode,        model_adapter=model_adapter,        monitor_gpu=monitor_gpu,    )    if result.get("launch_error"):
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 1 项风险
中风险

运行失败信息默认会跨仓库持久写入用户主目录

原文依据:7 处
发现了什么

课程记录功能默认启用。执行结果为 `partial` 或 `blocked` 时,编排器把阻塞摘要和文档命令写入 `~/.rigorpilot/lessons.jsonl`;这超出了目标仓库和 `repro_outputs/`。关键词正则只是尽力过滤,并不能保证识别私有 URL、个人数据或所有密钥格式。

为什么需要注意

命令文本、内部路径、仓库指纹和错误上下文可能长期留在用户主目录,并在以后汇总到个人覆盖文件;共享主目录或备份系统可能扩大可见范围。

执行被请求后,结果为 `partial` 或 `blocked` 时,编排器会默认把状态、阻塞原因、文档命令和仓库指纹追加到用户主目录下的持久记录,而非仅写入目标输出目录。密钥正则会拒绝部分文本,但只是尽力过滤,仍可能保存私有路径、URL或其他敏感上下文。用户可在运行前设置 `RIGORPILOT_LESSONS=0`,并要求作者改为明确选择加入。

ai-research-reproduction/scripts/orchestrate_repro.py:62来自代码打开原文件
    try:        if status in {"partial", "blocked"}:            path = store.record_lesson(                kind="failure-fix",                skill="ai-research-reproduction",                summary=f"[{status}] {context.get('main_blocker', 'unrecorded blocker')}",                detail=str(context.get("documented_command") or ""),                fingerprint=fingerprint,            )            return str(path) if path else None
查看另外 6 个位置
ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:41来自代码打开原文件
def lessons_home() -> Path:    root = os.environ.get("RIGORPILOT_HOME")    return Path(root).expanduser() if root else Path.home() / ".rigorpilot"def lessons_enabled() -> bool:    return os.environ.get("RIGORPILOT_LESSONS", "1") != "0"
ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:125来自代码打开原文件
    }    path = lessons_path()    path.parent.mkdir(parents=True, exist_ok=True)    with path.open("a", encoding="utf-8") as handle:        handle.write(json.dumps(entry, ensure_ascii=False) + "\n")    return path
ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:21来自代码打开原文件
VALID_KINDS = {"failure-fix", "user-correction", "preference", "generalization"}# Best-effort blocklist: keyword shapes plus common bare-credential formats.# This is a guardrail, not a guarantee — callers still must not pass secrets.SECRET_RE = re.compile(    r"(api[_-]?key|secret|token|password|passwd|authorization|bearer\s+\S|-----BEGIN"    r"|AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|sk-[A-Za-z0-9_-]{16,}"    r"|xox[a-z]-[A-Za-z0-9-]{10,}|AIza[0-9A-Za-z_-]{30,})",    re.IGNORECASE,)MAX_FIELD_CHARS = 300
ai-research-reproduction/scripts/orchestrate_repro.py:59来自代码打开原文件
        return None    fingerprint = store.repo_fingerprint(repo_path)    status = context.get("status")    try:        if status in {"partial", "blocked"}:            path = store.record_lesson(                kind="failure-fix",                skill="ai-research-reproduction",                summary=f"[{status}] {context.get('main_blocker', 'unrecorded blocker')}",                detail=str(context.get("documented_command") or ""),                fingerprint=fingerprint,            )            return str(path) if path else None        if status == "success":
ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:67来自代码打开原文件
def sanitize(text: str) -> Optional[str]:    cleaned = " ".join(str(text or "").split())[:MAX_FIELD_CHARS]    if not cleaned:        return None    if SECRET_RE.search(cleaned):        return None    return cleaned
ai-research-reproduction/scripts/orchestrate_repro.py:1391来自代码打开原文件
    context["lesson_recorded"] = maybe_record_lesson(repo_path, context) if args.run_selected else None
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
中风险

“source_unchanged”验收不会检测运行期间新增的仓库文件

原文依据:2 处
发现了什么

初始清单记录每个已有文件的哈希,但最终检查只遍历初始文件并比较其当前哈希,没有检查当前文件集合是否多出新路径。因此命令创建新源码、启动脚本或其他未验收文件后,`source_unchanged` 仍可能为真。

为什么需要注意

最终报告可能把任务标为成功并声称源文件未变,而仓库已经包含新增的持久文件。这会影响用户对工作树完整性和后续执行安全性的判断。

最终 `source_unchanged` 只遍历初始清单中的路径并比较哈希,没有要求当前清单与初始路径集合相同。因此,原有文件都未改变时,命令新增未验收的源码、脚本或其他文件仍可能得到 `source_unchanged: true`。这不是新增文件已被执行的证据,但会使验收名称产生过强保证。用户可要求验收明确报告并拒绝非预期新增路径。

ai-research-reproduction/scripts/run_agent.py:71来自代码打开原文件
def inventory(repo: Path, output: Path) -> dict:    result = subprocess.run(["git", "-C", str(repo), "ls-files", "-z"], capture_output=True)    paths = [repo / p.decode() for p in result.stdout.split(b"\0") if p] if result.returncode == 0 else repo.rglob("*")    found = {}    size = 0    for path in paths:        if not path.is_file() or path.resolve().is_relative_to(output) or any(p in {".git", "__pycache__", ".venv"} or p.startswith(".env") for p in path.relative_to(repo).parts):            continue        if not path.resolve().is_relative_to(repo):            raise ValueError("Repository symlink escapes scope")        size += path.stat().st_size        if size > 50_000_000 or len(found) >= 10000:            raise ValueError("P1 repository inventory limit exceeded (50 MB / 10000 files)")        found[path.relative_to(repo).as_posix()] = hashlib.sha256(path.read_bytes()).hexdigest()    return found
查看另外 1 个位置
ai-research-reproduction/scripts/run_agent.py:237来自代码打开原文件
def verify_task(repo: Path, output: Path, task: dict, state: dict, files: dict) -> dict:    details = {key: command_checks(repo, task["commands"][key], state["results"].get(key, {})) for key in task["required_commands"]}    for key, detail in details.items():        if key in state["results"]:            state["results"][key].update(checks=detail, verified=detail["passed"])    current_files = inventory(repo, output)    # Command IDs are user-defined; keep them out of the controller namespace.    return {"commands": {key: value["passed"] for key, value in details.items()},            "source_unchanged": all(current_files.get(name) == digest for name, digest in files.items()),            "details": details}
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

6 个说明模块

该 Skill 的核心用途是执行短时、非训练的已选命令,并把结果、日志和补丁状态写入标准化的 `repro_outputs/` 证据文件。

查看原文
SKILL.md:17来自说明文档打开原文件
- After a reproduction target and setup plan exist.- When the main skill needs execution evidence and normalized outputs.- When a smoke test, documented inference run, documented evaluation run, or other short non-training verification is appropriate.- When the user already knows what command should be attempted and wants execution plus reporting only.
SKILL.md:47来自说明文档打开原文件
## Output expectations- execution result summary- standardized `repro_outputs/` files- `SCIENTIFIC_CHANGELOG.md` for changed scientific meaning and evidence status- `COMPARABILITY_REPORT.md` for README/paper/baseline comparability- clear distinction between verified, partial, and blocked states- `PATCHES.md` when repo files changed

实际执行默认使用直接参数模式,但用户可显式选择原生 shell;运行器会启动本机子进程,并在超时或取消时终止其进程组。

查看原文
scripts/run_command.py:269来自代码打开原文件
def main() -> int:    parser = argparse.ArgumentParser(description="Run a short non-training command and summarize the evidence.")    parser.add_argument("--repo", required=True, help="Path to the target repository.")    parser.add_argument("--command", required=True, help="Command to execute.")    parser.add_argument("--timeout", type=int, default=60, help="Execution timeout in seconds.")    parser.add_argument(        "--shell-mode",        choices=["direct", "native"],        default="direct",        help="Use direct argv execution by default; native shell execution requires explicit opt-in.",    )
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:487来自代码打开原文件
    try:        argv = build_command(command, shell_mode)        environment = dict(os.environ if child_env is None else child_env)        spec["requested_argv"] = list(argv)        atomic_write_json(run_dir / "spec.json", spec)        if shell_mode == "direct":            argv = resolve_direct_argv(argv, repo, environment)        spec["argv"] = list(argv)        atomic_write_json(run_dir / "spec.json", spec)        creationflags = subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0        process = subprocess.Popen(            argv,            env=environment,            cwd=repo,            stdout=subprocess.PIPE,            stderr=subprocess.PIPE,            text=True,            encoding="utf-8",            errors="replace",            bufsize=1,            creationflags=creationflags,            start_new_session=os.name != "nt",        )    except (FileNotFoundError, ShellSyntaxRequired, OSError, ValueError) as exc:

套件还包含可选的 Anthropic 模型工具循环。它限制模型只能读取初始仓库清单中的文件并选择预审命令,但这是本机执行而非操作系统沙箱。

查看原文
ai-research-reproduction/scripts/run_agent.py:47来自代码打开原文件
TOOLS = [    tool("list_files", "List the initial repository file inventory", {}, []),    tool("read_file", "Read a UTF-8 repository file, optionally from an offset", {        "path": {"type": "string"}, "offset": {"type": "integer", "minimum": 0}}, ["path"]),    tool("update_plan", "Record completed and remaining work", {        "steps": {"type": "array", "items": {"type": "string"}}}, ["steps"]),    tool("run_command", "Execute a reviewed command ID; cannot change its argv", {        "command_id": {"type": "string"}}, ["command_id"]),    tool("finish", "Request independent final verification", {"summary": {"type": "string"}}, ["summary"]),]
ai-research-reproduction/references/agent-runner.md:16来自说明文档打开原文件
This is local execution with credential environment filtering, not an OS sandbox.Approved programs can access the host and network; use only trusted repositoriesuntil an isolated executor is configured. Commands that change scientificconditions must be explicitly reviewed. P1 targets small evaluations, not fulltraining or autonomous source repair.

运行证据会持久保存完整 stdout、stderr、事件和资源记录;摘要中的尾部虽有大小限制,但完整日志不截断。

查看原文
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:248来自代码打开原文件
def _stream_reader(    stream: Any,    log_path: Path,    stream_name: str,    capture: TailBuffer,    journal: RuntimeJournal,) -> None:    total_chars = 0    with log_path.open("w", encoding="utf-8", newline="") as log:        while True:            chunk = stream.read(4096)            if not chunk:                break            log.write(chunk)            log.flush()            capture.append(chunk)            total_chars += len(chunk)            journal.event("stream_chunk", stream=stream_name, characters=len(chunk))    journal.event("stream_closed", stream=stream_name, characters=total_chars)
ai-research-reproduction/references/output-spec.md:148来自说明文档打开原文件
    automation must inspect the persisted outcome and configured acceptance checks- `runtime`  - identifies the durable `_runtime/<run_id>/` directory, terminal state, event stream, full stdout/stderr logs, truncation flags, cancellation state, and duration  - summary fields may contain only a bounded log tail; the referenced log files remain complete
从这里开始 · 工作说明SKILL.md
minimal-run-and-audit
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

22 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录21 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文
  • ai-research-reproduction/_bundled/shared/scripts/lessons_store.py已纳入全文
  • ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py已纳入全文
  • ai-research-reproduction/_bundled/shared/scripts/task_queue.py已纳入全文
  • ai-research-reproduction/scripts/orchestrate_repro.py已纳入全文
  • ai-research-reproduction/scripts/run_agent.py已纳入全文
  • scripts/run_command.py已纳入全文
  • scripts/write_outputs.py已纳入全文
  • references/reporting-policy.md已纳入全文
  • ai-research-reproduction/references/agent-operating-principles.md已纳入全文
  • ai-research-reproduction/references/agent-runner.md已纳入全文
  • ai-research-reproduction/references/continuous-learning-policy.md已纳入全文
  • ai-research-reproduction/references/deep-learning-experiment-principles.md已纳入全文
  • ai-research-reproduction/references/language-policy.md已纳入全文
  • ai-research-reproduction/references/output-spec.md已纳入全文
  • ai-research-reproduction/references/patch-policy.md已纳入全文
  • ai-research-reproduction/references/research-rigor-principles.md已纳入全文
  • ai-research-reproduction/references/research-safety-principles.md已纳入全文
  • ai-research-reproduction/references/runtime-and-model-adapter.md已纳入全文
  • ai-research-reproduction/SKILL.md已纳入全文
  • agents/openai.yaml已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • SKILL.md工作说明
  • agents/openai.yaml配套文件
  • references/reporting-policy.md配套文件
  • scripts/run_command.py脚本
  • scripts/write_outputs.py脚本
  • ai-research-reproduction/SKILL.md配套文件
  • ai-research-reproduction/references/agent-operating-principles.md配套文件
  • ai-research-reproduction/references/research-rigor-principles.md配套文件
  • ai-research-reproduction/references/deep-learning-experiment-principles.md配套文件
  • ai-research-reproduction/scripts/orchestrate_repro.py脚本
  • ai-research-reproduction/references/runtime-and-model-adapter.md配套文件
  • ai-research-reproduction/references/agent-runner.md配套文件
  • ai-research-reproduction/scripts/run_agent.py脚本
  • ai-research-reproduction/references/patch-policy.md配套文件
  • ai-research-reproduction/references/output-spec.md配套文件
  • ai-research-reproduction/references/language-policy.md配套文件
  • ai-research-reproduction/references/continuous-learning-policy.md配套文件
  • ai-research-reproduction/_bundled/shared/scripts/lessons_store.py脚本
  • ai-research-reproduction/references/research-safety-principles.md配套文件
  • ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py脚本
  • ai-research-reproduction/_bundled/shared/scripts/task_queue.py脚本

代码和说明中提到的操作

运行命令
scripts/run_command.py:9来自代码打开原文件
import reimport subprocessimport sys
scripts/run_command.py:40来自代码打开原文件
def decode_stream(value: Any) -> str:    # On POSIX, subprocess.TimeoutExpired carries captured output as bytes    # even when the run was started with text=True.
scripts/run_command.py:73来自代码打开原文件
def run_git(repo: Path, args: List[str]) -> subprocess.CompletedProcess[str]:    try:
读取文件
ai-research-reproduction/scripts/orchestrate_repro.py:205来自代码打开原文件
        if config_path.exists() and config_path.suffix.lower() in {".yaml", ".yml", ".json", ".toml", ".py"}:            text_content = config_path.read_text(encoding="utf-8", errors="replace")            step_match = None
ai-research-reproduction/scripts/orchestrate_repro.py:352来自代码打开原文件
        return command_data    readme_file = Path(readme_path)    readme_text = readme_file.read_text(encoding="utf-8-sig", errors="replace")
ai-research-reproduction/scripts/orchestrate_repro.py:353来自代码打开原文件
    readme_file = Path(readme_path)    readme_text = readme_file.read_text(encoding="utf-8-sig", errors="replace")    links: List[tuple] = []
读取密钥或账号配置
ai-research-reproduction/scripts/orchestrate_repro.py:101来自代码打开原文件
    command = [sys.executable, str(script), *args]    child_env = os.environ.copy()    child_env["PYTHONIOENCODING"] = "utf-8"
ai-research-reproduction/scripts/run_agent.py:65来自代码打开原文件
    path = (repo / name).resolve()    if (not path.is_relative_to(repo) or any(p == ".git" or p.startswith(".env") for p in Path(name).parts)            or any(p == ".git" or p.startswith(".env") for p in path.relative_to(repo).parts)):
ai-research-reproduction/scripts/run_agent.py:66来自代码打开原文件
    if (not path.is_relative_to(repo) or any(p == ".git" or p.startswith(".env") for p in Path(name).parts)            or any(p == ".git" or p.startswith(".env") for p in path.relative_to(repo).parts)):        raise ValueError("File path is outside the permitted repository scope")
修改文件
ai-research-reproduction/scripts/orchestrate_repro.py:118来自代码打开原文件
        context_path = Path(handle.name)        handle.write(json.dumps(context, indent=2, ensure_ascii=False))
ai-research-reproduction/scripts/run_agent.py:328来自代码打开原文件
        with (output / "SUMMARY.md").open("a", encoding="utf-8") as handle:            handle.write("\n" + explanation + "\n")
ai-research-reproduction/scripts/run_agent.py:374来自代码打开原文件
                with (output / "trajectory.jsonl").open("a", encoding="utf-8") as handle:                    handle.write(json.dumps({"time": utc_now(), "type": "reverification", "status": state["status"],                                             "previous_checks": previous_checks, "checks": checks}, ensure_ascii=False) + "\n")
安装其他软件包
ai-research-reproduction/scripts/orchestrate_repro.py:252来自代码打开原文件
        score -= 10    if text_value.startswith(("pip install", "conda install", "conda env create", "conda activate", "git clone", "cd ")):        score -= 12
连接外部网站
ai-research-reproduction/scripts/orchestrate_repro.py:357来自代码打开原文件
        rel = match.group(1)        if rel.startswith(("http://", "https://")):            continue
ai-research-reproduction/scripts/run_agent.py:343来自代码打开原文件
        raise ValueError("All budget limits must be positive integers")    endpoint_identity = fingerprint(profile.get("endpoint") or os.getenv("ANTHROPIC_BASE_URL") or "https://api.anthropic.com")    harness_identity = fingerprint([Path(__file__).read_bytes().replace(b"\r\n", b"\n").hex(), SYSTEM, TOOLS,
ai-research-reproduction/references/runtime-and-model-adapter.md:65来自说明文档打开原文件
  "capabilities": ["text", "tool_calling", "structured_output"],  "endpoint": "https://gateway.example/v1",  "credential_env": "LAB_MODEL_API_KEY",
读取了多少行
5,190
文件校验值(用于核对版本)
3d2f4b2aefb65d9f1d8a3ad5cade694caa186ffffb6667e5bba48363ac1bd9ca