Skip to content

feat: produce schema-v2 conformance evidence - #42

Merged
BunsDev merged 21 commits into
mainfrom
feat/schema-v2-conformance-evidence
Aug 30, 2026
Merged

feat: produce schema-v2 conformance evidence#42
BunsDev merged 21 commits into
mainfrom
feat/schema-v2-conformance-evidence

Conversation

@BunsDev

@BunsDev BunsDev commented Aug 30, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve and review the schema-v2 cross-repository evidence producer
  • execute observed SDK, Chat, Cave, custody, and native transport assertions
  • bind protected platform artifacts to exact source and workflow identities

Current status

This is intentionally draft while final validation confirms the non-circular SDK validator binding, hosted Linux Secret Service, independent keyring cleanup, and Windows process supervision. No platform evidence or release approval is claimed yet.

BunsDev and others added 18 commits August 30, 2026 00:38
Add the SDK schema-v2 adapter, exact protected platform workflow, native custody isolation, provenance verification, redaction gates, and release operator documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require exact observed SDK and Chat results, select validators at protected runtime, and provision isolated Linux Secret Service custody.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the non-cyclic producer-first handoff and make validator integration tests follow the selected exact SDK checkout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the runtime validator integration test within the repository formatting contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Hash operator files incrementally with a one-gibibyte run ceiling so real Coven homes can be compared without large in-memory reads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Hash complete filesystem metadata while bounding content reads so large real operator homes remain verifiable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Hash symlink identity and target text while refusing to follow it, preserving bounded operator-state comparison.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Raise the finite directory-depth ceiling for real Coven homes while retaining entry, logical-size, and content-read bounds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bound traversal at one million entries and hash special-file metadata without following links or device endpoints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run SDK and Chat observation suites under a separately owned short temp root so Unix socket checks remain executable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adopt the authoritative SDK Cave repin and update Phase 0/Phase 1 provenance and tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep non-retained causes for diagnosis and compare vendor files by path, size, and digest independently of package labels.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the committed producer canary lock while retaining independent frozen source and artifact verification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore discovery after stale-state proof, forget the live credential through the managed path, and remove only the isolated installation entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create and verify the native Keychain entirely within the process-owned evidence home so schema-v2 runs never depend on the operator login keychain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Set the process-owned macOS keychain to owner-only permissions before native custody probes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Return the exact observation-map shape consumed by schema-v2 assertion adaptation and reject the obsolete fabricated-key shape.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build the locked Cave conformance artifact, include the discovery-vector SDK test, and preserve the exact observation-map shape through schema-v2 adaptation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a schema-v2 “platform evidence” production path for Phase 1 conformance, aiming to generate SDK-validator-accepted, canonical, provenance-bound evidence artifacts across macOS/Linux/Windows while preserving the existing schema-v1 gate.

