跳转到主要内容

1 - Doc Accuracy Contract

1.1 - Credential Boundary and Accepted Risk

Decision

  • Status: Accepted risk
  • Accepted by: Project owner
  • Date: 2026-09-05
  • Behavior baseline: e5dd546e965e6878b5edffe093699c81ff1e0dce
  • Scope: Existing direct invocation and the existing Jenkinsfile post-deployment Sync to Notion stage only.

The synchronizer reads repository .env configuration, decrypts Ansible Vault when available (or reads Terraform secret data), constructs system/application credential fields, stores them in the project’s private Notion workspace, and may print masked prefixes during local dry-run output. It can be run directly and is also invoked by the existing Jenkins post-deployment stage with credentials binding. Notion is a third-party cloud service even though the managed homelab is on a private LAN; the accepted exposure is therefore the private Notion account/workspace, integration token and direct/Jenkins execution or logging path—not merely LAN reachability.

For this personal project, the owner intentionally uses Notion as a private credential GUI and accepts that existing SaaS/account and execution risk. Removing credential fields or the existing Jenkins invocation is not a prerequisite for OINK, the repository consistency gate or AI doc-gardening. This decision does not claim the behavior is generally safe, recommend it for shared projects or authorize expanding it.

Accepted Scope

The accepted risk covers the synchronizer’s existing data flow at the behavior baseline:

  • direct invocation using local Notion configuration and existing secret sources;
  • the Jenkinsfile post-deployment stage using Jenkins credentials binding;
  • mapping and sending credentials into the owner’s private Notion database;
  • existing dry-run/status and Jenkins output associated with those invocations.

This contract does not change, test or harden scripts/sync-to-notion.py or Jenkinsfile. Any additional schedule/trigger, new destination, broader sharing, additional credential source or materially changed output is outside the accepted scope and requires a new decision.

Existing Controls and Residual Risk

Known controls are the private Notion workspace, Jenkins credentials binding for the existing stage, and Jenkins post-run removal of generated secret files. MFA state, Notion member access, integration-token scope/rotation, cloud exports/backups and local/Jenkins log retention are not verified by this contract and must not be claimed as controls.

Residual risk remains credential disclosure through Notion account/workspace compromise, integration-token misuse, provider storage/export behavior, or direct/Jenkins output. The project owner accepts that residual risk only within the scope above.

Hard Isolation Boundary

Acceptance ends at the Notion synchronization process. The following components must not import, invoke, inspect, consume or receive the synchronizer, its payloads, its stdout/stderr or any data derived from them:

  • tools/check-doc-claims.py and its fixtures/report;
  • tools/doc-gardening/, AI prompts, manifests, model outputs and run records;
  • documentation GitHub Actions, their CI artifacts and Draft PR content;
  • OINK/Hugo, GitHub Pages, rendered Markdown and llms.txt.

Those components must not read .env, Ansible Vault values or password files, Terraform *.tfvars/state secrets, Notion database content, passwords, API/integration tokens, private keys, credential-bearing connection strings, or masked/truncated/hash-for-display derivatives. A Notion token used by the manual synchronizer is never documentation evidence or inventory data for this automation.

The detector may read only the repository paths declared by the six claims in claim-registry.md . Doc-gardening may consume only its explicit single-document manifest and allowlisted, non-sensitive repository evidence. OINK remains a presentation plane and receives neither synchronization nor model/production credentials.

Required Automation Evidence

The documentation automation remains acceptable only while deterministic tests demonstrate that:

  1. the Phase 1 detector and report run without .env, Vault password files, Terraform state/secret files, network access or Notion credentials;
  2. doc-gardening manifests, recorded outputs and validators reject secret sentinels without echoing them;
  3. documentation CI uses read-only repository permission and contains no Notion, model or production secret path;
  4. generated reports/manifests contain only the fields and evidence allowed by their versioned contracts;
  5. no documentation workflow imports or invokes scripts/sync-to-notion.py.

A failure at this isolation boundary is a hard failure. It must not become unknown, be hidden by masking, retry with broader credentials, or be published. This hard failure applies to documentation automation; it does not retroactively revoke the separately accepted manual Notion path.

Review Triggers

Reassess this accepted risk before any of the following:

  • the repository, homelab operations or Notion database become shared with additional people;
  • the synchronizer gains an unattended trigger beyond the existing Jenkins post-deployment stage;
  • the Notion database, integration or credential fields gain broader access;
  • synchronization data is proposed as an AI/runtime oracle or enters an artifact, prompt, report, PR, OINK page or llms.txt;
  • a Notion account, integration-token, local-log or credential disclosure incident occurs;
  • the project moves beyond a personal homelab threat model.

1.2 - OINK AI Documentation Automation Roadmap

Contract role

本 companion 说明现有交付物是什么、离线测试实际证明什么,以及从当前手动 AI prototype 到自动 Draft PR 的阶段边界。它不授权模型调用、GitHub 写入、生产访问或公开报告。

现有文档不整体作废:

  • SPEC.md 与本目录 companions 是当前 canonical contract;
  • spec-oink-doc-accuracy-integration-phase-1.md 保留 done,作为带 change log 的滚动交付记录,反映 known-claim consistency gate 的当前已交付范围,而非不可变的原始快照;
  • spec-doc-gardening-phase-2.md 保留 done,同样作为滚动交付记录,反映单文档 manifest、手动 live Codex、recorded replay 与 proposal validation 的当前已交付范围;
  • spec-doc-gardening-agent/SPEC.md 继续提供更广义的 evidence gate、人工升级和不自动 merge 原则;其中 production observation/runtime evidence 属于本路线 Phase 3,不代表当前已实现;
  • 本路线扩展而非替换上述成果;若历史 artifact 与当前能力描述冲突,以 canonical contract 与可执行代码/测试为准,并修正历史事实说明。

Current capability / 当前能力

ComponentStateWhat existsWhat does not exist
OINK/Hugo siteDeliveredRepository Markdown rendering and GitHub Pages workflowAccuracy report is not publicly rendered
Phase 1 consistency gateDeliveredSix explicit Markdown/defaults comparisons, stable report, read-only PR checkOpen-ended claim discovery, production truth or semantic repair
Phase 2 AI controller prototypeDeliveredSingle-document manifest, strict candidate/proposal schemas, recorded replay, explicitly confirmed local codex execPatch application or PR publication
Phase 2A Shadow candidate discoveryDeliveredDeterministic changed-document selection, v2 manifests, trusted base-object validation, bounded read-only Claude matrix, numeric Summary and 14-day JSON evidenceModel-quality proof, unchanged-document inference, edits, comments or policy enforcement
Automated repair loopNot implementedContract and reusable validator primitives plus non-writing Shadow evidenceIsolated apply, write identity and Draft PR publisher
Runtime evidenceDeferredPolicy and observation designCredentialed collectors and production reconciliation

