https-deeplearning-ai / https-deeplearning-ai/spec-build-lab

Recording: Claude Code transcript compaction can erase the /prepare-build announcement bookend

未关闭
#19 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
3
派生
3
平均合并
20 小时 23 分钟
30 天内合并 PR
6

描述

Observed on run-08 (2026-09-07): the .session breadcrumb correctly pointed at the live transcript, but by extraction time the session had gone through context compaction and the transcript JSONL no longer contained the /prepare-build announcement text ("Run 08 — building in builds/run-08/") — the default opening bookend matched nothing and extract.py sliced from the start of the surviving transcript. The closing bookend (recent text) still matched. Recovered by re-running with --from="Spec fully absorbed", a phrase that survived compaction; the final log covers 138 turns of the build but has lost the allocation/checklist turns that preceded the compaction boundary.

Implication: the post-hoc recording design (CLAUDE.md "Recording is post-hoc") assumes the transcript retains raw turns for the whole build window. Long sessions violate that: compaction can drop any pre-boundary turn, including the opening bookend and early build activity.

Options to consider (next tooling pass):

  • /prepare-build writes the announcement text (or a unique token) into evals/run-NN/.session alongside the path, and extract.py falls back to slicing from the earliest surviving turn while WARNING loudly that the opening bookend was lost (today it says "no match — sliced from start" only in stdout).
  • Have /prepare-build note a timestamp at allocation; slice by timestamp rather than text.
  • Or extract eagerly (run /extract-build-log periodically during long builds) since re-runs are idempotent.

🤖 Generated with Claude Code

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先从 extract.py 和 /prepare-build 录制流程开始,然后阅读 CLAUDE.md 中关于录制是事后进行的指导。使用 run-08 场景,复现 transcript 压缩后的提取过程,并比较可用的 boundary 选项。完成的标准是:长会话不再悄无声息地丢失开头上下文,并且在原始 bookend 缺失时,提取过程能清楚报告使用了哪个 boundary。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。