@plasius/offline-cache 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - **Added**
6
+ - (placeholder)
7
+
8
+ - **Changed**
9
+ - (placeholder)
10
+
11
+ - **Fixed**
12
+ - (placeholder)
13
+
14
+ - **Security**
15
+ - (placeholder)
16
+
17
+ ## [0.1.9] - 2026-10-21
18
+
19
+ - Restore approved self-hosted, trusted-push CI with isolated runner admission,
20
+ clean installation, bounded jobs and final package-manifest verification.
21
+
5
22
  - **Added**
6
23
  - (placeholder)
7
24
 
@@ -172,3 +189,4 @@
172
189
  [0.1.6]: https://github.com/Plasius-LTD/offline-cache/releases/tag/v0.1.6
173
190
  [0.1.7]: https://github.com/Plasius-LTD/offline-cache/releases/tag/v0.1.7
174
191
  [0.1.8]: https://github.com/Plasius-LTD/offline-cache/releases/tag/v0.1.8
192
+ [0.1.9]: https://github.com/Plasius-LTD/offline-cache/releases/tag/v0.1.9
package/README.md CHANGED
@@ -72,13 +72,37 @@ npm run pack:check
72
72
  ## Release integrity
73
73
 
74
74
  CI keeps the administrative contributor registry outside Git and npm package
75
- artifacts using exact, case-normalised path checks. CI runs on approved
76
- GitHub-hosted runners for same-repository pull requests and `main`, with
77
- package-manager cache finalization disabled; fork PR code is denied.
75
+ artifacts using exact, case-normalised path checks. CI runs only for canonical
76
+ repository branch pushes on `Public CI - Quarantined` with literal
77
+ `[self-hosted, Linux, X64]` labels. Pull-request and manual triggers are absent.
78
+ Both jobs check the repository and event, have bounded timeouts, persist no
79
+ checkout credentials and disable package-manager caching. There is no hosted CI
80
+ fallback or caller-selected runner. Clean installation, lint, types, runtime
81
+ audit, build, 80% line coverage and final package-manifest checks remain required.
78
82
  Publication uses the GitHub-hosted `production` job with Node 24 and a pinned
79
83
  npm 11.6.2 client. It is token-free and proceeds only while the prepared SHA
80
84
  is the exact `main` head after successful push-triggered CI. Do not dispatch CD
81
85
  until the npm trusted-publisher binding is verified.
86
+
87
+ An authorised runner-group operator must review each source branch before adding
88
+ only `Plasius-LTD/offline-cache/.github/workflows/ci.yml@refs/heads/<branch>`
89
+ to the existing workflow allowlist. Preserve repository selection, public access
90
+ policy and unrelated refs. Keep the existing `main` admission.
91
+ Review the release-preparation App's exact metadata diff before admitting its
92
+ branch. Run metadata CI and required reviews/checks before merge where repository
93
+ policy holds the PR open. Existing preparation can auto-merge under a policy
94
+ without required checks; record that accurately and verify successful metadata
95
+ and exact-main CI before publication. If the App deleted the branch, restore only
96
+ its reviewed, unchanged PR-head SHA to the same absent branch by an ordinary
97
+ non-force push so its queued CI can execute. Remove temporary admissions and
98
+ branches after successful checks. Missing access is a blocker; never widen
99
+ admission with wildcards or change production/protection settings to pass.
100
+
101
+ The remote `platform.public-artifact-integrity.enabled` flag controls restoration
102
+ of public distribution. Mandatory integrity checks remain unconditional when it
103
+ is enabled, disabled or rolled back. Rollback disables the affected workflow or
104
+ distribution channel and removes temporary admissions; it never restores the
105
+ administrative path or hosted CI. No capability is introduced.
82
106
  <!-- END PLASIUS RELEASE INTEGRITY -->
83
107
 
84
108
  ## Consent-aware workers
@@ -16,7 +16,8 @@ Publish only from the GitHub-hosted `production` job using npm trusted
16
16
  publishing. Prove the prepared SHA is still the exact remote `main` head and
17
17
  that push-triggered `ci.yml` succeeded for it. Require Node 24 and npm 11.5.1 or
18
18
  newer, request provenance, and prohibit npm write-token fallbacks. Reviewed CI
19
- uses explicit GitHub-hosted runners; fork PR code is denied.
19
+ uses explicit approved self-hosted runners for canonical-repository pushes;
20
+ fork PR code is denied. ADR-0003 supersedes the former hosted-CI decision.
20
21
 
21
22
  ## Consequences
22
23
 
