Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test_platform_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,11 +1327,11 @@ def test_offline_navigation_is_sealed_opaque_before_actual_host_identity(self):
q.mkdir(parents=True)
env.update(Q=str(q), NEXUS_CHECKOUT_VALIDATED='true',
NEXUS_JOB_RESULT='success', REAL_EVIDENCE_STORE='true')
# Use the actual maintained resolver and its canonical full IR.
# Seal the real resolver's one-way serialized artifact projection.
navigation = {}
resolved = configure.resolve(
resolved = configure.resolve_ir(
ROOT / 'tools/configure/assemblies/qiming-baremetal.toml',
ROOT, input_paths=navigation)
ROOT, input_paths=navigation).to_dict()
report_argument = re.search(r'--report "([^"\n]+)"',
self.step('reproduce')['run']).group(1)
report_path = Path(report_argument.replace('$Q', str(q)).replace('$E', env['E']))
Expand Down
9 changes: 7 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ They do not establish current support or qualification.
- SoC facts and Board `board.json` are machine-maintained JSON. One authored TOML
assembly resolves through a validated typed IR into one atomic bundle. CMake
targets own software dependencies. Do not introduce Kconfig/cache fallback,
competing configuration authorities or a second source build graph. Legacy
schema-1 JSON fixtures may be read during migration, never silently mixed.
competing configuration authorities or a second source build graph. Authored
platform input is TOML schema 2 only; reject legacy JSON assemblies. Production
resolution and emitters use immutable named records, without a mapping facade
or duplicate decision values. JSON facts and keyed immutable indexes remain
explicit leaf data; resolved JSON is a one-way audit/artifact projection.
Frozen historical evidence retains its original bytes and read-only verifiers;
that retention never reopens a legacy production configuration path.
- Reject unknown fields, unsupported modes, resource conflicts and stale inputs.
Never repair configuration by silently selecting a different mode or Board.
- Distinguish a chip capability from a reviewed PCB route and physical HIL.
Expand Down
2 changes: 1 addition & 1 deletion cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ Actual include-closure, selected ARM and relocated-SDK checks establish the
migration's software scope; the version inventory alone establishes none of it.

Board packages are read-only `board.json` facts with provenance and reviewed
wiring. SoC resources and route catalogs live in `soc/<family>`. Unreviewed
wiring. SoC resources and route catalogs live in `soc/<vendor>/<family>`. Unreviewed
physical connections cannot be enabled by claiming chip-level capability.
See [integration contracts](../docs/design/integration-contracts.md).
2 changes: 1 addition & 1 deletion dependencies/platform-compatibility.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"schemas": {
"assembly_authoring": 2,
"assembly_projection": 1,
"typed_ir": 1,
"typed_ir": 2,
"board": 1,
"soc": 1,
"routes": 1,
Expand Down
7 changes: 6 additions & 1 deletion docs/assets/diagrams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ python tools/dev/dev.py docs check --full \

![FIG-03:构建输入/产物链,生成失败使owned bundle失效](configuration-generation.svg)

边表示构建时输入和产物传递,不表示运行时调用。严格解析不能修复非法字段、冲突或陈旧输入;失败只撤回拥有的输出,不清理未拥有目录,也不暴露半成品。ELF/资源报告不构成实板资格。
边表示构建时输入和产物传递,不表示运行时调用。TOML 唯一入口先得到冻结
`AuthoredAssembly` 意图,再与 SoC/Board 事实校验得到具名 `ConfigurationIR`。
同一 IR 驱动 SoC 的静态定义/冷态调用与单向 JSON/配置/内存投影;全部经过
同一 bundle 事务发布。`resolved.json` 不回流为装配输入。严格解析不能修复非法
字段、冲突或陈旧输入;失败只撤回拥有的输出,不清理未拥有目录,也不暴露半成品。
ELF/资源报告不构成实板资格。

依据:[配置器](../../../tools/configure/configure.py)、[不可变IR](../../../tools/configure/ir.py)、[bundle事务](../../../tools/configure/bundle.py)、[构建合同](../../design/build-system.md)。
[可编辑DOT](configuration-generation.dot);实施关联:DOC-45。
Expand Down
17 changes: 12 additions & 5 deletions docs/assets/diagrams/configuration-generation.dot
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIG-03 current: build-time inputs and artifacts.
// Code basis: 0111c8d3b9c7b37d258b9c401070305b13b6f3a1.
// Code basis: tools/configure/authored.py, configure.py, ir.py and bindings.py.
// Edges denote configuration/production flow, not runtime I/O.
digraph configurationGeneration {
graph [label="FIG-03 当前配置与原子生成\nFIG-03 Current configuration and generation", fontname="Noto Sans CJK SC", fontsize=15, labelloc=t, rankdir=TB, bgcolor="white", pad=0.25, nodesep=0.30, ranksep=0.50];
Expand All @@ -11,24 +11,31 @@ digraph configurationGeneration {
assembly [label="一份 authored TOML\none authored TOML assembly", fillcolor="#f8fafc"];
socFacts [label="SoC / CPU / routes 事实\nSoC / CPU / route facts", fillcolor="#f8fafc"];
boardFacts [label="Board 接线与来源事实\nBoard wiring and provenance", fillcolor="#f8fafc"];
authored [label="严格 TOML 字段检查 → 冻结用户意图\nstrict TOML fields -> frozen AuthoredAssembly"];
resolver [label="严格解析:字段、模式、资源、输入身份\nstrict field / mode / resource / identity checks"];
typedIr [label="不可变 typed IR\nimmutable typed IR"];
typedIr [label="不可变具名 IR:每个决策只存一次\nimmutable named IR: each decision stored once"];
construction [label="SoC 构造:静态定义与冷态调用\nSoC Construction: static definitions and cold calls"];
bundle [label="事务生成与原子发布\ntransactional generation and atomic publish"];
outputs [label="静态实例 / factory / 配置 / 内存预算\nstatic instances / factory / config / budgets"];
outputs [label="静态实例 / factory / 配置 / 内存预算 / resolved.json\nstatic instances / factory / config / budgets / resolved.json"];
targets [label="CMake:唯一软件目标图\nCMake: sole software target graph"];
ninja [label="Ninja:编译、链接、资源检查\nNinja: compile / link / resource checks"];
firmware [label="ELF / BIN / map / 资源报告\nELF / BIN / map / resource reports", fillcolor="#f0fdf4"];
rejected [label="拒绝 / 生成失败\nrejected input or generation failure", fillcolor="#fff7ed"];
invalidated [label="owned bundle 失效,不暴露半成品\ninvalidate owned bundle, no partial outputs", fillcolor="#fff7ed"];
assembly -> resolver [label="产品选择\nproduct selection"];
assembly -> authored [label="唯一装配入口\nsole assembly input"];
authored -> resolver [label="尚未准入的选择\nunresolved selections"];
socFacts -> resolver [label="芯片能力\nsilicon capability"];
boardFacts -> resolver [label="Board 授权\nBoard authorization"];
resolver -> typedIr [label="验证通过\nvalidated"];
typedIr -> bundle [label="生成选定内容\ngenerate selected content"];
typedIr -> construction [label="具名字段\nnamed fields"];
construction -> bundle [label="生成 binding C 字节\nrender binding C bytes"];
typedIr -> bundle [label="单向 JSON / 配置 / 内存投影\none-way JSON / config / memory projection"];
bundle -> outputs [label="成功发布\natomic publish"];
outputs -> targets [label="配置与生成源\nconfiguration and generated sources"];
targets -> ninja [label="执行目标图\nexecute target graph"];
ninja -> firmware [label="本次实际产物\nactual artifacts of this execution"];
authored -> rejected [label="语法 / 字段非法\ninvalid syntax / fields"];
construction -> rejected [label="生成失败\nemission failure"];
resolver -> rejected [label="非法 / 冲突 / 变化\ninvalid / conflict / input changed"];
bundle -> rejected [label="生成或发布失败\ngeneration or publish failure"];
rejected -> invalidated [label="仅清理拥有的输出\ninvalidate owned outputs only"];
Expand Down
Loading
Loading