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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
- name: Run quality gate
run: pnpm quality

- name: Verify bundled reporting, summaries, and redaction
run: pnpm test:integration

integration:
name: Install CLI (${{ matrix.target }})
strategy:
Expand Down Expand Up @@ -85,6 +88,11 @@ jobs:
CK_CACHE_HIT: ${{ steps.setup-again.outputs.cache-hit }}
CK_EXPECTED_CACHE_HIT: 'true'
CK_EXPECTED_TARGET: ${{ matrix.target }}
CK_FIRST_CACHE_HIT: ${{ steps.setup.outputs.cache-hit }}
CK_FIRST_NOTIFICATION_EVENT:
${{ steps.setup.outputs.notification-event }}
CK_NOTIFICATION_EVENT:
${{ steps.setup-again.outputs.notification-event }}
CK_PATH: ${{ steps.setup-again.outputs.path }}
CK_TARGET: ${{ steps.setup-again.outputs.target }}
CK_VERSION: ${{ steps.setup-again.outputs.version }}
Expand Down
22 changes: 18 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ configuration contains no credentials. Trusted CI installation grants
`packages: read` only to its quality job. Fork workflows may lack package
access; do not use privileged untrusted PR execution to bypass that restriction.

Normal reporting development uses exact published notification-contract 0.0.6.
No source checkout, candidate preparation or file:tarball dependency is needed.
The historical candidate procedure is archived in
`docs/reporting-validation.md`.
Normal reporting development uses the exact published dependency in
`package.json`; no source checkout, candidate preparation or file:tarball
dependency is needed. The
[compatibility and validation record](docs/reporting-validation.md) owns
released-versus-main reporting status and historical candidate evidence.

```bash
corepack enable
Expand All @@ -40,6 +41,7 @@ pnpm lint
pnpm typecheck
pnpm test
pnpm test:coverage
pnpm test:scripts
pnpm bundle
pnpm bundle:check
pnpm audit --prod --audit-level=high
Expand All @@ -60,6 +62,18 @@ second-invocation cache hit. It does not install into a system directory or
modify a shell profile. Latest-stable discovery is covered with synthetic unit
fixtures because the current public CLI releases are previews.

CI runs the full bundled reporting integration once in its Linux quality job.
All six native jobs retain their install/cache checks and verify the real event
outputs using the same success assertions. This avoids six additional complete
integration installations.

The ESLint and typescript-eslint development parents use upstream patched
minimatch releases. `test:scripts` verifies all three installed paths stay at
11.0.1 or newer. This targeted regression complements the existing production
audit; it is not a claim that every development advisory is absent. Review
development audit results separately without lowering the production gate or
adding broad dependency overrides.

## Committed bundle

GitHub executes `dist/index.js` directly. Consumers do not run `pnpm install`,
Expand Down
39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Setup CommerceKit CLI

> **Registry-backed reporting:** consistent notifications and GitHub summaries
> consume exact published notification-contract 0.0.6 and are bundled for
> runtime consumers. See [reporting validation](docs/reporting-validation.md).
> **Released:** `@v1` installs and verifies the CLI. **Unreleased on main:** the
> notification event and consistent job summaries described below. See
> [release compatibility and validation](docs/reporting-validation.md) before
> selecting an immutable commit for those features.

Install and verify a requested
[CommerceKit CLI](https://github.com/commercekit-tools/cli) version, or the
Expand All @@ -19,8 +20,8 @@ version are independent.

## Usage

After the first v1 Action release, a workflow can install the current CLI
preview and run project checks in a separate step:
A workflow can use the released v1 Action to install the current CLI preview and
run project checks in a separate step:

```yaml
name: CommerceKit
Expand Down Expand Up @@ -108,18 +109,18 @@ fails. It never falls back to another release, Homebrew, or WinGet.

## Outputs

| Output | Meaning | Example |
| -------------------- | --------------------------------------------------- | ---------------------------------------------- |
| `version` | Exact installed CLI version. | `0.1.0-preview.2` |
| `path` | Absolute path to the verified executable. | Runner tool-cache path ending in `commercekit` |
| `target` | Normalized release target selected for the runner. | `linux-x64` |
| `build-id` | Verified identity from `release-manifest.json`. | 40-character source identity |
| `cache-hit` | Lowercase string for verified tool-cache reuse. | `true` |
| `notification-event` | Validated setup event with safe inputs and outcome. | Bounded JSON for the existing Notify action. |
| Output | Meaning | Example |
| -------------------- | --------------------------------------------------------------------------- | ---------------------------------------------- |
| `version` | Exact installed CLI version. | `0.1.0-preview.2` |
| `path` | Absolute path to the verified executable. | Runner tool-cache path ending in `commercekit` |
| `target` | Normalized release target selected for the runner. | `linux-x64` |
| `build-id` | Verified identity from `release-manifest.json`. | 40-character source identity |
| `cache-hit` | Lowercase string for verified tool-cache reuse. | `true` |
| `notification-event` | **Unreleased on main:** validated setup event with safe inputs and outcome. | Bounded JSON for the existing Notify action. |

