quality/ 是 v0.8.3 质量内核的机器事实源:严格 schema、requirements、change records、bug records、test catalog、gates、lineage 和 production path policy 共同描述“应验证什么、证据能证明到哪一层”。变化登记必须随生产路径变化一起更新;记录问题不等于修复问题。
当前已提供 source/unit 级的 metadata、impact-pr 和 impact-release validator、隔离 focused tests,以及分阶段落地的 run-evidence 合同和存储原语。source-test / source-green 只表示当前源码和机器元数据验证,不表示 artifact、installed、live provider/Science、signing/notarization 或 public release。
旧 test/run_all.sh / S0 门仍登记为 legacy-known-unreliable,在后续节点切换前不能被本页或 quality kernel 重新命名为 release-ready。产品问题与质量体系缺陷分别登记;任何 open-not-fixed 记录都不能写成 fixed。
impact-pr 必须显式给出 target ref,并以 Git merge-base 计算影响范围;impact-release 固定使用 lineage 中 v0.8.2 annotated tag 的 peeled commit,并要求 clean、非 shallow、祖先关系和生产路径闭合。audit baseline 只用于审计参照,不能作为 release impact base。
lineage 不保存当前 worktree 的 candidate SHA,也不把 live HEAD 写回机器事实源;未来 run/release evidence 运行时绑定 candidate SHA,并同时记录其 source/test-result 证据。TestImpactV1 只允许 add、update、existing-sufficient、manual-evidence、not-yet-automatable 五态;高风险变化不能用后两态逃避自动回归。Bug 的 confirmed_facts 与 hypotheses 分开保存,后者不构成 observed 或 fixed 证据。
NODE-RUN-EVIDENCE 正按独立小任务逐步实现。RUE-01 已固定 AdapterResultV1、AttemptRecordV1 与 TestResultV1 的状态合同;RUE-02 已固定 run、source snapshot、change set、evidence、completion seal、run failure 和 release candidate 的 manifest 合同;RUE-03 已实现私有 run root、生命周期锁、canonical JSON、原子 no-clobber 发布、fsync / 回读校验和 first-failure-only 记录的 source/unit 存储原语;RUE-04 已实现 clean-commit snapshot:在安全绑定的本地 Git object/index/worktree 上验证 exact commit/tree/blob 链和 clean gate,先 bounded 枚举不应用 excludes 的全部 untracked path 并拒绝任何未跟踪 .gitignore,再仅允许已提交 checkout .gitignore 与已绑定 repo-local exclude 解释合法 ignored output;特殊 Git metadata 与 split-index 明确 fail-closed,capture/store 双重验证 manifest 绑定、schema、canonical bytes 与大小,再经 capture lease、pending publication ticket、锁外 final source recheck 与短临界区 final linearization 发布 manifest。RUE-05 又增加了一个最小、dedicated 的 attempt-0 source/unit runner 闭环:它只运行版本化隔离 fixture,并将 fixture 的 digest、大小与 mode 绑定到已 finalized 的 clean-commit snapshot;通过窄范围 adapter FD 与精确 ACK 交换结构化结果,保留真实 child RC,并对 timeout、output limit、Darwin NOTE_EXIT 截止、terminal drain 与 reap fail closed;attempt-0 只允许经私有 one-shot 路径发布。failure-shield tests 覆盖 stdout marker、伪造 RC、迟到 adapter、FD 漂移、fixture 路径或内容替换、ACK/EOF 异常与 publication replay,防止这些输入产生 false green。
RUE-06 在同一固定 fixture、snapshot、suite、entrypoint 与 argv 边界内增加一次显式 attempt-1;只有 layout-local 精确回读到 persisted READINESS/READINESS_TIMEOUT/13 的 attempt-0 才有资格调度。两个 attempt 各自保留真实 RC、使用独立 cache leaf 并经 one-shot no-clobber 发布;名称替换、同字节 replay、canonical/binding 漂移或发布不确定性均不生成最终结果。attempt-1 再次 readiness timeout 生成 READINESS_EXHAUSTED;恢复为 0/10/11 只能生成 release-blocking FLAKY_RETRY;hard timeout 与 infra 保持既有结果 kind。最终 TestResultV1 只由两个精确持久化 record 经现有 make_result / validate_result 构造并返回,不在本阶段发布到 results/。公开 attempt-0 默认无隐藏 retry,公开 retry API 也不接受 scenario、policy、argv、fixture、identity 或环境 override。
固定 single-suite aggregation/completion 小阶段只接受已经 finalized 的同一 clean snapshot,以及 focused / merge-base-origin-main、["rue-fixed-api.v1"] 和唯一 SUITE-RUE05A / ENTRY-RUE05A-ATTEMPT0 计划;这个 argv 是内部固定 API identity,不是 CLI 已实现声明。它从 layout-local 精确绑定的一个 attempt 或完整 RUE-06 retry 重建 TestResultV1,依次 no-clobber 发布 result、evidence,最后在同一 layout 锁内复读 run/snapshot/attempt/result/evidence 后发布 completion seal。seal 的 decision/RC 必须逐项等于唯一 result;因此 ignored、skipped、ENV-BLOCKED、readiness exhausted 和 recovered flaky 都只能 BLOCKED,test/infra/hard-timeout 只能 FAIL。missing、contradictory、replayed、name/identity drift、partial publication uncertainty 或 terminal conflict 都不得升级为 seal;在 result/evidence 已发布后失败允许留下不可重试的 partial evidence,但 completion slot 已消耗,不能借 replay 生成 green。seal 专用 publication 在临时 inode 上完成 file fsync、canonical/digest/full identity、held-name、live-layout 与 parent fsync 验证,再以 Darwin renameatx_np exclusive final rename 作为最后一个可失败的成功线性化点;该 ABI 只有返回 0 才成功,错误返回保证两个参数文件均不受影响,因此错误直接传播且不再 stat/read final,成功后也不再用 read/fsync/close 反转结论。崩溃恢复只可能看到完整有效 final seal 或没有 seal。这个规则不支持违反系统 ABI 的 rename-then-raise wrapper,不扩展到普通 publisher,也不是通用 transaction。通用 run/result/evidence/seal publisher 不提供该 authority。
固定 CLI 只提供一个命令:/usr/bin/python3 -I test/quality/run_evidence/cli.py run --output-root ABS。ABS 必须是当前 euid 拥有、mode 0700、非 symlink、规范绝对路径且为空的目录;CLI 没有 scenario、policy、argv、fixture、environment 或 identity override。它只选择 catalog 中精确的 SUITE-RUE05A / ENTRY-RUE05A-ATTEMPT0,以 RUE-04 clean snapshot 绑定真实 HEAD、origin/main commit 与 merge-base,并把 schema/runner/fixture/build inventory、catalog/gates 原始 bytes、固定 child environment、/usr/bin/python3、sys.executable、/usr/bin/git、三项 Git binding 和固定 user-site dependency RECORD inventory 归入 run input digests。prepare 和 completion 前均复核 Git 与输入;只有 persisted readiness timeout 才执行一次固定 retry。
completion seal 存在时,CLI stdout 只写一行 canonical JSON,claim 为 NODE-RUN-EVIDENCE、scope 为 fixed-one-suite-focused-source-unit,其中 decision、runner_exit、run_id 与 evidence path 必须逐项绑定 seal;PASS/FAIL/BLOCKED 分别返回 seal 的 0、10/12/13 或 11/13。stdout 不是 authority,completion seal 才是。本节点只允许据有效 seal 声明这一个固定 one-suite source/unit NODE-RUN-EVIDENCE;它仍不等于通用或 multi-suite runner,也不得命名为 RUN-EVIDENCE-GREEN、SOURCE-GREEN、release-ready,或任何 artifact / installed / live provider/Science / signing/notarization / public release 证据。原有 SUITE-RUN-EVIDENCE-CONTRACT 保持 legacy contract suite;新 executable suite gate-free,不能被 release gate 意外提升。
TestResultV1 同时记录 outcome、classification、gate_decision 和真实记录的 exit_code;PASS 必须是 PASS/NONE/PASS/0,任何非 PASS 结果不能伪装成零退出。evidence-manifest 的每个结果采用与 test-result.v1 完整等价的六分支 oneOf 语义(包括 FLAKY、QUARANTINED、readiness timeout 和 blocked),不能只依赖 result_schema 标记。run-manifest、evidence-manifest 与 release-candidate 均绑定 test-result.v1。
生产路径只能由 active matching ChangeRecord 覆盖;该 change 的 test_impact.required_suite_ids 与 required_gate_ids 必须分别包含具体 policy 的全部 required suites/gates。retired-only、无关 suite 或无关 gate 均 fail closed。