Skip to content

refactor(platform): unify typed assembly and cold lifecycle contracts - #38

Open
VectorQiu wants to merge 2 commits into
mainfrom
refactor/typed-platform-unification
Open

VectorQiu wants to merge 2 commits into
mainfrom
refactor/typed-platform-unification

Conversation

@VectorQiu

@VectorQiu VectorQiu commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

平台装配现在只接受 TOML schema 2,由 resolve_ir() 直接向 factory 和 emitter 提供具名不可变决策。删除旧 JSON 输入、Mapping façade、重复 values 和 typed/JSON 往返;私有 Python source epoch 为 2,单向 resolved JSON 为 schema 1,公共 C factory 接口保持 epoch 1。

  • Construction 初始化和停止使用受限 DirectCall,声明静态引用、常量和有序清理动作,不增加运行时解释器或转发层。
  • U575 finite/chain UART DMA、F407 polling/DMA/paired SPI、GD470 SPI0/SPI4 polling/DMA/paired、Native RTC/LPTIM 的选定冷态生命周期迁入 C;修复门控和寄存器恢复失败时的责任保留。其它生成冷态辅助函数仍保留明确边界,未声称全部迁移。
  • ADC/PWM 将硬件事实移入只读配置。开发成本比较:F103 RAM -64 B / Flash +72 B;GD303 RAM -72 B / Flash +68 B。F407 恢复责任记录为 28 B,所测配置 BSS +24~32 B,属于正确性成本。
  • 能力查询复用候选完整验证并精确匹配源码与配置;加入完整本地计划验收和独立状态发布工具;原 48 项台账接入现有导航;文档包显式引用原软件候选,中英文架构说明和图同步更新。

验证绑定干净平台提交 fc01d863c3374643c276195ae19a24e6f8b8c8ee,示例提交 acb5179ec09e0c2fae1911d32655296df39acedc:

  • 普通完整索引提交钩子通过:3,299 项工具测试、352 个 GoogleTest 程序 / 6,423 个用例,零失败、零跳过。
  • Q02 一次完整本地正式计划 159/159 通过;Clang-Tidy 与 Cppcheck 分别覆盖 872 个实际编译上下文。Q02 report SHA-256:8c67786b80b5fb64cb0f6f216c1dbf4c05ddb84f61ab2ef4542fb0f55e0910a2。
  • 示例 PR #16:完整 98 条命令通过,17 个 preset、7 个独立消费者、39 项 ELF 预算检查;12 份 HIL 准备报告。示例实际消费 Q01 SDK;两份 SDK 均完整验证,2,931 个源码文件、manifest 和 CMake exports 一致,未改写原执行路径。
  • 两套独立输入快照和空构建目录、禁网容器构建,四条命令全部通过;ELF/BIN 字节相同。ELF SHA-256:6c385bd54c79b7dd4350636fd3009ae48e62acdd0f077c1d58e8078c697994f1;BIN SHA-256:8efaf6bda92a2bb8e1f85d054d40c9fd5cf62eca32c6c22c695cc89808147d8d。
  • 候选 typed-unification-fc01d863c337-acb5179ec09e 已通过封存和完整验证,状态 software_qualified,六项范围:host_contracts、arm_link、resource_budget、source_sdk、reproducibility、hil_tooling。资格仅属于原候选精确配置与产物。
  • 便携候选归档完整校验 6,441 个成员,434,092,822 bytes,SHA-256:a443e9c3b39528d5d5fbbdd19ee1c065496cd86b8df78cb5380aab4505bf3aa9。持久入口:nexus-examples/build/platform-candidate-fc01d863c337-acb5179ec09e-01/delivery-index.json。
  • 干净 P2 严格双语文档构建通过:132 页、264 个语言记录。文档 PR #39 已完成干净文档提交 7368e99 的严格双语构建、显式候选引用打包和独立离线恢复,不改变本 PR 的验证提交。文档包 SHA-256:8fff261356ae509502ec437bfc44d50ef6959a731d8b477a900d21e8d5a27b45。

TDD 保留实际 RED/GREEN:缺失冷态 API、门控/寄存器拒绝恢复、候选元数据篡改与类型边界拒绝。C 生命周期、证据校验及双语图文完成独立 agent 审查。完整 Q02、候选、R01 准备失败及收尾原件已归档并在环境恢复后重新验证。Q01 失败原因和原报告身份仍有文字记录,但其未归档的临时报告在环境重置后丢失;没有把失败前缀拼入 Q02。

边界:源码 checkout 的能力 CLI 与安装 SDK 候选具有不同输入闭包(SDK manifest 是配置输入,现有绝对路径排序也会改变输入记录顺序),因此实测 source_match=true、configuration_match=false,执行范围保持 not_assessed;原 candidate verify 是精确产物的正向验证入口。部分生成冷态行为尚未迁入 C,不以本 PR 宣称全部硬件路径重构。

GitHub Actions 按用户要求由本地 CI 验证。实际 GitHub 状态发布返回 403(statuses:write),publication=unconfirmed;服务端保护规则写入同样返回 403,未声称远端绿灯或保护已启用。实板未接入,HIL 为 not_executed;候选未签名、未进行产品发布。

Use immutable named resolution and direct constructor calls throughout the
maintained providers. Remove legacy JSON assembly input and mapping adapters,
keep one-way audit projections, and version the private typed source contract.

Move selected STM32/GD32 cold lifecycle operations into tested C owners,
preserve retryable resource responsibility, and split measured ADC/PWM
hardware descriptions from mutable state.

Verify exact candidate evidence in capability queries, validate complete local
software-plan receipts, and align explicit documentation evidence references,
architecture diagrams and reviewed bilingual documentation.
self.assertTrue(all(isinstance(call, DirectCall)
for call in construction.stop))
with self.assertRaises(TypeError):
construction["definitions"]
self.assertNotIsInstance(result, Mapping)
self.assertNotIsInstance(result.cpu_profile, Mapping)
with self.assertRaises(TypeError):
result["board"]
Generate test-only calls from Construction and share physical MMIO addresses
across the complete constructor and driver translation units. Preserve
rollback, shared IRQ and line ownership assertions.
cs->output = true;
status = nx_stm32_gpio_initialize(cs, cs->mask);
if (status == NX_SUCCESS) {
endpoint->endpoint->port = port;

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants