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
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Run `pnpm format`, `pnpm lint`, `pnpm typecheck`, `pnpm schema:check`, `pnpm tes

## GitHub Packages access

`@commercekit-tools/notification-contract` is pinned to `0.0.4`. The committed `.npmrc` contains only the scoped registry. Configure a classic GitHub PAT with `read:packages` in your user-level npm configuration, or supply `NODE_AUTH_TOKEN` through an external npm auth configuration. Never commit credentials or add a long-lived PAT repository secret.
`@commercekit-tools/notification-contract` is pinned to `0.0.5`. The committed `.npmrc` contains only the scoped registry. Configure a classic GitHub PAT with `read:packages` in your user-level npm configuration, or supply `NODE_AUTH_TOKEN` through an external npm auth configuration. Never commit credentials or add a long-lived PAT repository secret.

```sh
npm login --scope=@commercekit-tools --registry=https://npm.pkg.github.com --auth-type=legacy
pnpm view @commercekit-tools/notification-contract@0.0.4 version --registry=https://npm.pkg.github.com
pnpm view @commercekit-tools/notification-contract@0.0.5 version --registry=https://npm.pkg.github.com
pnpm install --frozen-lockfile
```

Expand Down
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Action performs no CCv2 API calls, build/deployment work, CLI checks, projec

## Shared event contract

NotificationEvent v1 is supplied by `@commercekit-tools/notification-contract`, pinned to **0.0.4** from GitHub Packages and bundled into `dist/index.js`. Workflow users do not install the package or authenticate to GitHub Packages. Maintainers need package read access to install development dependencies; see [Contributing](CONTRIBUTING.md).
NotificationEvent v1 is supplied by `@commercekit-tools/notification-contract`, pinned to **0.0.5** from GitHub Packages and bundled into `dist/index.js`. Workflow users do not install the package or authenticate to GitHub Packages. Maintainers need package read access to install development dependencies; see [Contributing](CONTRIBUTING.md).

Notify owns presentation templates, Slack/Teams rendering and escaping, webhook policies, delivery, retries, and Action inputs/outputs. Package SemVer, event `schemaVersion`, and Action releases evolve independently. Notify remains unreleased. See the [migration compatibility notes](docs/shared-contract-migration.md).

Expand Down Expand Up @@ -138,7 +138,7 @@ For a visual preview, paste the complete Slack payload into [Block Kit Builder](
### Cleanup compatibility

This unreleased Action accepts `ccv2.build-cleanup.completed` through the published
`@commercekit-tools/notification-contract@0.0.4` package. The exact registry
`@commercekit-tools/notification-contract@0.0.5` package. The exact registry
dependency and integrity are recorded in `package.json` and `pnpm-lock.yaml`;
all runtime dependencies are bundled into `dist/index.js`.

Expand All @@ -148,3 +148,22 @@ builds using notification-contract 0.0.3 reject cleanup events; consumers must
pin an immutable Notify commit containing this compatible bundle. Package
publication does not create an Action release or tag and does not authorize
real cleanup or provider delivery.

### Cleanup notification context

Cleanup notifications include all fourteen input names with all four authentication
values always `[REDACTED]`, all aggregate counts, safe errors and warning issues
in both providers. Accepted build-deletion requests are reported as initiation;
dry-runs report zero actual cleanup requests. Long input/issue previews are bounded
and visibly marked when truncated. Legacy cleanup events still show their available
policy/counts and identify unreported context.

The published notification-contract **0.0.5** package supports the additive cleanup
context and cleanup-specific warning status. The exact registry dependency,
lockfile, installed-version assertions and committed bundle are upgraded together;
there is no local tarball dependency or candidate override. Existing shared
schema/context/text APIs and webhook delivery remain in use. See the
[validation evidence](docs/cleanup-notification-validation.md) for registry provenance,
provider coverage and remaining release gates. Earlier Notify bundles may accept
basic cleanup events while rejecting cleanup warnings or omitting this context;
pin an immutable Notify commit containing this compatible bundle.
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Action release version (`v1.0.0`) and NotificationEvent schema version (`1`)

**Release hold:** Do not tag, create a GitHub Release, or publish this Action to Marketplace until the separate `commercekit-tools/ccv2-build` and `commercekit-tools/ccv2-deploy` Actions are built and their NotificationEvent v1 outputs have been validated with this notifier. This is a product release gate; the two producer Actions remain separate repositories and releases.

The Action bundles `@commercekit-tools/notification-contract@0.0.4` and its runtime dependencies. Package SemVer is independent of NotificationEvent `schemaVersion`. Maintainers and preflight CI need GitHub Packages read access as described in [Contributing](CONTRIBUTING.md); workflow users and manual provider smoke use the committed bundle without registry access. Package publication does not release this Action.
The Action bundles `@commercekit-tools/notification-contract@0.0.5` and its runtime dependencies. Package SemVer is independent of NotificationEvent `schemaVersion`. Maintainers and preflight CI need GitHub Packages read access as described in [Contributing](CONTRIBUTING.md); workflow users and manual provider smoke use the committed bundle without registry access. Package publication does not release this Action.

## Release order

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Redaction is defense in depth and does not replace safe producer behavior. See [

Report vulnerabilities through GitHub private vulnerability reporting for this repository when available. Otherwise use GitHub's private security advisory reporting flow. Do not disclose exploit details in public issues.

NotificationEvent v1 parsing and validation are supplied by the bundled `@commercekit-tools/notification-contract@0.0.4`. Notify retains filesystem safety, provider escaping and redaction, webhook URL masking, destination restrictions, timeouts, redirects and delivery policy. Runtime workflow consumers need no registry credentials. Package credentials belong only in maintainer user configuration or the CI install step; never in repository files or the bundle.
NotificationEvent v1 parsing and validation are supplied by the bundled `@commercekit-tools/notification-contract@0.0.5`. Notify retains filesystem safety, provider escaping and redaction, webhook URL masking, destination restrictions, timeouts, redirects and delivery policy. Runtime workflow consumers need no registry credentials. Package credentials belong only in maintainer user configuration or the CI install step; never in repository files or the bundle.
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Third-party notices

The Action's bundled runtime includes `@actions/core` and `@commercekit-tools/notification-contract@0.0.4`, including the contract package's Ajv and `ajv-formats` dependencies. The committed `dist/licenses.txt` contains the license text and notices emitted by `@vercel/ncc` for code incorporated into `dist/index.js`; distribute it with the bundle. `package.json` and `pnpm-lock.yaml` record exact direct and resolved dependencies. Development tools are used to build and validate the Action and are not required by Action consumers.
The Action's bundled runtime includes `@actions/core` and `@commercekit-tools/notification-contract@0.0.5`, including the contract package's Ajv and `ajv-formats` dependencies. The committed `dist/licenses.txt` contains the license text and notices emitted by `@vercel/ncc` for code incorporated into `dist/index.js`; distribute it with the bundle. `package.json` and `pnpm-lock.yaml` record exact direct and resolved dependencies. Development tools are used to build and validate the Action and are not required by Action consumers.

Before each release, regenerate the bundle and review `dist/licenses.txt` for changes alongside dependency updates.
8 changes: 4 additions & 4 deletions dist/index.js

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions docs/cleanup-notification-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Cleanup notification validation

## Published registry integration

The notification-contract publication gate is resolved. Notify pins the exact
published `@commercekit-tools/notification-contract@0.0.5`, commits its registry
lockfile and builds the standalone bundle from that installation. There are no
file dependencies, local links or candidate validation overrides in this checkout.
The Action itself remains unreleased; package publication does not authorize
provider delivery, deployment or real SAP cleanup.

Publication evidence:

- [action-kit publish run 43667757934](https://github.com/commercekit-tools/action-kit/actions/runs/43667757934).
- Source commit [`7cc2e8e6af46e7438064cc6205b22f4f7154eb94`](https://github.com/commercekit-tools/action-kit/commit/7cc2e8e6af46e7438064cc6205b22f4f7154eb94).
- Registry metadata was independently verified with `npm view`; package version
`0.0.5`, shasum `dba01de9635ba79f14ac2bb477c8c828dd4d223f`, integrity
`sha512-SMcyyWaeHdtlztt99xtWlJycSAspSTGvCaWJH7M2+u+on77JHwo8boTBOc9UUC0BQHDPo/VHmOj4gpt/XIbqmw==`.
- This integrity exactly matches the reviewed candidate below. The installed
public root, schema and package metadata exports were inspected; the shared
`createBuildCleanupEvent`, parser, validator and redaction primitives remain
available.

Normal validation (Node 24.21.0, pnpm 12.6.0):

| Command | Result |
| ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `npm view @commercekit-tools/notification-contract@0.0.5 version dist.integrity dist.shasum --registry=https://npm.pkg.github.com` | PASS; published metadata matches the reviewed tarball |
| `pnpm install --no-frozen-lockfile` | PASS; exact registry lockfile regenerated |
| `pnpm install --frozen-lockfile` | PASS; supply-chain policy and frozen resolution |
| `pnpm bundle` | PASS; normal registry runtime bundled |
| `pnpm quality` | PASS; formatting, lint, strict types, all 19 schema fixtures, coverage tests, byte-consistent bundle, public scan and production audit |
| `git diff --check` | PASS |

All **107 tests in 12 files passed with zero skips** against the published package,
including six standalone-bundle executions: success, failure and warning through
both providers using mocked fetch. Coverage is 97.94% statements (333/340),
90.18% branches (340/377), 98.07% functions (51/52) and 99.34% lines (304/306).
Existing coverage thresholds and source inclusion were not changed. The new
cleanup helper has 100% statement/function/line coverage and 92.4% branch coverage.
The public scan checked 90 files; the production audit found no known
vulnerabilities. Existing non-cleanup event snapshots are unchanged.

Registry bundle SHA256:
`6c49cb5e49fcdd62d4c6993f4d31d67fb729825e98ee760dac9f8d2e09ffca2f`.
It is byte-identical to the reviewed candidate bundle. Workflow consumers need
neither registry credentials nor `node_modules` to run it.

Remaining gates: required PR validation/CodeQL must pass before merge; the Notify
Action remains unreleased, and live Slack/Teams delivery has not been run for this
change. No webhook delivery, deployment, Action release/tag or real SAP operation
was performed by this validation. Production SAP eligibility guarantees and
cleanup execution approvals remain the cleanup producer's separate gates.

## Archived exact-source candidate evidence

Before publication, an isolated source-candidate integration established the
following evidence. At that time the normal manifest, lock and bundle remained
on 0.0.4 and normal dependency readiness was blocked. Publication and the normal
registry upgrade above supersede that temporary dependency gate.

Candidate provenance:

- action-kit source `3f9e418556b190bb8d55ac11a22f554e2c51a4a5`.
- Source package version 0.0.5; exact tarball SHA256
`9c3b9910dc51be697c3aa4e44620c3cd87d3cdd132f9a5431e85f9cb5f712dec`.
- Tarball integrity:
`sha512-SMcyyWaeHdtlztt99xtWlJycSAspSTGvCaWJH7M2+u+on77JHwo8boTBOc9UUC0BQHDPo/VHmOj4gpt/XIbqmw==`.

An isolated private copy installed this file tarball, rebuilt the actual bundle
and ran `COMMERCEKIT_CANDIDATE_CONTRACT_VERSION=0.0.5 pnpm quality`.
That temporary candidate mode required the exact installed 0.0.5 package and a
file tarball dependency; the normal registry schema check then remained fixed to
0.0.4. Temporary candidate dependency/lock/dist files were not copied back to this
repository. The candidate-mode code has been removed after registry publication.

PASS: formatting, lint, strict types, all 19 schema fixtures, 107 tests in 12 files
with zero skips, byte-consistent candidate bundle, public scan and production
dependency audit (no known vulnerabilities). Coverage: 97.94% statements,
90.18% branches, 98.07% functions and 99.34% lines. Existing coverage configuration
was not weakened. The new cleanup helper has 100% statement/function/line coverage
and 92.4% branch coverage.

The tests include success, no-op, dry-run, warning, failure, partial failure and
unknown outcomes; all 14 input names and 10 aggregate counts; unconditional masking
of four authentication fields; known-secret and provider escaping defenses;
rejected/truncated inputs; legacy 0.0.4 events; repository visibility; maximal Unicode
and long-link payload bounds; and six actual standalone-bundle executions
(success/failure/warning through both existing providers with mocked fetch).
No node_modules or registry credentials were present in those isolated runtime
tests. All other event-family golden snapshots remain unchanged; cleanup-specific
snapshots were updated and new cleanup failure/warning snapshots were added.

Candidate bundle SHA256:
`6c49cb5e49fcdd62d4c6993f4d31d67fb729825e98ee760dac9f8d2e09ffca2f`.

No webhook delivery, SAP call, package publication, Action release, merge, tag or
deployment was performed during candidate validation. The separate authorized
package publication is recorded above. OAuth and existing delivery implementations
are unchanged.
Loading