@@ -0,0 +1,67 @@
1
+ # ADR-0003: Approved Self-Hosted CI and Hosted Publication
2
+
3
+ - Status: Accepted
4
+ - Date: 2026-10-21
5
+ - Task: Plasius-LTD/offline-cache#6
6
+ - Parent Story: Plasius-LTD/plasius-ltd-site#1626
7
+ - Parent Feature: Plasius-LTD/plasius-ltd-site#1597
8
+ - Feature flag: `platform.public-artifact-integrity.enabled`
9
+
10
+ ## Context
11
+
12
+ Hosted CI contradicted the task and parent Story. The repository is already
13
+ selected by the `Public CI - Quarantined` group, whose workflow allowlist admits
14
+ its exact `ci.yml@refs/heads/main`. Public self-hosted capacity must never execute
15
+ external-fork or pull-request-target head code. Publication requires a separate
16
+ GitHub-hosted OIDC identity.
17
+
18
+ ## Decision
19
+
20
+ Both CI jobs run only on canonical-repository branch pushes using the literal
21
+ `Public CI - Quarantined` group and `[self-hosted, Linux, X64]` labels. Remove
22
+ pull-request/manual triggers, persist no checkout credentials, disable caching,
23
+ and bound job timeouts. Keep clean `npm ci`, lint, typecheck, audit, build, coverage
24
+ at 80% or higher, source admission and final package-manifest checks. Reuse existing
25
+ package/admission tooling and the demonstrated oauth2-issuer CI pattern; no runtime
26
+ or public API/dependency changes are needed.
27
+
28
+ Operators review each source and generated release-metadata branch before admitting
29
+ its exact workflow ref; they preserve selected repositories and all unrelated refs.
30
+ Remove temporary refs after successful validation. README documents the existing
31
+ metadata auto-merge behavior, exact reviewed SHA restoration for a deleted branch,
32
+ and the requirement to verify metadata/main CI before publication. Missing access
33
+ is a blocker and cannot justify hosted fallback or wildcard workflow admission.
34
+
35
+ Keep CD phase-isolated and hosted on literal `ubuntu-latest`, publishing only via
36
+ `production`, npm OIDC, immutable artifact digests and successful exact-main push
37
+ CI. Keep the approved release preparation flow; it owns package/lockfile versions
38
+ and changelog promotion. Choose an unused version and verify registry provenance,
39
+ manifest, digest and consumer behavior before completion.
40
+
41
+ The remote backend flag controls restoration only. Enabled, disabled and rollback
42
+ states all retain unconditional integrity checks. Disable the workflow/channel and
43
+ remove temporary refs for rollback; never restore the administrative path. There
44
+ is no user-visible capability change.
45
+
46
+ ## Alternatives
47
+
48
+ Hosted CI fails the authoritative runner requirement. Pull-request CI with a fork
49
+ guard does not meet the parent Story's trusted-push-only boundary. Caller-selected
50
+ runners or broad workflow refs would weaken isolation. Replacing the package or
51
+ runtime code is unnecessary because the remaining mismatch is CI policy.
52
+
53
+ ## Consequences and validation
54
+
55
+ Every source/release branch needs exact workflow admission and may wait for shared
56
+ runner capacity. Release preparation remains hosted; it is outside the CI call
57
+ graph, as is the existing scheduled monthly dependency-maintenance workflow.
58
+ No repository selection, visibility, branch protection or production policy change
59
+ is part of this task. Do not claim required reviews or checks exist when absent.
60
+
61
+ Workflow regressions fail against the prior hosted/PR-triggered CI, then enforce
62
+ the trusted event, every job's runner/permissions/timeout/cache/checkout boundary,
63
+ and retained quality/artifact gates. Validate baseline and final lint, types,
64
+ coverage, build, package, audits, strict dependencies and actionlint. Runtime
65
+ source is unchanged, so changed-runtime-file LCOV is N/A; combined runtime
66
+ coverage remains required. Accessibility, browser/SEO and ACA secret references
67
+ are N/A because this delivers an npm package workflow with no UI or deployment.
@@ -2,4 +2,5 @@
2
2
 
3
3
  - [ADR 0001: Browser CacheStorage Package Boundary](./adr-0001-browser-cache-storage-package-boundary.md)
4
4
  - [ADR-0002: Hosted OIDC Package Publication](./adr-0002-hosted-oidc-package-publication.md)
5
+ - [ADR-0003: Approved Self-Hosted CI and Hosted Publication](./adr-0003-approved-self-hosted-ci.md)
5
6
  - [ADR 0004: Worker consent lifecycle](./adr-0004-worker-consent-lifecycle.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasius/offline-cache",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Browser offline cache helpers for Plasius progressive public sites and demo asset packs.",
5
5
  "type": "module",
6
6
  "sideEffects": false,