Installation outputs are set only after the executable passes integrity and
exact-version verification. The Action also emits `notification-event` for
handled failures before the Action reports failure.
exact-version verification. The unreleased reporting implementation also emits
`notification-event` for handled failures before the Action reports failure.

```yaml
- name: Show resolved installation
Expand All @@ -131,10 +132,12 @@ handled failures before the Action reports failure.
"$COMMERCEKIT_PATH" --version
```

## Consistent notifications and job summaries
## Consistent notifications and job summaries (unreleased)

The Action uses the existing shared notification contract and the existing
Notify Action. It does not add a webhook input or delivery code.
These features are available only at reviewed main commits, and are absent from
the current released `v1` alias. See the
[compatibility record](docs/reporting-validation.md#release-compatibility).
Notify handles delivery; Setup does not add a webhook input.
`commercekit.setup.completed` reports setup success or failure with the exact
`version` input name, effective `latest` when omitted, validation/truncation
metadata, verified installed version, target, build identity, cache reuse and
Expand Down
36 changes: 18 additions & 18 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ This repository does not publish an npm package.

## Reporting consistency

The Action consumes exact published notification-contract 0.0.6, with its
registry lockfile and standalone bundle committed. Normal development and
runtime use no candidate dependency or source checkout. The package-only
publication is separate from this Action's release process; it created no Action
tag or Marketplace release. See
[reporting-validation.md](docs/reporting-validation.md) for exact provenance and
normal validation evidence. All quality/security checks and six native runner
jobs must pass on the reviewed release commit.
See the
[release compatibility and validation record](docs/reporting-validation.md) for
the released Action reference, main-only reporting features, exact shared
dependency and publication evidence. Package publication and an Action release
are separate decisions. All quality/security checks and six native runner jobs
must pass on the reviewed release commit.

## Release prerequisites

Expand All @@ -48,18 +46,20 @@ Before creating a release:

Do not create an Action release from an unreviewed branch.

## Initial v1 release
## Next compatible v1 release (owner approval required)

After the implementation pull request is merged and `main` CI passes:
The initial `v1.0.0` already exists. Keep that immutable tag and release intact.
Only after the owner separately authorizes an Action release, a reviewed pull
request is merged and the exact main commit passes all prerequisites:

1. create immutable annotated tag `v1.0.0` at the reviewed release commit;
2. create or update annotated tag `v1` to the same commit;
3. push both tags without rewriting the immutable tag;
4. create a GitHub Release for `v1.0.0` with public release notes;
1. select an unused compatible patch version, such as `v1.0.1`;
2. create its immutable annotated tag and GitHub Release at the reviewed commit;
3. verify the exact tag's committed bundle and public release notes;
4. update the compatible `v1` alias under the versioning policy;
5. verify `commercekit-tools/setup-commercekit@v1` from an independent public
test repository; and
6. optionally submit the Action to GitHub Marketplace after confirming the
repository license, metadata, branding, and security guidance.
6. consider Marketplace publication only with separate owner authorization and
after confirming the license, metadata, branding and security guidance.

No tags or Marketplace publication should occur before the implementation is
reviewed and merged.
Normal CI never creates tags, GitHub Releases or Marketplace listings. The
reporting and validation changes do not authorize any of these operations.
71 changes: 56 additions & 15 deletions docs/reporting-validation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Reporting consistency validation

## Release compatibility

| Action reference | Installation | Notification event and consistent summaries |
| --------------------------------------------------------------------------- | ------------ | ------------------------------------------------ |
| Released `v1` / `v1.0.0`, commit `dffa026980479cf96d7a5f4763602d39a7325a7c` | Available | Absent from this release |
| Reviewed main commits since `52a5a098d89f9ef2c42a234b4c3baa5d60a7a896` | Available | Implemented and bundled; unreleased as an Action |

The
[existing release](https://github.com/commercekit-tools/setup-commercekit/releases/tag/v1.0.0)
is independent of the CLI's Preview maturity. Use the released alias for
installation, or a reviewed immutable main commit when explicitly testing
reporting. Notify must support the same setup event before it receives that
output; use compatible immutable commits rather than an assumed future tag. This
record owns release-state details linked by the README and release guide.

## Published dependency and provenance

The owner-authorized
Expand Down Expand Up @@ -30,28 +45,33 @@ remain unchanged. Shared APIs own captured input context, bounded redaction,
setup event factories/schema validation, safe GitHub context and common
summaries.

## Executed normal registry checks
## Recorded registry-adoption checks

The following records the original registry-backed adoption, rather than
claiming that historical results validate every later commit.

Status vocabulary: PASS, FAIL, BLOCKED, NOT RUN.

| Check | Status | Evidence |
| -------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Frozen installation and public exports | PASS | Exact registry 0.0.6 and required public setup/reporting APIs verified |
| Formatting, lint and strict types | PASS | Normal source passes without candidate switches |
| Unit/integration coverage | PASS | 154 tests/11 files; 94.06% statements, 90.29% branches, 93.54% functions, 94.21% lines; existing thresholds and inclusion unchanged |
| Actual registry-backed bundle integration | PASS | Public CLI preview.2 installed/verified on darwin-arm64, verified cache reuse, success and invalid-input failure events/summaries |
| Normal bundle regeneration | PASS | SHA256 above matches the reviewed candidate exactly |
| Public scan, production audit, workflow lint | PASS | Scan passed; no known vulnerabilities; local actionlint and diff checks passed |
| Final committed bundle check | PASS | Full normal `pnpm quality` passed after committing registry-backed dist; no generated changes |
| Six native runner integration jobs | NOT RUN | Final-head Linux/macOS/Windows x64/ARM64 jobs must pass before merge; earlier baseline-bundle jobs are not feature evidence |
| Live Slack/Teams delivery | NOT RUN | Notify owns this separately authorized capability; no provider send performed |
| Check | Status | Evidence |
| -------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Frozen installation and public exports | PASS | Exact registry 0.0.6 and required public setup/reporting APIs verified |
| Formatting, lint and strict types | PASS | Normal source passes without candidate switches |
| Unit/integration coverage | PASS | 154 tests/11 files; 94.06% statements, 90.29% branches, 93.54% functions, 94.21% lines; existing thresholds and inclusion unchanged |
| Actual registry-backed bundle integration | PASS | Public CLI preview.2 installed/verified on darwin-arm64, verified cache reuse, success and invalid-input failure events/summaries |
| Normal bundle regeneration | PASS | SHA256 above matches the reviewed candidate exactly |
| Public scan, production audit, workflow lint | PASS | Scan passed; no known vulnerabilities; local actionlint and diff checks passed |
| Final committed bundle check | PASS | Full normal `pnpm quality` passed after committing registry-backed dist; no generated changes |
| Six native runner installation/cache jobs | PASS | [Main CI run 43679114996](https://github.com/commercekit-tools/setup-commercekit/actions/runs/43679114996) passed all six targets at `52a5a098d89f9ef2c42a234b4c3baa5d60a7a896`; those checks verified installation/cache outputs, not reporting assertions |
| Live Slack/Teams delivery | NOT RUN | Notify owns this separately authorized capability; no provider send performed |

Commands actually executed: `pnpm install --frozen-lockfile`, `pnpm bundle`,
public-export assertions, `pnpm format:check`, `pnpm lint`, `pnpm typecheck`,
`pnpm test:coverage`, `pnpm test:integration`, `pnpm scan:public`,
`pnpm audit --prod --audit-level=high`, actionlint and `git diff --check`. Full
committed-bundle quality and final hosted checks remain required before merge.
The registry-publication compatibility gate is resolved.
`pnpm audit --prod --audit-level=high`, actionlint and `git diff --check`. The
recorded
[main CodeQL run](https://github.com/commercekit-tools/setup-commercekit/actions/runs/43679114994)
also passed. Every later review still requires checks for its exact head. The
registry-publication compatibility gate is resolved.

Tests cover complete input/result projection, workflow reference parity,
allowlisted GitHub environment access, safe invalid settings, JWT/URL credential
Expand All @@ -61,6 +81,27 @@ executes the actual entry point, checks two successful invocations plus invalid
input failure, and validates events/summaries in controlled temporary files. No
SAP operation is involved.

## Hosted reporting checks

The Linux quality job now runs the existing `pnpm test:integration` once. It
executes the committed bundle with an isolated tool cache, parses the public
contract schema, checks fresh/cached success events and summaries, and verifies
the handled invalid-input failure and synthetic JWT redaction in events,
summaries and logs. No provider message is sent.

The six existing native jobs still install and reuse the Action exactly as
before. Their verifier additionally checks both actual notification outputs
against installed version, target, build identity, cache result, bounded input
context and duration, and rejects private executable paths. Shared assertions
are reused by the isolated integration instead of copying reporting policy or
repeating its complete fresh/cache/failure flow on six platforms. Installation
and reporting failures must remain visible; reporting errors do not change the
Action's underlying installation outcome.

`pnpm test:scripts` covers missing/malformed outputs, mismatched facts, private
paths and the installed patched minimatch resolutions. It is part of `quality`;
the existing unit coverage thresholds and production audit remain unchanged.

## Historical candidate evidence

Before publication, source `475cc4db42f79310240496201f90d7047aa54330` was packed
Expand Down
Loading
Loading