You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@FayeSpica — review of the RFC #653 L4 baseline deliverable (the report comment plus the attached data package), following the repo's opendirector-review discipline.
No PR tip exists: #653 is an RFC issue and the deliverable is the issue comment plus rfc653-l4-baseline-2026-12-04.zip (sha256 f183121f…, 97 files, 710.8 KiB). Release checks / CI: N/A. No user-visible product change, so screenshots/demo: N/A. 87 >= the agreed 80 merge gate → acceptable to merge as the #653 baseline artifact.
Independently recomputed dedup cache_read / cache_creation / peak input from all 12 raw .claude.jsonl files (last usage per message id): 12/12 exact match to baseline-3x-summary.json.
Exact conservation: 0 + 51,185 + 2 = 51,187; 4,129 + 50,238 + 2 = 54,369; 4,129 + 44,532 + 2 = 48,663. cache_read is monotonic across all 30/36/23 requests; no compaction events (only slash-command strings match "compact").
Sample C: raw recomputation gives Turn 2 dedup cache_read = 140,434 and result.usage also 140,434; all 4 turns reconcile. The historical T4 snapshot is marked reconstructed_estimate_resume_fork with a caveat (System prompt 1,100 → 756).
Offline read: in a copy with zero.jsonl files, python3 rfc653_bench.py read --snapshots-dir snapshots returns start + every turn; --point <turn> resolves a turn end; no model call, no replay. 18 files = 117,537 bytes (114.8 KiB).
Sanitization: no /home, /Users, provider tokens, or credentials found; only placeholders plus harmless /tmp/cc-socks/*.sock paths.
Final texts support the one manual pass (Run 2 T4 总纲: “画面定格切黑,去留留给观众”).
Non-blocking findings (fix report text when convenient; none invalidate the numbers)
P2 — REPORT §5 and the comment say System tools 3.0k → 110; sample-c-audit.json and its caveat say System tools 110 → 110. The actual shift is System prompt 1.1k → 756. The reconstructed_estimate_resume_fork flag is still justified; only the sentence is wrong.
P2 — The headline “12/12 轮均达到预期” conflicts with allBusinessPassed=false for Run 2 (T4 outline_synced_ending=false). The note and final text verify the manual pass; restate as 11/12 automated + 1/12 manually verified and qualify the T4 “3/3” cell.
P2 — T1 “3/3 passed” overstates Run 1: has_group_or_layout passes on four distinct positions, but Run 1 has groupCount=0, references=0, and no textual cross-links; the “expressed via group/text cross-links” note is false for Run 1. Tighten the check or mark Run 1 T1 partial (the context measurements are unaffected).
P3 — rfc653_bench.py sets REPO = Path(__file__).resolve().parents[3] at import; extracting to a shallow directory (e.g. /tmp/rfc653-l4-baseline-2026-12-04) makes even read crash with IndexError. Make REPO lazy/guarded so the README's zero-dependency claim holds.
P3 — The 21.4% “all startup fixed” figure depends on the inferred ~3.0k Skills addition to the measured 4,129 breakpoint; document the aggregation/cold-start formula. The strict 12.4% and upper bound 27.3% reproduce exactly; run-level startup shares run ~20.3–23.2% rather than the stated 20.1–22.8% range.
Ran: download + sha256; file inventory; raw-trace recomputation of all 12 turns; sample-C recomputation; conservation/monotonicity/compaction checks; snapshot schema; zero-trace offline read; final-text and position checks; credential/path scan.
Not run: Release checks (no PR/CI); live re-execution of the 3 sessions (no new provider calls); browser lane (no UI change).
Coordinator: @FayeSpica — 87/100 meets the 80 merge gate. Please accept the baseline once the P2 report-text / quality-gate corrections are applied. This review does not merge.
Activity
Redivesue commentedon Dec 4, 2026
RFC #653 / #579 D3 标定基线报告(L4 四轮 · Claude Code)
1. 核心结论(直接回答 #579 D3 与 #582)
在固定
main @ 728b4077、Claude Code 2.1.332、claude-opus-5-5(有效窗口 1,000,000)、纯净隔离数据目录(/tmp,无父仓库AutoMem污染)条件下,独立复跑 3 次 L4 四轮场景:compact系统事件或 compaction block,请求序列单调递增,且全部满足精确守恒T1_req1_cache_read + sum(cache_creation) + 2 == T4_peak_input)。cache_read中位数 967,170 tokens(范围705,193–1,264,053);4,129 tokens/req):中位数仅占 12.4%(范围11.8%–13.5%);4,129System+Tools +~3.0kSkills ≈~7.1k tokens/req):中位数占 21.4%(范围20.1%–22.8%,各轮 T1→T4 中位数31.9% → 21.8% → 18.4% → 14.9%);9,105–9,111 tokens/req计):中位数 ≤ 27.3%(范围25.5%–29.0%,各轮 T1→T4 中位数40.8% → 27.9% → 23.6% → 19.1%);71.0%–74.5%,扣除首轮提示后实际约 78.6%;其中 T2–T4 单轮下界达 72.1%–80.9%)。cache_creation(其中绝大部分是 CLI 探索capabilities/--help-field的工具输出),随后 T2 / T3 / T4 每轮只净增 4.0k / 5.8k / 7.0k;33k,空闲空间始终 >912k)。对 [feat] assistant: 压缩双模并与 harness 压缩对齐 #582 而言:短中程任务首要价值是稳前缀防重建 + 配合 [feat] assistant: 上下文组装改为选择器(预算 + 执行摘要 + 冻结引用) #581 减少/折叠历史工具结果原文(并权衡折叠历史引发的缓存重建成本),而真正的窗口压缩主要服务于更长会话或小窗口模型。2. 实验环境清单
728b40774628307f315a2b29c466237a8c434a11(main)Claude Code 2.1.332claude-opus-5-5(有效窗口1,000,000,maxOutputTokens=128,000)Bash,Read,Skill(--strict-mcp-config,--mcp-config '{"mcpServers":{}}',--setting-sources '')opendirector@inline (0.1.7),cc-plugin-agents-md@builtin,cc-plugin-telemetry@builtin,cc-plugin-privacy@builtin,cc-plugin-plugin-authoring@builtin/tmp隔离工作目录(无父仓库AutoMem),OPENDIRECTOR_API_URL指向隔离后端自身,每轮前/open续租约claude -p "/context" --no-session-persistence;各轮末:claude -p "/context" --resume <session_id> --fork-session --no-session-persistence(duration_api_ms=0,不向主对话追加消息)3. 3 次独立复跑汇总(中位数与范围)
cache_readcache_creation~7.1k) / 上界 (~9.1k)逐轮中位数与范围(n = 3)
cache_read中位数 [范围]cache_creation中位数~7.1k) 占比中位数~9.1k) 中位数/context:4.1k / 1m(见下方口径说明)references=0为已知文本互连缺口)references=0)x均严格按阅读顺序递增)4. 原生
/context分类快照与口径校准说明在 3 次运行的全部 15 个采样点上,原生
/context返回均稳定且一致:System prompt: 1.1k,System tools: 30,Skills: 3k,Memory files: 0,Messages: 10,Autocompact buffer: 33k,Free space: 962.9k,合计4.1k / 1m。29.9k / 1m(System prompt 1.1k / System tools 30 / Skills 3k / Messages 25.8k / Autocompact buffer 33k / Free 937.1k)33.6k / 1m(Messages 29.5k / Free 933.4k)44.5k / 1m(Messages 40.4k / Free 922.5k)51.4k / 1m(Messages 47.3k / Free 915.6k)实测校准发现(重要):
-p无头模式下,Claude Code/context将System tools仅估为30 tokens,而实际 API 首请求第一缓存断点(Run 2 / Run 3 精确一致)为4,129 tokens(即真实System prompt 1.1k + Tool schemas ~3.0k)。轮末/context总量会锚定到真实 API 末请求总输入 + 末次输出(例如 Run 1 T451,187 → 51.4k),但未计入的~3.0ktool schemas 会落入Messages项。因此报告中同时给出原生/context报告值与 API 校准口径(~7.1k与严格上界~9.1k)。--setting-sources "",Claude Code 仍会自动加载父仓库AutoMem(MEMORY.md,约1.1k tokens);改用独立/tmp数据目录后Memory files归零。5. RFC #653 验收项核对
main @ 728b4077上 3 次独立复跑(rfc653-l4-run1..3),每次 5 个采样点共 15 份窗口快照、12 轮工程内容核对与去重用量全部落盘(baseline-3x-summary.json)。cache_read = 140,434,与轮末result.usage精确对齐(4 轮全部精确对齐);39aff0c1-5864-4d8a-afee-e45874ac9fc4)执行--resume --fork-session --no-session-persistence旁路/context验证:总量准确报49.2k / 1m,但检测到System prompt (1.1k → 756)、System tools (3.0k → 110)较起点偏移,已自动标记为reconstructed_estimate_resume_fork(见sample-c-audit.json)。snapshots/<project_id>/<conversation_id>/{index.json,start.json,<turn_id>.json}落盘小型 JSON,共 18 个文件、总计 114.8 KB(无 SQLite);.claude.jsonl详细 trace 的独立临时目录实测离线回读(python3 rfc653_bench.py read --snapshots-dir snapshots),可直接定位全部 3 个对话的start与任一turn_id,不调用模型、不重放对话。6. 附件与复验方式
.claude.jsonl):Zhangbo-cn commentedon Dec 4, 2026
@FayeSpica — review of the RFC #653 L4 baseline deliverable (the report comment plus the attached data package), following the repo's
opendirector-reviewdiscipline.PASS 87/100 — f183121 Refs #653, Refs #579
Verified
/contextsnapshotsstatus=ok; 12 turns.cache_read/cache_creation/ peak input from all 12 raw.claude.jsonlfiles (last usage per message id): 12/12 exact match tobaseline-3x-summary.json.0 + 51,185 + 2 = 51,187;4,129 + 50,238 + 2 = 54,369;4,129 + 44,532 + 2 = 48,663.cache_readis monotonic across all 30/36/23 requests; no compaction events (only slash-command strings match "compact").cache_read = 140,434andresult.usagealso140,434; all 4 turns reconcile. The historical T4 snapshot is markedreconstructed_estimate_resume_forkwith a caveat (System prompt 1,100 → 756)..jsonlfiles,python3 rfc653_bench.py read --snapshots-dir snapshotsreturns start + every turn;--point <turn>resolves a turn end; no model call, no replay. 18 files = 117,537 bytes (114.8 KiB)./home,/Users, provider tokens, or credentials found; only placeholders plus harmless/tmp/cc-socks/*.sockpaths.Non-blocking findings (fix report text when convenient; none invalidate the numbers)
3.0k → 110;sample-c-audit.jsonand its caveat say System tools110 → 110. The actual shift is System prompt1.1k → 756. Thereconstructed_estimate_resume_forkflag is still justified; only the sentence is wrong.allBusinessPassed=falsefor Run 2 (T4outline_synced_ending=false). The note and final text verify the manual pass; restate as 11/12 automated + 1/12 manually verified and qualify the T4 “3/3” cell.has_group_or_layoutpasses on four distinct positions, but Run 1 hasgroupCount=0,references=0, and no textual cross-links; the “expressed via group/text cross-links” note is false for Run 1. Tighten the check or mark Run 1 T1 partial (the context measurements are unaffected).rfc653_bench.pysetsREPO = Path(__file__).resolve().parents[3]at import; extracting to a shallow directory (e.g./tmp/rfc653-l4-baseline-2026-12-04) makes evenreadcrash withIndexError. MakeREPOlazy/guarded so the README's zero-dependency claim holds.readis documented; there is no step-by-steprunrecipe (server,--ws-root, script placement). Add one so [feat] assistant: 上下文组装改为选择器(预算 + 执行摘要 + 冻结引用) #581 / [feat] assistant: 压缩双模并与 harness 压缩对齐 #582 can rerun the baseline.Score: acceptance criteria 23/25 + 23/25 + 22/25, data integrity 15/15, documentation/claim precision 4/10 = 87/100.
Ran: download + sha256; file inventory; raw-trace recomputation of all 12 turns; sample-C recomputation; conservation/monotonicity/compaction checks; snapshot schema; zero-trace offline read; final-text and position checks; credential/path scan.
Not run: Release checks (no PR/CI); live re-execution of the 3 sessions (no new provider calls); browser lane (no UI change).
Coordinator: @FayeSpica — 87/100 meets the 80 merge gate. Please accept the baseline once the P2 report-text / quality-gate corrections are applied. This review does not merge.