Skip to content

feat: add lens and PLG adoption workflows - #7

Merged
sks merged 1 commit into
mainfrom
feat/plg-lens-adoption
Nov 13, 2026
Merged

sks merged 1 commit into
mainfrom
feat/plg-lens-adoption

Conversation

@sks

@sks sks commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the lens and new-capability adoption surface discussed for CCE M1–M5, using the released CCE 0.0.38 image as the action-tested default.

Lens support in scan

  • Adds lens, lens-sha256, and lens-required to the composite action and reusable scan workflow.
  • Resolves local lenses relative to the caller workspace, hashes local bytes automatically, and passes the pin to CCE.
  • Requires an explicit SHA-256 pin for HTTPS lenses and rejects non-HTTPS URLs.
  • Emits lens-file-sha256, lens-new-operation-count, and job-summary provenance.
  • lens-required: true performs an opt-in built-in baseline scan and fails when the lens adds no unique provider/resource/operation tuples. Its baseline never sends diagnostics.
  • Documents filter: all for custom providers such as TECH_DEBT.

Native PR review

Adds .github/workflows/pr-review.yml with:

  • Base/head worktrees and identical lens settings for both scans.
  • Repository-relative call-site evidence from CCE 0.0.38.
  • Policy-free JSON plus policy-aware Markdown diffs.
  • Paginated sticky comments using <!-- cce-api-diff -->.
  • Optional comments, SARIF upload, policy, and --fail-new enforcement.
  • Fork-safe comment/SARIF skipping, always-on artifacts and summaries, and deferred policy failure after evidence is published.
  • Report/diff paths and added/removed/entitlement counts as outputs.

New focused entry points

  • cce-action/access-request: versioned IAM-review JSON, operation count, commit, lens provenance, artifact upload, and summary.
  • cce-action/quickstart: BOM, HTML, SARIF, lens lockfile, and suggested workflow artifact bundle.
  • cce-action/lens-verify: deterministic Gate 0 with local auto-hashing, remote pin requirements, newly mapped/regressed summaries, and verdict upload even on failure.
  • Reusable access-request.yml, quickstart.yml, and lens-verify.yml wrappers with matching inputs and outputs.

The access-request flow intentionally remains artifact-first; no cross-repository credential is required.

Reproducibility and compatibility

  • Replaces the default moving latest image with ghcr.io/stackgenhq/cce:0.0.38 across all entry points.
  • Retains image as an explicit override.
  • Adds capability checks with actionable CCE >=0.0.38 upgrade errors for older preinstalled binaries.
  • Keeps the existing scan interface and defaults backward compatible.

Documentation and tests

  • Adds copy-paste examples for PR review, access request, quickstart, and lens verification.
  • Expands self-test coverage for custom-provider lens scans, lens value measurement, local hash verification, bad local pins, unpinned remote lenses, access-request schema/counts, quickstart artifacts, Gate 0 success, intentional regression evidence, and PR-review reusable execution.

Local validation completed:

  • actionlint
  • shellcheck scripts/*.sh tests/*.sh
  • bash -n for all scripts
  • YAML parsing and remote action input-contract checks
  • Real CCE fixture scans: custom lens added TECH_DEBT/requests/get; lens-required measured 1 new tuple; access request emitted 3 complete operations; quickstart produced all five artifacts; Gate 0 returned 2 additions/0 regressions; intentional regression returned exit 1 with 1 regressed row and preserved outputs; bad pins failed closed.

@sks
sks merged commit f26f38f into main Nov 13, 2026
5 checks passed
@sks
sks deleted the feat/plg-lens-adoption branch November 13, 2026 20:14
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.

1 participant