Repository navigation
docs(adr): propose ADR 026 for verification tiers and CI governance - #1940
Conversation
Add proposed ADR 025 defining the five verification tiers (L0–L4, including event-driven formal model verification), test coverage and placement discipline, and CI governance rules, along with its mirrored Chinese translation, index entries and a routing pointer in AGENTS.md. Refs #1938
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
APPROVE
This is a docs-only ADR. It follows docs/templates/adr.md (Context, Decision, Consequences, Non-goals, Supersession), is marked Proposed in both the English and Chinese files, and the relationship with ADR 008 is recorded in docs/adr/README.md:35 and in the ADR's Supersession section. The Chinese mirror under docs/zh/adr/ matches the English decisions and section structure, and docs/INDEX.md:52 links both files. All referenced paths exist and every relative link resolves.
Verification: git diff --check origin/main...HEAD passes, and node scripts/adr-check.mjs --base origin/main reports ADR freeze passed: 5 changed files. No conflict with main at 499d590 or the open PRs I could inspect.
One optional P3 note is inline on the L0 row. It does not block approval.
|
|
||
| | Tier | Question answered | Scope | Trigger | | ||
| | --- | --- | --- | --- | | ||
| | **L0 — Design & formal** | Do the state-machine, protocol and handover invariants hold in the abstract? | Formal models (e.g. TLA+ specifications and `.cfg` properties), ADR immutability checks | **Event-driven on design/contract change**: when a formal model, protocol/event contract, recovery boundary or handover invariant changes. Not run on ordinary implementation PRs. | |
There was a problem hiding this comment.
Optional (P3): this row puts the ADR immutability check in L0, but the trigger does not name an ADR file change. A router implemented from this trigger list would skip L0 for a PR that edits an accepted ADR without the adr-erratum label, so the freeze check would not run; the current CI runs scripts/adr-check.mjs on every non-fork PR (.github/workflows/ci.yml:49-53). Fix: add an ADR file change to the L0 trigger, or state that the ADR freeze check stays on every PR.
|
Two open PRs under #1919 already apply D4 and could be linked from the description (not the ADR body, per ADR 008):
Until #1920 merges, D4's " |
zerob13
left a comment
There was a problem hiding this comment.
Review of the policy itself (non-blocking; the doc-format review above already covers structure and links). Inline points, in order of weight:
- D3 fixes numeric budgets in an ADR that becomes immutable once accepted, while Non-goals defers concrete values to workflow files and architecture guides.
- D4's path-scoped
mainrouting relies on scheduled full sweeps that do not exist yet. - L0 and L2 triggers are not mechanically decidable, or are narrower than today's selection.
- Runtime injection of release stamps / endpoints needs a production-safety bound.
- D2's "lowest layer" wording should be reconciled with AGENTS.md Testing.
- L4 "never gates an ordinary PR" should say how harness changes verify themselves.
|
|
||
| ### D3. CI gates operate under explicit budgets and light/heavy isolation | ||
|
|
||
| - **Hard latency and resource budgets**: every synchronous tier maintains an explicit wall-clock |
There was a problem hiding this comment.
Budgets in an accepted ADR. Once accepted, these numbers can only change through a superseding ADR, yet they are tuning values that depend on runner pools and should follow measurements. They are also far from the current baseline in #1919 (passing verify median 29 min, workspace tests alone 14.2 min), so on acceptance almost every PR would count as a "regression". The Non-goals section also keeps concrete values out of the ADR. Suggest: the ADR requires that every synchronous tier has a recorded budget and that "approaching the budget is fixed by narrowing, not by raising timeouts"; the numbers live in docs/architecture/build.md and #1919.
|
|
||
| ### D4. Impact-scoped routing is the default, backed by scheduled full sweeps | ||
|
|
||
| - **Consistent routing on PRs and `main`**: both pull requests and pushes to `main` select only the |
There was a problem hiding this comment.
Ordering dependency with the sweep. Today a main push narrows only for docs-only changes and otherwise runs every group (scripts/ci-changes.mjs), and no workflow has a schedule trigger. If main is narrowed before the full sweep exists, cross-group coupling is no longer caught anywhere. Suggest stating that path-scoped main routing is allowed only while a full sweep is running, and what happens when the sweep fails: who triages it and how the failure is traced back to the commit that caused it, since per-commit signals then only cover the selected groups.
|
|
||
| | Tier | Question answered | Scope | Trigger | | ||
| | --- | --- | --- | --- | | ||
| | **L0 — Design & formal** | Do the state-machine, protocol and handover invariants hold in the abstract? | Formal models (e.g. TLA+ specifications and `.cfg` properties), ADR immutability checks | **Event-driven on design/contract change**: when a formal model, protocol/event contract, recovery boundary or handover invariant changes. Not run on ordinary implementation PRs. | |
There was a problem hiding this comment.
L0 trigger is a judgement call. "Protocol/event contract, recovery boundary or handover invariant changes" cannot be derived from paths, and the TLA+ models do not run in CI today (TLC needs Java and the tools jar from outside the repo, per capability-models/README.md). Suggest splitting it: (a) a mechanical trigger on docs/design/examples/capability-models/**, with its cost disclosed under D3 (Java + TLC runtime); (b) for implementation changes, a PR-template checkbox that a reviewer confirms, i.e. "touches a modelled guarantee → update and rerun the model". Otherwise the last paragraph of D1 has no enforcement point.
| | --- | --- | --- | --- | | ||
| | **L0 — Design & formal** | Do the state-machine, protocol and handover invariants hold in the abstract? | Formal models (e.g. TLA+ specifications and `.cfg` properties), ADR immutability checks | **Event-driven on design/contract change**: when a formal model, protocol/event contract, recovery boundary or handover invariant changes. Not run on ordinary implementation PRs. | | ||
| | **L1 — Static & contract** | Are formatting, dependency boundaries, public schemas/wire types, static source rules and license/advisory policies intact? | Formatters, linters, pure static repository scans, frontend typecheck/lint, wire/schema contracts, dependency advisory/license checks | **Every PR**, scoped to the changed surface (dependency scans only on manifest, lockfile or policy changes). Fast fail-first gate. | | ||
| | **L2 — Affected business flows** | Do the modified modules and their direct dependents preserve behavioral contracts? | Unit tests and in-process or loopback flow tests for the affected crates and their downstream consumers | **Every PR** on the primary high-throughput platform; expands to the full workspace only when shared foundational crates or workspace-wide configuration change. | |
There was a problem hiding this comment.
"Direct dependents" is narrower than what Cargo can break. A change in a crate can break any transitive dependent, and today's router selects coarse groups that cover them. Suggest "the reverse-dependency closure of the changed crates" (computable from cargo metadata, which xtask already reads), or state explicitly that transitive breakage is left to the sweep.
| terminal E2E suite) proves a behavior, higher layers verify only connectivity and do not duplicate | ||
| its failure matrix. Migrating coverage to a better carrier requires retiring or disabling the | ||
| superseded CI case in the same change or tracked migration. | ||
| - **Inject testability at runtime boundaries instead of recompiling**: test variants (release |
There was a problem hiding this comment.
Production-safety bound. Making release stamps, build IDs or endpoints configurable at runtime can make the shipped binary trust an environment variable for release identity or update endpoints. Suggest adding: the injection point must be unreachable in a release build, or limited to test harness entry points, so that test injection never widens what a production binary accepts.
| Coverage quality is measured by contract protection per unit of cost, not by test count at the top | ||
| layer. | ||
|
|
||
| - **Test at the lowest layer that proves the contract**: logic, state transitions, rendering rules, |
There was a problem hiding this comment.
Reconcile with AGENTS.md Testing. AGENTS.md already says that assertions about private modules, helpers or single functions belong in the nearest flow test, not standalone tests. "Test at the lowest layer that proves the contract" can be read as encouraging helper-level unit tests. Suggest "the lowest flow or contract layer that proves the contract", and having AGENTS.md point to this rule instead of keeping both.
| | **L1 — Static & contract** | Are formatting, dependency boundaries, public schemas/wire types, static source rules and license/advisory policies intact? | Formatters, linters, pure static repository scans, frontend typecheck/lint, wire/schema contracts, dependency advisory/license checks | **Every PR**, scoped to the changed surface (dependency scans only on manifest, lockfile or policy changes). Fast fail-first gate. | | ||
| | **L2 — Affected business flows** | Do the modified modules and their direct dependents preserve behavioral contracts? | Unit tests and in-process or loopback flow tests for the affected crates and their downstream consumers | **Every PR** on the primary high-throughput platform; expands to the full workspace only when shared foundational crates or workspace-wide configuration change. | | ||
| | **L3 — Real environment & cross-platform** | Do real OS primitives, process/plugin wiring, terminal interaction and external protocol boundaries work? | OS-native boundary slices, real daemon + plugin runtime flows, interactive terminal E2E suites, external registry acceptance | **Split by cost**: narrow OS-native boundary slices run on PRs that touch platform/client code; full cross-platform runs and external-registry checks run asynchronously on `main` or on a schedule; interactive terminal E2E runs locally on demand and before release. | | ||
| | **L4 — Quality, performance & release** | Have model quality, resource budgets, executable layout or distribution artifacts regressed? | Evaluation harnesses, memory/startup measurements, native code-layout builds, multi-platform release builds and registry/image acceptance | **Scheduled (nightly), manual dispatch or release train only**. Never gates an ordinary feature PR. | |
There was a problem hiding this comment.
Harness changes. Today a change under xtask/ selects the eval group and runs xtask/eval-tests on the PR, and code-layout.yml runs on PRs that touch scripts/code-layout/**. Both are reasonable: a change to the L4 harness should verify the harness itself on its PR. Suggest saying that L4 execution never gates feature PRs, while changes to an L4 harness are checked on their own PR (L1/L2 of the harness).
codoggy
left a comment
There was a problem hiding this comment.
Review summary
I reviewed the merge-base diff for c4fb0c1b783abba006a77c0888aead21a7526c42, focusing on the proposed verification tiers, their Chinese translation, and how contributors find them. I found no blocking issues in that scope.
Non-blocking note: AGENTS.md:69 says to “Follow ADR 025,” while both the ADR and its index mark it Proposed. A contributor could read the tier table as replacing the existing pre-merge commands at AGENTS.md:79–85. Until the decision is accepted, label the link as a proposal and keep those commands as the source for what to run today.
Checks: Static inspection: the English and Chinese documents distinguish formal-model triggers from routine flow tests and leave workflow changes to later implementation. The five changed files are documentation and navigation only. CI: changes and ci-ok passed; the build and test jobs were skipped. Tests not run locally.
zerob13
left a comment
There was a problem hiding this comment.
Requesting changes on the points in the earlier review, which I first left as non-blocking. Once accepted, this ADR is immutable, so these should be settled before merge:
- Move the D3 numeric budgets out of the ADR (
docs/architecture/build.md/ #1919); keep only the rule that every synchronous tier has a recorded budget. - D4: allow path-scoped
mainrouting only while a scheduled full sweep exists, and state who triages a failed sweep. - D2: bound runtime test injection so that it is unreachable in release builds.
The remaining inline points (L0 trigger, L2 reverse-dependency closure, AGENTS.md wording, L4 harness changes) need a reply, either a change or a reason to keep the current text.
… doc checks Incorporate review feedback from #1940: - Frame D1 around three operational test states (Active gate, Retained on-demand/sweep, Dev/exploratory) with L0–L4 mapped onto them, keeping ADR freeze checks in L1, splitting L0 triggers into model-file changes and review checklists, scoping L2 to reverse-dependency closures, and distinguishing L4 execution from L4 harness self-checks. - Add D2 stating that documentation guides and carries semantic contracts while automated checks enforce deterministic form and structural invariants without business compilation or prose/literal guessing. - Reconcile D3 with AGENTS.md Testing (lowest flow or contract layer) and add a release-unreachability bound for runtime test injection. - Move numeric latency budgets out of the immutable ADR (D4) and require an active scheduled sweep with triage/bisection ownership before narrowing main pushes (D5). - Revert the AGENTS.md edit until ADR 025 is accepted. Refs #1938
|
Thank you @yyhhyyyyyy, @zerob13, and @codoggy for the sharp reviews — updated ADR 025 (both English and Chinese mirrors) and the PR description to address every point:
Also structured D1 around three operational states (Active gate, Retained on-demand & sweep, Dev / exploratory) and added D2 to draw the boundary between documentation guidance/semantic contracts and deterministic form-only automated checks. |
Clarify under D2 that generated files are committed and freshness-checked only when downstream code consumes them or when they serve as concise, actively referenced public summaries; fine-grained internal graphs used for boundary enforcement are verified live in memory and generated on demand instead of committed to Git. Refs #1938
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Reviewed head e2a5a2c. The PR proposes ADR 025: three operational verification states (Active, Retained, Dev), an L0-L4 tier mapping, form-only documentation checks, test coverage discipline and CI governance, plus index entries and a Chinese mirror. The change is documentation-only and follows the ADR template.
The earlier P3 from review 5988772539 is resolved. ADR immutability is no longer in L0; the L1 row owns it and names the every-PR trigger (docs/adr/025-verification-tiers-and-ci-governance.md:42), matching scripts/adr-check.mjs in the changes job (.github/workflows/ci.yml:49-53).
Findings:
P2. D2's check taxonomy conflicts with the xtask check the repository runs. The out-of-scope bullet says to avoid "cross-language text scanners that try to infer semantics from raw literals and rely on growing manual allowlists" (docs/adr/025-verification-tiers-and-ci-governance.md:68-72). xtask check runs exactly such a scan: literal_main reads Rust, TypeScript and Vue sources for bare "main" literals and resolves unrelated uses through the nine-entry UNRELATED allowlist (xtask/src/literal_main.rs:1-7, xtask/src/literal_main.rs:72, xtask/src/main.rs:73), and #1933 lists it among the pure static checks it will separate; open PR 1881 is currently growing the same UNRELATED allowlist from 9 to 11 entries for web/src/chat-ui/WebChatTimeline.vue (xtask/src/literal_main.rs at #1881 head). The same D2 section puts code-to-document structural projections (public service catalogs, crate-level overviews) under "L1, zero business compilation" (docs/adr/025-verification-tiers-and-ci-governance.md:59-62; Chinese mirror docs/zh/adr/025-verification-tiers-and-ci-governance.md:40), but catalog::check and types::check are workspace-coupled and run in the heavy macOS verify job after cargo build --workspace (xtask/src/main.rs:69-70, .github/workflows/ci.yml:159,174-194); #1933 separates them as workspace-coupled. Failure: after acceptance, literal_main is both an active-gate pure static check and an out-of-policy scanner, while the catalog and type projections are L1 code-to-document checks that violate the zero-compilation bound. A maintainer cannot classify either check without contradicting the ADR or the tracked split, and the easy fixes are deleting coverage (against the Non-goals) or ignoring D2. Fix: scope the avoid rule to new scanners, and either drop "zero business compilation" for the workspace-coupled projections or give them a separate heavy check or tier, citing #1933.
P2. The L3 row puts interactive terminal E2E in retained main or scheduled workflows. The row makes interactive terminal E2E "Retained (asynchronous main/scheduled sweeps, pre-release or local on-demand)" (docs/adr/025-verification-tiers-and-ci-governance.md:44; Chinese mirror docs/zh/adr/025-verification-tiers-and-ci-governance.md:31). The suite is local-only: AGENTS.md:72 says "No workflow may invoke the suite", AGENTS.md:85 says "local only, never in CI", docs/architecture/build.md:326 says it runs "locally through tmux, not in CI", and docs/architecture/tui-e2e.md:3-9 says CI does not run a migrated flow. Failure: the scheduled full sweep required by D5 includes every Retained L3 asset, or a reader wires the suite into a main or scheduled job because this row lists that trigger, and the workflow invokes the tmux suite, violating the repository's CI policy and the local-only boundary. Fix: state that interactive terminal E2E runs only locally on demand or before release, never in a workflow; apply the same fix to the Chinese mirror.
P2 (cross-PR). ADR number 025 is claimed twice. This PR adds docs/adr/025-verification-tiers-and-ci-governance.md with a row at docs/adr/README.md:35 and a line at docs/INDEX.md:52. Open draft PR 1941 adds docs/adr/025-rutis-0-23.md with its own row at the same docs/adr/README.md:35 and docs/INDEX.md:52. Failure: whichever merges second either conflicts at those insertion points or leaves two ADRs numbered 025, violating the sequential ADR convention. Fix: coordinate with #1941; this PR was opened first (06:57 versus 07:17), so keep 025 here and have #1941 renumber to 026 before it leaves draft, or rebase and renumber the later merge.
P3. The Retained state definition and the L0 row disagree on triggers. D1 says Retained runs on scheduled sweeps, before release, when diagnosing a failure, or when a design or protocol review calls for it (docs/adr/025-verification-tiers-and-ci-governance.md:28-32), but the L0 row adds an automatic trigger on formal model file changes (docs/adr/025-verification-tiers-and-ci-governance.md:41; Chinese mirror docs/zh/adr/025-verification-tiers-and-ci-governance.md:21,28). Failure: a model-only PR that changes .tla or .cfg files matches none of the state's run modes, so a router implemented from D1 skips the L0 check that the tier table requires. Fix: add the model-file-change trigger to the Retained definition or state that the tier table's "Default state & trigger" column is authoritative.
P3. The new "Keep generated snapshots minimal" bullet (docs/adr/025-verification-tiers-and-ci-governance.md:63-67; Chinese mirror docs/zh/adr/025-verification-tiers-and-ci-governance.md:41) matches #1945 but contradicts the current repository contract. AGENTS.md:95-96 says xtask graph writes modules.mmd / modules.json and xtask check fails when the committed crates.* / modules.* snapshots are stale; docs/architecture/README.md:110 says check renders them in memory and fails when they differ from the committed ones. The bullet says fine-grained internal graphs are "generated on demand rather than committed to Git". Failure: until #1945 lands, a contributor who regenerates modules.* after an assembly change gets conflicting instructions, and after acceptance the ADR and AGENTS.md disagree. Fix: cite #1945 in the ADR or state that current committed snapshots remain until that tracked change.
Checked and correct: docs/INDEX.md:52 links both files, docs/adr/README.md:35 records Proposed, the English and Chinese status lines agree, all relative links resolve, node scripts/adr-check.mjs --base origin/main passed, and git diff --check origin/main...HEAD is clean. The new generated-snapshot bullet does not fix the D2 check-taxonomy conflict; it adds the tracked #1945 migration described above. CI at e2a5a2c is green: changes and ci-ok succeeded; the build and test jobs were skipped for a docs-only diff.
Verdict: REQUEST_CHANGES.
| | **L0 — Design & formal** | Do abstract state-machine, protocol and handover invariants hold? | Formal models (e.g. TLA+ specifications and `.cfg` properties) | **Retained**: (a) triggered on formal model file changes (with tool cost disclosed under D4 if wired into CI), and (b) enforced via PR checklist/review whenever an implementation change alters a modelled handover, recovery or ordering guarantee. Not run on ordinary implementation PRs. | | ||
| | **L1 — Static form & contract** | Are formatting, dependency boundaries, ADR immutability, public schemas/wire types and license/advisory policies intact? | Formatters, linters, pure static form/structure checks (including ADR freeze checks on every PR / ADR edit), frontend typecheck/lint, wire/schema contracts, dependency advisory/license scans | **Active gate**: fast fail-first on every PR, scoped to the changed surface (dependency scans only on manifest, lockfile or policy changes). | | ||
| | **L2 — Business flows** | Do modified modules and their transitive consumers preserve behavioral contracts? | Unit and in-process or loopback flow tests | **Active gate** on the primary high-throughput platform for the **reverse-dependency closure** of changed crates (expanding to the full workspace when foundational crates or workspace-wide configuration change). Heavy historical, soak or low-frequency flows belong in **Retained**. | | ||
| | **L3 — Real environment & cross-platform** | Do real OS primitives, process/plugin wiring, terminal interaction and external protocol boundaries work? | OS-native boundary slices, real daemon + plugin runtime flows, interactive terminal E2E suites, external registry acceptance | **Split**: narrow OS-native boundary slices run in the **Active gate** only on PRs touching platform/client code; full cross-platform runs, external-registry acceptance and interactive terminal E2E are **Retained** (asynchronous `main`/scheduled sweeps, pre-release or local on-demand). | |
There was a problem hiding this comment.
P2: this row makes interactive terminal E2E Retained with main/scheduled sweeps as a possible trigger, but the suite is local-only. AGENTS.md:72 says "No workflow may invoke the suite"; AGENTS.md:85 says "local only, never in CI"; docs/architecture/build.md:326 says it runs locally through tmux, not in CI; docs/architecture/tui-e2e.md:3-9 says CI does not run a migrated flow. Failure: a scheduled full sweep added for D5 includes this Retained asset, or a reader wires the suite into a main or scheduled job from this list, and the workflow invokes the tmux suite, violating the CI policy and the local-only boundary. Fix: state that interactive terminal E2E runs only locally on demand or before release, never in a workflow; update docs/zh/adr/025-verification-tiers-and-ci-governance.md:31 too.
There was a problem hiding this comment.
Fixed in e417fb7: the L3 row now marks interactive terminal E2E as Retained (local-only) and states that a CI workflow never invokes it (docs/adr/026-verification-tiers-and-ci-governance.md:46; Chinese mirror docs/zh/adr/026-verification-tiers-and-ci-governance.md:31). No workflow invokes scripts/tui-tmux/run.mjs; .github/workflows/ci.yml:222-224 only carries comments about the local suite.
|
Verified fixed in |
Address all findings from PR #1940 review: - Renumber from ADR 025 to ADR 026 across English/Chinese ADRs and indexes so PR #1941 retains 025 without collision. - Split D2 automated checks into pure static L1 checks (zero business compilation) and runtime-assembled structural projections (workspace- coupled alongside L2), and scope the literal-scanner rule to introducing new scanners. - Mark interactive terminal E2E in L3 as Retained (local-only), run locally on demand or before release and never invoked by CI workflows. - Add asset-file edits (such as formal model changes) to D1's Retained definition and state that the tier table trigger column is authoritative. - Clarify in Consequences that AGENTS.md and docs/architecture/ remain authoritative for current commands and committed snapshots until this ADR is accepted and follow-up tooling changes land. Refs #1938
|
Thanks @yyhhyyyyyy for the thorough second-round review — all five points are addressed in the latest push:
@zerob13 — all items from your earlier review were also applied in |
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Reviewed head e417fb7 (the renumbering commit). The PR now proposes ADR 026, and each prior finding is resolved.
Resolved findings
- P2, check taxonomy. D2 now scopes the scanner rule to new scanners and keeps existing allowlist-backed scanners only until replacement (
docs/adr/026-verification-tiers-and-ci-governance.md:74-78), soliteral_mainand itsUNRELATEDlist (xtask/src/literal_main.rs:69-72) are no longer out of policy. The workspace-coupled projections moved out of L1: D2 places runtime-assembled projections alongside L2 (docs/adr/026-verification-tiers-and-ci-governance.md:65-68), and the L2 scope names runtime-assembled structural checks (:45).catalog::checkdoes assemble the product profile (xtask/src/catalog.rs:47-58), whiletypes::checkreads source and Cargo metadata without compilingdim-app-server(xtask/src/types.rs:65-75). The remaining packaging split is a P3 note below, not a contradiction. The router still does not run the workspace path for docs, frontend or script PRs (.github/workflows/ci.yml:152-154,186-194;scripts/ci-changes.mjs:13,16,18). - P2, interactive terminal E2E. The L3 row now says the suite is Retained (local-only), runs locally on demand or before release, and is never invoked by a CI workflow (
docs/adr/026-verification-tiers-and-ci-governance.md:46; Chinese mirrordocs/zh/adr/026-verification-tiers-and-ci-governance.md:31). This matchesAGENTS.md:72,85,docs/architecture/build.md:326anddocs/architecture/tui-e2e.md:3-9. No workflow invokesscripts/tui-tmux/run.mjs;.github/workflows/ci.yml:222-224only carries comments about the local suite. - P2, duplicate ADR number. Every reference now says 026: the headings (
docs/adr/026-verification-tiers-and-ci-governance.md:1,docs/zh/adr/026-verification-tiers-and-ci-governance.md:1),docs/INDEX.md:52anddocs/adr/README.md:35. A targetedgit grepover docs, AGENTS.md, scripts and .github finds no025-verification,ADR 025oradr/025reference. PR #1941 still addsdocs/adr/025-rutis-0-23.mdwith its own README and INDEX rows, so 025 remains available for it. Whichever PR merges second will need the usual rebase at the shared insertion point. - P3, Retained and L0 triggers. D1 now includes "when the asset's own source files change" and makes the tier table authoritative (
docs/adr/026-verification-tiers-and-ci-governance.md:29-31); the L0 row keeps the model-file trigger and the review checklist (:43). The Chinese mirror matches (docs/zh/adr/026-verification-tiers-and-ci-governance.md:21,28). - P3, generated snapshots. Consequences now says
AGENTS.mdanddocs/architecture/remain authoritative for today's commands and committed snapshots until the follow-up lands (docs/adr/026-verification-tiers-and-ci-governance.md:143-146), which resolves the conflict withAGENTS.md:95-96. The bullet itself is unchanged in substance (:69-73).
Renumbering check
docs/adr/026-verification-tiers-and-ci-governance.mdanddocs/zh/adr/026-verification-tiers-and-ci-governance.mdare the only new ADR paths; there is no duplicate 026.- Both headings, the ADR table row and the INDEX line agree. All relative links in the four changed files resolve.
- The 025 gap in the ADR table is filled by PR #1941's row; no file points at 025 for this ADR.
P3 nits (non-blocking)
- Issue #1938 still says "proposed as ADR 025", which now names PR #1941's rutis ADR. Update the issue body to 026 so the INDEX link at
docs/INDEX.md:52does not point at a stale number. This is the only stale 025 pointer I found, and it is outside the repository. docs/adr/026-verification-tiers-and-ci-governance.md:44says dependency scans run only on manifest, lockfile or policy changes. Today.github/workflows/ci.yml:54-76runscargo denywhenrust == trueordependencies == true, andscripts/ci-changes.mjs:20-26selectsrustfor crate changes, so a Rust source change runs the scan without a manifest or lockfile change.docs/adr/026-verification-tiers-and-ci-governance.md:116-118says pure static checks run in lightweight jobs and:147says they are decoupled. Today they are bundled:xtask/src/main.rs:67-74runsboundaries,catalog::check,types::check,npm::check,comment_links::checkandliteral_main::checkin onextask check, and.github/workflows/ci.yml:186-194runs it in the macOSverifyjob after the workspace build. The Consequences hedge covers today's state; citing #1933 would make the planned split discoverable. The same note applies to thesource-parsed type declarationsexample at:63, which #1933 groups withtypes::checkas workspace-coupled.
Gates
git diff --check origin/main...HEAD: clean.node scripts/adr-check.mjs --base origin/main:ADR freeze passed: 4 changed files.node --test scripts/adr-check.test.mjs: 7 passed, 0 failed.- The repository has no doc link checker; a relative-link check over the four changed files found no broken links.
- CI at e417fb7:
changesandci-oksucceeded;dependencies,windows-cli,web,verifyandacp-registrywere skipped for the docs-only diff. PR state: head e417fb7, open, not draft, mergeable true, mergeable_state clean.
Verdict: APPROVE. The P3 notes above are non-blocking.
| - [Architecture decisions](adr/README.md) | ||
| - [ADR 022 — Timeline 属性查询与正文重建](adr/022-event-property-queries.md)(中文):目标 API 与模块结构、属性查询、业务状态恢复和正文释放 | ||
| - [ADR 023 — 上下文用量由独立分支部件维护](adr/023-context-usage.md)(中文):ContextUsage 的职责、增量统计、服务商校准及后续设计边界 | ||
| - [ADR 026 — Verification tiers, test coverage and CI governance](adr/026-verification-tiers-and-ci-governance.md)([中文](zh/adr/026-verification-tiers-and-ci-governance.md)):three operational test states, verification tiers (L0–L4), form-only doc checks and CI governance (#1938) |
| | Tier | Question answered | Scope | Default state & trigger | | ||
| | --- | --- | --- | --- | | ||
| | **L0 — Design & formal** | Do abstract state-machine, protocol and handover invariants hold? | Formal models (e.g. TLA+ specifications and `.cfg` properties) | **Retained**: (a) triggered on formal model file changes (with tool cost disclosed under D4 if wired into CI), and (b) enforced via PR checklist/review whenever an implementation change alters a modelled handover, recovery or ordering guarantee. Not run on ordinary implementation PRs. | | ||
| | **L1 — Static form & contract** | Are formatting, dependency boundaries, ADR immutability, public schemas/wire types and license/advisory policies intact? | Formatters, linters, pure static form/structure checks (including ADR freeze checks on every PR / ADR edit), frontend typecheck/lint, source-derived wire/schema contracts, dependency advisory/license scans | **Active gate**: fast fail-first on every PR, scoped to the changed surface (dependency scans only on manifest, lockfile or policy changes). | |
There was a problem hiding this comment.
P3: this parenthetical does not match today's job. .github/workflows/ci.yml:54-76 runs cargo deny when rust == true or dependencies == true, and scripts/ci-changes.mjs:20-26 sets rust for crate and workspace changes, so a Rust source change runs the scan even with no manifest or lockfile change. If the sentence describes the target scoping, say so or cite the follow-up.
| timeouts alone. | ||
| - **Cost disclosure for gate additions**: any change that adds a required PR check or widens path | ||
| selection must state its incremental runtime, added compile dependencies and target runner pool. | ||
| - **Physical isolation of light checks from heavy builds**: pure static repository checks must not |
There was a problem hiding this comment.
P3: today the static checks are still bundled. xtask/src/main.rs:67-74 runs boundaries, catalog::check, types::check, npm::check, comment_links::check and literal_main::check in one xtask check, and .github/workflows/ci.yml:186-194 runs it in the macOS verify job after the workspace build. The Consequences hedge at :143-146 covers today's state; citing #1933 here would make the planned split discoverable. The same applies to the source-parsed type declarations example at :63, which #1933 groups with types::check as workspace-coupled.
zerob13
left a comment
There was a problem hiding this comment.
Reviewed the English and Chinese ADR 026 at e417fb75. The earlier blockers are resolved. D3 keeps test-only overrides unreachable from shipped binaries, D4 leaves numeric budgets in the build documentation and tracking issues, and D5 requires an active scheduled full sweep with triage ownership and commit-range bisection before narrowing main verification. The ADR freeze check and git diff --check passed.
Summary
Propose ADR 026 (renumbered from 025 to leave 025 for #1941) to establish the repository's verification governance principles:
mainpushes (with narrowingmaingated on an active scheduled full sweep + triage/bisection), explicit path classification, scarce OS pools limited to source-verified platform-native boundaries, and periodic telemetry-driven pruning.Scope & Related Work
Documentation-only (
Decision status: Proposed.). Per ADR 008, delivery status, rollout steps and numeric budgets stay out of the ADR body and are tracked in issues and follow-up PRs:mainpushes run to completion without cancelling earlier ones)DIM_RELEASE_BUILDrecompile loop with release-safe runtime injection)xtaskchecks)cli_flow)windows-cli, trim slow tails)modules.jsonandmodules.mmdwhile keeping live boundary checks and updatingAGENTS.md/docs/architecture/README.md)Verification
node scripts/adr-check.mjs --base origin/mainpassedgit diff --check origin/maincleandocs/adr/README.md, anddocs/INDEX.mdresolve