Skip to content

[ACP-HARDEN-240] cross-artifact semantic graph validatorを追加する #3663

Description

@ootakazuhiko

Parent: #3655
Depends on: ACP-HARDEN-130, ACP-HARDEN-210, ACP-HARDEN-220
Blocks: #3640
Codex lane: contracts/semantic-graph-validator

背景

Private Matchのreviewで繰り返し発生したblocking problemは、単一Schemaの構文エラーではなく、複数artifact間の意味的不整合だった。

例:

  • eventとmessage typeは個別に存在するが組合せが不正
  • threatがcontrolを参照するがcontrol familyが違う
  • flow側とthreat側のreverse referenceが一致しない
  • test IDは存在するがlinked threat/control/Evidenceと無関係
  • profile digestの表示値とbinding値が違う
  • approvalが別subject materialへ再利用される
  • test-only Evidenceがreal gateを満たす

現行Contract Catalogはartifact inventoryとして有効だが、artifact群をtyped semantic graphとして検査する共通機構がない。

目的

contract-graph/v1とoffline semantic validatorを追加し、cross-artifact reference、family、version、digest、status、approvalの整合を検査する。

Codex CLI preflight

  • Contract Catalog
  • Context Pack/Boundary Map graph models
  • execution-result/human-decision/artifact-ref contracts
  • claim manifest/policy decision/change package/formal/security artifacts
  • existing reference validators
  • Context Pack/Boundary Map

Proposed graph

Node type候補:

claim
requirement
flow
threat
control
test
evidence
execution-result
approval
artifact
tool-run
policy-decision
release
review-disposition

Edge type候補:

supports
requires
produced-by
validated-by
approved-by
implements
mitigates
tests
supersedes
derived-from
bound-to
blocks

実装タスク

  • contract-graph/v1 Schema、validator、fixtures、Contract Catalog entryを追加する。
  • node/edge ID、type、version、artifact ref、subject digestを閉じる。
  • dangling reference、duplicate ID、unknown node/edge typeを拒否する。
  • reverse-reference parityが必要なrelationを定義し、片方向だけの参照を拒否する。
  • control family、Evidence kind、execution status、claim projectionのtype rulesを定義する。
  • artifact/Schema/profile/approval digest parityを検査する。
  • human decision subject digestとapproved-by edgeを一致させる。
  • test-only/synthetic nodeがreal gate/releaseを満たさない規則を追加する。
  • unresolved blockerがあるのにrelease-readysatisfiedとなるgraphを拒否する。
  • report-only summaryをmerge approvalとして使用するedgeを拒否する。
  • existing Context Pack/claim/security fixtureから小さなrepresentative graphを生成する。
  • graph generationはdeterministic、validationはofflineとする。
  • report-onlyで導入し、policy enforcementは別Issue/profile選択まで有効化しない。

Acceptance criteria

  • dangling/duplicate/type mismatch fixtureを検出する。
  • flow-threat、threat-control、test-Evidence、approval-subjectの不整合を検出する。
  • visible digestとbound digestの差異を検出する。
  • skip -> pass等のstatus collapseを検出する。
  • test-only Evidenceでreal release gateを満たせない。
  • unresolved high-risk nodeがあるgraphはrelease-readyにならない。
  • valid representative graphはdeterministicに生成・検証できる。
  • errorはstable code、artifact path、node/edge IDを含み、secret値を含まない。

Validation

  • Schema self-validation
  • positive representative graph
  • comprehensive negative matrix
  • deterministic graph generation x2
  • existing artifact adapter tests
  • Context Pack compatibility tests
  • pnpm -s run check:schemas
  • pnpm -s run check:doc-consistency
  • pnpm -s run verify:lite

非目標

  • graph database導入
    -全repository artifactの初回完全移行
  • policy enforcementの即時mandatory化
    -形式証明によるgraph正当性証明

Stop condition

  • Draft PR
  • report-only integration
  • exact-head CI success
  • unresolved review threads 0
  • worktree clean

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:contractsSchemas and contractsassurance-control-planeAgent-neutral assurance control plane roadmapcodex-readyIssue body is structured for Codex CLI executionpriority:p1Important next slicerisk:highHigh risk PR (approval and gate labels required)type:taskImplementation task

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions