Skip to content

feat(lab): CL-10 public evidence operator and community integration - #1706

Merged
lidge-jun merged 25 commits into
cl10-public-corefrom
feat/cl-10-public-evidence-contract
Aug 15, 2026
Merged

feat(lab): CL-10 public evidence operator and community integration#1706
lidge-jun merged 25 commits into
cl10-public-corefrom
feat/cl-10-public-evidence-contract

Conversation

@Wibias

@Wibias Wibias commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Stack

2/2 - operator/community layer stacked on #1705.

This PR restores the former #1510 branch on top of the restored trust-core base.

Summary

Implements CL-10.1 through CL-10.4 on the reviewed public-evidence contract: privacy-safe projection, canonical signed local exports, explicit local operator surfaces, and isolated non-authoritative community verification/revocation context.

CL-10.5 remote publishing is deliberately not implemented. It remains blocked until an exact service origin, transport, security, retention, and revocation contract is independently reviewed and accepted.

Scope

CL-10.1 - public projection and trust boundary

  • closed PublicEvidenceRecordV1 / PublicEvidenceBundleV1 schemas
  • allowlist-only projection from canonical Lab evidence
  • deterministic domain-separated public IDs
  • exact reviewed scenario/assertion and public-route authority checks
  • fail-closed handling for private route identity instead of broadening claims
  • second-pass public privacy validation, including decoded text artifact bytes
  • closed incident corpus and strict public-field validation

CL-10.2 - canonical bundles, signatures, and local storage

  • RFC 8785/JCS canonical bytes with strict UTF-8/duplicate-key/depth/width limits
  • domain-separated SHA-256 bundle and revocation identities
  • installation-local Ed25519 publisher identity with restrictive private-key handling
  • exact bundle digest/signature verification and canonical record/artifact ordering
  • bounded, descriptor-checked, crash-aware local persistence
  • public artifacts remain fail-closed without reviewed public_export authority

CL-10.3 - explicit local operator surfaces

  • ocx lab public preview
  • ocx lab public export
  • ocx lab public verify <file> with nonzero exit on invalid evidence
  • management API preview/export/verify routes
  • no publisher private-key or local-path disclosure on public surfaces

CL-10.4 - community verification and revocation

  • bounded community bundle/revocation import
  • strict schema, canonical-byte, digest, signature, publisher, authority, privacy, and artifact-policy validation before persistence
  • exact same-publisher revocation bootstrap and deterministic replay/conflict handling
  • record revocations propagate across bundles from the same verified publisher
  • bounded local community cache with concurrency-safe quota handling
  • local/community provenance and purge handling without deleting unrelated third-party evidence
  • read-only Compatibility Matrix community context with explicit community_untrusted_v1 / not-local-verdict semantics

Trust isolation

Community evidence remains non-authoritative:

  • no writes into canonical local compatibility evidence
  • no effect on local verdicts, freshness, Routing Profiles, Router Intelligence, combined scores, or CL-08 scheduling
  • signatures prove bundle integrity and publisher-key continuity only, not truth, correctness, ownership, or platform authority
  • revoked or unverifiable evidence remains quarantined/non-authoritative

Explicit non-scope

  • no remote publishing transport
  • no /api/lab/public/publish endpoint
  • no ocx lab public publish command
  • no background publishing or telemetry
  • no remote service selection
  • no public artifact export until a reviewed public_export authority exists

Stack order

  1. feat(lab): CL-10 public evidence trust core #1705 - cl10-public-core -> dev
  2. This PR - feat/cl-10-public-evidence-contract -> cl10-public-core

Restores the branch previously reviewed in #1510 without merging that closed PR.

Summary by CodeRabbit

  • New Features
    • Added local public evidence preview, export, signing, verification, import, and listing through the CLI and management API.
    • Added privacy-preserving evidence bundles with explicit export controls and tamper verification.
    • Added community evidence display to the Compatibility Matrix, including active and revoked record counts.
    • Community evidence is clearly separated from local verdicts and cannot affect local decisions.
  • Security
    • Added strict validation, provenance tracking, revocation handling, mutation protection, and safe purge support.
  • Limitations
    • Remote publishing remains unavailable.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cfc0fa80-4a07-4434-b1f6-0a971391439d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR defines and implements CL-10 public evidence export. It adds privacy-safe projection, Ed25519 signing, bounded community import, revocation, provenance-aware purge, CLI and management API surfaces, Compatibility Matrix context, and validation tests. Remote publishing remains unavailable.

Changes

CL-10 public evidence lifecycle

Layer / File(s) Summary
Contract and implementation plan
devlog/_plan/260807_compatibility_lab/*, docs/superpowers/plans/*, docs/superpowers/specs/*
Defines closed public evidence schemas, route authority, privacy validation, canonical hashing, signing, revocation, quarantine, purge behavior, delivery phases, and the remote-publishing hard stop.
Projection, signing, and revocation
src/lab/public/operator.ts, src/lab/public/revocation.ts, src/lab/public/index.ts, src/lab/index.ts, src/lab/public/community-files.ts
Adds projection, preview, export, bundle verification, signed revocations, file naming, and package exports.
Community storage and lifecycle
src/lab/public/community.ts, src/lab/public/mutation-lock.ts, src/lab/public/origin.ts, src/lab/public/origin-purge.ts, src/lab/public/purge.ts, src/lab/ledger/purge.ts
Adds bounded locked storage, strict imports, publisher-scoped revocations, origin tracking, sensitive purge handling, and durable tombstones.
CLI, management API, and Compatibility Matrix
src/cli/lab.ts, src/server/management/lab-routes.ts, gui/src/pages/compatibility-matrix-api.ts, gui/src/pages/CompatibilityMatrix.tsx, gui/src/i18n/lab-translations.ts
Adds local public-evidence commands, management routes, and read-only community counts separate from local verdicts.
Validation and regression coverage
tests/lab-public-*, tests/lab-community-*, gui/tests/compatibility-community-evidence.test.ts
Adds coverage for privacy, schema closure, signatures, artifacts, revocation, quotas, locking, provenance, purge durability, CLI/API behavior, and UI isolation.

Estimated code review effort: 5 (Critical) | ~120 minutes

Merge Risk: 🟡 Moderate · up to fa784

This PR adds local public-evidence and community workflows, but a stale process lock can make community operations unavailable until manual cleanup, an over-capacity cache can block reads and imports, and large record totals can lose integer precision. A test fault is also not restored when assertions fail, which can contaminate later tests. These bounded issues should be fixed or explicitly accepted before merge.

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant PublicEvidenceOperator
  participant ManagementAPI
  participant CommunityStorage
  participant CompatibilityMatrix

  Operator->>PublicEvidenceOperator: preview or export selected evidence
  PublicEvidenceOperator->>PublicEvidenceOperator: project, validate, and sign bundle
  Operator->>ManagementAPI: verify or import bundle
  ManagementAPI->>CommunityStorage: validate and persist quarantined evidence
  CompatibilityMatrix->>ManagementAPI: fetch community context
  ManagementAPI-->>CompatibilityMatrix: return untrusted bundle and record summaries
Loading

Possibly related PRs

Suggested reviewers: ingwannu, lidge-jun

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.16% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the CL-10 public evidence operator and community integration, which are the main changes in the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cl-10-public-evidence-contract

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed.

UI screenshot waived by the gui-screenshot-waived label.

Hygiene

Deterministic PR hygiene checks passed.

@github-actions
github-actions Bot marked this pull request as draft August 14, 2026 18:15
@Wibias
Wibias marked this pull request as ready for review August 14, 2026 18:16
@Wibias
Wibias marked this pull request as draft August 14, 2026 18:16
@Wibias Wibias added the gui-screenshot-waived Maintainer waiver for false-positive GUI screenshot requirements label Aug 14, 2026
@github-actions
github-actions Bot marked this pull request as ready for review August 14, 2026 18:20
Rebase the reviewed CL-10 operator/community layer onto the current public-evidence core. This squashes the child history onto cl10-public-core while preserving the exact conflict-free GitHub merge tree, including the final review fixes.
@Wibias
Wibias force-pushed the feat/cl-10-public-evidence-contract branch from c54b36d to 2a709df Compare August 14, 2026 19:18
coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@lidge-jun
lidge-jun merged commit d8479bd into dev Aug 15, 2026
28 checks passed
@Wibias
Wibias deleted the feat/cl-10-public-evidence-contract branch August 15, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request gui-screenshot-waived Maintainer waiver for false-positive GUI screenshot requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants