Просмотр исходного кода

Merge branch 'closure/lane-a-contract-docs' into closure/integrate-3axis

Prod2U Integrator 3 месяцев назад
Родитель
Сommit
9e08949352

+ 21 - 33
ACCEPTANCE_MATRIX.md

@@ -1,37 +1,37 @@
-# Acceptance Matrix(活动真相)
+# Acceptance Matrix(活动真相 · 三轴)
 
-> Windows 2026-07-26 全绿矩阵叙述已归档:[`docs/historical/ACCEPTANCE_MATRIX-windows-20260726.md`](docs/historical/ACCEPTANCE_MATRIX-windows-20260726.md)。  
-> 下表为 **当前可声明** 状态;`pass` 仅当有绑定到所述 commit 的收据。
+> 二轴+电磁铁 closure 矩阵已归档:[`docs/historical/ACCEPTANCE_MATRIX-2axis-solenoid-closure-da7b05a.md`](docs/historical/ACCEPTANCE_MATRIX-2axis-solenoid-closure-da7b05a.md)。  
+> Windows 2026-07-26 叙述:[`docs/historical/ACCEPTANCE_MATRIX-windows-20260726.md`](docs/historical/ACCEPTANCE_MATRIX-windows-20260726.md)。  
+> 下表为 **当前可声明** 状态;`pass` 仅当有绑定到最终 tip 的收据。最终 tip TD / bitstream:**pending final tip TD**(unbound)。
 
 ## Frozen contract gates
 
 | Area | Contract evidence | Status |
 |---|---|---:|
-| Project configuration | `project.json`:4 FAN + 4 chamber PTC→8 PWM + intake/exhaust doors;UART/I2C/motor/watchdog/limits.startup | pass(源合同) |
-| Schema | 配置节闭合;count/list 漂移拒绝 | pass(源合同) |
-| Protocol model | CRC;duty 0..100;**SET_ALL 11 字节**;旧 14 字节拒绝;马达 `00=stop` / 电磁铁 `00=hold` | pass(源合同) |
-| Generator / ADC | 确定性产物;活动 ADC **25** 脚(含 `intake_solenoid_out`@P2);CON138–141 产品重映射 | pass(源合同) / solenoid **inferred** LOC |
-
-| Startup one-shot | 450 步/burst、1000 step/s、50 ms、最多 10 burst;`startup_done` 后 limit 惰性 | pass(源合同 + 既有 Icarus/formal 目标) |
+| Project configuration | `project.json`:4 FAN + 4 chamber PTC→8 PWM + Z/X/Y doors;UART/I2C/motor/watchdog/六限位 | pass(源合同) |
+| Schema | 配置节闭合;`stop_semantics` enum = truncate | pass(源合同) |
+| Protocol model | CRC;duty 0..100;**SET_ALL 11 字节**;旧 14 字节拒绝;三轴 `00=stop`;无电磁铁 | pass(源合同) |
+| Motors / EN | 450 step jog @ 1000;X/Y/Z 可重叠;EN `permanent_high` @ CON120.2/C11 | pass(源合同) |
+| Limits / hard truncate | 六限位;`runtime_use=true`;`truncate_current_high_pulse_immediately_after_synchronized_limit` | pass(源合同) |
+| Startup one-shot | 5000 close / 500 backoff @ 1000;`startup_done` 后运行期仍硬截断(非惰性) | pass(源合同) |
+| Active IO mapping | X/Y/Z @ CON104/105/106;limits @ CON12 + CON129;**禁止** solenoid / CON68 / CON34 / CON138–141 作活动 IO | pass(源合同) |
 
 ## Offline verification(收据绑定)
 
 | Area | Bound evidence | Status |
 |---|---|---:|
-| Python / contract | final matrix @ `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2` | pass |
-| Formal | final matrix @ `da7b05a…`(BMC vs prove 以各收据为准) | pass |
-| cocotb UART e2e | final matrix @ `da7b05a…` | **pass** |
-| Full matrix @ FINAL_COMMIT | `verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`(RUN_ID `grok45-final-20260805T013238Z`) | **pass**(含 cocotb) |
-| TD + bitstream | Linux `td2026` built @ **`8f28660f176e18e97a015e66bdae0ff747e0fc63`**;bit SHA-256 `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d`;绑定 FINAL_COMMIT(综合输入一致,tip 未强制重跑) | pass |
-| Package / replay | final closure 包已出具;`review-compact` @ tip `445814a…`(RUN_ID `packager-compact-20260805T042343Z`) | pass(closure + compact) |
+| Python / contract | Lane A 合同对齐 @ tip `cdf9f76…` 基线之上 | pass(合同/单测;非最终闭包) |
+| Formal / Icarus / cocotb / Verilator | 最终 tip 收据 | **pending final tip TD** |
+| Full matrix @ FINAL_COMMIT | 最终 tip | **pending final tip TD** |
+| TD + bitstream | Linux `td2026` @ 最终 tip;完整 SHA-256 | **pending final tip TD**(unbound) |
+| 历史旁路 bit(非 tip) | `45f548ab…` built @ `bb515af` | historical only — **不是** current |
+| Package / replay | firmware + compact + reference 三卷绑定最终 tip | **pending** |
 | Physical hardware | COM/JTAG/烧录未授权 | **`not_run`** |
 
-## Physical / board remaining uncertainties(不升格为 confirmed pass)
+## Physical / board notes
 
-- Intake solenoid:CON141.1/P2 **inferred** LOC;外部驱动/线圈极性未确认。
-- Exhaust X/Y STEP/DIR/EN 在 CON138–139 为 EX_GPIO 产品角色 **inferred**;X 限位 **CON68.3/M6**,Y 限位 **CON34.3/F9**。
-- 历史 A11 与 CON124 装配冲突记录保留;产品 y_limit 已迁至 CON34.3/F9。
-- 详见 [`docs/IO_EVIDENCE_MATRIX.zh-CN.md`](docs/IO_EVIDENCE_MATRIX.zh-CN.md)。
+- 物理路径权威:V1.2 BRD(board-viewer);活动探点见 [`docs/HARDWARE_TEST_ORDER_WAVEFORMS.zh-CN.md`](docs/HARDWARE_TEST_ORDER_WAVEFORMS.zh-CN.md)(CON104/105/106/120/12/129)。
+- 旧二轴探点 CON68/CON34/CON138–141 与电磁铁叙事已迁 historical,**不是**活动 IO。
 
 ## Frozen protocol numbers
 
@@ -39,16 +39,4 @@
 - Types:`0x01` / `0x02` / `0x82`。
 - SET_ALL:**11** 字节;Temperature:**27** 值 / 33 字节响应帧。
 - PWM:~19.993602047 Hz;boot PTC=0/FAN=10;watchdog 10 s → PTC=0/FAN=20。
-- Ordinary motor:450 steps @ 1000 step/s;X/Y 可重叠。
-
-## 3-axis closure (`3axis-20260805T171312Z`)
-
-| Lane | Status | Notes |
-|------|--------|-------|
-| python / board_viewer | pass | CON12 remap + detached validate |
-| icarus / verilator / cocotb | pass | 3-axis startup + runtime hard-stop |
-| formal | pass | BMC hard-stop/startup/dispatcher; prove motor-temp contract |
-| td2026 | pass | tip `bb515af…`; bitstream `45f548ab…` |
-| reference ZIP | pass | Linux; Windows handoff blocked |
-| Hardware validation | NOT RUN | COM/JTAG not authorized |
-
+- Ordinary motor:**450** steps @ 1000 step/s;startup close **5000** / backoff **500**;X/Y/Z 可重叠。

+ 1 - 1
AGENTS.md

@@ -58,7 +58,7 @@ Current authority is limited to the above contract files, this `AGENTS.md`, and
   - Y: LS CON12.3 C8, HS CON12.4 A8
   - Z: LS CON129.1 K16, HS CON129.2 J15
 - Motors: X STEP/DIR CON104.2/3 C12/B12; Y CON105.2/3 L12/J11; Z CON106.2/3 L14/K14.
-- Runtime: direction-select limit hard-stop each clock; finish current high half-cycle then no next rising edge; busy ignores new start.
+- Runtime: direction-select limit hard-stop each clock; truncate current STEP high pulse immediately after synchronized limit (`truncate_current_high_pulse_immediately_after_synchronized_limit`); busy ignores new start.
 - Startup (once per power-on/reset/reconfig): PTC 0%, FAN 10%, all axes DIR=1 close; up to 5000 steps @ 1000 steps/s per axis; if limit not hit, 500-step backoff and mark missed; X/Y/Z may move concurrently and stop independently.
 - `startup_done` is sticky until next FPGA power-on, global hardware reset, or reconfiguration.
 - After `startup_done`: startup motor controls idle; ordinary host jog and runtime limit policy apply; limit FSM does not restart.

+ 25 - 24
FINAL_DELIVERY_REPORT.md

@@ -1,49 +1,50 @@
 # Prod2U 门控温度 CPLD — 活动交付状态报告
 
-> 本文件描述 **当前活动真相**(Linux / 11 字节 SET_ALL)。  
-> 2026-07-26 Windows 清理轮次的最终包叙述已归档:[`docs/historical/FINAL_DELIVERY_REPORT-windows-20260726.md`](docs/historical/FINAL_DELIVERY_REPORT-windows-20260726.md)。
+> 本文件描述 **当前活动真相**(Linux / 11 字节 SET_ALL / **三轴 X/Y/Z**)。  
+> 二轴+电磁铁时代 closure 叙述已归档:[`docs/historical/FINAL_DELIVERY_REPORT-2axis-solenoid-closure-da7b05a.md`](docs/historical/FINAL_DELIVERY_REPORT-2axis-solenoid-closure-da7b05a.md)。  
+> Windows 清理轮次:[`docs/historical/FINAL_DELIVERY_REPORT-windows-20260726.md`](docs/historical/FINAL_DELIVERY_REPORT-windows-20260726.md)。
 
 ## 执行摘要
 
-- 产品合同已收敛为 **11 字节 SET_ALL**、进风默认电磁铁、出风 X/Y 步进;旧 14 字节格式拒绝。
-- 权威工具链为 **Linux**(`td2026` + OSS CAD / Python 验证)。Windows 收据与路径不是活动权威。
-- Final software closure tip:`da7b05a340a096ccfb4ccf4f656eb3efe6a957e2`(RUN_ID `grok45-final-20260805T013238Z`)。全矩阵(含 cocotb)**pass**;Hardware **`NOT RUN`**。
-- Packager integrate tip `445814a…`(RUN_ID `packager-compact-20260805T042343Z`)已合入 `dev`:仅打包/文档/测试工具链;不改写本报告中的产品 final commit / 矩阵 / TD / bitstream 真相。
+- 产品合同:**11 字节 SET_ALL**、三轴步进门 X/Y/Z、六限位、普通 jog **450** / startup **5000** / backoff **500**、EN `permanent_high`、限位硬截断 `truncate_current_high_pulse_immediately_after_synchronized_limit`。
+- **无** 电磁铁进风门;活动 IO **不是** CON68 / CON34 / CON138–141。
+- 权威工具链为 **Linux**(`td2026` + OSS CAD / Python 验证)。
+- 最终 tip TD / bitstream:**pending final tip TD**(unbound)。历史旁路 bit `45f548ab…` @ `bb515af` **不是** tip。
+- Hardware **`NOT RUN`**。在最终 tip 独占 TD 与三卷打包完成前,**禁止宣称可刷机固件完成**。
 
 ## 关键标识(活动)
 
 | 项目 | 值 |
 |---|---|
-| FINAL_COMMIT | `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2` |
-| 闭合 RUN_ID | `grok45-final-20260805T013238Z` |
-| SET_ALL payload | **11 字节** |
-| Full matrix(含 cocotb) | **pass**(`verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`) |
-| TD built commit | `8f28660f176e18e97a015e66bdae0ff747e0fc63` |
-| Bitstream SHA-256 | `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d` |
-| TD tip 重跑 | **否**(综合输入与 tip 一致;绑定既有位流) |
+| 合同对齐基线 tip | `cdf9f76b22d75f1c2bc1e7ff99a49d2897a8dcb7`(非最终闭包 tip) |
+| FINAL_COMMIT | **pending final tip TD**(unbound) |
+| SET_ALL payload | **11 字节**(Z/X/Y) |
+| stop_semantics | `truncate_current_high_pulse_immediately_after_synchronized_limit` |
+| Full matrix @ final tip | **pending final tip TD** |
+| TD built commit / Bitstream SHA-256 | **pending final tip TD**(unbound) |
+| 历史 firmware bit(非 tip) | `45f548ab…` @ `bb515af` |
 | Hardware validation | **`NOT RUN`** |
 
-## 风门语义摘要
+## 风门与限位摘要
 
-- **马达(exhaust X/Y)`00` = stop**(无新 STEP jog)。
-- **电磁铁(intake)`00` = hold**(保持当前 latch;非“停止脉冲”语义)。
-- `01` = open;`02` = close。细节见协议文档。
+- 三轴门字节 `00` = stop(无新 jog);`01` open;`02` close。
+- 六限位运行期与 startup 均硬截断;runtime limits are **not** inert。
+- EN:FPGA 恒 1(`permanent_high`)。
 
 ## 合法 blocked / not_run
 
-- `intake_solenoid_out`:CON141.1/P2 **inferred** LOC;外部驱动/线圈极性未确认。
-- X/Y STEP/DIR/EN:CON138–139 EX_GPIO 产品角色 **inferred**;X 限位 CON68.3/M6,Y 限位 CON34.3/F9。
-- 历史 A11 vs CON124 装配冲突记录保留;产品 y_limit 已迁至 CON34.3/F9。
 - COM / JTAG / 烧录未授权 → Hardware **`not_run`**。
+- 最终 tip 独占 TD、全矩阵收据、三卷打包与活动文档最终身份绑定 → **pending**。
 
 ## 明确作废的活动声明
 
 以下内容**不得**再当作 tip / 活动 pass:
 
-- Windows 路径下的 “全矩阵 pass + cocotb pass”(`d99f354` / `4ddfbec` 时代叙述)。
-- SET_ALL **14 字节** 为当前合同。
-- 将过期 tip `f82c41e`、失败矩阵 `6f32493`、历史 TD `ead5a3e` / bitstream `a7b5c119…` 当作当前 final closure 证据。
+- 禁止当作 tip:二轴+电磁铁 final closure(`da7b05a` / TD `8f28660` / 旧位流 `ce3157c5…`)。
+- 禁止将 `45f548ab…` 当作 tip 位流(其构建 commit 为 `bb515af`)。
+- 禁止复活:SET_ALL **14 字节**、电磁铁 intake、`00=hold`、limit-inert 政策、CON68/CON34/CON138–141 作活动 IO。
+- 禁止当作 pass:Windows 路径下的虚假全矩阵(`d99f354` / `4ddfbec`)。
 
 ## 结论
 
-软件闭环已完成:FINAL_COMMIT `da7b05a…`,矩阵(含 cocotb)**pass**,TD 位流 `ce3157c5…` 已绑定。物理硬件为 **`NOT RUN`**;物理 blockers 仍开放。
+三轴源码与合同截断语义已对齐为活动真相;**最终 tip TD / bitstream 仍 unbound(pending final tip TD)**。物理硬件为 **`NOT RUN`**。

+ 12 - 13
OPEN_QUESTIONS.md

@@ -1,25 +1,24 @@
 # Open Questions and Accepted Uncertainty
 
-No user product-contract decision currently blocks the **11-byte SET_ALL + solenoid intake** software path.
+No user product-contract decision currently blocks the **11-byte SET_ALL + three-axis X/Y/Z** software path.
 
 ## Accepted uncertainty / explicit status
 
-- **Hardware validation: `NOT RUN`** — COM/JTAG/programming not authorized; board response and real fan load behavior unverified.
-- **FINAL_COMMIT**: `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2` (closure RUN_ID `grok45-final-20260805T013238Z`).
-- **Verification matrix**: full matrix **pass** including cocotb (`verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`).
-- **TD**: built commit `8f28660f176e18e97a015e66bdae0ff747e0fc63`; bitstream SHA-256 `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d` bound to FINAL_COMMIT (identical synthesis inputs; tip rebuild not required).
+- **Hardware validation: `NOT RUN`** — COM/JTAG/programming not authorized.
+- **FINAL_COMMIT / tip TD / bitstream SHA-256**: **pending final tip TD** (unbound). Do not invent a fake final SHA.
+- Prior bypass firmware bitstream `45f548ab…` was built at `bb515af`, **not** tip — not active closure evidence.
+- Contract/source baseline for this docs lane: `cdf9f76b22d75f1c2bc1e7ff99a49d2897a8dcb7` (alignment only).
+- Active contract: X/Y/Z, six limits, 450/5000/500, EN `permanent_high`, hard truncate `truncate_current_high_pulse_immediately_after_synchronized_limit`. Runtime limits are **not** inert.
 - PWM ~20 Hz is a protocol/debug target; it does not guarantee a specific fan mechanical speed or torque.
-- Packager integrate tip `445814a…` (`packager-compact-20260805T042343Z`) merged to `dev`; packaging-only — does not reopen the software/TD closure above.
 
 ## Physical / evidence remaining uncertainties
 
-- `intake_solenoid_out` is **inferred-LOC’d** on **CON141.1 / P2** (EX_GPIO33). Connector→series-R→ball is board-data backed; external driver / coil polarity still **unconfirmed**.
-- Exhaust X/Y STEP/DIR/EN on CON138–CON139 are **inferred** EX_GPIO roles; X limit on **CON68.3 / M6**, Y limit on **CON34.3 / F9** (fan-header tach pin3 repurposed).
-- Historical **A11 vs CON124** WATER_COOL conflict remains a board-assembly note; product **y_limit** is CON34.3 / F9 (not A11).
-- Contract prose historically said CON30.3(丝印) for X limit; V1.2 product probe is now **CON68.3 / M6**.
-- CON34/CON68 pin2 (+12V fan rails) and pin1 (GND) must not carry limit signals.
+- Board bring-up and real fan/PTC/motor load behavior remain unverified until hardware is authorized.
+- Active IO probes: CON104/105/106 (STEP/DIR), CON120.2 (EN), CON12 + CON129 (six limits). Solenoid / CON68 / CON34 / CON138–141 are **not** active product IO (see `docs/historical/`).
 
 ## Non-goals for docs lane
 
-- Do not treat archived Windows packages (`d99f354` / `4ddfbec`, `C:\Users\...`) as current pass evidence.
-- Do not revive superseded tip claims (`f82c41e`, matrix fail `6f32493`, TD `ead5a3e` / bitstream `a7b5c119…`) as final closure truth.
+- Do not treat archived 2-axis/solenoid closure (`da7b05a`, TD `8f28660`, bitstream `ce3157c5…`) as current tip truth.
+- Do not present `45f548ab…` as tip bitstream.
+- Do not revive Windows packages (`d99f354` / `4ddfbec`, `C:\Users\...`) as current pass evidence.
+- Do not claim flashable firmware closure before final tip TD + three-volume packaging bind.

+ 12 - 11
PLAN.md

@@ -1,21 +1,22 @@
-# Prod2U active plan pointer
+# Prod2U active plan pointer(三轴闭包)
 
-- Final software closure RUN_ID: `grok45-final-20260805T013238Z`
-- FINAL_COMMIT: `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2`
-- Full matrix (incl. cocotb): **pass** (`verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`)
-- TD built commit: `8f28660f176e18e97a015e66bdae0ff747e0fc63`
-- Bitstream SHA-256: `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d`
+- Contract truth: X/Y/Z, six limits, 450/5000/500, EN `permanent_high`, hard truncate `truncate_current_high_pulse_immediately_after_synchronized_limit`
+- FINAL_COMMIT / tip TD / Bitstream SHA-256: **pending final tip TD** (unbound)
+- Historical bypass bit `45f548ab…` @ `bb515af` — **not** tip
+- Contract/source baseline tip: `cdf9f76b22d75f1c2bc1e7ff99a49d2897a8dcb7` (docs/contract lane start; not final closure)
 - Hardware validation: **`not_run`**
-- Physical blocked: intake solenoid ball/ADC; X/Y silk mapping; A11/CON124
+- Active IO: CON104/105/106/120/12/129 — **not** solenoid / CON68 / CON34 / CON138–141; runtime limit **not** inert
 
-## Packager compact (does not reopen product closure evidence)
+## Closure sequence (integration owns)
 
-- Packager integrate tip: `445814ad54467996cb4150651e80db3933cfd582` (RUN_ID `packager-compact-20260805T042343Z`; delivery tip = current `dev` HEAD after docs align)
-- Default upload profile: `review-compact` (no full git bundle; unified `source/` + `evidence/` + `meta/`)
-- Pre-closure docs plan archived: [`docs/historical/PLAN-grok45-final-pre-closure-20260805.md`](docs/historical/PLAN-grok45-final-pre-closure-20260805.md)
+1. Merge parallel lanes (contract/docs, RTL naming, formal/sim, packaging, BRD/reference).
+2. Exclusive `td2026` on clean final tip; bind full bitstream SHA-256.
+3. Full matrix + three-volume package; fill FINAL_COMMIT / bit identity into activity docs.
+4. Independent read-only review session.
 
 ## Authority
 
 - Linux `td2026` + OSS CAD / Python verification
 - Contract: `projects/prod2u-door-temp/project.json`, requirements, protocol, `AGENTS.md`
 - Active status docs: `README.zh-CN.md`, `ACCEPTANCE_MATRIX.md`, `FINAL_DELIVERY_REPORT.md`, `OPEN_QUESTIONS.md`
+- Superseded 2-axis/solenoid plans: [`docs/historical/`](docs/historical/)

+ 29 - 19
README.zh-CN.md

@@ -1,6 +1,6 @@
 # Prod2U 门控温度 CPLD
 
