跳转到正文
报告库
用途分类 / 开发辅助

Explore Code Skill 安全审计

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

Rigor Improve implementation leaf skill for auditable candidate implementation in deep learning research repositories. Use when the researcher explicitly authorizes exploratory work on an isolated branch or worktree to transplant modules, adapt a backbone, add LoRA or adapter layers, replace a head, or stitch together meaningful low-risk migration ideas with rollback-aware records in `explore_outp

第三方安全检查结论

先别安装或运行

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

README 中提取的命令可在本机以当前用户权限执行

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

复现流程把仓库 README 和链接文档当作命令来源,自动选择目标;启用 `--run-selected` 后将所选文本交给运行器。子进程默认继承完整环境,并在仓库目录启动。仓库文档本身可能不可信,因此“文档化”不等于已安全审核。

为什么需要注意

恶意或危险的 README 命令可能修改或删除可访问文件、安装软件、使用网络,或读取进程继承的凭据。直接模式减少 shell 语法风险,但不会限制被启动程序自身的能力。

风险成立,但仅在用户显式启用 `--run-selected` 时发生。流程从 README 或其本地链接文档提取并自动选择命令,然后把所选命令交给本机运行器;运行器在目标仓库目录中启动子进程,并默认复制控制进程的完整环境。README 来源的命令虽被称为“documented”,这里没有等同于安全审核。用户应先审阅选中的实际命令,保持默认 direct 模式,并限制子进程环境或使用隔离执行器。

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)
查看另外 5 个位置
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: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,
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.
ai-research-reproduction/scripts/orchestrate_repro.py:1107来自代码打开原文件
    parser.add_argument("--user-language", default="en", help="Language tag for human-readable reports.")    parser.add_argument("--run-selected", action="store_true", help="Execute the selected documented command.")    parser.add_argument("--include-analysis-pass", action="store_true", help="Run analyze-project and record its outputs in the stage ledger.")
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,
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 3 项风险
高风险

可选模型代理会把读取的仓库内容发送给 Anthropic 或配置的网关

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

模型可以读取初始仓库清单中的文件;读取结果被加入对话消息,随后整组消息传给 provider。配置还允许使用自定义 HTTPS endpoint。凭据过滤保护被执行的子进程环境,但不会阻止为模型分析而上传文件内容。

为什么需要注意

私有源代码、配置、README 内容以及命令输出可能离开本机,受所选模型提供商或网关的数据处理、日志和保留政策约束。

风险成立,且只涉及可选的模型代理入口。模型工具可以读取初始仓库清单内最多 12,000 字符的文件片段;工具结果随后加入消息历史,并把整组消息发送给配置的 provider。文档说明 endpoint 可指向自定义 HTTPS 网关。子进程凭据过滤不等于仓库内容不会外发。私有仓库用户应在启用代理前确认提供商、endpoint、数据保留政策和允许读取的文件范围。

ai-research-reproduction/scripts/run_agent.py:440来自代码打开原文件
                            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/references/agent-runner.md:110来自说明文档打开原文件
`endpoint` optionally names the final HTTPS endpoint. Without it, the clientuses `ANTHROPIC_BASE_URL` or the official endpoint. For an already configuredBearer gateway, set `metadata.auth_scheme` to `bearer` and name its credentialenvironment variable. Redirects are refused so credentials are not forwarded.
中风险

命令、完整 stdout/stderr 和代理轨迹会持久保存,可能留下敏感信息

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

运行器把原始命令写入 `spec.json`,把完整 stdout 和 stderr 写入日志;模型代理还把工具结果和模型响应追加到 `trajectory.jsonl`。这些记录是审计功能的一部分,并非临时内存。

为什么需要注意

若命令行含令牌、程序打印环境变量、私有路径、样本数据或服务响应,敏感内容会保留在输出目录中,并可能在分享复现包或轨迹时泄露。

风险成立,这是持久审计功能的直接结果。运行器把原始命令写入 `spec.json`,并把子进程的完整 stdout/stderr 持续写入日志;代理还把工具结果及模型响应追加到 `trajectory.jsonl`。如果命令参数、程序输出或读取的文件片段含令牌、私有路径、数据样本或个人信息,它们会留在输出目录,后续分享证据包可能泄露。用户应把输出目录视为敏感数据,并在共享前审查和脱敏。

ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:431来自代码打开原文件
    started_monotonic = time.monotonic()    spec = {        "schema_version": SCHEMA_VERSION,        "run_id": run_id,        "command": command,        "cwd": str(repo),        "timeout_seconds": timeout,        "shell_mode": shell_mode,        "capture_limit_characters": capture_limit,        "model_adapter": model_adapter,        "retry_of": retry_of,        "attempt": attempt,        "resource_monitoring": {            "root_process": True,            "nvidia_device_global": monitor_gpu,        },        "created_at": started_at,    }    atomic_write_json(run_dir / "spec.json", spec)    state: Dict[str, Any] = {
查看另外 4 个位置
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:255来自代码打开原文件
) -> 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/scripts/run_agent.py:401来自代码打开原文件
        def event(kind, **data):            with (output / "trajectory.jsonl").open("a", encoding="utf-8") as handle:                handle.write(json.dumps({"time": utc_now(), "type": kind, **data}, ensure_ascii=False) + "\n")
ai-research-reproduction/references/agent-runner.md:157来自说明文档打开原文件
Usage and elapsed execution time accumulate across resumes (offline pause timeis excluded). Before each model request, UTF-8 request bytes plus output tokensand overhead provide a conservative token reservation. Reported usage is stored;gateway token accounting may differ. Output size is checked between actions,not an OS disk quota. `CANCEL` is checked between actions; use the runtime CANCELfile to stop an active process. Credentials are not included in provider errors.Do not publish traces from private repositories without reviewing their contents.
ai-research-reproduction/scripts/run_agent.py:544来自代码打开原文件
                    raise ProviderError("Duplicate provider tool call IDs; execution stopped")                event("model_response", content=blocks, usage=usage, model=response.get("model"))                state["messages"].append({"role": "assistant", "content": blocks})                state["pending"] = [{k: b[k] for k in ["id", "name", "input"]} for b in tool_blocks]                if sum(state["usage"].values()) > budget["max_total_tokens"]:
中风险

复现失败信息默认写入跨项目的用户主目录学习存储

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

课程记录默认启用,并写入 `~/.rigorpilot/lessons.jsonl`。复现失败时,状态、主要阻塞原因、文档命令以及由目录名和 README 哈希生成的仓库指纹会被记录。正则过滤只是一种尽力而为的秘密检测。

为什么需要注意

私有项目名称、内部命令、文件路径或错误详情可能长期保留在用户主目录,并在以后生成个人覆盖文件或列出记录时再次出现。它不会自动上传,但扩大了本地敏感数据的保留范围。

风险成立,但只在执行被请求后记录,且可用 `RIGORPILOT_LESSONS=0` 禁用。默认设置为启用,并在未覆盖目录时写入用户主目录的 `.rigorpilot/lessons.jsonl`。失败或阻塞记录包含状态与主阻塞原因,detail 包含文档命令,fingerprint 来自仓库目录名和 README 哈希前缀。这会形成跨项目持久元数据;秘密正则过滤仅是尽力而为。用户可在运行前禁用、改到受控目录,或审查该 JSONL 后再保留。

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"
查看另外 6 个位置
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: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,            )
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:50来自代码打开原文件
def lessons_path() -> Path:    return lessons_home() / "lessons.jsonl"
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
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
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 1 项风险
高风险

运行 ID 未限制在 runtime 根目录内,可通过路径穿越触及外部目录

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

`cancel` 和 `retry` 直接将用户提供的 `run_id` 拼接到 runtime 根目录,没有验证 ID 格式或确认解析后的路径仍在根目录内。CLI 的 `--run-id` 也接受任意字符串。

为什么需要注意

如果构造的 `../` 路径指向一个已有 `state.json` 的外部目录,取消操作可在那里创建 `CANCEL` 文件;若外部目录还含有效 `spec.json`,重试操作会读取其中的工作目录和命令并执行。这绕过了调用者对 runtime 根目录范围的预期。

风险成立。`cancel` 和 `retry` 都把未经格式校验的 `run_id` 拼到已解析的 runtime 根目录后;CLI 参数同样没有限制。包含 `..` 或绝对路径的值可能解析到根目录之外。若外部目录具有预期的 `state.json`/`spec.json`,取消可在那里创建 `CANCEL`,重试还会读取其中保存的工作目录和命令并再次执行。用户应限制这些 CLI 入口只能接收程序生成的 ID,并要求作者加入严格 ID 格式和根目录包含性校验。

ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:203来自代码打开原文件
def request_cancel(runtime_root: Path, run_id: str) -> Dict[str, Any]:    run_dir = Path(runtime_root).resolve() / run_id    state_path = run_dir / "state.json"    if not state_path.is_file():        raise FileNotFoundError(f"Unknown runtime run: {run_id}")    state = read_json(state_path)    if state.get("status") in TERMINAL_STATES:        return {"run_id": run_id, "status": state.get("status"), "cancel_requested": False}    if state.get("status") == "orphaned":        return {            "run_id": run_id,            "status": "orphaned",            "cancel_requested": False,            "reason": "orphaned-run-requires-explicit-process-inspection",        }    (run_dir / "CANCEL").touch()    return {"run_id": run_id, "status": state.get("status"), "cancel_requested": True}
查看另外 4 个位置
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:659来自代码打开原文件
) -> Dict[str, Any]:    root = Path(runtime_root).resolve()    parent_dir = root / run_id    state_path = parent_dir / "state.json"    spec_path = parent_dir / "spec.json"    if not state_path.is_file() or not spec_path.is_file():        raise FileNotFoundError(f"Unknown or incomplete runtime run: {run_id}")    recovery = reconcile_run(parent_dir)    state = read_json(state_path)    status = str(state.get("status") or recovery.get("status"))    if status in ACTIVE_STATES:        raise RuntimeError(f"Run {run_id} is still active or orphaned ({status}); refusing duplicate execution")    if status == "success" and not allow_success_retry:        raise RuntimeError(f"Run {run_id} already succeeded; use allow_success_retry only when repetition is intentional")    spec = read_json(spec_path)    selected_timeout = int(timeout if timeout is not None else spec.get("timeout_seconds", 60))    if selected_timeout <= 0:        raise ValueError("retry timeout must be greater than zero")    return run_persistent_command(        repo=Path(spec["cwd"]),        command=str(spec["command"]),        timeout=selected_timeout,
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:697来自代码打开原文件
    recover_parser.add_argument("--stale-after", type=float, default=30.0)    cancel_parser = subparsers.add_parser("cancel", help="Write a cancellation request for an actively monitored run.")    cancel_parser.add_argument("--run-id", required=True)    retry_parser = subparsers.add_parser("retry", help="Explicitly retry a terminal run as a new attempt.")    retry_parser.add_argument("--run-id", required=True)    retry_parser.add_argument("--timeout", type=int)    retry_parser.add_argument("--allow-success-retry", action="store_true")    args = parser.parse_args()
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:712来自代码打开原文件
            payload = recover_runtime_root(root, args.stale_after)        elif args.action == "cancel":            payload = request_cancel(root, args.run_id)        else:            payload = retry_run(                runtime_root=root,                run_id=args.run_id,                timeout=args.timeout,                allow_success_retry=args.allow_success_retry,            )    except (FileNotFoundError, RuntimeError, ValueError) as exc:
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:672来自代码打开原文件
        raise RuntimeError(f"Run {run_id} already succeeded; use allow_success_retry only when repetition is intentional")    spec = read_json(spec_path)    selected_timeout = int(timeout if timeout is not None else spec.get("timeout_seconds", 60))    if selected_timeout <= 0:        raise ValueError("retry timeout must be greater than zero")    return run_persistent_command(        repo=Path(spec["cwd"]),        command=str(spec["command"]),        timeout=selected_timeout,        runtime_root=root,        shell_mode=str(spec.get("shell_mode") or "direct"),
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

5 个说明模块

主技能面向已获明确授权的探索性代码修改,并要求在隔离分支或 worktree 中进行;其自身的规划脚本只扫描代码和配置路径、生成候选修改计划,没有实施修改。

查看原文
SKILL.md:17来自说明文档打开原文件
- When the researcher explicitly authorizes exploratory code changes on an isolated branch or worktree.- When the task is source-anchored module transplant, backbone adaptation, LoRA or adapter insertion, or low-risk module combination.- When summary-level recording is sufficient and the result is a candidate, not a trusted conclusion.
scripts/plan_code_changes.py:291来自代码打开原文件
) -> Dict[str, Any]:    candidate_targets = collect_candidate_edit_targets(repo, current_research, task_family)    target_location_map = derive_target_location_map(candidate_targets, idea_card, analysis)    supporting_changes = derive_supporting_changes(spec, idea_card, analysis)    patch_surface_summary = derive_patch_surface_summary(target_location_map, supporting_changes)    minimal_patch_plan = derive_minimal_patch_plan(target_location_map, idea_card, analysis)    smoke_validation_plan = derive_smoke_validation_plan(target_location_map, analysis, spec)    code_tracks = build_code_tracks(spec, candidate_targets, task_family, current_research)    return {

捆绑的确定性复现流程会读取 README 及最多三个本地 Markdown 链接,从中提取和自动选择命令;只有传入 `--run-selected` 时才尝试执行所选命令。

查看原文
ai-research-reproduction/scripts/orchestrate_repro.py:363来自代码打开原文件
    links.sort(key=lambda item: (0 if any(token in item[0].lower() for token in DOC_PRIORITY_TOKENS) else 1, len(item[0])))    for rel, target in links[:3]:        doc_data = run_json(extract_script, ["--readme", str(target), "--json"])        doc_commands = doc_data.get("commands", [])        for item in doc_commands:            item["source_file"] = rel        command_data["commands"].extend(doc_commands)        if any(item.get("kind") in {"run", "smoke"} for item in doc_commands):            command_data.setdefault("warnings", []).append(
ai-research-reproduction/scripts/orchestrate_repro.py:1107来自代码打开原文件
    parser.add_argument("--user-language", default="en", help="Language tag for human-readable reports.")    parser.add_argument("--run-selected", action="store_true", help="Execute the selected documented command.")    parser.add_argument("--include-analysis-pass", action="store_true", help="Run analyze-project and record its outputs in the stage ledger.")
ai-research-reproduction/scripts/orchestrate_repro.py:1237来自代码打开原文件
    chosen = choose_goal(command_data.get("commands", []), repo_path)    dataset_hint = derive_dataset_hint(asset_data)
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,            )

可选模型代理只允许模型读取初始清单内的仓库文件和选择预先审核的命令 ID;执行前还会从子进程环境中移除名称疑似凭据的变量。

查看原文
ai-research-reproduction/scripts/run_agent.py:440来自代码打开原文件
                            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":
ai-research-reproduction/scripts/run_agent.py:452来自代码打开原文件
                            value = {"plan": state["plan"]}                        elif name == "run_command":                            command_id = args["command_id"]                            command = task["commands"][command_id]                            run_dir = output / "_runtime" / call["runtime_id"]                            if recovering:
ai-research-reproduction/scripts/run_agent.py:469来自代码打开原文件
                                command_text = subprocess.list2cmdline(argv) if os.name == "nt" else shlex.join(argv)                                clean_env = {k: v for k, v in os.environ.items() if not re.search(r"KEY|TOKEN|SECRET|PASSWORD|CREDENTIAL|AUTH", k, re.I)}                                credential_name = profile.get("credential_env")                                if credential_name:                                    clean_env.pop(credential_name, None)                                clean_env["PYTHONIOENCODING"] = "utf-8"                                value = run_persistent_command(repo=safe_file(repo, command.get("cwd", ".")), command=command_text,                                    timeout=max(1, min(command.get("timeout_seconds", 30), int(remaining))),                                    runtime_root=output / "_runtime", run_id=call["runtime_id"], child_env=clean_env,                                    capture_limit=16000, model_adapter=profile)                            value["checks"] = command_checks(repo, command, value)

每次执行会持久保存命令规格、状态、事件、资源采样以及完整标准输出和错误输出,并提供超时、取消和进程树终止机制。

查看原文
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:431来自代码打开原文件
    started_monotonic = time.monotonic()    spec = {        "schema_version": SCHEMA_VERSION,        "run_id": run_id,        "command": command,        "cwd": str(repo),        "timeout_seconds": timeout,        "shell_mode": shell_mode,        "capture_limit_characters": capture_limit,        "model_adapter": model_adapter,        "retry_of": retry_of,        "attempt": attempt,        "resource_monitoring": {            "root_process": True,            "nvidia_device_global": monitor_gpu,        },        "created_at": started_at,    }    atomic_write_json(run_dir / "spec.json", spec)    state: Dict[str, Any] = {
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:255来自代码打开原文件
) -> 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/_bundled/shared/scripts/runtime_runner.py:555来自代码打开原文件
            now = time.monotonic()            if cancel_path.exists():                cancelled = True                journal.event("cancel_detected", source="CANCEL")                _terminate_process_tree(process, journal)                break            if timeout >= 0 and now - started_monotonic >= timeout:                timed_out = True                journal.event("timeout_detected", timeout_seconds=timeout)                _terminate_process_tree(process, journal)                break            if now >= next_heartbeat:
从这里开始 · 工作说明SKILL.md
explore-code
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

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/plan_code_changes.py已纳入全文
  • scripts/write_outputs.py已纳入全文
  • references/explore-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/explore-policy.md配套文件
  • scripts/plan_code_changes.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/plan_code_changes.py:41来自代码打开原文件
        return {}    return json.loads(Path(path).resolve().read_text(encoding="utf-8-sig"))
scripts/plan_code_changes.py:47来自代码打开原文件
        return {}    return json.loads(Path(path).resolve().read_text(encoding="utf-8-sig"))
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:12来自代码打开原文件
import shleximport subprocessimport sys
ai-research-reproduction/scripts/orchestrate_repro.py:103来自代码打开原文件
    child_env["PYTHONIOENCODING"] = "utf-8"    result = subprocess.run(        command,
ai-research-reproduction/scripts/orchestrate_repro.py:121来自代码打开原文件
    try:        subprocess.run(            [
读取密钥或账号配置
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,180
文件校验值(用于核对版本)
ed774ef48275073782e5738b8a81b8d8ae1f3c56071d37306f05f637e876fd39