Skip to content

[codex] harden deep-research workflow - #1

Merged
Usernames686 merged 3 commits into
mainfrom
codex/harden-deep-research
Jul 21, 2026
Merged

[codex] harden deep-research workflow#1
Usernames686 merged 3 commits into
mainfrom
codex/harden-deep-research

Conversation

@Usernames686

Copy link
Copy Markdown
Owner

变更概述

  • 将仓库从旧的 OpenCode 2.0.0 工作流迁移到 Codex 5.2.0-codex.1 四阶段工作流。
  • 加固 Task 2 的 URL 归属、来源专属 gap、正文释放、失败回滚和断点恢复。
  • 接入结构化 SearXNG 搜索、sources.json 权威来源排序和有界补搜。
  • 升级 Scrapling MCP 的并发抓取、SSRF/DNS/重定向防护、批次截止时间和内容预算。
  • 增加多语言端到端报告链、幂等引用与元数据处理、安全懒加载报告浏览器。
  • 增加锁定依赖、65 项测试和 GitHub Actions 验收。

影响

  • 成功抓取但尚未提取的正文不会再被错误标记完成。
  • 状态写入、移动或删除失败时恢复原正文和旧状态,后续运行可继续。
  • 标准抓取支持 6 路并发;本地真实测试中 6 URL 批量比串行快约 4.33 倍。
  • 浏览器输出使用 CSP 与 DOMPurify,阻止脚本、事件属性和危险链接执行。
  • 保留仓库原有 案例报告/,不包含本机 .venv.codex/config.toml

验证

  • 65/65 unittest 通过。
  • py_compile 和 CLI --help 通过。
  • uv pip check:54 个包兼容。
  • profiles.jsonsources.jsonreports.json 和两个工作流 YAML 解析通过。
  • 真实 SearXNG 主查询与反方查询 2/2 成功。
  • Scrapling MCP 标准、JS 渲染、反检测模式及私网拦截已实测。
  • 受保护报告、正式浏览器索引和 DOMPurify 哈希保持不变。

这是一次较大的运行时迁移,先以草稿 PR 提交,合并前可以直接查看完整文件差异和 Actions 结果。

@ecc-tools

ecc-tools Bot commented Jul 21, 2026

Copy link
Copy Markdown

Analyzing 200 commits...

@ecc-tools

ecc-tools Bot commented Jul 21, 2026

Copy link
Copy Markdown

Analysis Complete

Generated ECC bundle from 1 commits | Confidence: 55%

View Pull Request #2

Repository Profile
Attribute Value
Language Python
Framework Not detected
Commit Convention freeform
Test Directory separate
Changed Files (48)
Metric Value
Files changed 48
Additions 22382
Deletions 1391

Top hotspots

Path Status +/-
reports-browser/html-docx.min.js added +13216 / -0
tools/dr_gen.py modified +741 / -214
reports/zh/Agent 技术专题深度研究:架构范式、工程栈、安全治理与生态演进-20260721-181215.md added +840 / -0
tools/dr_check.py modified +674 / -154
tests/test_task2_tools.py added +723 / -0

Top directories

Directory Files Total changes
reports-browser 7 13285
tools 9 4441
. 14 2099
tests 5 1967
prompts 8 980
Analysis Depth Readiness (evidence-backed, 50%)

ECC Tools uses this to decide whether recommendations should stay at commit-history/setup guidance or expand into CI, security, harness, reference-set, AI-routing, and team backlog work.

Area Status Evidence / Next Step
Commit history Partial 1 commits sampled
CI/CD signals Ready .github/workflows/reports-pages.yml, .github/workflows/test.yml
Security evidence Missing Add AgentShield, audit, SARIF, SBOM, or security review evidence so recommendations can cover security posture.
Harness configuration Ready tests/test_scrapling_mcp_server.py
Reference/eval evidence Missing Add fixtures, golden traces, reference sets, or evaluator benchmarks so deeper recommendations have regression evidence.
AI routing and cost controls Ready prompts/chapter_agent.md, prompts/task1_oracle.md, prompts/task1_outline.md
Team handoff and project tracking Missing Add roadmap, runbook, project, Linear, or follow-up tracking docs so generated work can land in a team queue.
Reference Set Readiness (1/7, 14%)
Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Present tests/test_scrapling_mcp_server.py
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.
Likely Future Issues (4)
Severity Signal Why it may show up
MEDIUM CLI changes may ship without shell or end-to-end coverage 2 CLI surface paths changed; 0 CLI-focused integration or e2e tests changed
MEDIUM Cost or token-risk changes may ship without budget evidence 8 cost/token-risk paths changed; 0 budget, usage, or cost validation artifacts changed
MEDIUM CI workflow changes may ship without failure-mode evidence 2 CI/test-runner paths changed; 0 CI failure-mode evidence artifacts changed
MEDIUM Dependency or CI drift could surface after merge CI/workflow files changed; no lockfile changes detected
  • CLI changes may ship without shell or end-to-end coverage: The PR changes CLI, bin, or command-entry files without touching any obvious CLI-focused integration or end-to-end tests.
  • Cost or token-risk changes may ship without budget evidence: The PR changes AI routing, usage, token budget, or model-call surfaces without touching obvious budget, usage-limit, or cost regression evidence.
  • CI workflow changes may ship without failure-mode evidence: The PR changes CI workflows or test-runner entrypoints without touching CI failure fixtures, captured logs, troubleshooting notes, or regression evidence.
  • Dependency or CI drift could surface after merge: Package or workflow changes landed without an accompanying lockfile update, which often turns into CI or release noise later.