-本仓库实现 `prod2u-door-temp` 门温控:25 MHz 主时钟、UART `115200 8N1`、无流控。统一帧为 `A5 5A type length payload CRC16_LE`。CRC-16/CCITT-FALSE 覆盖 type、length 与 payload,线路低字节在前。
+本仓库实现 `prod2u-door-temp`:**四腔热控 + 腔体 1 三轴步进风门(X/Y/Z)**。25 MHz 主时钟、UART `115200 8N1`、无流控。统一帧为 `A5 5A type length payload CRC16_LE`。CRC-16/CCITT-FALSE 覆盖 type、length 与 payload,线路低字节在前。
 
 **权威执行环境:Linux 容器**(`td2026`、Python/Icarus/Verilator/formal/cocotb)。Windows 路径与旧收据仅作历史参考,见 [`docs/historical/`](docs/historical/)。
 
@@ -8,40 +8,50 @@
 
 | 类型 | 说明 |
 |---|---|
-| `0x01 SET_ALL` | **11 字节** payload:4 FAN + 4 chamber PTC(各复制到 2 路物理 PTC PWM)+ 进风门/出风门 X/出风门 Y;成功无回复。旧 14 字节 length `0x0E` 静默丢弃。 |
+| `0x01 SET_ALL` | **11 字节** payload:4 FAN + 4 chamber PTC(各复制到 2 路物理 PTC PWM)+ Z/X/Y 门字节;成功无回复。旧 14 字节 length `0x0E` 静默丢弃。 |
 | `0x02 GET_TEMPERATURE` | 空 payload;读完 27 项 CT7428 后只回一帧温度。 |
 | `0x82 TEMPERATURE_DATA` | 27 字节 payload,总帧长 33 字节。 |
 
 PTC/FAN 占空为十进制 0..100。PWM ≈20 Hz。PTC active-high;FAN 在 FPGA 输出为 active-low。启动目标 PTC=0、FAN=10;看门狗 10 s → PTC=0、FAN=20。
 
-### 风门字节语义(关键)
+### 门字节语义(三轴步进,无电磁铁)
 
-| 字节 | 执行器 | `00` | `01` | `02` |
+| 字节 | 轴 | `00` | `01` | `02` |
 |---|---|---|---|---|
-| 偏移 8 进风门 | 默认**电磁铁** | **保持(hold)** | open latched | closed latched |
-| 偏移 9/10 出风门 X/Y | **步进马达** | **停止(stop / 无新 jog)** | 开门 DIR=0 | 关门 DIR=1 |
+| 偏移 8 | Z | stop(无新 jog) | open DIR=0 | close DIR=1 |
+| 偏移 9 | X | stop(无新 jog) | open DIR=0 | close DIR=1 |
+| 偏移 10 | Y | stop(无新 jog) | open DIR=0 | close DIR=1 |
 
-马达普通 jog:450 步 @ 1000 step/s;X/Y 可并行。详细合同见 [`docs/prod2u-door-temp-protocol.zh-CN.md`](docs/prod2u-door-temp-protocol.zh-CN.md) 与 `projects/prod2u-door-temp/project.json`。
+普通 jog:**450** 步 @ 1000 step/s;X/Y/Z 可并行。电机 EN:CON120.2 / C11,FPGA `permanent_high`(板级 NPN 反相后座端永久使能)。详细合同见 [`docs/prod2u-door-temp-protocol.zh-CN.md`](docs/prod2u-door-temp-protocol.zh-CN.md) 与 `projects/prod2u-door-temp/project.json`。
 
-## 启动限位(one-shot)
+## 六限位与启动 / 运行期硬截断
 
-上电/`startup_done==0`:X/Y 向 close(DIR=1)间歇寻限位,最多 10 burst × 450 步 @ 1000 step/s,burst 间隔 50 ms;限位 active-high(X: CON68.3/M6,Y: CON34.3/F9;风扇座 pin3 tach 复用,见 IO 证据)。`startup_done` 前主机 UART 被丢弃;完成后限位对普通 jog **惰性**。
+六路限位(FPGA active-high,`runtime_use=true`):
 
-## 当前基线与验证真相(final closure)
+| 轴 | LS | HS |
+|---|---|---|
+| X | CON12.1 A5 | CON12.2 B6 |
+| Y | CON12.3 C8 | CON12.4 A8 |
+| Z | CON129.1 K16 | CON129.2 J15 |
+
+马达:X CON104.2/3 C12/B12;Y CON105.2/3 L12/J11;Z CON106.2/3 L14/K14。
+
+- **Startup(上电一拍)**:PTC=0、FAN=10;三轴 DIR=1 关门寻限,每轴最多 **5000** 步 @ 1000 step/s;未命中则 **500** 步 backoff;`startup_done` 前主机帧丢弃。
+- **硬截断**:`stop_semantics=truncate_current_high_pulse_immediately_after_synchronized_limit`(同步限位后立即截断当前 STEP 高脉冲)。Startup 与运行期均硬停;runtime limits are **not** inert。
+
+活动 IO **不是** 电磁铁 / CON68 / CON34 / CON138–141;旧二轴+电磁铁叙述见 [`docs/historical/`](docs/historical/)。
+
+## 当前基线与验证真相(三轴闭包进行中)
 
 | 项 | 值 |
 |---|---|
-| FINAL_COMMIT | `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2` |
-| 闭合 RUN_ID | `grok45-final-20260805T013238Z` |
-| 全矩阵(含 cocotb) | **pass**(`verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`) |
-| TD built commit | `8f28660f176e18e97a015e66bdae0ff747e0fc63`(生产综合输入与 tip 一致,tip 未强制重跑 TD) |
-| Bitstream SHA-256 | `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d` |
+| 合同 / 源码基线 tip | `cdf9f76b22d75f1c2bc1e7ff99a49d2897a8dcb7`(Lane A 起点;**不是**最终固件闭包 tip) |
+| FINAL_COMMIT / 最终 tip TD | **pending final tip TD**(unbound) |
+| Bitstream SHA-256 | **pending final tip TD**(unbound) |
+| 历史旁路 firmware bit | `45f548ab…` 构建于 `bb515af`,**不是** tip / 当前闭包证据 |
 | Hardware / JTAG / 烧录 | **`not_run`**(未授权) |
-| 物理 uncertainties | 进风电磁铁外部驱动/线圈极性;CON138–139 马达 EX_GPIO 角色 inferred;限位复用风扇座 pin3(X:CON68 / Y:CON34);历史 A11 vs CON124 |
-
-`packager-compact-20260805T042343Z` 已合入 `dev`(integrate tip `445814a…` + 活动文档对齐;review-compact 打包体系);生产综合输入相对 `da7b05a…` **未变**,**不**改写上表软件/TD/bitstream 闭合证据。
 
-陈旧 Windows 最终交付叙述(`d99f354` / `4ddfbec`、虚假 cocotb 全绿、`C:\Users\...` 包路径)及过期 tip 声明(`f82c41e` / `ead5a3e` / `a7b5c119…`)已移至 [`docs/historical/`](docs/historical/),**不是**当前活动真相。
+在最终 tip 独占 TD 完成前:**禁止宣称可刷机固件完成**。陈旧二轴/电磁铁“final closure”(`da7b05a` / `ce3157c5…` / `8f28660…`)及 Windows 叙述已归档,**不是**当前活动真相。
 
 ## 离线验证入口(Linux)
 

+ 54 - 52
docs/HARDWARE_TEST_ORDER_WAVEFORMS.zh-CN.md

@@ -1,95 +1,97 @@
-# Prod2U V1.2 硬件测试顺序与期望波形(简版)
+# Prod2U V1.2 硬件测试顺序与期望波形(三轴活动版)
 
-run_id: `con138-141-20260805T061504Z`  
-前提:比特流与 active ADC 含 confirmed PWM/UART/I2C 球 + CON138–141 **inferred** 电机/限位/电磁铁球(共 25);`intake_solenoid_out` **LOC @ P2**。  
+前提:比特流与 active ADC 绑定 **最终 tip TD**(当前 **pending final tip TD** / unbound)。  
+历史旁路 bit `45f548ab…` @ `bb515af` **不是** tip。  
 本文件 **不是** 已执行硬件回执;物理 COM/JTAG 未授权前状态为 `not_run`。
 
-引脚权威见 [`IO_EVIDENCE_MATRIX.zh-CN.md`](IO_EVIDENCE_MATRIX.zh-CN.md)。
+旧二轴+电磁铁探点(CON68/CON34/CON138–141、solenoid)已归档:  
+[`historical/HARDWARE_TEST_ORDER_WAVEFORMS-2axis-solenoid-pre-3axis.zh-CN.md`](historical/HARDWARE_TEST_ORDER_WAVEFORMS-2axis-solenoid-pre-3axis.zh-CN.md)。
 
-## 0. 安全与探点
+引脚权威见 [`IO_EVIDENCE_MATRIX.zh-CN.md`](IO_EVIDENCE_MATRIX.zh-CN.md) 与 `project.json`。
 
-- 逻辑探点优先 FPGA 球侧 3.3 V(或串联 0R 后);风扇/PTC 座为 12 V 功率域。
-- FAN:FPGA 球 **active-low** PWM;座端经板级反相后给风扇。
-- PTC:FPGA 球 **active-high**。
-- 限位:期望 **active-high** 表示已到位(合同);用高阻探头,勿强驱。
-- X 限位探点:**CON68.3 / M6**(FAN_GPIO47;旧 CON140.1/T11、CON125.3/B9 已退役)。
-- Y 限位探点:**CON34.3 / F9**(FAN_GPIO11;旧 CON68.4/L8、CON140.2/P13、CON12.3/A11 已退役)。
-- X 电机:**CON139.1–3** → STEP/DIR/EN_n(R6/R8/T7)。
-- Y 电机:**CON138.1–2** → STEP/DIR(T3/R4)。
-- 进风电磁铁逻辑球:**CON141.1 / P2**(外部功率驱动自备)。
+## 0. 安全与探点(活动 IO)
+
+- 逻辑探点优先 FPGA 球侧 3.3 V;风扇/PTC 座为 12 V 功率域。
+- FAN:FPGA 球 **active-low** PWM;PTC:FPGA 球 **active-high**。
+- 限位:FPGA **active-high**;用高阻探头,勿强驱。
+- **X 限位**:CON12.1/A5(LS)、CON12.2/B6(HS)。
+- **Y 限位**:CON12.3/C8(LS)、CON12.4/A8(HS)。
+- **Z 限位**:CON129.1/K16(LS)、CON129.2/J15(HS)。
+- **X 电机**:CON104.2/3 → STEP/DIR(C12/B12)。
+- **Y 电机**:CON105.2/3 → STEP/DIR(L12/J11)。
+- **Z 电机**:CON106.2/3 → STEP/DIR(L14/K14)。
+- **EN**:CON120.2 / C11;FPGA `permanent_high`(恒 1);板级 NPN 反相后座端永久使能。
+- **禁止**将 solenoid / CON68 / CON34 / CON138–141 当作活动探点。
 
 ## 1. 推荐测试顺序
 
 | 步 | 项目 | 操作摘要 | 通过判据(期望) |
 |---:|------|----------|------------------|
-| 1 | 上电静态 | 上电,不发 UART | PTC 球≈0;FAN 球对应默认 duty≈10%(~20 Hz);EN_n≈0(常使能低);STEP 无边沿 |
-| 2 | Startup 关门寻限位 | 观察 X/Y STEP + 限位 | 见 §2.1;`startup_done` 前主机帧应被丢弃(无 TEMP 响应) |
+| 1 | 上电静态 | 上电,不发 UART | PTC 球≈0;FAN 球对应默认 duty≈10%(~20 Hz);FPGA EN=1;STEP 无边沿 |
+| 2 | Startup 关门寻限位 | 观察 X/Y/Z STEP + 六限位 | 见 §2.1;`startup_done` 前主机帧丢弃 |
 | 3 | UART 冒烟 | startup 完成后发 GET_TEMPERATURE | 收到 `0x82` 27 字节温度载荷 + CRC |
-| 4 | FAN PWM | SET_ALL 单腔风扇 0/50/100 | §2.2;其余腔保持 |
-| 5 | PTC PWM | SET_ALL 单腔 PTC 0/50/100 | §2.3;同腔两路物理 PTC 波形一致 |
-| 6 | 出风门 jog | SET_ALL exhaust X/Y = 01 或 02 | §2.4;450 个 STEP 上升沿 @ 1000 step/s |
-| 7 | 运行期限位惰性 | startup 后拨动限位 | STEP 不被 limit 截断 |
-| 8 | 看门狗 | 停发 SET_ALL ≥10 s | PTC→0,FAN→20;马达停 |
-| 9 | 进风电磁铁 | SET_ALL intake = 01/02/00 | CON141.1/P2 电平随 open/close/hold;**外部驱动必接** |
+| 4 | FAN PWM | SET_ALL 单腔风扇 0/50/100 | §2.2 |
+| 5 | PTC PWM | SET_ALL 单腔 PTC 0/50/100 | §2.3;同腔两路物理 PTC 一致 |
+| 6 | 三轴 jog | SET_ALL Z/X/Y = 01 或 02 | §2.4;每轴最多 450 个 STEP 上升沿 @ 1000 step/s |
+| 7 | 运行期硬截断 | startup 后 jog 时拨动目标限位 | STEP 高脉冲立即截断;无新上升沿(非惰性) |
+| 8 | 看门狗 | 停发 SET_ALL ≥10 s | PTC→0,FAN→20;STEP 停;EN 仍永久使能 |
 
 ## 2. 期望波形
 
-时钟 25 MHz;时间按合同标称(允许晶振/分频误差)。
+时钟 25 MHz;时间按合同标称。
 
 ### 2.1 Startup 关门寻限位
 
-- DIR = 1(关);EN_n = 0。
-- 每轴:最多 10 个 burst;每 burst ≤450 个 STEP **上升沿**;步进率 1000 step/s → 半周期 0.5 ms,周期 1 ms。
-- burst 间隔:STEP 保持低 **50 ms**,再开下一 burst。
-- 限位在 burst 内变高:该轴不再产生新的上升沿;若当前 STEP 为高,完成半周期后落下。
+- DIR = 1(关);FPGA EN = 1(`permanent_high`)。
+- 每轴最多 **5000** 个 STEP 上升沿 @ 1000 step/s;未命中 LS 则 DIR=0 回退最多 **500**(HS 可提前停)。
+- 限位同步变高:该轴 **立即截断** 当前 STEP 高脉冲(`truncate_current_high_pulse_immediately_after_synchronized_limit`),不再产生新上升沿。
 - 限位上电已为高:该轴不运动。
-- X/Y 可重叠,独立停止。
+- X/Y/Z 可重叠,独立停止。
 
 ```text
-STEP  (axis seeking):  ‾|_|‾|_| … (≤450 rises) … |_  (50 ms low)  _|‾|_| …
-LIMIT (active-high):   ____________/‾‾‾‾‾‾  → stop further rises
+STEP  (axis seeking):  ‾|_|‾|_| … (≤5000 rises) …
+LIMIT (active-high):   ____________/‾‾‾‾‾‾  → truncate high immediately
 ```
 
 ### 2.2 FAN PWM(~20 Hz)
 
-- 相位计数 100;slot ≈1042 clk @25 MHz → f≈19.99 Hz,周期≈50.05 ms。
-- duty=D%:FPGA 球上 **低有效** 脉宽约占 D%(再经板级到座)。
-- duty=0:球侧接近常高(风扇停);duty=100:接近常低。
+- 相位计数 100;slot ≈1042 clk @25 MHz → f≈19.99 Hz。
+- duty=D%:FPGA 球上 **低有效** 脉宽约占 D%。
 
 ### 2.3 PTC PWM(~20 Hz)
 
 - 同 ~20 Hz 时基;球侧 **高有效**。
-- 同腔两路(如 G16/F16)占空应一致。
+- 同腔两路占空应一致。
 
 ### 2.4 普通 jog(startup_done 后)
 
-- 步进马达:`01` DIR=0 开门;`02` DIR=1 关门;**`00` = stop**(无新 STEP 边沿 / 不启动新 jog)。
-- 进风电磁铁(若已接线):`01` open latch;`02` closed latch;**`00` = hold**(保持;非马达 stop 语义)。无 FPGA ball 时本步 **blocked / 跳过**。
-- 非零马达命令:固定 **450** 个 STEP 上升沿 @ 1000 step/s(约 450 ms 脉冲列)。
-- 运行期 LIMIT 翻转 **不应** 截断 STEP。
+- `01` DIR=0 开门;`02` DIR=1 关门;`00` = stop(无新 jog)。
+- 非零命令:最多 **450** 个 STEP 上升沿 @ 1000 step/s。
+- 运行期目标限位有效:**硬截断**(非 inert)。
 
 ```text
 DIR   ____/‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
-STEP  ....|‾|_|‾|_| … 450 rising edges … |_
-EN_n  0(保持)
+STEP  ....|‾|_|‾|_| … ≤450 rising edges … |_
+EN    1(FPGA permanent_high)
 ```
 
 ### 2.5 UART(115200 8N1)
 
 - bit 宽 = 217 clk @25 MHz ≈ 8.68 µs。
-- 帧:`A5 5A | type | length | payload | CRCL | CRCH`(CRC-16/CCITT-FALSE)。
+- 帧:`A5 5A | type | length | payload | CRCL | CRCH`。
 - GET_TEMPERATURE → `0x82`,payload 27;SET_ALL **无** 应答。
 
-## 3. 探点速查(V1.2)
+## 3. 探点速查(V1.2 活动)
 
-| 信号 | 球 | V1.2 优先探点 | 矩阵等级 |
-|------|----|---------------|----------|
-| UART2 | N11/M10 | CON78.2/1(RS-232 电平!逻辑域在 U23 FPGA 侧) | confirmed |
+| 信号 | 球 | V1.2 优先探点 | 备注 |
+|------|----|---------------|------|
+| UART2 | N11/M10 | CON78.2/1(RS-232 电平!) | confirmed |
 | FAN1–4 | C4/B5/B1/A14 | CON8/24/25/26.7 或球侧 | confirmed |
-| PTC 腔1–4 | F16/G16… | CON18/27/28/29 功率针(危险)或 HEAT 控制侧 | confirmed |
-| X limit | M6 | **CON68.3** | inferred(FAN_GPIO47 tach 复用) |
-| Y limit | F9 | **CON34.3** | inferred(FAN_GPIO11 tach 复用) |
-| X STEP/DIR | R6/R8 | **CON139.1/2** | inferred |
-| Y STEP/DIR | T3/R4 | **CON138.1/2** | inferred |
-| EN_n | T7 | **CON139.3** | inferred |
-| 进风电磁铁 | P2 | **CON141.1** | inferred(外部驱动) |
+| PTC 腔1–4 | F16/G16… | 功率针危险;优先控制侧 | confirmed |
+| X LS/HS | A5/B6 | **CON12.1/2** | runtime_use |
+| Y LS/HS | C8/A8 | **CON12.3/4** | runtime_use |
+| Z LS/HS | K16/J15 | **CON129.1/2** | runtime_use |
+| X STEP/DIR | C12/B12 | **CON104.2/3** | |
+| Y STEP/DIR | L12/J11 | **CON105.2/3** | |
+| Z STEP/DIR | L14/K14 | **CON106.2/3** | |
+| EN | C11 | **CON120.2** | FPGA 恒 1 |

Разница между файлами не показана из-за своего большого размера
+ 41 - 58
docs/TD_USAGE.zh-CN.md


+ 54 - 0
docs/historical/ACCEPTANCE_MATRIX-2axis-solenoid-closure-da7b05a.md

@@ -0,0 +1,54 @@
+# Acceptance Matrix(活动真相)
+
+> Windows 2026-07-26 全绿矩阵叙述已归档:[`docs/historical/ACCEPTANCE_MATRIX-windows-20260726.md`](docs/historical/ACCEPTANCE_MATRIX-windows-20260726.md)。  
+> 下表为 **当前可声明** 状态;`pass` 仅当有绑定到所述 commit 的收据。
+
+## Frozen contract gates
+
+| Area | Contract evidence | Status |
+|---|---|---:|
+| Project configuration | `project.json`:4 FAN + 4 chamber PTC→8 PWM + intake/exhaust doors;UART/I2C/motor/watchdog/limits.startup | pass(源合同) |
+| Schema | 配置节闭合;count/list 漂移拒绝 | pass(源合同) |
+| Protocol model | CRC;duty 0..100;**SET_ALL 11 字节**;旧 14 字节拒绝;马达 `00=stop` / 电磁铁 `00=hold` | pass(源合同) |
+| Generator / ADC | 确定性产物;活动 ADC **25** 脚(含 `intake_solenoid_out`@P2);CON138–141 产品重映射 | pass(源合同) / solenoid **inferred** LOC |
+
+| Startup one-shot | 450 步/burst、1000 step/s、50 ms、最多 10 burst;`startup_done` 后 limit 惰性 | pass(源合同 + 既有 Icarus/formal 目标) |
+
+## Offline verification(收据绑定)
+
+| Area | Bound evidence | Status |
+|---|---|---:|
+| Python / contract | final matrix @ `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2` | pass |
+| Formal | final matrix @ `da7b05a…`(BMC vs prove 以各收据为准) | pass |
+| cocotb UART e2e | final matrix @ `da7b05a…` | **pass** |
+| Full matrix @ FINAL_COMMIT | `verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`(RUN_ID `grok45-final-20260805T013238Z`) | **pass**(含 cocotb) |
+| TD + bitstream | Linux `td2026` built @ **`8f28660f176e18e97a015e66bdae0ff747e0fc63`**;bit SHA-256 `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d`;绑定 FINAL_COMMIT(综合输入一致,tip 未强制重跑) | pass |
+| Package / replay | final closure 包已出具;`review-compact` @ tip `445814a…`(RUN_ID `packager-compact-20260805T042343Z`) | pass(closure + compact) |
+| Physical hardware | COM/JTAG/烧录未授权 | **`not_run`** |
+
+## Physical / board remaining uncertainties(不升格为 confirmed pass)
+
+- Intake solenoid:CON141.1/P2 **inferred** LOC;外部驱动/线圈极性未确认。
+- Exhaust X/Y STEP/DIR/EN 在 CON138–139 为 EX_GPIO 产品角色 **inferred**;X 限位 **CON68.3/M6**,Y 限位 **CON34.3/F9**。
+- 历史 A11 与 CON124 装配冲突记录保留;产品 y_limit 已迁至 CON34.3/F9。
+- 详见 [`docs/IO_EVIDENCE_MATRIX.zh-CN.md`](docs/IO_EVIDENCE_MATRIX.zh-CN.md)。
+
+## Frozen protocol numbers
+
+- Clock 25 MHz;UART 115200 8N1,217 clocks/bit;帧头 `A5 5A`;CRC-16/CCITT-FALSE LE。
+- Types:`0x01` / `0x02` / `0x82`。
+- SET_ALL:**11** 字节;Temperature:**27** 值 / 33 字节响应帧。
+- PWM:~19.993602047 Hz;boot PTC=0/FAN=10;watchdog 10 s → PTC=0/FAN=20。
+- Ordinary motor:450 steps @ 1000 step/s;X/Y 可重叠。
+
+## 3-axis closure (`3axis-20260805T171312Z`)
+
+| Lane | Status | Notes |
+|------|--------|-------|
+| python / board_viewer | pass | CON12 remap + detached validate |
+| icarus / verilator / cocotb | pass | 3-axis startup + runtime hard-stop |
+| formal | pass | BMC hard-stop/startup/dispatcher; prove motor-temp contract |
+| td2026 | pass | tip `bb515af…`; bitstream `45f548ab…` |
+| reference ZIP | pass | Linux; Windows handoff blocked |
+| Hardware validation | NOT RUN | COM/JTAG not authorized |
+

+ 49 - 0
docs/historical/FINAL_DELIVERY_REPORT-2axis-solenoid-closure-da7b05a.md

@@ -0,0 +1,49 @@
+# Prod2U 门控温度 CPLD — 活动交付状态报告
+
+> 本文件描述 **当前活动真相**(Linux / 11 字节 SET_ALL)。  
+> 2026-07-26 Windows 清理轮次的最终包叙述已归档:[`docs/historical/FINAL_DELIVERY_REPORT-windows-20260726.md`](docs/historical/FINAL_DELIVERY_REPORT-windows-20260726.md)。
+
+## 执行摘要
+
+- 产品合同已收敛为 **11 字节 SET_ALL**、进风默认电磁铁、出风 X/Y 步进;旧 14 字节格式拒绝。
+- 权威工具链为 **Linux**(`td2026` + OSS CAD / Python 验证)。Windows 收据与路径不是活动权威。
+- Final software closure tip:`da7b05a340a096ccfb4ccf4f656eb3efe6a957e2`(RUN_ID `grok45-final-20260805T013238Z`)。全矩阵(含 cocotb)**pass**;Hardware **`NOT RUN`**。
+- Packager integrate tip `445814a…`(RUN_ID `packager-compact-20260805T042343Z`)已合入 `dev`:仅打包/文档/测试工具链;不改写本报告中的产品 final commit / 矩阵 / TD / bitstream 真相。
+
+## 关键标识(活动)
+
+| 项目 | 值 |
+|---|---|
+| FINAL_COMMIT | `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2` |
+| 闭合 RUN_ID | `grok45-final-20260805T013238Z` |
+| SET_ALL payload | **11 字节** |
+| Full matrix(含 cocotb) | **pass**(`verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`) |
+| TD built commit | `8f28660f176e18e97a015e66bdae0ff747e0fc63` |
+| Bitstream SHA-256 | `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d` |
+| TD tip 重跑 | **否**(综合输入与 tip 一致;绑定既有位流) |
+| Hardware validation | **`NOT RUN`** |
+
+## 风门语义摘要
+
+- **马达(exhaust X/Y)`00` = stop**(无新 STEP jog)。
+- **电磁铁(intake)`00` = hold**(保持当前 latch;非“停止脉冲”语义)。
+- `01` = open;`02` = close。细节见协议文档。
+
+## 合法 blocked / not_run
+
+- `intake_solenoid_out`:CON141.1/P2 **inferred** LOC;外部驱动/线圈极性未确认。
+- X/Y STEP/DIR/EN:CON138–139 EX_GPIO 产品角色 **inferred**;X 限位 CON68.3/M6,Y 限位 CON34.3/F9。
+- 历史 A11 vs CON124 装配冲突记录保留;产品 y_limit 已迁至 CON34.3/F9。
+- COM / JTAG / 烧录未授权 → Hardware **`not_run`**。
+
+## 明确作废的活动声明
+
+以下内容**不得**再当作 tip / 活动 pass:
+
+- Windows 路径下的 “全矩阵 pass + cocotb pass”(`d99f354` / `4ddfbec` 时代叙述)。
+- SET_ALL **14 字节** 为当前合同。
+- 将过期 tip `f82c41e`、失败矩阵 `6f32493`、历史 TD `ead5a3e` / bitstream `a7b5c119…` 当作当前 final closure 证据。
+
+## 结论
+
+软件闭环已完成:FINAL_COMMIT `da7b05a…`,矩阵(含 cocotb)**pass**,TD 位流 `ce3157c5…` 已绑定。物理硬件为 **`NOT RUN`**;物理 blockers 仍开放。

+ 95 - 0
docs/historical/HARDWARE_TEST_ORDER_WAVEFORMS-2axis-solenoid-pre-3axis.zh-CN.md

@@ -0,0 +1,95 @@
+# Prod2U V1.2 硬件测试顺序与期望波形(简版)
+
+run_id: `con138-141-20260805T061504Z`  
+前提:比特流与 active ADC 含 confirmed PWM/UART/I2C 球 + CON138–141 **inferred** 电机/限位/电磁铁球(共 25);`intake_solenoid_out` **LOC @ P2**。  
+本文件 **不是** 已执行硬件回执;物理 COM/JTAG 未授权前状态为 `not_run`。
+
+引脚权威见 [`IO_EVIDENCE_MATRIX.zh-CN.md`](IO_EVIDENCE_MATRIX.zh-CN.md)。
+
+## 0. 安全与探点
+
+- 逻辑探点优先 FPGA 球侧 3.3 V(或串联 0R 后);风扇/PTC 座为 12 V 功率域。
+- FAN:FPGA 球 **active-low** PWM;座端经板级反相后给风扇。
+- PTC:FPGA 球 **active-high**。
+- 限位:期望 **active-high** 表示已到位(合同);用高阻探头,勿强驱。
+- X 限位探点:**CON68.3 / M6**(FAN_GPIO47;旧 CON140.1/T11、CON125.3/B9 已退役)。
+- Y 限位探点:**CON34.3 / F9**(FAN_GPIO11;旧 CON68.4/L8、CON140.2/P13、CON12.3/A11 已退役)。
+- X 电机:**CON139.1–3** → STEP/DIR/EN_n(R6/R8/T7)。
+- Y 电机:**CON138.1–2** → STEP/DIR(T3/R4)。
+- 进风电磁铁逻辑球:**CON141.1 / P2**(外部功率驱动自备)。
+
+## 1. 推荐测试顺序
+
+| 步 | 项目 | 操作摘要 | 通过判据(期望) |
+|---:|------|----------|------------------|
+| 1 | 上电静态 | 上电,不发 UART | PTC 球≈0;FAN 球对应默认 duty≈10%(~20 Hz);EN_n≈0(常使能低);STEP 无边沿 |
+| 2 | Startup 关门寻限位 | 观察 X/Y STEP + 限位 | 见 §2.1;`startup_done` 前主机帧应被丢弃(无 TEMP 响应) |
+| 3 | UART 冒烟 | startup 完成后发 GET_TEMPERATURE | 收到 `0x82` 27 字节温度载荷 + CRC |
+| 4 | FAN PWM | SET_ALL 单腔风扇 0/50/100 | §2.2;其余腔保持 |
+| 5 | PTC PWM | SET_ALL 单腔 PTC 0/50/100 | §2.3;同腔两路物理 PTC 波形一致 |
+| 6 | 出风门 jog | SET_ALL exhaust X/Y = 01 或 02 | §2.4;450 个 STEP 上升沿 @ 1000 step/s |
+| 7 | 运行期限位惰性 | startup 后拨动限位 | STEP 不被 limit 截断 |
+| 8 | 看门狗 | 停发 SET_ALL ≥10 s | PTC→0,FAN→20;马达停 |
+| 9 | 进风电磁铁 | SET_ALL intake = 01/02/00 | CON141.1/P2 电平随 open/close/hold;**外部驱动必接** |
+
+## 2. 期望波形
+
+时钟 25 MHz;时间按合同标称(允许晶振/分频误差)。
+
+### 2.1 Startup 关门寻限位
+
+- DIR = 1(关);EN_n = 0。
+- 每轴:最多 10 个 burst;每 burst ≤450 个 STEP **上升沿**;步进率 1000 step/s → 半周期 0.5 ms,周期 1 ms。
+- burst 间隔:STEP 保持低 **50 ms**,再开下一 burst。
+- 限位在 burst 内变高:该轴不再产生新的上升沿;若当前 STEP 为高,完成半周期后落下。
+- 限位上电已为高:该轴不运动。
+- X/Y 可重叠,独立停止。
+
+```text
+STEP  (axis seeking):  ‾|_|‾|_| … (≤450 rises) … |_  (50 ms low)  _|‾|_| …
+LIMIT (active-high):   ____________/‾‾‾‾‾‾  → stop further rises
+```
+
+### 2.2 FAN PWM(~20 Hz)
+
+- 相位计数 100;slot ≈1042 clk @25 MHz → f≈19.99 Hz,周期≈50.05 ms。
+- duty=D%:FPGA 球上 **低有效** 脉宽约占 D%(再经板级到座)。
+- duty=0:球侧接近常高(风扇停);duty=100:接近常低。
+
+### 2.3 PTC PWM(~20 Hz)
+
+- 同 ~20 Hz 时基;球侧 **高有效**。
+- 同腔两路(如 G16/F16)占空应一致。
+
+### 2.4 普通 jog(startup_done 后)
+
+- 步进马达:`01` DIR=0 开门;`02` DIR=1 关门;**`00` = stop**(无新 STEP 边沿 / 不启动新 jog)。
+- 进风电磁铁(若已接线):`01` open latch;`02` closed latch;**`00` = hold**(保持;非马达 stop 语义)。无 FPGA ball 时本步 **blocked / 跳过**。
+- 非零马达命令:固定 **450** 个 STEP 上升沿 @ 1000 step/s(约 450 ms 脉冲列)。
+- 运行期 LIMIT 翻转 **不应** 截断 STEP。
+
+```text
+DIR   ____/‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
+STEP  ....|‾|_|‾|_| … 450 rising edges … |_
+EN_n  0(保持)
+```
+
+### 2.5 UART(115200 8N1)
+
+- bit 宽 = 217 clk @25 MHz ≈ 8.68 µs。
+- 帧:`A5 5A | type | length | payload | CRCL | CRCH`(CRC-16/CCITT-FALSE)。
+- GET_TEMPERATURE → `0x82`,payload 27;SET_ALL **无** 应答。
+
+## 3. 探点速查(V1.2)
+
+| 信号 | 球 | V1.2 优先探点 | 矩阵等级 |
+|------|----|---------------|----------|
+| UART2 | N11/M10 | CON78.2/1(RS-232 电平!逻辑域在 U23 FPGA 侧) | confirmed |
+| FAN1–4 | C4/B5/B1/A14 | CON8/24/25/26.7 或球侧 | confirmed |
+| PTC 腔1–4 | F16/G16… | CON18/27/28/29 功率针(危险)或 HEAT 控制侧 | confirmed |
+| X limit | M6 | **CON68.3** | inferred(FAN_GPIO47 tach 复用) |
+| Y limit | F9 | **CON34.3** | inferred(FAN_GPIO11 tach 复用) |
+| X STEP/DIR | R6/R8 | **CON139.1/2** | inferred |
+| Y STEP/DIR | T3/R4 | **CON138.1/2** | inferred |
+| EN_n | T7 | **CON139.3** | inferred |
+| 进风电磁铁 | P2 | **CON141.1** | inferred(外部驱动) |

+ 25 - 0
docs/historical/OPEN_QUESTIONS-2axis-solenoid-closure-da7b05a.md

@@ -0,0 +1,25 @@
+# Open Questions and Accepted Uncertainty
+
+No user product-contract decision currently blocks the **11-byte SET_ALL + solenoid intake** software path.
+
+## Accepted uncertainty / explicit status
+
+- **Hardware validation: `NOT RUN`** — COM/JTAG/programming not authorized; board response and real fan load behavior unverified.
+- **FINAL_COMMIT**: `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2` (closure RUN_ID `grok45-final-20260805T013238Z`).
+- **Verification matrix**: full matrix **pass** including cocotb (`verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`).
+- **TD**: built commit `8f28660f176e18e97a015e66bdae0ff747e0fc63`; bitstream SHA-256 `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d` bound to FINAL_COMMIT (identical synthesis inputs; tip rebuild not required).
+- PWM ~20 Hz is a protocol/debug target; it does not guarantee a specific fan mechanical speed or torque.
+- Packager integrate tip `445814a…` (`packager-compact-20260805T042343Z`) merged to `dev`; packaging-only — does not reopen the software/TD closure above.
+
+## Physical / evidence remaining uncertainties
+
+- `intake_solenoid_out` is **inferred-LOC’d** on **CON141.1 / P2** (EX_GPIO33). Connector→series-R→ball is board-data backed; external driver / coil polarity still **unconfirmed**.
+- Exhaust X/Y STEP/DIR/EN on CON138–CON139 are **inferred** EX_GPIO roles; X limit on **CON68.3 / M6**, Y limit on **CON34.3 / F9** (fan-header tach pin3 repurposed).
+- Historical **A11 vs CON124** WATER_COOL conflict remains a board-assembly note; product **y_limit** is CON34.3 / F9 (not A11).
+- Contract prose historically said CON30.3(丝印) for X limit; V1.2 product probe is now **CON68.3 / M6**.
+- CON34/CON68 pin2 (+12V fan rails) and pin1 (GND) must not carry limit signals.
+
+## Non-goals for docs lane
+
+- Do not treat archived Windows packages (`d99f354` / `4ddfbec`, `C:\Users\...`) as current pass evidence.
+- Do not revive superseded tip claims (`f82c41e`, matrix fail `6f32493`, TD `ead5a3e` / bitstream `a7b5c119…`) as final closure truth.

+ 21 - 0
docs/historical/PLAN-2axis-solenoid-closure-da7b05a.md

@@ -0,0 +1,21 @@
+# Prod2U active plan pointer
+
+- Final software closure RUN_ID: `grok45-final-20260805T013238Z`
+- FINAL_COMMIT: `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2`
+- Full matrix (incl. cocotb): **pass** (`verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`)
+- TD built commit: `8f28660f176e18e97a015e66bdae0ff747e0fc63`
+- Bitstream SHA-256: `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d`
+- Hardware validation: **`not_run`**
+- Physical blocked: intake solenoid ball/ADC; X/Y silk mapping; A11/CON124
+
+## Packager compact (does not reopen product closure evidence)
+
+- Packager integrate tip: `445814ad54467996cb4150651e80db3933cfd582` (RUN_ID `packager-compact-20260805T042343Z`; delivery tip = current `dev` HEAD after docs align)
+- Default upload profile: `review-compact` (no full git bundle; unified `source/` + `evidence/` + `meta/`)
+- Pre-closure docs plan archived: [`docs/historical/PLAN-grok45-final-pre-closure-20260805.md`](docs/historical/PLAN-grok45-final-pre-closure-20260805.md)
+
+## Authority
+
+- Linux `td2026` + OSS CAD / Python verification
+- Contract: `projects/prod2u-door-temp/project.json`, requirements, protocol, `AGENTS.md`
+- Active status docs: `README.zh-CN.md`, `ACCEPTANCE_MATRIX.md`, `FINAL_DELIVERY_REPORT.md`, `OPEN_QUESTIONS.md`

+ 62 - 0
docs/historical/README-2axis-solenoid-closure-da7b05a.zh-CN.md

@@ -0,0 +1,62 @@
+# Prod2U 门控温度 CPLD
+
+本仓库实现 `prod2u-door-temp` 门温控:25 MHz 主时钟、UART `115200 8N1`、无流控。统一帧为 `A5 5A type length payload CRC16_LE`。CRC-16/CCITT-FALSE 覆盖 type、length 与 payload,线路低字节在前。
+
+**权威执行环境:Linux 容器**(`td2026`、Python/Icarus/Verilator/formal/cocotb)。Windows 路径与旧收据仅作历史参考,见 [`docs/historical/`](docs/historical/)。
+
+## 正式帧类型
+
+| 类型 | 说明 |
+|---|---|
+| `0x01 SET_ALL` | **11 字节** payload:4 FAN + 4 chamber PTC(各复制到 2 路物理 PTC PWM)+ 进风门/出风门 X/出风门 Y;成功无回复。旧 14 字节 length `0x0E` 静默丢弃。 |
+| `0x02 GET_TEMPERATURE` | 空 payload;读完 27 项 CT7428 后只回一帧温度。 |
+| `0x82 TEMPERATURE_DATA` | 27 字节 payload,总帧长 33 字节。 |
+
+PTC/FAN 占空为十进制 0..100。PWM ≈20 Hz。PTC active-high;FAN 在 FPGA 输出为 active-low。启动目标 PTC=0、FAN=10;看门狗 10 s → PTC=0、FAN=20。
+
+### 风门字节语义(关键)
+
+| 字节 | 执行器 | `00` | `01` | `02` |
+|---|---|---|---|---|
+| 偏移 8 进风门 | 默认**电磁铁** | **保持(hold)** | open latched | closed latched |
+| 偏移 9/10 出风门 X/Y | **步进马达** | **停止(stop / 无新 jog)** | 开门 DIR=0 | 关门 DIR=1 |
+
+马达普通 jog:450 步 @ 1000 step/s;X/Y 可并行。详细合同见 [`docs/prod2u-door-temp-protocol.zh-CN.md`](docs/prod2u-door-temp-protocol.zh-CN.md) 与 `projects/prod2u-door-temp/project.json`。
+
+## 启动限位(one-shot)
+
+上电/`startup_done==0`:X/Y 向 close(DIR=1)间歇寻限位,最多 10 burst × 450 步 @ 1000 step/s,burst 间隔 50 ms;限位 active-high(X: CON68.3/M6,Y: CON34.3/F9;风扇座 pin3 tach 复用,见 IO 证据)。`startup_done` 前主机 UART 被丢弃;完成后限位对普通 jog **惰性**。
+
+## 当前基线与验证真相(final closure)
+
+| 项 | 值 |
+|---|---|
+| FINAL_COMMIT | `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2` |
+| 闭合 RUN_ID | `grok45-final-20260805T013238Z` |
+| 全矩阵(含 cocotb) | **pass**(`verification_run_id` `c43c4201f74517c50bd349fce87f9e0b`) |
+| TD built commit | `8f28660f176e18e97a015e66bdae0ff747e0fc63`(生产综合输入与 tip 一致,tip 未强制重跑 TD) |
+| Bitstream SHA-256 | `ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d` |
+| Hardware / JTAG / 烧录 | **`not_run`**(未授权) |
+| 物理 uncertainties | 进风电磁铁外部驱动/线圈极性;CON138–139 马达 EX_GPIO 角色 inferred;限位复用风扇座 pin3(X:CON68 / Y:CON34);历史 A11 vs CON124 |
+
+`packager-compact-20260805T042343Z` 已合入 `dev`(integrate tip `445814a…` + 活动文档对齐;review-compact 打包体系);生产综合输入相对 `da7b05a…` **未变**,**不**改写上表软件/TD/bitstream 闭合证据。
+
+陈旧 Windows 最终交付叙述(`d99f354` / `4ddfbec`、虚假 cocotb 全绿、`C:\Users\...` 包路径)及过期 tip 声明(`f82c41e` / `ead5a3e` / `a7b5c119…`)已移至 [`docs/historical/`](docs/historical/),**不是**当前活动真相。
+
+## 离线验证入口(Linux)
+
+```bash
+python -B tools/run_verification_matrix.py \
+  --work-root-prefix "${TMPDIR:-/tmp}/prod2u-matrix" \
+  --verification-run-id "<run_id>" \
+  --report-file "${TMPDIR:-/tmp}/prod2u-matrix/matrix-receipt.json"
+```
+
+TD:仅用 `td2026`(Anlogic TD 2026.1 SP2 Linux)。勿把 TD 的 `LD_LIBRARY_PATH` 导出到全局 shell。说明见 [`docs/TD_USAGE.zh-CN.md`](docs/TD_USAGE.zh-CN.md)。
+
+## 合同与工具
+
+- 合同:`projects/prod2u-door-temp/project.json`、`requirements.zh-CN.md`、协议文档、`AGENTS.md`
+- 源码审计包:`package_for_agent_analysis.py`
+- 固件包:`tools/build_firmware_package.py`(需绑定 `--td-root`)
+- IO / 硬件期望:[`docs/IO_EVIDENCE_MATRIX.zh-CN.md`](docs/IO_EVIDENCE_MATRIX.zh-CN.md)、[`docs/HARDWARE_TEST_ORDER_WAVEFORMS.zh-CN.md`](docs/HARDWARE_TEST_ORDER_WAVEFORMS.zh-CN.md)

+ 13 - 6
docs/historical/README.md

@@ -1,14 +1,17 @@
 # Historical documents (not active authority)
 
-Files here preserve prior Windows-era or superseded claims for provenance.
+Files here preserve prior Windows-era, **2-axis/solenoid**, or otherwise superseded claims for provenance.
 They are **not** the active product contract.
 
-Active authority:
+Active authority (root / contract — **current 3-axis truth**):
 - `projects/prod2u-door-temp/project.json`
 - `projects/prod2u-door-temp/requirements.zh-CN.md`
 - `docs/prod2u-door-temp-protocol.zh-CN.md`
 - `AGENTS.md`
 - Root active docs: `README.zh-CN.md`, `ACCEPTANCE_MATRIX.md`, `FINAL_DELIVERY_REPORT.md`, `PLAN.md`, `OPEN_QUESTIONS.md`
+- Active hardware order: `docs/HARDWARE_TEST_ORDER_WAVEFORMS.zh-CN.md`(CON104/105/106/120/12/129)
+
+Root activity docs are **not** the old solenoid/2-axis truth; that narrative lives only in this folder.
 
 Known superseded claims archived here:
 - Windows primary toolchain paths (`C:\Users\...`)
@@ -16,10 +19,14 @@ Known superseded claims archived here:
 - Final commits `d99f354` / package commit `4ddfbec` as tip truth
 - Cocotb / full matrix reported as pass on those Windows cleanup commits
 - Pre-final tip claims: `f82c41e`, matrix fail `6f32493`, TD `ead5a3e` / bitstream `a7b5c119…`
+- **2-axis + intake solenoid “final closure”**: `da7b05a` / TD `8f28660` / bitstream `ce3157c5…`(见 `*-2axis-solenoid-closure-da7b05a*`)
+- Obsolete probes as active IO: solenoid, CON68, CON34, CON138–141;runtime limit inert;`00=hold`
+- Pre-3-axis hardware order: `HARDWARE_TEST_ORDER_WAVEFORMS-2axis-solenoid-pre-3axis.zh-CN.md`
 - Root runtime residue probes (e.g. `evidence-batch-summary-linux-continue-20260804T155114Z.txt`)
 - Pre-closure plan: `PLAN-grok45-final-pre-closure-20260805.md`
 
-Current final closure truth (see active root docs):
-- FINAL_COMMIT `da7b05a340a096ccfb4ccf4f656eb3efe6a957e2`
-- RUN_ID `grok45-final-20260805T013238Z`
-- Matrix pass (incl. cocotb); TD built `8f28660…`; bitstream `ce3157c5…`; hardware `not_run`
+Current activity truth (see **root** docs, not this folder):
+- Three-axis X/Y/Z, six limits, 450/5000/500, EN `permanent_high`, hard truncate
+- FINAL_COMMIT / tip TD / bitstream: **pending final tip TD** (unbound)
+- Historical bypass bit `45f548ab…` @ `bb515af` is **not** tip
+- Hardware `not_run`

+ 4 - 3
docs/prod2u-door-temp-protocol.zh-CN.md

@@ -43,14 +43,15 @@ busy 期间新的门命令全部忽略(无 latest-wins)。看门狗超时:
 | LS3/HS3 | CON129.1/2 | K16/J15 |
 | LS4/HS4 | CON129.3/4 | H15/H16(仅 inventory) |
 
-限位高有效。运行期与 startup 均硬停:DIR=1 看 LS,DIR=0 看 HS。
+限位高有效。运行期与 startup 均硬停:DIR=1 看 LS,DIR=0 看 HS。  
+`stop_semantics`:`truncate_current_high_pulse_immediately_after_synchronized_limit`(同步限位后立即截断当前 STEP 高脉冲,不再产生新上升沿)。
 
 ## Startup(上电一拍)
 
 1. 六路限位 2FF 同步后:已在 LS 的轴不运动。
-2. 其余轴 DIR=1 关向搜索,最多 **5000** 个 STEP 上升沿;命中 LS 的轴立即停。
+2. 其余轴 DIR=1 关向搜索,最多 **5000** 个 STEP 上升沿;命中 LS 的轴按截断语义立即停。
 3. 仅对仍未命中 LS 的轴做 DIR=0 回退最多 **500** 步(途中 HS 可提前停)。
-4. `startup_done` 粘性置位后才接受主机命令;限位不再用于标定/位置模型。
+4. `startup_done` 粘性置位后才接受主机命令;运行期仍按方向选择限位硬截断(非惰性)。
 
 普通命令 jog = **450** 步 @ 1000 step/s。无电磁铁、无 motor-compat 双 profile。
 

+ 1 - 1
projects/prod2u-door-temp/project.json

@@ -107,7 +107,7 @@
       "step_rate_hz": 1000,
       "axis_order": ["x", "y", "z"],
       "limit_stop_during_move": true,
-      "stop_semantics": "finish_current_high_pulse_then_no_next_rising_edge",
+      "stop_semantics": "truncate_current_high_pulse_immediately_after_synchronized_limit",
       "additional_rising_edges_after_synchronized_limit": 0,
       "runtime_limit_use": true
     },

+ 1 - 1
projects/prod2u-door-temp/requirements.zh-CN.md

@@ -48,7 +48,7 @@ CRC 为 CRC-16/CCITT-FALSE。正式类型只有 `0x01`、`0x02` 和 `0x82`。
 | Z | CON129.1 K16 | CON129.2 J15 |
 
 - **Startup**:PTC=0、FAN=10;三轴 DIR=1 关门寻限;每轴最多 5000 步 @ 1000 step/s;未触发则回退 500 步后标记 missed;`startup_done` 粘滞。
-- **运行期**:按运动方向选择对应限位;限位有效时该轴硬停(完成当前高半周期后不再产生上升沿);busy 期间忽略新 start。
+- **运行期**:按运动方向选择对应限位;限位有效时该轴硬停(同步限位后立即截断当前 STEP 高脉冲,`stop_semantics=truncate_current_high_pulse_immediately_after_synchronized_limit`);busy 期间忽略新 start。
 - Startup 完成前:SET_ALL / GET_TEMPERATURE 丢弃,看门狗不喂,帧解析器保持 flush。
 
 ## 输出与看门狗

+ 5 - 1
schemas/project.schema.json

@@ -445,7 +445,11 @@
                                                                                                                            "type":  "boolean"
                                                                                                                        },
                                                                                             "stop_semantics":  {
-                                                                                                                 "type":  "string"
+                                                                                                                 "type":  "string",
+                                                                                                                 "enum":  [
+                                                                                                                              "truncate_current_high_pulse_immediately_after_synchronized_limit"
+                                                                                                                          ],
+                                                                                                                 "description":  "After synchronized direction-selected limit, truncate the current STEP high pulse immediately; no further rising edges."
                                                                                                              },
                                                                                             "additional_rising_edges_after_synchronized_limit":  {
                                                                                                                                                     "type":  "integer"

+ 1 - 1
src/generated/host-contract.json

@@ -104,7 +104,7 @@
       "limit_stop_during_move": true,
       "runtime_limit_use": true,
       "step_rate_hz": 1000,
-      "stop_semantics": "finish_current_high_pulse_then_no_next_rising_edge"
+      "stop_semantics": "truncate_current_high_pulse_immediately_after_synchronized_limit"
     }
   },
   "motors": {

+ 113 - 62
tests/unit/test_activity_docs_truth.py

@@ -1,9 +1,9 @@
 #!/usr/bin/env python3
-"""Fail-closed consistency gates for active status docs vs final closure truth.
+"""Fail-closed consistency gates for active status docs vs current 3-axis truth.
 
-Activity docs must agree on FINAL_COMMIT, matrix (incl. cocotb), TD built commit,
-bitstream SHA-256, hardware not_run, and physical blockers. Stale tip / fail-matrix
-/ old-bitstream claims must not reappear as current truth.
+Activity docs must assert X/Y/Z, six limits, 450/5000/500, permanent EN, hard
+truncate, and unbound tip-TD/bitstream placeholders. Stale 2-axis/solenoid IO,
+runtime-limit-inert policy, and old bit/commit-as-current claims must not reappear.
 """
 
 from __future__ import annotations
@@ -17,14 +17,11 @@ from pathlib import Path
 
 ROOT = Path(__file__).resolve().parents[2]
 
-FINAL_COMMIT = "da7b05a340a096ccfb4ccf4f656eb3efe6a957e2"
-FINAL_COMMIT_SHORT = "da7b05a"
-TD_BUILT_COMMIT = "8f28660f176e18e97a015e66bdae0ff747e0fc63"
-TD_BUILT_SHORT = "8f28660"
-BITSTREAM_SHA256 = "ce3157c593858c33c36e9805fe477a3955ba6f380b4a04f5f9236d3fbddb376d"
-BITSTREAM_SHORT = "ce3157c5"
-CLOSURE_RUN_ID = "grok45-final-20260805T013238Z"
-MATRIX_RUN_ID = "c43c4201f74517c50bd349fce87f9e0b"
+PENDING_MARKER = "pending final tip TD"
+TRUNCATE_SEMANTICS = "truncate_current_high_pulse_immediately_after_synchronized_limit"
+PRIOR_BIT_SHORT = "45f548ab"
+PRIOR_BIT_COMMIT = "bb515af"
+BASELINE_TIP_SHORT = "cdf9f76"
 
 ACTIVITY_DOCS = (
     "README.zh-CN.md",
@@ -33,57 +30,94 @@ ACTIVITY_DOCS = (
     "OPEN_QUESTIONS.md",
     "PLAN.md",
     "docs/TD_USAGE.zh-CN.md",
+    "docs/HARDWARE_TEST_ORDER_WAVEFORMS.zh-CN.md",
 )
 
-# Must appear in every activity doc (full or unambiguous short form).
+# Must appear in every activity doc.
 PER_DOC_MARKERS = (
-    FINAL_COMMIT_SHORT,
-    TD_BUILT_SHORT,
-    BITSTREAM_SHORT,
+    PENDING_MARKER,
+    PRIOR_BIT_SHORT,
+    PRIOR_BIT_COMMIT,
 )
 
 # Must appear somewhere in the activity-doc corpus.
 CORPUS_REQUIRED = (
-    FINAL_COMMIT,
-    TD_BUILT_COMMIT,
-    BITSTREAM_SHA256,
-    CLOSURE_RUN_ID,
-    MATRIX_RUN_ID,
-    "cocotb",
-    "intake",
-    "A11",
-    "CON124",
+    PENDING_MARKER,
+    TRUNCATE_SEMANTICS,
+    "permanent_high",
+    "450",
+    "5000",
+    "500",
+    "CON104",
+    "CON105",
+    "CON106",
+    "CON120",
+    "CON12",
+    "CON129",
+    BASELINE_TIP_SHORT,
+    PRIOR_BIT_SHORT,
+    PRIOR_BIT_COMMIT,
 )
 
-# Superseded identifiers that must not be presented as current FINAL/tip truth.
+# Superseded identifiers / policies that must not be presented as current tip truth.
 STALE_AS_CURRENT = (
     (
         re.compile(
-            r"(?i)(?:FINAL_COMMIT|文档对齐 tip|worktree 起点 tip|Full matrix @ tip)\s*[|::]*\s*`?f82c41e"
+            r"(?i)FINAL_COMMIT\s*[|::=]*\s*`?da7b05a[0-9a-f]*`?"
         ),
-        "stale tip f82c41e presented as current FINAL/tip",
+        "stale 2-axis FINAL_COMMIT da7b05a presented as current",
     ),
     (
-        re.compile(r"(?i)最近矩阵绑定 commit\s*[|::]*\s*`?6f32493"),
-        "stale fail-matrix 6f32493 presented as current bind",
+        re.compile(
+            r"(?i)Bitstream SHA-256\s*[|::=]*\s*`?ce3157c5[0-9a-f]*`?"
+        ),
+        "stale bitstream ce3157c5 presented as current",
     ),
     (
         re.compile(
-            r"(?i)(?:TD built commit|最近 TD pass|TD \+ bitstream)[^\n]{0,80}`?ead5a3e"
+            r"(?i)TD built commit\s*[|::=]*\s*`?8f28660[0-9a-f]*`?"
         ),
-        "stale TD ead5a3e presented as current TD evidence",
+        "stale TD 8f28660 presented as current",
     ),
     (
-        re.compile(r"(?i)bitstream SHA-256\s*`?a7b5c119"),
-        "stale bitstream a7b5c119 presented as current",
+        re.compile(
+            r"(?i)(?:(?:as|@)\s*tip|tip\s+(?:bitstream|bit|TD|证据)|"
+            r"当前\s*(?:tip\s*)?(?:bitstream|位流|闭包证据))\s*[`:]?\s*45f548ab"
+        ),
+        "prior bit 45f548ab presented as tip/current",
     ),
     (
-        re.compile(r"(?i)cocotb[^\n]{0,40}\*\*fail\*\*"),
-        "cocotb still marked fail in activity docs",
+        re.compile(
+            r"(?i)(?:runtime\s+limits?\s+are\s+inert|"
+            r"(?<!not\s)(?<!non-)runtime\s+limit\s+inert|"
+            r"限位对普通\s*jog\s*\*?惰性\*?|"
+            r"完成后限位对普通 jog\s*\*?惰性\*?)"
+        ),
+        "runtime limit inert presented as current policy",
     ),
     (
-        re.compile(r"(?i)Full matrix @ `?6f32493`?[^\n]{0,40}\*\*fail\*\*"),
-        "full matrix still marked fail at stale commit",
+        re.compile(
+            r"(?i)(?:进风(?:门)?默认\*?电磁铁\*?|intake_solenoid_out\s*[::].*\bP2\b|"
+            r"偏移\s*8\s*进风门\s*\|\s*默认\*\*电磁铁\*\*)"
+        ),
+        "solenoid intake presented as active product path",
+    ),
+    (
+        re.compile(
+            r"(?i)(?:X\s*限位[^\n]{0,40}CON68|Y\s*限位[^\n]{0,40}CON34|"
+            r"CON68\.3\s*/\s*M6|CON34\.3\s*/\s*F9|"
+            r"X\s*电机[^\n]{0,20}CON139|Y\s*电机[^\n]{0,20}CON138|"
+            r"进风电磁铁[^\n]{0,20}CON141)"
+        ),
+        "obsolete CON68/CON34/CON138-141 mapping presented as active probe",
+    ),
+    (
+        re.compile(r"(?i)(?:FINAL_COMMIT|文档对齐 tip|worktree 起点 tip|Full matrix @ tip)\s*[|::]*\s*`?f82c41e"),
+        "stale tip f82c41e presented as current FINAL/tip",
+    ),
+    (
+        re.compile(r"(?i)bitstream SHA-256\s*`?a7b5c119"),
+        "stale bitstream a7b5c119 presented as current",
     ),
 )
 
@@ -103,7 +137,7 @@ class ActivityDocsTruthTests(unittest.TestCase):
         missing = [rel for rel in ACTIVITY_DOCS if not (ROOT / rel).is_file()]
         self.assertEqual(missing, [], f"missing activity docs: {missing}")
 
-    def test_each_activity_doc_carries_final_td_bitstream_markers(self) -> None:
+    def test_each_activity_doc_carries_pending_and_prior_bit_markers(self) -> None:
         for rel in ACTIVITY_DOCS:
             text = _read(rel)
             for marker in PER_DOC_MARKERS:
@@ -113,32 +147,25 @@ class ActivityDocsTruthTests(unittest.TestCase):
                     f"{rel} missing required marker {marker!r}",
                 )
 
-    def test_activity_docs_agree_on_closure_corpus_fields(self) -> None:
+    def test_activity_docs_agree_on_three_axis_corpus(self) -> None:
         corpus = "\n".join(_read(rel) for rel in ACTIVITY_DOCS)
         for marker in CORPUS_REQUIRED:
             self.assertIn(marker, corpus, f"activity corpus missing {marker!r}")
 
-        # Matrix / cocotb / hardware / blockers
-        self.assertRegex(corpus, r"(?i)cocotb[^\n]{0,80}pass")
-        self.assertRegex(corpus, r"(?i)(?:Full matrix|全矩阵)[^\n]{0,80}pass")
+        self.assertRegex(corpus, r"(?i)(?:X\s*/\s*Y\s*/\s*Z|三轴)")
+        self.assertRegex(corpus, r"(?i)(?:六限位|six limits)")
+        self.assertRegex(corpus, r"(?i)(?:硬截断|立即截断|hard truncate)")
         self.assertRegex(corpus, r"(?i)(?:Hardware|硬件)[^\n]{0,80}(?:NOT RUN|not_run)")
-        self.assertRegex(corpus, r"(?i)solenoid")
-        self.assertRegex(corpus, r"(?i)(?:silkscreen|丝印)")
-        self.assertRegex(corpus, r"A11")
-        self.assertRegex(corpus, r"CON124")
-
-        # Cross-doc agreement: every doc that mentions FINAL_COMMIT uses the same hash.
-        for rel in ACTIVITY_DOCS:
-            text = _read(rel)
-            if "FINAL_COMMIT" in text or "da7b05a" in text:
-                self.assertIn(FINAL_COMMIT_SHORT, text)
-                if re.search(r"da7b05a[0-9a-f]*", text):
-                    matches = set(re.findall(r"da7b05a[0-9a-f]*", text))
-                    for match in matches:
-                        self.assertTrue(
-                            FINAL_COMMIT.startswith(match),
-                            f"{rel} has unexpected commit token {match!r}",
-                        )
+        self.assertRegex(
+            corpus,
+            r"(?i)45f548ab[^\n]{0,80}bb515af|bb515af[^\n]{0,80}45f548ab",
+        )
+        # Active mapping must include 3-axis connectors somewhere.
+        self.assertRegex(corpus, r"CON104")
+        self.assertRegex(corpus, r"CON105")
+        self.assertRegex(corpus, r"CON106")
+        self.assertRegex(corpus, r"CON120")
+        self.assertRegex(corpus, r"CON129")
 
     def test_activity_docs_reject_stale_current_claims(self) -> None:
         for rel in ACTIVITY_DOCS:
@@ -149,6 +176,27 @@ class ActivityDocsTruthTests(unittest.TestCase):
                     f"{rel}: {message}",
                 )
 
+    def test_obsolete_io_mentions_are_negated(self) -> None:
+        """If obsolete connectors appear, they must be clearly non-active."""
+        obsolete = ("CON68", "CON34", "CON138", "CON139", "CON140", "CON141", "solenoid", "电磁铁")
+        negate = re.compile(
+            r"(?i)(?:不是|禁止|无|not\b|historical|归档|退役|obsolete|非活动|not\s+active|"
+            r"已迁|作废|superseded|forbid)"
+        )
+        for rel in ACTIVITY_DOCS:
+            text = _read(rel)
+            for token in obsolete:
+                if token.lower() not in text.lower() and token not in text:
+                    continue
+                # Allow token only in sentences/lines that negate active use.
+                for line in text.splitlines():
+                    if token.lower() not in line.lower() and token not in line:
+                        continue
+                    self.assertIsNotNone(
+                        negate.search(line),
+                        f"{rel}: obsolete token {token!r} on non-negated line: {line!r}",
+                    )
+
     def test_root_runtime_residue_not_tracked_or_present(self) -> None:
         for name in ROOT_RESIDUE:
             path = ROOT / name
@@ -163,10 +211,14 @@ class ActivityDocsTruthTests(unittest.TestCase):
         ):
             self.assertIn(token, ignored, f".gitignore missing {token!r}")
 
-        # Migrated historical probe must exist; active root copy must not.
         hist = ROOT / "docs/historical/evidence-batch-summary-linux-continue-20260804T155114Z.txt"
         self.assertTrue(hist.is_file(), "expected migrated evidence-batch summary")
 
+        hist_readme = _read("docs/historical/README.md")
+        self.assertIn("pending final tip TD", hist_readme)
+        self.assertIn("2-axis", hist_readme.lower() + hist_readme)
+        self.assertRegex(hist_readme, r"(?i)not.*old solenoid|not.*solenoid/2-axis|不是.*solenoid|不是.*电磁铁|Root activity docs are \*\*not\*\*")
+
     def test_cleanup_runtime_residue_helper_removes_root_probes(self) -> None:
         script = ROOT / "tools/cleanup_runtime_residue.py"
         self.assertTrue(script.is_file())
@@ -180,7 +232,6 @@ class ActivityDocsTruthTests(unittest.TestCase):
             (fake_root / ".run_id_linux").write_text("run\n", encoding="utf-8")
             (fake_root / "evidence-batch-summary.txt").write_text("old\n", encoding="utf-8")
             (fake_root / "td_20260804_probe.log").write_text("log\n", encoding="utf-8")
-            # Nested path must not be deleted.
             nested = fake_root / "runs" / "td_20260804_probe.log"
             nested.parent.mkdir()
             nested.write_text("keep\n", encoding="utf-8")

+ 4 - 1
tests/unit/test_startup_close_seek.py

@@ -27,7 +27,10 @@ class StartupCloseSeekContractTests(unittest.TestCase):
         self.assertEqual(startup["step_rate_hz"], 1000)
         self.assertEqual(startup["axis_order"], ["x", "y", "z"])
         self.assertTrue(startup["limit_stop_during_move"])
-        self.assertEqual(startup["stop_semantics"], "finish_current_high_pulse_then_no_next_rising_edge")
+        self.assertEqual(
+            startup["stop_semantics"],
+            "truncate_current_high_pulse_immediately_after_synchronized_limit",
+        )
         self.assertEqual(startup["additional_rising_edges_after_synchronized_limit"], 0)
         self.assertTrue(startup["runtime_limit_use"])
 

+ 4 - 1
tools/generate_project.py

@@ -262,7 +262,10 @@ def _validate_project(payload: Mapping[str, Any]) -> None:
     _require(startup["enabled"] is True, "startup must be enabled")
     _require(startup["direction_meaning"] == "close", "startup direction must be close")
     _require(startup["limit_stop_during_move"] is True, "startup limit stop during move must be enabled")
-    _require(startup["stop_semantics"] == "finish_current_high_pulse_then_no_next_rising_edge", "unsupported stop semantics")
+    _require(
+        startup["stop_semantics"] == "truncate_current_high_pulse_immediately_after_synchronized_limit",
+        "unsupported stop semantics",
+    )
     _require(startup["additional_rising_edges_after_synchronized_limit"] == 0, "additional rising edges after limit must be zero")
     _require(startup["runtime_limit_use"] is True, "startup runtime limit use must be true")
     _integer(startup["direction_value"], "limits.startup.direction_value", minimum=0)