The current live implementation in tools/doc-gardening/run-analysis.py uses a locally installed Codex CLI only when both --live and --confirm-live are supplied. Its default model is an implementation detail, not a correctness authority. Existing CI never takes this path.

Validation suite glossary

Known-claim regression suite

tests/doc-claims/doc-claims-test.py tests the deterministic Markdown/defaults consistency checker: exact typed equality, contradiction/indeterminate states, locator/parser failures, provenance, secret-safe report behavior, atomic writes, CLI exits and the read-only workflow contract. It independently pins the six current claim IDs. It does not discover claims, call AI, validate production or prove that two matching values are objectively correct.

Doc-gardening controller/contract suite

tests/doc-gardening/doc-gardening-test.py builds synthetic Git repositories and tests manifest packaging, single-document/path scope, source spans, hashes, evidence references, secret/stale rejection, strict model-output validation, proposal binding and recorded-output replay. Its live-mode test proves only that an unconfirmed call is blocked; the suite does not execute a model or assess model judgment.

Phase 2A Shadow candidate-discovery suite

tests/doc-gardening/candidate-discovery-test.py 使用 synthetic Git repositories 与 fake structured output 覆盖 changed-path stable selection、A/M/D/R disposition、5-document/20-candidate limits、base-only trusted-object revalidation、无 Phase 1 evidence 时的 unknown/missing_evidence、secret/stale/action failure、bootstrap 与 workflow least-privilege contract。它不调用 Claude,也不证明模型能正确发现 stale claims。

Recorded golden accept/reject fixtures

tools/doc-gardening/evaluate.py evaluates 11 prerecorded valid and hostile artifacts against the validator. false_proposals and security_leakage are fixture contract mismatches, not real-world model precision, recall or leakage measurements. Passing means the validator accepted/rejected the recorded cases as specified.

Repository consistency run

tools/check-doc-claims.py evaluates the current six known claims and writes the local/CI report. This is the final deterministic regression for those six pairs, not a whole-document audit.

Target architecture

PR change or approved schedule
  -> deterministic document selection
  -> one secret-safe manifest per document/revision
  -> AI candidate discovery
  -> deterministic source/evidence/staleness gate
  -> AI minimal edit proposal
  -> deterministic proposal binding and isolated apply
  -> known-claim regression + document/OINK validation
  -> least-privilege publisher creates one Draft PR
  -> human review and merge

AI owns semantic discovery and prose generation. The controller owns document allowlists, evidence selection, state transitions, retries, revision binding, patch scope, validation and publish eligibility. The publisher receives only an already validated single-document patch and non-sensitive audit summary; it never receives model, Notion or production credentials.

Phase 2A — Automated candidate discovery

Goal: automatically find likely stale claims without modifying the repository.

  1. The initial deterministic trigger selects only changed Markdown files under docs/deployment/ and docs/designs/; deleted/renamed files are recorded as no-analysis audit outcomes rather than silently omitted. “Impacted but unchanged” inference is deferred until a versioned dependency-selection contract exists.
  2. Changed-file runs reuse the existing base/head diff manifest. A separately approved periodic full scan must first add a versioned snapshot-manifest mode that deterministically enumerates every allowed document and creates current-revision spans without requiring a diff; the current builder cannot represent unchanged documents.
  3. Every model-visible document, diff hunk and repository evidence item is untrusted data, never an operator instruction. PR bodies, issues/comments and commit messages are excluded from prompts.
  4. The AI returns only schema-valid candidate_contradiction, possibly_stale or unknown entries bound to exact spans and evidence references.
  5. The validator rejects stale hashes, invented quotes/references, secret-bearing content, out-of-scope paths and multi-document outputs.
  6. Valid candidates are audit artifacts only. unknown and evidence conflicts remain no-change results.
  7. Credentialed jobs check out only the PR merge base, use trusted base code to reconstruct head Git-object provenance, and never execute PR-head code; the bootstrap PR records runtime_not_bootstrapped and makes zero model calls.
  8. Claude Opus 5 receives one inline manifest and at most three turns. It may use only Read against a path named in that manifest from the trusted merge-base checkout; no command, network, write, MCP or PR-head access is allowed. Only structured_output enters the final report, and prompts and execution logs are not uploaded as evidence artifacts.

Delivered Shadow evidence: .github/workflows/doc-candidate-discovery.yml 自动运行只读候选发现,但结果仅为不阻塞 PR 的 evidence;它有固定 5-document/20-candidate limits、每文档 5 分钟 timeout、串行调用与 14 天 JSON retention。离线 synthetic/hostile fixtures 只验证 controller 和安全合同。Phase 2A.1 的 strict corpus evaluator 现定义六个 closed-claim 正样本与两个负样本:只有 6 TP / 0 FN / 0 FP / 0 execution-or-integrity failure 才可 promotion;Action 缺失/无效输出单列 not_evaluable 并阻止 promotion。语料尚未收集完成,因此不得据此进入 Phase 2B、应用 patch、发表评论或设置 required check。

Phase 2B — Deterministic gate, minimal patch and Draft PR

Goal: turn only provable document drift into a reviewable one-document Draft PR.

  1. The controller re-reads the candidate’s exact revision and independently reconstructs its evidence. AI classification alone never authorizes an edit.
  2. Only a candidate supported by an approved, versioned deterministic oracle resolver may enter proposal mode. Phase 1’s six pairs are the only current resolvers; a registry-external candidate remains unknown until a parser, source schema, uniqueness rule and approval are added. Ambiguous truth, production drift and missing evidence also stop.
  3. AI produces one exact FIND/REPLACE proposal per run, bound to the selected candidate, span and evidence IDs. Multiple or overlapping proposals are not combined.
  4. The controller applies the proposal in an isolated automation worktree and rejects edits outside the selected document or intended span.
  5. It reruns all six known claims, controller/contract tests, recorded fixtures and scripts/ci/validate-documentation.sh; when site inputs change it runs that command with Hugo validation enabled. The target contradiction must be resolved and no existing claim may regress.
  6. A separate trusted publisher reconstructs and revalidates the patch against the pinned revision rather than trusting an artifact from an untrusted PR run. Only after every gate passes may it create an automation branch and Draft PR containing provenance and validation results. It cannot merge.

