Commit 15c1aa6b 15c1aa6b5ebfd967d4d7f5fc72778f4c2e4c0532 by cnb.bofCdSsphPA

Add a repo status snapshot for faster session handoff

Constraint: Future sessions need a quick machine-readable summary of the verified repo state and next commands
Rejected: Depend on manual reconstruction from docs and git history alone | Slower and more error-prone during handoff
Confidence: high
Scope-risk: narrow
Directive: Keep the snapshot script aligned with the real default docs, drop zones, smoke outputs, and next-step commands
Tested: /usr/local/miniconda3/bin/python scripts/status_snapshot.py
Not-tested: Consumption of the snapshot by external automation beyond manual review
1 parent 93b2a506
......@@ -10,6 +10,7 @@ Use this checklist when a new session starts working on the repo.
## 2. Verify repo health
```bash
git status --short
/usr/local/miniconda3/bin/python scripts/status_snapshot.py
```
## 3. Verify open-dataset tooling
......
#!/usr/bin/env python3
import json
import subprocess
from pathlib import Path
root = Path.cwd()
workspace_root = root.parent
def sh(cmd):
return subprocess.check_output(cmd, shell=True, text=True).strip()
snapshot = {
'latest_commit': sh('git log --oneline -n 1'),
'docs': {
'readme': str((workspace_root / 'docs/README.md').resolve()),
'handoff': str((workspace_root / 'docs/session-handoff.md').resolve()),
'workflow': str((workspace_root / 'docs/open-dataset-workflow.md').resolve()),
},
'drop_zones': {
'fma': str((root / 'data/raw/fma_small_audio').resolve()),
'mtg_jamendo': str((root / 'data/raw/mtg_jamendo_audio').resolve()),
},
'verified_open_smoke_dirs': {
'manifests': str((root / 'data/external_ingested/synthetic_as_open_fixed/fma/manifests').resolve()),
'reports': str((root / 'reports/open-smoke-fixed/fma').resolve()),
'one_shot_reports': str((root / 'data/external_smoke/fma_reports_smoke').resolve()),
},
'next_commands': {
'inspect_fma': '/usr/local/miniconda3/bin/python src/data/external_adapters.py inspect-local fma data/raw/fma_small_audio --eval-ratio 0.2 --query-duration 8.0',
'smoke_fma': '/usr/local/miniconda3/bin/python src/data/external_adapters.py smoke-local fma data/raw/fma_small_audio --output-root data/external_smoke --eval-ratio 0.2 --query-duration 8.0 --train-epochs 1 --batch-size 2',
'inspect_jamendo': '/usr/local/miniconda3/bin/python src/data/external_adapters.py inspect-local mtg_jamendo data/raw/mtg_jamendo_audio --eval-ratio 0.2 --query-duration 8.0',
'smoke_jamendo': '/usr/local/miniconda3/bin/python src/data/external_adapters.py smoke-local mtg_jamendo data/raw/mtg_jamendo_audio --output-root data/external_smoke --eval-ratio 0.2 --query-duration 8.0 --train-epochs 1 --batch-size 2'
}
}
print(json.dumps(snapshot, ensure_ascii=False, indent=2))
......@@ -179,6 +179,29 @@
- 新 session 现在可以更快进入有效开发状态
- 启动成本和漏看关键文档/命令的风险进一步下降
### Stage: 状态快照脚本
完成项:
- 新增 [acr-engine/scripts/status_snapshot.py](../acr-engine/scripts/status_snapshot.py)
- 统一输出:
- latest commit
- 核心 docs 路径
- 真实数据 drop zones
- 已验证 smoke 目录
- 下一步推荐命令
- 将脚本接入 handoff 文档与 first-run checklist
验证结果:
- `/usr/local/miniconda3/bin/python scripts/status_snapshot.py` 成功
- 输出已正确指向:
- `/workspace/docs/README.md`
- `/workspace/docs/session-handoff.md`
- `/workspace/docs/open-dataset-workflow.md`
结论:
- 新 session 现在不只靠静态文档,也可以直接读取当前仓库状态快照
- 持续开发交接更稳
### Stage: confused 定向优化 v6(sample-level weighting)
完成项:
......
......@@ -275,6 +275,7 @@
- [docs/open-dataset-workflow.md](./open-dataset-workflow.md)
- [docs/session-handoff.md](./session-handoff.md)
- [acr-engine/FIRST_RUN_CHECKLIST.md](../acr-engine/FIRST_RUN_CHECKLIST.md)
- 运行 [acr-engine/scripts/status_snapshot.py](../acr-engine/scripts/status_snapshot.py)
2. 检查真实数据是否已落位:
- `acr-engine/data/raw/fma_small_audio/`
......