Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Dockerfile text eol=lf
*.toml text eol=lf
*.ps1 text eol=crlf
tests/contracts/cas-contracts/v0.1.0/*.json -text -diff
evidence/verified-local-golden-path-v0.1/artifacts/** -text -diff
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ jobs:
- run: python -m ruff check .
- run: python -m mypy
- run: python -m pytest
- run: python -m cas_reference_product.evidence
- run: docker build --platform linux/amd64 -t cas-reference-product:ci .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ The image runs as a non-root user, listens on port `8080`, and provides `/health
- [Architecture](docs/architecture.md)
- [Threat model](docs/threat-model.md)
- [Operations](docs/operations.md)
- [Immutable golden-path case-study evidence](docs/case-study-evidence.md)
- [cas-platform interface](deployment/cas-platform.interface.yaml)

## Security

Report vulnerabilities through GitHub private vulnerability reporting. Do not include credentials or sensitive prompt data in issues.

45 changes: 45 additions & 0 deletions docs/case-study-evidence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Immutable Golden-Path Evidence

The committed bundle under
`evidence/verified-local-golden-path-v0.1/` is the case-study evidence for one
verified local golden-path execution. It connects four independently versioned
CAS repositories without claiming an Azure deployment.

## What The Bundle Proves

- `cas-reference-product` served the deterministic local workflow over HTTP.
- `cas-evals` evaluated the actual returned output and preserved lifecycle and
trace identifiers.
- The published `cas-contracts` v0.1.0 registry manifest is pinned by SHA-256.
- Every schema digest referenced by that registry manifest is verified before
the canonical records are validated against the exact published schemas.
- The evaluation fixture, normalized evidence, fixture digest, and returned
output digest are verified together.
- The `cas-platform` what-if script is pinned as a non-deploying interface
reference. No what-if output or Azure deployment is claimed.
- Every included artifact digest and immutable source SHA is checked offline in
tests and CI.

The canonical `artifact-manifest.json` and `verification-result.json` conform to
the vendored `cas-contracts` `ArtifactManifest` and `VerificationResult`
schemas. `bundle.json` maps their URN evidence identifiers to committed files
and records the claim boundaries.

## Container Digest Boundary

The bundle does not claim a container image digest. The repository builds a
local image in CI, but it does not publish a reproducible registry artifact
whose digest can be independently resolved. The canonical verification result
therefore marks this check as `skipped` rather than substituting a mutable tag
or local image ID.

## Verify

```powershell
./scripts/validate.ps1
./scripts/verify-evidence.ps1
```

The verifier is network-free. It fails when an artifact changes, a digest is
malformed, a source URI is not pinned to its full commit SHA, the golden result
does not pass exactly one case, or the platform evidence claims deployment.
43 changes: 43 additions & 0 deletions evidence/verified-local-golden-path-v0.1/artifact-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"kind": "ArtifactManifest",
"correlationId": "cas-reference-product-golden-v0.1",
"promptId": "reference-product-golden-workflow",
"runId": "cas-reference-product-golden-v0.1",
"repo": "Coding-Autopilot-System/cas-reference-product",
"actor": {
"id": "evidence-bundle-ci",
"type": "workflow"
},
"timestamp": "2026-06-13T00:00:00Z",
"schemaVersion": "0.1.0",
"traceContext": {
"traceparent": "00-0f32a2f22b960e873c92cecabc6f8dea-afb7553009ebcb9d-01"
},
"artifacts": [
{
"kind": "source-provenance",
"uri": "urn:cas-evidence:verified-local-golden-path-v0.1:source-provenance",
"sha256": "d621003fea89b9e0a6af8ce87c1e6f60e42ad9a6df5f775a778dcccbafc6aa18"
},
{
"kind": "contract-registry-manifest",
"uri": "urn:cas-evidence:verified-local-golden-path-v0.1:contract-registry-manifest",
"sha256": "92a09b0907e08b022f96b89ce09764b0416d268acc38653e08fd335b5e5198f9"
},
{
"kind": "evaluation-result",
"uri": "urn:cas-evidence:verified-local-golden-path-v0.1:eval-evidence",
"sha256": "6d95d47fbdf422ff8fc3608b53b283e99b3f74b135d3876c7a1a4557dde2a8e7"
},
{
"kind": "evaluation-fixture",
"uri": "urn:cas-evidence:verified-local-golden-path-v0.1:golden-fixture",
"sha256": "667fc47e19c3910dcc202063d8167f1acf6417e4cb35b705f8862a2886c5188a"
},
{
"kind": "platform-what-if-reference",
"uri": "urn:cas-evidence:verified-local-golden-path-v0.1:platform-what-if-reference",
"sha256": "d6c57d4fb80aa168025368134ff8022f3a8328a92936503518e460aef03907ad"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"version": "0.1.0",
"schemas": [
{
"id": "https://schemas.coding-autopilot.dev/v0.1/artifact-manifest.schema.json",
"path": "artifact-manifest.schema.json",
"sha256": "2864e3ef2c7ab8114395d15a2f6b4b1e832049c0a3a2b8a1165ba287f61caa06"
},
{
"id": "https://schemas.coding-autopilot.dev/v0.1/common.schema.json",
"path": "common.schema.json",
"sha256": "c7ce72a6f5da8394e48f2421820588a8142546962e05152997bd1e6ced994928"
},
{
"id": "https://schemas.coding-autopilot.dev/v0.1/evaluation-result.schema.json",
"path": "evaluation-result.schema.json",
"sha256": "be6d3216c95cfa6d2ccda908ff089010765b1c70223a920bfe3cb70a0cd24df5"
},
{
"id": "https://schemas.coding-autopilot.dev/v0.1/policy-decision.schema.json",
"path": "policy-decision.schema.json",
"sha256": "21a66d651f5c0190fe0b50b81350ab32d29190d1c44719e2584628a8e0e6614f"
},
{
"id": "https://schemas.coding-autopilot.dev/v0.1/prompt-envelope.schema.json",
"path": "prompt-envelope.schema.json",
"sha256": "baf043344abe6bf9afbc31272bef8034ec46ffc4d3fc799a41fead002b7274d6"
},
{
"id": "https://schemas.coding-autopilot.dev/v0.1/run-event.schema.json",
"path": "run-event.schema.json",
"sha256": "6e96cb3e690ab4fcbcbe75005b27c14d83595c4951cabc35bed86b41fc2f0a7f"
},
{
"id": "https://schemas.coding-autopilot.dev/v0.1/verification-result.schema.json",
"path": "verification-result.schema.json",
"sha256": "3ef6085b19c726204b65c9f8fd815a8aa0dcda6a8db82acdbd61e56bce45b4c9"
},
{
"id": "https://schemas.coding-autopilot.dev/v0.1/work-request.schema.json",
"path": "work-request.schema.json",
"sha256": "7a6d5aee580d0198336c704cd9b154bc6c08bca15ec77be9c5db965cf54a9606"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.coding-autopilot.dev/v0.1/artifact-manifest.schema.json",
"title": "ArtifactManifest",
"type": "object",
"allOf": [
{
"$ref": "common.schema.json#/$defs/lifecycleMetadata"
},
{
"type": "object",
"required": [
"kind",
"artifacts"
],
"properties": {
"kind": {
"const": "ArtifactManifest"
},
"artifacts": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "common.schema.json#/$defs/evidence"
}
}
}
}
],
"unevaluatedProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.coding-autopilot.dev/v0.1/common.schema.json",
"title": "CAS Common Definitions",
"$defs": {
"actor": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type"],
"properties": {
"id": { "type": "string", "minLength": 1, "maxLength": 256 },
"type": {
"type": "string",
"enum": ["human", "agent", "service", "workflow"]
},
"displayName": { "type": "string", "minLength": 1, "maxLength": 256 }
}
},
"traceContext": {
"type": "object",
"additionalProperties": false,
"required": ["traceparent"],
"properties": {
"traceparent": {
"type": "string",
"pattern": "^[\\da-f]{2}-[\\da-f]{32}-[\\da-f]{16}-[\\da-f]{2}$"
},
"tracestate": { "type": "string", "maxLength": 512 }
}
},
"lifecycleMetadata": {
"type": "object",
"required": [
"correlationId",
"promptId",
"runId",
"repo",
"actor",
"timestamp",
"schemaVersion",
"traceContext"
],
"properties": {
"correlationId": { "type": "string", "minLength": 1, "maxLength": 128 },
"promptId": { "type": "string", "minLength": 1, "maxLength": 128 },
"runId": { "type": "string", "minLength": 1, "maxLength": 128 },
"repo": {
"type": "string",
"pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
},
"actor": { "$ref": "#/$defs/actor" },
"timestamp": { "type": "string", "format": "date-time" },
"schemaVersion": { "const": "0.1.0" },
"traceContext": { "$ref": "#/$defs/traceContext" }
}
},
"evidence": {
"type": "object",
"additionalProperties": false,
"required": ["kind", "uri"],
"properties": {
"kind": { "type": "string", "minLength": 1, "maxLength": 64 },
"uri": { "type": "string", "format": "uri" },
"sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" }
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.coding-autopilot.dev/v0.1/evaluation-result.schema.json",
"title": "EvaluationResult",
"type": "object",
"allOf": [
{
"$ref": "common.schema.json#/$defs/lifecycleMetadata"
},
{
"type": "object",
"required": [
"kind",
"evaluator",
"outcome",
"metrics"
],
"properties": {
"kind": {
"const": "EvaluationResult"
},
"evaluator": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"outcome": {
"enum": [
"passed",
"failed",
"inconclusive"
]
},
"metrics": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "number"
}
}
}
}
],
"unevaluatedProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.coding-autopilot.dev/v0.1/policy-decision.schema.json",
"title": "PolicyDecision",
"type": "object",
"allOf": [
{
"$ref": "common.schema.json#/$defs/lifecycleMetadata"
},
{
"type": "object",
"required": [
"kind",
"decision",
"policyVersion",
"reasons"
],
"properties": {
"kind": {
"const": "PolicyDecision"
},
"decision": {
"enum": [
"allow",
"deny",
"require-approval"
]
},
"policyVersion": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"reasons": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
}
}
}
],
"unevaluatedProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.coding-autopilot.dev/v0.1/prompt-envelope.schema.json",
"title": "PromptEnvelope",
"type": "object",
"allOf": [
{
"$ref": "common.schema.json#/$defs/lifecycleMetadata"
},
{
"type": "object",
"required": [
"kind",
"intent",
"prompt"
],
"properties": {
"kind": {
"const": "PromptEnvelope"
},
"intent": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 50000
},
"constraints": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"uniqueItems": true
}
}
}
],
"unevaluatedProperties": false
}
Loading
Loading