Exit evidence: end-to-end fixtures cover clean no-op, valid drift repair, stale input, hallucinated evidence, secret detection, validation regression, overlapping proposals, duplicate-run idempotency and publisher failure. The publisher implementation SPEC must define its idempotency key and partial-failure recovery. Model credentials, schedules, apply, commit, push and Draft PR are distinct authorization boundaries; automation stops before each external write unless the project owner has separately approved a durable policy for that exact boundary.

Phase 3 — Runtime evidence

Runtime evidence remains deferred until a separately approved Phase 3 implementation SPEC defines measurable entry criteria, evidence freshness/retention, collector identity and rotation, replay/staleness handling, and required operating-history evidence. Narrow controller-owned collectors may then verify facts unavailable from checkout, using dedicated read-only identities and redacted, versioned evidence envelopes. Model workers never receive collector credentials or raw Terraform state.

Production disagreement with valid IaC is production_drift, not authorization to rewrite documentation. Unreachable, unauthorized, stale or ambiguous evidence remains unresolved and cannot produce a patch. The observation/retry policy in spec-doc-gardening-agent/ governs this phase and must be revalidated before implementation.

Optional OINK report presentation

OINK may later render a reviewed, non-sensitive summary of scan revision, known-claim states and unresolved candidate counts. This is a separate publication decision. A report may be shown only when its source revision matches the site source revision; a missing, stale or mismatched report must be omitted or fail the approved build policy, never presented as current. Build time is not evidence freshness, and no model prompt, raw diff, Notion data, runtime payload or credential-derived field may enter Pages or llms.txt.

Invariants across all phases

  • One model task, one proposal and one repair PR operate on one document at one pinned revision; proposals are never combined.
  • All model-visible repository text is untrusted data; only fixed controller prompts carry operator instructions.
  • AI can nominate and write; it cannot declare verified, authorize publishing or merge.
  • Known-claim regression is preserved after every accepted patch but does not replace semantic evals.
  • No evidence means no edit; unknown is a successful safe outcome, not a failure to bypass.
  • Notion synchronization remains outside the entire pipeline under security-boundary.md .
  • Automatic merge, deployment, infrastructure writes and production remediation are never part of doc-gardening.

1.3 - OINK 文档准确性集成:确定性基础与 AI 自动化边界


id: SPEC-oink-doc-accuracy-integration companions:

  • claim-registry.md
  • security-boundary.md
  • automation-roadmap.md sources:
  • ../../planning-artifacts/research/technical-oink-doc-accuracy-integration-2026-08-26/research.md

Canonical contract. 本 SPEC 与 companions: 中的文件共同构成构建、测试和验证必须遵守的完整契约。sources: 仅用于追溯,不是下游必读材料。已完成的 Phase 1/Phase 2 implementation artifacts 保留为交付历史;本契约与 companions 定义当前语义和后续路线。

Why

IaC 文档中的错误端口、镜像、版本或配置会误导维护者和 coding agent。封闭的静态比较能可靠发现少量已登记值的两端不一致,但不能开放式阅读文档、发现新 claim 或撰写修复;这些工作需要 AI。系统因此将 AI 用于候选发现和最小编辑,把证据、权限、范围及验收保留在 deterministic control plane,并让 OINK 继续只承担无特权展示。

项目所有者有意将私人 Notion workspace 用作 credential GUI,并于 2026-09-05 接受直接运行及现有 Jenkins post-deployment stage 所带来的第三方 SaaS/账户和执行风险。该决定取消 Notion 去凭据化对 OINK/AI 路线的阻塞,但不授权文档 AI/CI、OINK 或公开制品读取、转发或发布这些凭据;完整边界见 security-boundary.md 。

Capabilities

  • CAP-1 — Known-claim consistency gate (delivered)

    • intent: 系统能够对 claim-registry.md 中的封闭 claim,确定性比较 Markdown locator 与 checked-in Ansible defaults scalar。
    • success: 当前六个 claim ID 被独立回归基线锁定;相等、矛盾、缺失及歧义 fixture 均产生规定状态、provenance 和 exit code。
  • CAP-2 — Bounded AI analysis contract (prototype delivered)

    • intent: 系统能够把单一允许文档、Git diff span 和脱敏 evidence 打包给 AI,并以本地 schema/validator 约束 candidate 与 edit proposal。
    • success: 模型不能签发 verified、伪造 source/evidence、越出单文档范围或绕过 stale/secret 检查;当前只支持 recorded replay 和显式确认的手动 live analysis,不应用修改。
  • CAP-3 — Automated draft repair loop (planned)

    • intent: 系统能够自动发现可能漂移的文档陈述,对可确定性证明的候选生成并验证最小 patch,再创建供人审阅的 Draft PR。
    • success: 只有 evidence gate、scope check、修改后 consistency regression 与文档构建全部通过的单文档 patch 可进入 publisher;unknown 或冲突只报告,不修改;永不自动 merge。

Capability Lineage

2026-09-05 的契约校准重新定义了 capability 编号:旧 CAP-1(Notion 去凭据化门禁)由 accepted-risk 决策取代;旧 CAP-2(closed-claim detector)和旧 CAP-3(report)合并为当前 CAP-1;当前 CAP-2 对应已交付的 Phase 2 controller prototype;当前 CAP-3 是尚未实施的新目标。引用 capability 时应同时给出本 SPEC 日期或名称,避免与旧版本混淆。

Constraints

  • tools/check-doc-claims.py 是 repository consistency gate,不是开放式发现器或现实世界 truth oracle。verified 只证明目标 Markdown 与 checked-in defaults 同类型同值;两端同时错误时仍可能通过。
  • CLAIMS 是 Phase 1 权威闭集,claim-registry.md 是其投影;扩大闭集需要单独批准。AI 可发现 registry 外候选,但不能借此静默改变确定性基线。
  • AI 负责语义候选发现与写作;普通代码负责 allowlist、引用回验、evidence completeness、revision/digest、secret scanning、状态转换、patch 验收和发布授权。
  • OINK/Hugo、GitHub Pages、detector 与 AI manifest/report 均为无特权面,不得 import、调用或消费 scripts/sync-to-notion.py、其输出、.env、Vault、tfvars/state、Notion 内容或生产凭据。
  • 当前 documentation CI 只运行四个离线步骤:known-claim regression suite、doc-gardening controller/contract suite、recorded golden accept/reject fixtures、current repository consistency run;它不调用真实 AI、不衡量模型语义准确率、不应用 patch,也不开 PR。
  • 真实 AI、自动调度、patch apply、GitHub write identity、Draft PR publisher、runtime collector 或公开 OINK report 均须作为独立实施边界获得批准。阶段与门禁见 automation-roadmap.md 。

Non-goals

  • 让 OINK/Hugo 执行 AI 推理、持有模型/生产/Notion 凭据或调用生产系统。
  • 将 pairwise repository consistency 宣称为生产现实、部署有效性或绝对事实正确性。
  • 让模型自行决定 evidence gate、修改 IaC/应用代码、修复 production drift、自动 merge 或部署。
  • 在本阶段引入 runtime collectors、设备/API 采集、webhook reconciliation 或开放网络发现。
  • 向 report、manifest、OINK 页面或 llms.txt 发布密码、token、凭据或敏感派生信息。

Success signal

在干净 checkout 上,六条独立锁定的 known claims 全部通过,所有离线 controller/contract 与 golden accept/reject fixtures 通过,且生成物只含允许的 repository evidence。下一阶段完成后,一个可证明的文档漂移将按 automation-roadmap.md 生成单文档最小 Draft PR;无法证明的候选保持 unknown 并且不产生修改。

Accepted Risk Review Triggers

出现以下任一变化时,必须重新评估 Notion accepted risk:仓库或运维转为多人协作、Notion 数据库扩大共享、同步进入无人值守运行、凭据进入 AI/CI/OINK/公开 artifact,或发生 Notion 账户、integration token、日志/输出泄漏事件。

Open Questions

  • 非敏感 accuracy report 是否公开渲染到 OINK/Pages,仍需单独批准;当前只作为 local/CI artifact。

1.4 - Phase 1 Known-Claim Consistency Registry

此 registry 是 Phase 1 的闭集和回归基线,不是开放式文档扫描、AI 候选发现或生产事实认证机制。每条记录只允许一个 checked-in Markdown locator 和一个 checked-in YAML 标量 oracle;检测器不得从 runtime、Terraform state、Notion、Vault 或日志补全证据。

权威运行时来源是 tools/check-doc-claims.py 的 CLAIMS。 下表是它的文档投影,CLAIMS 变动时必须同步重新导出。tests/doc-claims/doc-claims-test.py 另以独立、显式的六 ID tuple 锁定当前成员与顺序,避免代码与 report 互相引用同一列表而静默缩减。扩大、替换或重排闭集必须同时经过人工批准并更新三处。

Status contract

StatusDeterministic conditionRequired report data
verifiedlocator 恰好匹配一次,oracle key 恰好解析为一个标量,规范化后相等document locator、oracle path/key、非敏感 expected/observed value、revision/digest
contradiction两端均可唯一解析,但规范化后不相等同上,以及两端值
indeterminatesource 缺失、不可解析、locator 缺失或多次匹配、key 缺失/重复/非标量failure reason、可用的 path/locator、revision/digest;不得编造值

规范化只移除 Markdown code fence/table 的表示层并解析 YAML scalar;不得改写端口数字、版本字符串、大小写或语义等价关系。对于本 registry,原始标量的 exact equality 是唯一的 verified 条件。这里的 verified 只表示文档值与 checked-in defaults 值一致;它不证明生产状态、部署有效性或现实世界绝对正确性。如果两端同步变成同一个错误值,此 gate 仍可能通过。

Closed claims

闭集当前为 6 条。文档侧覆盖 docs/deployment/ 与 docs/designs/ 两类。

IDDocument and stable locatorOracleRegistry display/redaction value (non-authoritative)Reader
service.netbox.portdocs/deployment/netbox-deployment.md → Configuration Variables 表中 netbox_port 行ansible/roles/netbox/defaults/main.yml → netbox_port8080表格
service.netbox.imagedocs/deployment/netbox-deployment.md → Configuration Variables 表中 netbox_image 行ansible/roles/netbox/defaults/main.yml → netbox_imagenetboxcommunity/netbox:v4.1.11表格
service.qwen3-tts.vllm-imagedocs/designs/qwen3-tts-openai-api-integration.md → 关键配置值 中 qwen3_tts_vllm_imageansible/roles/qwen3-tts/defaults/main.yml → qwen3_tts_vllm_imagevllm/vllm-omni:v0.28.0fenced YAML
service.qwen3-tts.gpu-ordinaldocs/designs/qwen3-tts-openai-api-integration.md → 关键配置值 中 qwen3_tts_gpu_ordinalansible/roles/qwen3-tts/defaults/main.yml → qwen3_tts_gpu_ordinal1fenced YAML
service.qwen3-tts.portdocs/designs/qwen3-tts-openai-api-integration.md → 关键配置值 中 qwen3_tts_portansible/roles/qwen3-tts/defaults/main.yml → qwen3_tts_port8100fenced YAML
service.qwen3-tts.min-free-vram-mibdocs/designs/qwen3-tts-openai-api-integration.md → 关键配置值 中 qwen3_tts_min_free_vram_mibansible/roles/qwen3-tts/defaults/main.yml → qwen3_tts_min_free_vram_mib512fenced YAML

表中第四列投影 Claim.registry_value,当前实现仅用它判断不匹配字符串是否应在报告中脱敏;它不参与 document/oracle equality,也不是第三事实源或独立 expected-value assertion。

每条 claim 的依赖项均为"该文档 + 该 defaults 文件"。

已退役

service.llm-server.engine-version 与 service.llm-server.webui-port 随 llm-server 多模型 role 一并删除(f46ab45)。四条 qwen3-tts claim 在 a3818ec 加入。

同步记录

ansible/roles/qwen3-tts-workstation/ → ansible/roles/qwen3-tts/ 的 role 重命名已合入 main,上表四条 qwen3-tts claim 的 oracle 路径已随之更新。这是本 registry 作为 CLAIMS 投影的第一次实际同步:权威侧先变,投影随后跟上。

Required fixtures

The test suite must cover all of the following without contacting external services:

  1. 测试中的独立 expected-ID tuple 恰好按上表顺序列出六个 ID;删除、替换、重排或增加任一运行时 claim 都会失败,直到人工同步基线。
  2. 每条 registry claim 的仓库 fixture 均评估为 verified。
  3. A changed Markdown scalar evaluates to contradiction and identifies the document locator.
  4. A changed YAML scalar evaluates to contradiction and identifies the oracle path/key.
  5. A missing source, zero-match locator, multi-match locator, missing key, duplicate key, or non-scalar oracle evaluates to indeterminate with a specific reason.
  6. Every serialised report uses only the values above and the structural fields in the status contract; it contains no secret-bearing field or unredacted input outside the registry.

Excluded candidates

docs/deployment/immich-deployment.md is deliberately excluded: its stated port is not presently represented by a stable immich_port scalar in ansible/roles/immich/defaults/main.yml.

ansible/roles/qwen3-tts/files/vllm-deploy-config.yaml 中的 gpu_memory_utilization、max_num_seqs、kv_cache_memory_bytes、silence_ban_frames 同样排除:_yaml_key_values 直接跳过首字符为空白的行,而这些键位于 stages: 之下均为缩进行,因此根本不会被收集,实际结果是 oracle_key_missing——不是每 stage 重复导致的歧义,重复判定压根轮不到。这四项目前只能人工核对。

Credentials, tokens, passwords, free-form notes, domains, runtime states, Terraform resource specifications and any value sourced from a secret file are also excluded, even if they appear in documentation.

2 - NetBox Custom Fields 参考文档

创建日期: 2026-02-09
Story: 1.1 - 定义核心 Custom Fields
状态: ✅ 已完成


概述

本文档定义了 6 个核心 Custom Fields,用于驱动 Infrastructure as Data 自动化流程。这些字段应用于 virtualization.virtualmachine 和 dcim.device 对象类型。


Custom Fields 列表

1. infrastructure_platform (基础设施平台)

用途: 决定 Router Pipeline 的路由目标

属性值
TypeSelection
Required✅ Yes
Defaultproxmox
Choicesproxmox, esxi, physical
Object TypesVirtual Machine, Device
GroupAutomation
Weight100

描述: 定义资源的目标基础设施平台。Router Pipeline 读取此字段后路由到对应的 Platform-specific Pipeline。

路由逻辑:

  • proxmox → Proxmox Provisioning Pipeline
  • esxi → ESXi Provisioning Pipeline
  • physical → Physical Device Sync Pipeline (跳过 Terraform)

2. automation_level (自动化级别)

用途: 控制自动化流程的审批行为

属性值
TypeSelection
Required✅ Yes
Defaultrequires_approval
Choicesfully_automated, requires_approval, manual_only
Object TypesVirtual Machine, Device
GroupAutomation
Weight110

描述: 控制 Terraform Apply 是否需要人工审批。

审批逻辑:

  • fully_automated: Terraform Apply 无需人工审批(测试环境)
  • requires_approval: Terraform Plan 后暂停,等待人工审批(生产环境推荐)
  • manual_only: 跳过所有自动化,仅更新 Inventory(仅文档用途)

3. proxmox_node (Proxmox 节点)

用途: 指定 Proxmox VE 集群中的目标节点

属性值
TypeSelection
Required❌ No (条件必填)
Default-
Choicespve0, pve1
Object TypesVirtual Machine
GroupProxmox Configuration
Weight200

描述: 指定 Terraform 将在哪个 Proxmox 节点上创建 VM/LXC。

使用场景:

  • 仅当 infrastructure_platform=proxmox 时必填
  • 根据负载均衡或资源可用性选择目标节点
  • 未来可扩展为自动负载均衡选择

4. proxmox_vmid (Proxmox VMID)

用途: Proxmox 资源的唯一标识符

属性值
TypeInteger
Required❌ No (条件必填)
Default-
ValidationMin: 100, Max: 999
Object TypesVirtual Machine
GroupProxmox Configuration
Weight210

描述: Proxmox 资源的唯一 ID,必须在集群中全局唯一。

VMID 分配策略:

  • 100-199: LXC 容器
  • 200-299: QEMU VM (基础设施)
  • 300-399: QEMU VM (应用服务)

示例:

  • Anki LXC: 150
  • Caddy LXC: 110
  • NetBox VM: 201

5. ansible_groups (Ansible 组)

用途: 定义资源所属的 Ansible 组

属性值
TypeMultiple Selection
Required❌ No
Default-
Choicespve_vms, pve_lxc, docker, tailscale, backup_client, monitoring_target
Object TypesVirtual Machine, Device
GroupAnsible Configuration
Weight300

描述: Terraform 的 ansible_host 资源根据此字段自动分组,最终体现在 Ansible Dynamic Inventory 中。

常用组说明:

  • pve_vms: Proxmox QEMU 虚拟机
  • pve_lxc: Proxmox LXC 容器
  • docker: 安装 Docker 的主机
  • tailscale: 加入 Tailscale VPN 的主机
  • backup_client: PBS 备份客户端
  • monitoring_target: 监控目标主机

6. playbook_name (Playbook 名称)

用途: 指定关联的 Ansible Playbook 文件名

属性值
TypeText
Required❌ No
Default- (根据 ansible_groups 自动推导)
Object TypesVirtual Machine, Device
GroupAnsible Configuration
Weight310

描述: 显式指定 Ansible Playbook 文件名(不含 .yml 后缀)。如果留空,Pipeline 根据 ansible_groups 自动推导。

自动推导逻辑:

  • ansible_groups 包含 docker → 使用 deploy-docker.yml
  • ansible_groups 包含 netbox → 使用 deploy-netbox.yml
  • 可显式指定覆盖自动推导

示例:

  • deploy-netbox
  • deploy-caddy
  • sync-to-notion

使用场景示例

场景 1: 创建 Proxmox LXC 容器 (完全自动化)

{
  "name": "anki-sync-server",
  "cluster": 1,
  "status": "planned",
  "memory": 512,
  "vcpus": 1,
  "custom_fields": {
    "infrastructure_platform": "proxmox",
    "automation_level": "fully_automated",
    "proxmox_node": "pve0",
    "proxmox_vmid": 150,
    "ansible_groups": ["pve_lxc", "docker"],
    "playbook_name": null
  }
}

预期流程:

  1. Webhook 触发 Router Pipeline
  2. Router 识别 platform=proxmox,触发 Proxmox Pipeline
  3. Terraform Apply 自动执行(无需审批)
  4. Ansible 部署 Docker 和应用
  5. 验证通过,状态变为 active

场景 2: 创建生产 VM (需要审批)

{
  "name": "netbox-prod",
  "cluster": 1,
  "status": "planned",
  "memory": 2048,
  "vcpus": 2,
  "custom_fields": {
    "infrastructure_platform": "proxmox",
    "automation_level": "requires_approval",
    "proxmox_node": "pve1",
    "proxmox_vmid": 300,
    "ansible_groups": ["pve_vms", "monitoring_target"],
    "playbook_name": "deploy-netbox"
  }
}

预期流程:

  1. Webhook 触发 Router Pipeline
  2. Terraform Plan 生成变更预览
  3. ⚠️ Pipeline 暂停,等待人工审批
  4. 用户检查 Plan 后点击 “Approve”
  5. Terraform Apply 执行
  6. Ansible 部署 NetBox
  7. 验证通过

场景 3: 物理服务器配置管理

{
  "name": "pbs-backup-server",
  "device_type": 2,
  "role": 4,
  "site": 1,
  "status": "planned",
  "custom_fields": {
    "infrastructure_platform": "physical",
    "automation_level": "manual_only",
    "ansible_groups": ["backup_client"],
    "playbook_name": null
  }
}

预期流程:

  1. Webhook 触发 Router Pipeline
  2. Router 识别 platform=physical,触发 Physical Device Sync Pipeline
  3. ❌ 跳过 Terraform(物理服务器无需 provisioning)
  4. ✅ 从 NetBox 生成 Ansible Inventory
  5. Ansible 执行配置管理(安装软件、配置服务)

API 查询示例

查询所有 Proxmox 平台的 Planned 状态虚拟机

curl -H "Authorization: Token ${NETBOX_API_TOKEN}" \
  "http://192.168.1.104:8080/api/virtualization/virtual-machines/?status=planned&cf_infrastructure_platform=proxmox"

查询需要审批的虚拟机

curl -H "Authorization: Token ${NETBOX_API_TOKEN}" \
  "http://192.168.1.104:8080/api/virtualization/virtual-machines/?cf_automation_level=requires_approval"

查询特定节点的虚拟机

curl -H "Authorization: Token ${NETBOX_API_TOKEN}" \
  "http://192.168.1.104:8080/api/virtualization/virtual-machines/?cf_proxmox_node=pve0"

查询属于 docker 组的所有资源

# 虚拟机
curl -H "Authorization: Token ${NETBOX_API_TOKEN}" \
  "http://192.168.1.104:8080/api/virtualization/virtual-machines/?cf_ansible_groups=docker"

# 物理设备
curl -H "Authorization: Token ${NETBOX_API_TOKEN}" \
  "http://192.168.1.104:8080/api/dcim/devices/?cf_ansible_groups=docker"

故障排查

问题 1: 创建虚拟机时提示 “This field is required”

原因: infrastructure_platform 或 automation_level 未填写(必填字段)

解决方法: 确保两个必填字段都有值


问题 2: Terraform Plan 显示 proxmox_node 为 null

原因: 虚拟机的 infrastructure_platform=proxmox 但 proxmox_node 未填写

解决方法: 编辑虚拟机,设置 proxmox_node 为 pve0/pve1 之一


问题 3: VMID 冲突

错误: Terraform Apply 失败,提示 “VMID 199 already exists”

解决方法:

  1. 查询已使用的 VMID: pvesh get /cluster/resources --type vm
  2. 在 NetBox 中修改虚拟机的 proxmox_vmid 为未使用的 ID

相关文档

  • Story 1.1(历史来源,非当前运行指引): 历史 Story 1.1
  • Architecture ADR-005: NetBox 数据建模策略
  • PRD: FR3, FR4, FR5 - Custom Fields 功能性需求

Changelog

日期变更作者
2026-02-09初始创建,定义 6 个核心 Custom FieldsAI Agent

3 - 首个 Jenkins peer agent 本地交付与范围取舍

2026-11-02 集成修复:已扩展当前完整原生闭包、moved/heredoc、四份跟踪公开输入、两个已命名 terraform_data 的 cty payload、公开 inventory JSON 和 OpenBao 标识输出。source_raw 内容、桥接 comments 与公钥使用配置/state/refresh 成对脱敏,未知字段、类型、来源和 private 仍拒绝。真实 Terraform 1.14.4 / bpg 0.70.0 经假 HTTPS PVE 与实际 broker 的 bridge/snippet/VM/LXC Read 已通过,CPU 2→3 与桥接 MTU 1400→1500 可预测,上游写次数 0。评审、PR CI、合并由当前任务另记录,生产验收未完成。

整理日期:2026-10-23。结论:本地代码实现与评审完成,生产部署与 CI-only 移交未完成。本记录整理已有证据,不表示重新执行了生产验收或新一轮外部评审。

版本与资料保留

  • 公共基线:9e38f6138d17dfed06c488382a073e5267a0f247。
  • 本地实现提交:245e217f4f2e5fe96ff59143e0c9f446017ce0fc;对应 tree:6181ea6b5229567bda130e1c8240838cb0b378aa。
  • 本次整理前,已逐项核对原交付摘要中 73 个代码、配置、测试和指南文件的 SHA256,全部与上述提交交付记录一致。本次调整忽略规则、跟踪状态和文档;另将现有文档测试读取的准确性契约移入 docs/reference/doc-accuracy-contract/,仅更新读取路径,保留全部断言和原契约字节。Jenkins 运行逻辑未改。
  • 本记录和私有应用接入契约 随代码保留。恢复规格和部署指南已于 2026-11-06 删除,待按 CI-only 架构 重写。
  • _bmad-output/ 整体停止跟踪并保留本地文件;其中重复源码清单、各轮补丁、原始模型响应、失败尝试和长篇过程日志不再作为新增交付内容。既有提交历史未改写,因此历史中仍可找到原记录。其他任务在该目录的本地文件同样保留。

实现范围核对

按规格 S1–S8 对照部署引用、入口调用和验收要求,在原交付核对时,没有发现可在保持完整 B 验收的同时直接删除的独立功能组。这是范围与依赖核对,不宣称所有实现都已被证明是最简设计。

