ADR-0026 — test-placement model 是正 (verification/ → tests/ rename + consumer test 配置 非規定)

Status: accepted · Date: 2026-05-26 · folio v0.5.0-draft · forward (X4-F 是正、 user 承認済 (AskUq)、 実装は PARENT 一括)

§1. Context

constitution P-13 (Verification & Traceability) は verification を 2 種に分ける: (a) spec 適合性 (spec graph の link-integrity / JSON-LD 構造 / 双方向完備 = folio validate が担う framework 提供の普遍検証、 専用 dir 不要) と (b) 実装適合性 (実装が spec を満たすかの test = project 固有)。

folio は ADR-0013 で sandbox verification framework の実体を verification/ dir に置き、 ADR-0022 がこれを architecture/ の sibling として canonical layout に組み込んだ。 しかし verification/folio 自身 (bash plugin stack) の (b) impl-test dir にすぎないrules §2 / ADR-0022 / ADR-0024 (init) はこの verification/consumer の canonical layout にも規定しており、 これは「(b) は project 固有」 という P-13 と矛盾する過剰規定である。

実際の stack 慣習: bash は tests/ (bats)、 Python は tests/ (pytest)、 Rust は tests/ (cargo)、 TypeScript は tests/ または __tests__/ (jest)。 verification/ という dir 名はどの stack の慣習でもなく、 folio が独自に導入した逸脱だった。 X4-F はこの test-placement model を P-13 整合へ是正する。

§2. Decision

§2.1 test-placement model (P-13 (a)/(b) の dir 帰結)

verification の種担当dir
(a) spec 適合性folio validate (framework 提供、 全 consumer 普遍)専用 dir なし (architecture/ spec graph を走査)
(b) 実装適合性各 project の test 体系 (stack 固有)各 stack の慣習 location (tests/ 等)、 folio 非 mandate

spec ↔ test の対応は REQ-ID (REQ-VER-* / REQ-CM-* 等、 location 非依存) で結ぶ。 test の物理 location は folio の関心外 (P-13 (b) project 固有)。

§2.2 folio 自身: verification/ → tests/ rename

folio の sandbox verification 実体 dir を verification/ から tests/ へ rename する (folio の bash stack 慣習 = tests/ に整合)。 「verification」 は概念として存続する: (i) P-13 の verification 概念、 (ii) verification.html (folio の検証方法論 contract = sandbox-verified の SSoT)、 (iii) folio validate CLI、 (iv) REQ-VER-* ID はすべて改名しない。 rename するのはdir 名のみであり、 概念・contract・spec 名・REQ-ID は dir 名と独立に維持される。

§2.3 consumer: test dir を folio が規定しない

folio は consumer の (b) impl-test dir の location を規定しない (P-13 (b) 尊重)。 具体:

是正後の model: architecture/ (design-intent、 folio govern・普遍) + folio validate ((a)、 普遍・dir なし) + <stack test dir> ((b)、 全 stack 慣習、 folio 非 mandate)。 folio 自身は tests/ を採るが、 これは bash stack 慣習の de-facto 採用であって consumer への mandate ではない。

§2.4 supersede 範囲 (部分 revise)

本 ADR は以下を revise する (部分。 各 ADR の他の決定は不変ゆえ dc:replaces でなく dc:references + 本 § で trace):

§2.5 frozen ADR の link maintenance (href-only)

rename で移動する実ファイル (verification/e2e/runbook.md / observations-*.json / verification/scenarios/ 配下等) への frozen ADR 内 <a href> (ADR-0004 / ADR-0006 / ADR-0007 / ADR-0017 / ADR-0018 / ADR-0019) は href 属性のみ tests/ に rewrite する (link text は runbook / scenarios/ 等で path を含まないため表示不変)。 これは P-6 link-integrity 維持の link maintenance であり、 X4-C / ADR-0025 §2.3 で許容された frozen ADR cross-ref rewrite と同性質 (ADR 本文の決定改訂ではない)。 一方、 verification/ layout を決定した prose / tree 図 / 見出し (ADR-0013 / ADR-0022 / ADR-0024 等) の dir 名は historical record として据え置く (本 ADR が supersede を記録するため、 superseded ADR 本文の書換は ADR 不変性に反する)。

§2.6 goldens + 検証

init の verification/.gitkeep 除去で scenarios/init-scaffold.yaml の golden tree を再生成する。 dir rename は spec @id (architecture/ 配下) を変えないため inventory relations は不変だが、 sandbox runner / scenario / baseline の path 言及は tests/ へ追従する。 REQ-VER-* ID と verification.html spec 名は不変ゆえ inventory.json の spec 集合・relation 構造は本 ADR 起票 (本 § の reverse materialize) を除き変わらない。

§3. Consequences

Positive

Negative

Neutral

§4. Alternatives Considered

採用可否
verification/ → tests/ rename + consumer 非規定 (採用)P-13 (b) 整合、 全 stack uniform、 概念/dir 分離 (AskUq: frozen-ADR href-only / init scaffold なし / PARENT 一括)
consumer に tests/.gitkeep を init scaffold不採用 — 過剰規定先を verification/ から tests/ に替えただけで P-13 (b) 非 mandate に反する。 __tests__/ 等を使う stack で誤った前提になる (AskUq で「何も作らない」 を選択)
verification/ dir を維持不採用 — consumer への過剰規定 (P-13 (b) 矛盾) が継続。 stack 慣習からの逸脱も残る
verification.html spec 名・REQ-VER-* も改名不採用 — 「verification」 は概念 (P-13) / contract / CLI として dir 名と独立に存続すべき。 spec 名・REQ-ID の改名は trace churn が大きく利得なし
frozen ADR の prose / tree 図も全て tests/ に rewrite不採用 — layout を決定した superseded ADR 本文の書換は ADR 不変性に反する。 「rename の度に全 frozen ADR を書換」 前例は audit trail を毀損 (§2.5、 href-only に限定)

§5. Trace