Suggested Follow-up Work (4)
Type Suggested title Targets
PR test: add CLI coverage for command/research.md + command/update.md command/research.md, command/update.md
PR test: add budget evidence for prompts/chapter_agent.md + prompts/task1_oracle.md prompts/chapter_agent.md, prompts/task1_oracle.md
PR ci: add failure-mode evidence for .github/workflows/reports-pages.yml + .github/workflows/test.yml .github/workflows/reports-pages.yml, .github/workflows/test.yml
PR chore: refresh lockfile and validate CI after dependency updates .github/workflows/reports-pages.yml, .github/workflows/test.yml
  • test: add CLI coverage for command/research.md + command/update.md: Backfill CLI coverage before another command-surface change lands on the touched paths.
  • test: add budget evidence for prompts/chapter_agent.md + prompts/task1_oracle.md: Backfill cost, token, or usage-limit validation before another model-routing change lands on the touched surface.
  • ci: add failure-mode evidence for .github/workflows/reports-pages.yml + .github/workflows/test.yml: Backfill CI failure-mode evidence before another workflow or test-runner change lands on the touched surface.
  • chore: refresh lockfile and validate CI after dependency updates: Package or workflow changes without a lockfile refresh tend to turn into noisy follow-up fixes after merge.

Copy-ready bodies

test: add CLI coverage for command/research.md + command/update.md

## Summary
- Add shell, CLI, or end-to-end coverage for the recently changed command surface.

## Why
- Backfill CLI coverage before another command-surface change lands on the touched paths.

## Touched paths
- `command/research.md`
- `command/update.md`

## Validation
- Add or extend shell, CLI, or end-to-end coverage for the changed command surface.
- Exercise the user-facing command invocation and expected exit/output behavior.

test: add budget evidence for prompts/chapter_agent.md + prompts/task1_oracle.md

## Summary
- Add budget or usage-limit validation for the recently changed AI routing or model-call surface.

## Why
- Backfill cost, token, or usage-limit validation before another model-routing change lands on the touched surface.

## Touched paths
- `prompts/chapter_agent.md`
- `prompts/task1_oracle.md`

## Validation
- Add or extend budget, token, usage-limit, or model-routing regression coverage for the changed path.
- Verify the route still enforces plan limits, retry caps, fallback behavior, or explicit cost controls.

ci: add failure-mode evidence for .github/workflows/reports-pages.yml + .github/workflows/test.yml

## Summary
- Add CI failure-mode evidence for the recently changed workflow or test-runner surface.

## Why
- Backfill CI failure-mode evidence before another workflow or test-runner change lands on the touched surface.

## Touched paths
- `.github/workflows/reports-pages.yml`
- `.github/workflows/test.yml`

## Validation
- Add or update a CI failure fixture, captured failing log, troubleshooting note, workflow dry-run evidence, or regression test for the changed CI/test-runner behavior.
- Run the affected workflow or test-runner entrypoint locally or in CI and record pass/fail evidence.

chore: refresh lockfile and validate CI after dependency updates

## Summary
- Refresh the lockfile and rerun CI after the dependency or workflow changes in this PR.

## Why
- Package or workflow changes without a lockfile refresh tend to turn into noisy follow-up fixes after merge.

## Touched paths
- `.github/workflows/reports-pages.yml`
- `.github/workflows/test.yml`

## Validation
- Refresh the lockfile in the same package manager used by the repo.
- Run the repo typecheck / test / CI entrypoints that depend on the updated package graph.
Generated Instincts (17)
Domain Count
git 3
code-style 9
testing 5

After merging, import with:

/instinct-import .claude/homunculus/instincts/inherited/deep-research-instincts.yaml

Files

  • .claude/ecc-tools.json
  • .claude/skills/deep-research/SKILL.md
  • .agents/skills/deep-research/SKILL.md
  • .agents/skills/deep-research/agents/openai.yaml
  • .claude/identity.json
  • .codex/config.toml
  • .codex/AGENTS.md
  • .codex/agents/explorer.toml
  • .codex/agents/reviewer.toml
  • .codex/agents/docs-researcher.toml
  • .claude/homunculus/instincts/inherited/deep-research-instincts.yaml

ECC Tools | Everything Claude Code

@Usernames686
Usernames686 marked this pull request as ready for review July 21, 2026 17:18
@Usernames686
Usernames686 merged commit 843a2fe into main Jul 21, 2026
1 check passed
@Usernames686
Usernames686 deleted the codex/harden-deep-research branch July 21, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant