build(stage1): rebuild primary outcome package in the locked environment

Runs the four Stage 1 build scripts under .venv-research (python 3.12.14,
pandas 3.0.6, numpy 2.5.3, pyarrow 25.0.1, duckdb 1.5.5 - all matching
python-requirements.lock.txt), clearing the environment mismatch that halted
A-20260920-068. Brings generated artifacts back in line with the sources
corrected in 0c9645e.

Diff verified item by item: all 84 item_version_id unchanged, response
dictionary keys identical, and the only changes are the four authorized
corrections - YRBS 1995/1997 Louisiana exclusion, NSDUH attempt source
attribution and verification status, the five unattested inherited codes
marked needs_source, and the Morocco / Wallis and Futuna questionnaire
references switched to the stored text language.

Both signed reviewer CSVs are byte-identical before and after. Gate 1
acceptance audit still passes all seven machine deliverables and remains
blocked solely on two_actual_human_reviewers; Gate 1 stays in_progress.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Jinotech
2026-09-20 21:49:17 +12:00
co-authored by Claude Opus 5
parent b135c803a4
commit 4c7f42bfe4
8 changed files with 183 additions and 125 deletions
+31 -1
View File
@@ -1,6 +1,6 @@
# 项目进度档案
版本:1.19
版本:1.20
建立日期:2026-09-20
当前总状态:`in_progress`
当前阶段:阶段 1 `in_progress`;题库、回答字典、919,863 行回答长表及三调查设计字段/方法均已核验;Gate 1 仅剩主要结局的两名实际人工审核者签署
@@ -956,3 +956,33 @@ Gate 0 当前判定:`passed`。四项交付物齐备;目标总体政策、
- 下一步:
1. 在锁定环境执行 A-20260920-068 所列四个重建脚本并逐项 diff 验证 84 个 `item_version_id` 不变;
2. 修正 `review_date` 格式、完成 84 项裁决,再执行 Gate 1 逐项验收。
### A-20260920-070:在锁定环境执行 Stage 1 重建并逐项验证差异
- 时间:2026-09-20T21:48:23+12:00;阶段 1Gate 1 保持 `in_progress`
- 动作:执行 A-20260920-067 授权、A-20260920-068 因环境不符中止的 Stage 1 重建。行动前完整读取工作流与本档案并核对 `git status --short`(仅未跟踪 `CLAUDE.md`)。在 Windows 锁定环境 `E:\Model``.venv-research\Scripts\python.exe` 依次运行四个脚本,使生成物与 A-20260920-067 已修正的源头一致。未改动任何已签署审核行,未变更 Gate 状态。
- 环境核验(A-20260920-068 中止理由已消除):实测解释器 `3.12.14 (main, Aug 14 2026, 15:40:22) [MSC v.1944 64 bit (AMD64)]`,与 `smoke-test-result.json` 记录一致;`pandas 3.0.6``numpy 2.5.3``pyarrow 25.0.1``duckdb 1.5.5``python-requirements.lock.txt` 逐项一致。
- 事前保护:将 `research/stage1/` 全部 46 个文件备份至会话临时目录(不在仓库内),并记录重建前 SHA-256。运行前静态核对四个脚本的全部写出目标,确认 12 个输出文件中**不含**两份已签署审核表。
- 输入:`audit_yrbs_primary_outcome_sources.py``audit_gshs_primary_outcome_components.py``build_primary_outcome_registry.py``build_primary_outcome_package.py`(均无参数)。
- 输出(7 个文件发生变更):`item_bank.csv``response_dictionary.csv``survey_design.csv``source_conflicts.csv``primary_outcome_human_review_queue.csv``primary_outcome_registry.json``yrbs_primary_outcome_source_audit.json`
- 运行摘要:YRBS 审计 17 年/51 题,隔离 0 年、值域失败 0;GSHS 审计 191 组件、7 个含主要结局、行数不匹配 0、观测 673,499 行;registry 候选 66/派生 11/排除 40package 输出 84 题、396 编码、28 设计行、9 候选连接、32 冲突、84 审核队列。各项计数与 A-20260920-063 记录完全一致。
- 逐项差异验证(结果:**仅出现四项授权更正,无额外变化**):
- **84 个 `item_version_id` 完全不变**(排序后与 `HEAD` 版本 diff 为空),题库列结构 26 列不变;回答字典 396 行、(`item_version_id`,`raw_code`) 键集合完全一致。
- YRBS 1995/1997`population` 由“United States”改为载明 `excluding a majority of Louisiana`——题库 6 行、`survey_design.csv` 2 行、YRBS 审计 JSON 6 处。
- NSDUH 四年 `YUSUICTRY``source_file` 由空值改为各年本地 MRB 规范 PDF(题库 4 行、回答字典 36 行);`source_verification_status``official_indexed_text_verified_pdf_render_pending` 改为 `local_instrument_pdf_verified``population` 载明 `IF CURNTAGE = 12 - 17``notes` 同步。
- NSDUH 尝试题编码 85/94/97/98/995 编码 × 4 年 = 20 行):`derivation_rule` 标注为继承自 `YUSUITHK` 且无本地字典或 schema 佐证,`review_status``provisional` 改为 `needs_source`;编码未删除。
- GSHS 摩洛哥与瓦利斯和富图纳:问卷引用由 FRENCH/French 版改为存储题干语言对应的 ENGLISH/English 版——题库 6 行、回答字典 24 行、`source_conflicts.csv` 2 行;其余四个 GSHS 组件引用不变。
- registry 另新增 `unattested_answer_options` 字段,在 4 行中列出 85/94/97/98/99。
- 防伪与完整性检查:两份已签署审核表重建前后 SHA-256 **完全一致**reviewer_1 `cbd79847…`、reviewer_2 `5fe95245…`),裁决表亦未被写入;审核队列仍为 84 行/84 个唯一 ID,其 16 行变更与题库同源。中文路径字节未损坏。
- Gate 1 接受审计(对重建后生成物重跑 `audit_gate1_acceptance.py`):`item_bank` 84 行、`response_dictionary` 396 行、`survey_design` 28 行、`construct_ontology``responses_long` 919,863 行/80 个有回答题目、`item_links` 9 行、`source_conflicts` 32 行(11 项未关闭)七项全部 `passed`;唯一 `unmet_requirements` 仍精确收敛为 `two_actual_human_reviewers``gate1_acceptance_audit.json` 内容与重建前逐字节一致,说明重建未改变 Gate 判定。退出码 1 为未满足项的 fail-closed 信号,非运行错误。
- 未重建项:`responses_long.parquet` 未重新生成,因本次变更仅涉及来源、总体、备注与审核状态等元数据字段,`raw_code → canonical_code` 映射未变;重跑的 Gate 审计以现有 919,863 行长表通过,可证其仍然一致。
- 质量边界:生成物与源头一致不等于内容双审完成或抽样设计获批。全部题目仍为 `provisional`Gate 1 保持 `in_progress`
- 未解决问题:
- `review_date` 仍为 `2026/9/20`,验证器要求 ISO `YYYY-MM-DD`,据此 168 行报错。该字段属人工签署内容,按 A-20260920-063 的防伪边界(AI 不填写姓名、日期、决定或声明),**未由 AI 改写**,须由签署人本人确认后修正。
- 84 项裁决未完成;52 项来源缺口未关闭;`source_conflicts.csv` 11 项未关闭。
- A-20260920-067 列出的授权范围外事项仍未处理:牙买加与瓦利斯和富图纳的普查设计处理、所罗门群岛无国别工具、NSDUH 20222024 `question_text` 内的 codebook 说明与 2021 丢句、`LANGVER` 未用于语言状态。
- 下一步:
1. 由签署人确认并将 `review_date` 修正为 ISO `YYYY-MM-DD`,随后重跑 `validate_human_reviews.py`
2. 完成 84 项裁决并据此更新题库审核状态;
3. 重跑 Gate 1 逐项验收,全部满足后方可将阶段 1 标为 `passed`