Repository navigation
refactor: use shared Action Kit packages - #6
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace duplicated authentication/transport and NotificationEvent code with the exact published
@commercekit-tools/ccv2-client@0.0.2and@commercekit-tools/notification-contract@0.0.2packages. Build lifecycle, inputs/outputs, status mapping, result shape, failure output ordering, summaries, and logging remain locally owned.action.ymlis unchanged.Base:
ebdc830161cf9122121ddeb137d005f375063997. Seedocs/shared-packages.mdfor the responsibility inventory.Shared packages and access
.npmrccontains only the scoped GitHub Packages registry. CI quality, cross-platform jobs, and the manual Sandbox workflow use read-only package permissions and exposeGITHUB_TOKENonly during installation. No credential is committed.GITHUB_TOKEN, confirming Actions read access to both packages.Mutation safety and compatibility
Create-build calls explicitly use
unsafe-mutationwith one authorized 401 replay. Timeout, network failure, 429 and 5xx never trigger automatic mutation retry. Progress calls explicitly usesafe-readwith bounded transient retries and one 401 replay. Regression tests assert exact mutation attempt counts, refresh failure classification, Retry-After, request counters, and rejection of array/empty/binary endpoint responses.Sixteen fixtures captured from the original implementation compare complete result/event JSON, output order, and summaries, normalizing only event identity/time and comparing JSON structurally. Every fixture validates through the published contract. The original seven outputs and eleven inputs remain unchanged.
Validation
Node 24.21.0 / pnpm 12.6.0. Executed and passed:
pnpm format:check,pnpm lint,pnpm typecheck,pnpm contracts:checkpnpm test,pnpm test:coverage: 127 tests in 7 suitespnpm audit: no known vulnerabilitiespnpm bundle,pnpm bundle:check,pnpm scan:public,pnpm qualityThe bundle executes from an isolated temporary directory without repository node_modules or registry credentials and only synthetic endpoint responses. Its size changes from 678,041 to 687,633 bytes (+9,592 bytes, 1.41%), reflecting the shared transport/validator helpers. Both package licenses are included; reproducibility passes.
Follow-up duplication audit delegates credential/runtime/completion/error types, approved event field selection and default source metadata, and bounded event JSON parsing to package APIs. Required Build-specific adapters are documented in
docs/shared-packages.md.All PR checks passed for
3fbb7af4e1cabb78fe9162465ee1ec96d4c3eada: quality, Linux/macOS/Windows cross-platform, CodeQL analysis and scan. CI · CodeQL.Scope and release status
No Notify, Deploy, Sandbox, or legacy repository modifications. Guarded Sandbox scenarios and cleanup are retained; no live Sandbox or real SAP requests were executed. No provider delivery logic.
UNRELEASED. Do not merge automatically. No tags, GitHub Release, or Marketplace publication.