Skip to content

[ACP-HARDEN-220] content-addressed artifact referenceとimplementation manifestを標準化する #3660

Description

@ootakazuhiko

Parent: #3655
Depends on: —
Blocks: ACP-HARDEN-210, ACP-HARDEN-230, ACP-HARDEN-240
Codex lane: contracts/content-addressed-artifacts

背景

現行のclaim/handoff/formal/publication artifactはpathやgit commitを参照できるが、artifact本体、Schema、producer実装、dependency lockを一体としてbindingする共通contractがない。ci-artifact-provenance/v1にはpath、SHA-256、size、workflow、head/base SHAがあり、上流化の基礎として利用できる。

Private Matchでは、Protocol pin、message registry、conformance tree、export profile、exporter implementation、fixture catalog等をdigestで固定しないと、表示値と実際のbehaviorがずれる問題が繰り返し発生した。

目的

content-addressed artifact referenceとartifact-set/implementation manifestを標準化し、path-only referenceを段階的に置き換える。

Codex CLI preflight

  • ci-artifact-provenance-v1
  • claim-evidence-manifest
  • formal/assurance/change package/handoff/publication artifacts
  • Contract Catalog
  • release/provenance scripts
  • package and dependency locks
  • Context Pack/Boundary Map

Proposed contracts

推奨:

  • artifact-ref/v2
  • artifact-set-manifest/v1
  • implementation-manifest/v1

artifact-ref/v2最低限:

artifactId
path
sha256
size
schemaId
schemaVersion
schemaDigest
sourceRepository
sourceRevision
producerId
producerVersion
producerImplementationDigest
runtimeProfile
artifactStatus:
  real
  synthetic
  test-only

implementation-manifest/v1最低限:

manifestId
implementationId
version
sourceFiles[path,digest]
schemaFiles[path,digest]
dependencyLocks[path,digest]
profiles[path,digest]
runtimeRequirement
testedTarget
implementationDigest

実装タスク

  • existing provenance contractsとpath-only referencesのinventoryを作る。
  • additive Schema、semantic validators、fixtures、Contract Catalog entriesを追加する。
  • pathはrepository-relative POSIX、absolute/backslash/.../symlink escapeを拒否する。
  • manifest pathのduplicate、missing file、stale digestを拒否する。
  • implementation digestはbehavior-affecting source、Schema、profile、dependency lockを含める。
  • runtime requirementとtested targetをactual execution provenanceから分離する。
  • artifact statusを全referenceで保持し、test-only/syntheticをrealとして参照できないようにする。
  • claim-evidence-manifestとae-handoffへpreview artifact-refを追加する。互換性のためdual-readまたはadapterを用意する。
  • ci-artifact-provenanceからartifact-refへのdeterministic projectionを実装する。
  • manifest generationをbyte-deterministicにする。
  • source file、Schema、lock、profile変更でimplementation digestが変わるmutation testsを追加する。

Acceptance criteria

  • artifact content変更でartifact digestが変わる。
  • Schema変更でschema digestまたはimplementation digestが変わる。
  • helper sourceやdependency lock変更でimplementation digestが変わる。
  • stale digest、missing file、duplicate path、path escape、symlinkをrejectする。
  • test-only artifactでreal claim/release gateを満たせない。
  • current provenance artifactから情報損失なくprojectionできる。
  • manifest generation x2がbyte-identical。

Validation

  • Schema self-validation
  • path/symlink/digest mutation tests
  • deterministic manifest x2
  • current provenance compatibility tests
  • claim/handoff consumer tests
  • pnpm -s run check:schemas
  • pnpm -s run check:doc-consistency
  • pnpm -s run verify:lite

非目標

  • Sigstore/release signingの実装
  • artifact storeの選定
  • 全既存artifactの同時breaking migration
  • repository外fileのinventory

Stop condition

  • Draft PR
  • migration/rollback plan
  • 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