保留内容对应要求与必要性
CT110 Terraform、host vars、agent Deploy/VerifyS1:复用现有 LXC 模块,恢复唯一目标和 inventory;不扩展其他节点
三 UID、systemd unit、离线工具链及锁S2/S4:隔开 plan、deploy、私有应用身份;限制每次作业的能力和依赖来源
producer/projection/broker、schema 与 Read 策略S3:真实 provider 预测能力,同时避免把 HCP/PVE mutation 凭据和 raw state 交给 plan
admission、runner/client、事务审批、网络/probe 与材料校验S4:固定来源和 scope、两次审批、串行执行、残留隔离;由角色安装并由服务或入口调用
watchdog、controller maintenance、bootstrap/config gate、证据收集S5/S7:独立于 Jenkins 的恢复和自更新,以及 controller=0 前的真实证据门槛
三个 staged Jenkins 入口、job 映射、应用接入契约S6:保持旧入口,准备五 job 的调度和清理验收;私有代码留在所属仓库
工具链准备/投影策略更新 CLI、回归与集成夹具S2/S3/S8:生成和核对离线材料、审核配置闭包,以及验证实际失败分支;不增加新框架
_bmad/custom/bmad-build-auto.toml 两处文档路径修正本任务已批准的 Auto 执行适配;不改变部署行为或评审规则

20 个 scripts/jenkins/*.py 均有角色安装、运行调用或指南操作入口;其中准备工具链和更新投影策略是运维 CLI,不是常驻服务。三个大 JSON 由实际角色/代码消费:toolchain lock 用于离线安装,provider schema 与 plan policy 用于成对投影和 broker 约束。未仅因行数多就删除或重新格式化这些材料。

2026-10-23 后续精简仅移除未调用的旧 JSON 投影三函数与未消费的 ci/agent-access.yml,将 HTTP 重定向拒绝原语归入已有 control.py,并取消 peer 对 broker 服务脚本的复制依赖。原生投影及真实 root policy 来源见现行规格与部署指南;以上历史提交和评审证据仍对应原交付时点。 本次精简保留原 98 项并新增 1 项,99 项回归、真实固定 provider 假上游预测(写次数 0)及相关 Ansible/文档验证通过。Gemini 完成 intent/edge 两层;用户于 2026-10-23 明确授权主代理复核替代另两层,复核未发现需追加修复或延期的问题。完整 B 的生产验收仍待部署阶段授权。

当前 jenkins_agent_activate、gateway/watchdog 激活和五 job enabled 均默认关闭,cutover_authorized=false,controller 保持 bootstrap。保留现有 Jenkinsfile 和 Jenkinsfile-webhook-router 的基线行为,新入口通过 staged 验证后再获批切换。

最终评审与取舍

最终四层通过 PAL 的 agy CLI 执行:intent-alignment、blind-hunter、edge-case-hunter、verification-gap。请求模型为 gemini-3.8-flash-high,推理档位 High(该模型最高可用档);CLI 返回未报告实际模型字段,不能额外确认实际服务模型。四层均有完整报告、return_code=0、SUCCESS;其中两层初次超时后沿原会话各补完一次,未重复成功层。此前 Claude 两轮报告和额度失败记录仍在本地原始材料中。

最终 19 项:3 项修复、15 项拒绝(含不成立、范围外或生产待验收项)、1 项沿用前轮历史延期;无新增延期条目。下表保留每项取舍依据,生产未完成项仍列在后文,不因拒绝追加代码修复而视为已验收。

ID处理发现与依据
I1不追加修复真实CT110/IPAM及目标内核验收尚未执行。carried pass2 I1/I4:同一线上表面尚未部署,用户仍仅授权本地实施/提交;明确保留生产验收未完成,不据描述性差异提前部署或归零。
I2不追加修复线上job切换与controller归零尚未执行。carried pass2 I2/I3:同一线上表面尚未部署,用户仍仅授权本地实施/提交;明确保留生产验收未完成,不据描述性差异提前部署或归零。
I3不追加修复真实Vault/恢复证据/AD-9待生产授权。carried pass2 I7:同一线上表面尚未部署,用户仍仅授权本地实施/提交;明确保留生产验收未完成,不据描述性差异提前部署或归零。
I4不追加修复门控代码不等于真实生产移交。carried pass2 I6/I8:同一线上表面尚未部署,用户仍仅授权本地实施/提交;明确保留生产验收未完成,不据描述性差异提前部署或归零。
B1不追加修复GC删除nonce锁文件导致新旧inode并发。carried pass2 B21:registry_lock内先证明record存在再open锁;GC同锁删除record/lock,之后新调用无法通过record检查,没有重新open另一inode的可达路径。
B2不追加修复bundle慢读者长时间占worker。读取截止仅约束读取阶段是有意设计;bundle仅root mTLS可取且有256MiB上限、socket单次写超时。闭环可信peer上的极慢传输为低频假设,额外传输监督器/期限不纳入首peer最小实现;不声称无限期占用已获证明。
B3不追加修复本地只读Git子进程缺少逐调用timeout。唯一远端fetch已经timeout60。其他调用读root受管bare对象,未展示正常受支持输入上的锁等待;底层存储故障是全控制器问题。为每个本地读取添加防御性期限不是当前必要修复,按用户取舍要求拒绝扩张。
B4不追加修复peer断开使SO_PEERCRED崩溃selector。AF_UNIX凭据在连接建立时保存,peer close不使accepted fd失效;任务Sandbox实际16组socketpair在peer close后getSO_PEERCRED均成功。异常需要本地fd被关闭,而该fd此时仅selector持有,所述远端触发不成立。
B5不追加修复global.lock执行期持有阻塞maintenance。该锁正是mutation/清理与独立维护互斥的意图要求;watchdog用LOCK_NB等待,必须等run清理后维护。释放它会破坏已批准的串行边界。
B6已修复Terraform-only apply后提前返回未刷新inventory state。scripts/jenkins/transaction.py将已有refresh置于现有Terraform/playbooks判断后、空playbook早退前;test_terraform_only_apply_refreshes_state_before_returning_without_ansible验证apply→refresh且不启动Ansible。
B7不追加修复FQDN host_vars路径不能自动推导playbook。项目service/playbook使用kebab-case固定映射,带点hostname不属于自动推导契约;未映射输入按现有explicit_scope路径安全拒绝,并非已支持名称静默错误部署。不新增命名扩展。
B8不追加修复材料统一错误消息丢失diagnostics。carried pass2 V5:消费者全部no_log且必须静默fail-closed;未证明接受坏材料或外部错误变更。测试假通过已在前轮单独修复,不能由此要求输出秘密上下文。
B9不追加修复legacy echo/未引用Vault路径的既有兼容问题。Jenkinsfile与公开9e基线逐字相同,问题未由peer入口引入。依据用户本轮明确要求有所取舍,保留旧入口字节及该历史旁注,不扩大本任务到legacy维护或工单操作;不宣称已修复。
B10沿用历史延期legacy缺HEAD~1时跳过构建。carried pass2 E17:相同旧入口/相同claim,已判为前置问题;本轮不重复验证、修复或新增延期条目。
B11不追加修复skip inspection后when引用results失败。Queue task第一条when与inspection使用同一activate/runner gate,Ansible顺序短路;第一条false时不求值results。此前真实role首装/未激活夹具已执行通过,所述skip场景没有missing attribute。
B12不追加修复解包后chown跟随任意symlink越界。Runner解包前toolchain.check_archive、restore/drill前inspect_tar均只允许普通文件/目录,拒绝软/硬链接;私有root暂存区在启动消费者前chown,没有所述从archive进入symlink的路径。三个调用链均核对,避免重复nofollow保护。
E1不追加修复legacy Terraform异常退出码137等被视作无变更。这是原样保留的9e入口既有行为,peer transaction.run已经拒绝非允许退出码。按用户本轮取舍,仅保留历史旁注,不为了恢复旧入口而顺带扩展legacy功能改造;不声称该问题不存在或已修复。
V1已修复prepare_plan_ca生产hook缺少正常CI中的直接覆盖。复用RunnerTests.execute_fixture的plan profile,新增test_plan_ca_staging_and_execute_hook_use_public_readable_certificate,覆盖实际execute hook、有效CA/0444、非法CA拒绝和非plan不读取。
V2已修复apps-validation的真实Git object/tree检查未进CI回归。SourcePreflightTests.test_apps_validation_checks_real_repair_object_sha_and_tree_digest使用合成local bare Git,验证真实对象/tree摘要以及缺对象、错SHA、错摘要和畸形摘要的拒绝。

本地验证证据与复现

以下表格保留原 2026-10-23 实现的历史记录;本轮 2026-11-02 在指定 Sandbox 重跑七套回归的结果见本节末尾。

套件(tests/ci/)通过数
jenkins-peer-test.py22
jenkins-controller-state-test.py12
jenkins-runner-boundary-test.py5
jenkins-source-preflight-test.py4
jenkins-toolchain-unpack-test.py4
jenkins-peer-repair-test.py42
jenkins-role-fixture-test.py9
合计98
  • 真实 Terraform 1.14.4 / bpg 0.70 经 broker 对假 HTTPS PVE 上游预测 VM/LXC CPU 2→3,假上游写次数 0;真实 Terraform dynamic inventory 与合成加密 Vault 的审批前后集成通过。
  • repository fixtures、相关 41 文件离线 Ansible lint/control syntax、tracked 34 HCL fmt 和 native 31 文件 init/validate 通过;Ansible/HCL 此后未变化。native validate 仅有既存 CT120 timeout_start 弃用警告。
  • 真实 Sandbox proc-root 反例验证了 user namespace 的隔离机制;这些结果不替代目标 LXC 的实际 systemd/cgroup 能力验证。
  • 指定验证 Sandbox:iac-codex-jenkins-peer-recovery-direct-v130,linux_arm64;Kit 的 Terraform 1.14.9 / Ansible-core 2.20.10 与目标运行版本不同。另校验 Terraform 1.14.4;目标 amd64、Java 25、Ansible 2.19.12 尚需现场验收。

在该 Sandbox 的仓库根目录,单个普通套件使用 python3 tests/ci/<suite>.py;Ansible role fixture 需 login shell 激活已有工具环境。真实 provider 集成需提供对应 Terraform 二进制和已锁 provider mirror:

python3 tests/ci/jenkins-peer-provider-test.py --terraform <terraform-1.14.4> --mirror <locked-provider-mirror>
python3 tests/ci/jenkins-inventory-scope-test.py --terraform <terraform-1.14.4> --mirror <locked-provider-mirror>
python3 tests/ci/jenkins-peer-test.py --project-native

原始验证日志仍在任务 Sandbox 的 /tmp/jenkins-peer-final-*.log 等任务路径中,属于临时证据,可能随 Sandbox 清理消失;本记录保留版本、结果、覆盖与复现入口,不复制完整日志或巨量源码清单。临时二进制/mirror 不存在时,在已有安装授权范围内重新准备材料;不得用真实凭据或生产写入代替夹具。

2026-11-02 七套回归在指定 Sandbox 共通过 103 项(12、27、5、4、4、42、9);当前完整原生投影 init/validate 通过,仅既有 CT120 弃用警告。

本轮新增回归验证实际签名 producer、非空 roster 与所有 resource/moved 块保留;新增或变化的来源/template/input、符号链接、未知 cty 类型和嵌套 JSON 均拒绝。源与 schema 指纹继续由既有 updater 生成;四份公开输入不复制到策略作为第二份名册。运行策略必须逐名填写 bridges[alias][node];默认空范围与 disabled broker 保持不启用。snippet 文件 Read 只列 storage content,不授予 source_file、本地/URL 文件或 SSH 读取。

本次资料整理验证

在任务 Sandbox 的临时 Git 快照中执行 bash scripts/ci/validate-documentation.sh false 全部通过;快照不含 _bmad-output/,因此同时验证了新克隆场景不再依赖被忽略的契约文件。批准意图契约逐字一致,四份文档准确性契约逐字一致;新整理文档的本地 Markdown 链接均有效。Jenkins 实现未变化,因此未重复执行先前通过的 98 项回归。

尚未完成的生产验收

这些属于已批准 B 范围,仍需各自部署/演练授权,未降为可选项:

  1. IPAM/state/VMID/模板/存储复核,创建 CT110,目标 amd64 整套离线安装、真实秘密登记与节点重连。
  2. 目标 LXC 的双向 namespace/proc/socket、IPv4/IPv6、cgroup、abort/双 fork/残留、并发及 OOM/磁盘预算验证。
  3. 真实只读身份最小权限、当前 root/provider 覆盖和盲区验证;五 job 的调度、分阶段凭据、审批、清理证据及应用所有者补丁。
  4. 获批约 10 分钟停服窗口内完成实际备份/演练、故意失败恢复、Gitea 不变及独立自更新验证。
  5. 两次 Ansible 幂等验证及全部移交证据齐全后,单独批准 controller=0,再由正常 Jenkins plan 对账。

旧入口缺 HEAD~1 时跳过构建,以及历史退出码/路径引用问题,本轮未修复;它们未由新 peer 入口引入。投影覆盖仍为 partial,零变化不能作为整个 root 无变化证明。本轮推送和合并状态由 PR189 的最终记录确认;生产部署未执行。