Changes:

  • Adds schema-v2 evidence adapter + contract loading/verification, plus canonical serialization and retained-evidence scanning hooks.
  • Introduces platform-specific custody/isolated-runtime helpers (macOS Keychain isolation, Linux Secret Service install/runtime curation, operator filesystem isolation hashing).
  • Adds a protected manual GitHub Actions workflow to produce attested per-platform schema-v2 evidence artifacts, with extensive test coverage updates.

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/specification-guards.test.ts Updates pinned Cave revision and contract fixture digest; expands native RPC control assertions; tightens conformance packaging assertion.
src/phase1-schema-v2-evidence.test.ts Adds validator-gated tests covering schema-v2 adapter behavior, provenance binding, drift rejection, and canonical stability.
src/phase1-macos-keychain.test.ts Adds unit tests for isolated macOS Keychain session creation/probing/cleanup behavior.
src/phase1-linux-secret-service.test.ts Adds unit tests for Ubuntu package pin commands and curated Secret Service env forwarding.
src/phase1-evidence-runtime.test.ts Adds tests for operator filesystem snapshotting and isolation evidence construction.
src/phase1-conformance.test.ts Adds tests around schema-v2 observation normalization, safe git cloning behavior, env scrubbing, schema-v2 arg parsing, and error cause handling.
src/phase1-conformance-lock.test.ts Updates lock version expectations (v3), adds validator-cycle rejection, adds checkout env scrubbing test, and tightens “dirty checkout” semantics (includes ignored files).
src/phase1-conformance-artifact-root.test.ts Adds coverage for retaining caller-validated schema-v2 records without relaxing atomic copy invariants.
src/phase1-artifact-secret-scan.test.ts Adds coverage for scanning caller-validated schema-v2 record text via the existing redaction scan.
src/contract-canary-artifact-root.test.ts Updates pinned Cave revision/digests and increases timeouts for packed fixture validation tests.
src/client-v1-conformance-workflow.test.ts Adds validator-gated tests asserting the workflow matches the frozen SDK workflow contract and rejects unsafe mutations.
src-tauri/tests/phase1_native_rpc.rs Adjusts imports for unix/non-unix compilation boundaries.
src-tauri/src/keyring.rs Adds schema-v2 keyring service isolation support and conformance-only “state/cleanup” entry management helpers.
src-tauri/src/coven.rs Moves test temp root from CWD into OS temp for safer execution.
src-tauri/src/conformance.rs Adds explicit native provider mode selection and new RPC commands for native custody state/cleanup proofing.
scripts/process-owned-artifact-root.mjs Extends retained-report flow to support caller validation for schema-v2 records.
scripts/process-owned-artifact-root.d.mts Updates type surface to accept an optional validateReport callback in retained-report retention.
scripts/phase1-schema-v2-evidence.mjs Adds the schema-v2 evidence adapter: contract loading, provenance checks, environment/isolation validation, and canonical serialization validation.
scripts/phase1-schema-v2-evidence.d.mts Adds TS declarations for schema-v2 evidence adapter helpers and types.
scripts/phase1-macos-keychain.mjs Adds isolated Keychain session helper used by schema-v2 custody proofing.
scripts/phase1-macos-keychain.d.mts Adds TS declarations for the macOS Keychain helper.
scripts/phase1-linux-secret-service.sh Adds an isolated dbus-run-session + Secret Service wrapper for Linux schema-v2 runs.
scripts/phase1-linux-secret-service.mjs Adds Ubuntu package pin/install verification and curated environment extraction for Linux Secret Service.
scripts/phase1-linux-secret-service.d.mts Adds TS declarations for the Linux Secret Service helpers.
scripts/phase1-evidence-runtime.mjs Adds bounded operator filesystem snapshot hashing + isolation evidence builder.
scripts/phase1-evidence-runtime.d.mts Adds TS declarations for the operator state snapshot/isolation evidence helpers.
scripts/phase1-conformance.d.mts Updates TS declarations to reflect schema-v2 args, observation helpers, checkout cloning, env scrubbing, and RPC helpers.
scripts/phase1-conformance-lock.mjs Extends lock versions (1–3), adds tree pinning (v3), adds checkout env scrubbing, and treats ignored files as “dirty”.
scripts/phase1-conformance-lock.d.mts Updates TS declarations for lock versions, optional validator root, “ignored” dirtiness, and checkout identity helpers.
scripts/phase1-artifact-secret-scan.mjs Exposes scanPhase1ArtifactText() to scan caller-validated schema-v2 evidence text through the existing redaction scan.
scripts/phase1-artifact-secret-scan.d.mts Adds TS declarations for scanPhase1ArtifactText().
scripts/contract-canary.mjs Adds verifyFrozenPackedConsumer() and makes frozen tarball root overridable (supports producer-root reuse).
scripts/contract-canary.d.mts Adds TS declarations for verifyFrozenPackedConsumer().
README.md Updates documentation to describe the non-cyclic lock/validator model and schema-v2 protected workflow evidence surface.
phase1-conformance.lock.json Bumps lock to v3 and pins commit+tree for chat/sdk/cave/coven sources.
package.json Adds phase1-conformance.lock.json to biome lint/format targets.
docs/phase1-conformance.md Major doc update describing schema-v2 evidence production, isolation/custody requirements, protected workflow, and failure semantics.
contract-canary.lock.json Updates pinned Cave revision and artifact digests.
.github/workflows/client-v1-conformance.yml Adds protected manual workflow producing per-platform, canonical schema-v2 evidence artifacts + build provenance attestations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +94 to +102
return {
bytes: readFileSync(path),
path,
metadata: {
path: relativePath,
size: stats.size,
sha256: sha256(readFileSync(path)),
},
};
Comment thread scripts/process-owned-artifact-root.mjs Outdated
@@ -124,6 +124,11 @@ function requireCompletedJsonReport(snapshot) {
throw new Error('Sanitized report must be a completed JSON report.');
BunsDev and others added 3 commits August 30, 2026 11:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@BunsDev
BunsDev marked this pull request as ready for review August 30, 2026 17:36
@BunsDev
BunsDev merged commit 7d75a35 into main Aug 30, 2026
8 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants