@ai-ecoverse/slicc-shared-web 2.8.3 → 2.8.5

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/README.md CHANGED
@@ -95,7 +95,7 @@ Each reviewer answers with `findings.json`, held to one JSON schema:
95
95
 
96
96
  **Post** is the only job that writes to GitHub. Per reviewer it sets the commit status `review / claude` or `review / codex` (`success` for `approved`, `failure` for `denied`, `error` without findings), keeps one comment with its latest verdict and summary on the pull request (edited on each run), posts each comment on its line (or, for a line outside the diff, as a pull request comment naming it) unless the same comment is already there, and opens each issue unless one with the same title is already open. An issue in another repo of the same org needs `SLICC_ISSUES_TOKEN`, a token that can open issues there; without it, or when it is refused, the issue becomes a pull request comment instead. One outside the org is logged and skipped.
97
97
 
98
- **Release** runs `semantic-release` after lint, on a push to `main` only, without any test: what reached `main` went through the merge queue. GitHub sometimes rejects a push right after the tag push with a bare `(failed)`, most often semantic-release's push of `refs/notes/semantic-release-vX.Y.Z`, so the step puts a small `git` wrapper first on `PATH`: it retries `git push` and `git fetch` up to five times, 5, 10, 15 and 20 seconds apart, and runs every other git command once, as well as semantic-release's `git fetch --unshallow`, which fails on the job's full clone by design before semantic-release falls back to a plain fetch. When the push still fails, semantic-release fails before it publishes. With `release-environment`, the job runs in that GitHub environment, and `after-release` is a command run after semantic-release when it released, that is when a new `v*` tag points at the commit, with that version as `RELEASE_VERSION` (a production deploy, say). It gets the job's OIDC token. With `release-secrets`, a newline- or space-separated list of secret names, semantic-release and `after-release` get those secrets as environment variables (signing keys, say); without it they get none. With `attest`, a path or glob (a newline-separated list for several), the job attests the build provenance of those files after a release, through GitHub artifact attestations: the certificate names `ai-ecoverse/slicc-shared-web/.github/workflows/pipeline.yml` at the pipeline's tag, and its build configuration names the caller's `.github/workflows/ci.yml`, so a verifier checks both. The release job asks for `attestations: write` whether or not `attest` is set, so the caller grants it.
98
+ **Release** runs `semantic-release` after lint, on a push to `main` only, without any test: what reached `main` went through the merge queue. GitHub sometimes rejects a push right after the tag push with a bare `(failed)`, most often semantic-release's push of `refs/notes/semantic-release-vX.Y.Z`, so the step puts a small `git` wrapper first on `PATH`: it retries `git push` and `git fetch` up to five times, 5, 10, 15 and 20 seconds apart, and runs every other git command once, as well as semantic-release's `git fetch --unshallow`, which fails on the job's full clone by design before semantic-release falls back to a plain fetch. When the push still fails, semantic-release fails before it publishes. With `release-environment`, the job runs in that GitHub environment, and `after-release` is a command run after semantic-release when it released, that is when a new `v*` tag points at the commit, with that version as `RELEASE_VERSION` (a production deploy, say). It gets the job's OIDC token. With `release-secrets`, a newline- or space-separated list of secret names, semantic-release and `after-release` get those secrets as environment variables (signing keys, say); without it they get none. With `attest`, a path or glob (a newline-separated list for several), the job attests the build provenance of those files after a release, through GitHub artifact attestations, even when a later semantic-release step such as the npm publish failed once the `v*` tag was pushed, so that tag's release never goes without its attestation: the certificate names `ai-ecoverse/slicc-shared-web/.github/workflows/pipeline.yml` at the pipeline's tag, and its build configuration names the caller's `.github/workflows/ci.yml`, so a verifier checks both. The release job asks for `attestations: write` whether or not `attest` is set, so the caller grants it.
99
99
 
100
100
  **Review** is the check that stands for the reviews. On a pull request that gets a review it passes when both reviewers' `findings.json` say `approved`; when the repo can't read `AWS_BEARER_TOKEN_BEDROCK`, the reviewers don't start and it fails, naming the secret. On one that doesn't (a Renovate pull request outside `review-renovate`) it passes when `integration` did. In the merge queue it always passes, since the pull request was reviewed already. Require it next to `ci / integration`, as `ci / review`.
101
101
 
@@ -269,7 +269,7 @@ SLICC_UNIT_ALL=1 git commit
269
269
 
270
270
  ## Integration-test harness
271
271
 
272
- `harness/` drives Chromium over raw CDP on `--remote-debugging-pipe`, as its only client, from `node --test`. On CI (`CI` set, as GitHub Actions does) Chrome runs headed, since headless Chrome behaves slightly differently; the pipeline starts Xvfb when the runner has no display. On a developer machine (no `CI`) it runs headless, so a test run doesn't open windows. `SLICC_HEADLESS=1` or `0`, or `launch({ headless })`, overrides either way. On Linux, a headed Chrome on CI (or with no `DISPLAY`) gets an Xvfb display of its own, started with `-displayfd` so it picks a free number and stopped with the browser: browsers launched side by side, as `node --test` runs files with `--test-concurrency`, never share a screen, so none takes another's window focus (four on one display broke `:focus-visible` checks in slicc-spectrum#572). This needs `Xvfb` on `PATH`; without it, Chrome uses `DISPLAY`, and on a Linux desktop without `CI` it always does. Every page, service worker, shared worker and dedicated worker, nested ones included, starts paused, gets coverage (and the CPU profiler, when profiling is on) switched on in the same tick, and only then runs. With nothing to collect (`coverage: []` and profiling off) only pages start paused: service and shared workers are left out of the auto-attach and attached once they exist, so they never wait for the harness. A held start that Chrome repeats when it stops and restarts a service worker during an update left the updated worker installed and the next navigation unanswered whenever the harness was slow to run it (slicc-bios#844, #836, #789). Each test gets its own browser context and leaves `artifacts/<suite>/<test>/` behind: a screenshot per tab and a `console.log` of every target. Lines logged before the first test, such as an extension service worker's at startup, go into the first test's `console.log`. The global teardown merges the raw coverage into `coverage/` (console table, lcov, V8 HTML) and writes `artifacts/hotspots.md`.
272
+ `harness/` drives Chromium over raw CDP on `--remote-debugging-pipe`, as its only client, from `node --test`. On CI (`CI` set, as GitHub Actions does) Chrome runs headed, since headless Chrome behaves slightly differently; the pipeline starts Xvfb when the runner has no display. On a developer machine (no `CI`) it runs headless, so a test run doesn't open windows. `SLICC_HEADLESS=1` or `0`, or `launch({ headless })`, overrides either way. On Linux, a headed Chrome on CI (or with no `DISPLAY`) gets an Xvfb display of its own, started with `-displayfd` so it picks a free number and stopped with the browser: browsers launched side by side, as `node --test` runs files with `--test-concurrency`, never share a screen, so none takes another's window focus (four on one display broke `:focus-visible` checks in slicc-spectrum#572). This needs `Xvfb` on `PATH`; without it, Chrome uses `DISPLAY`, and on a Linux desktop without `CI` it always does. A headed Chrome gets `--enable-unsafe-swiftshader`, so WebGL falls back to software on a display without a GPU, as headless Chrome's does (slicc-bios#901's splash scene saw no WebGL2 otherwise). Every page, service worker, shared worker and dedicated worker, nested ones included, starts paused, gets coverage (and the CPU profiler, when profiling is on) switched on in the same tick, and only then runs. With nothing to collect (`coverage: []` and profiling off) only pages start paused: service and shared workers are left out of the auto-attach and attached once they exist, so they never wait for the harness. A held start that Chrome repeats when it stops and restarts a service worker during an update left the updated worker installed and the next navigation unanswered whenever the harness was slow to run it (slicc-bios#844, #836, #789). Each test gets its own browser context and leaves `artifacts/<suite>/<test>/` behind: a screenshot per tab and a `console.log` of every target. Lines logged before the first test, such as an extension service worker's at startup, go into the first test's `console.log`. The global teardown merges the raw coverage into `coverage/` (console table, lcov, V8 HTML) and writes `artifacts/hotspots.md`.
273
273
 
274
274
  CPU profiling is off by default. V8's sampler interrupts each page and worker thread every 100 µs with a signal, and the renderer SIGSEGVs in slicc-bios#114 all fault inside a signal handler walking the interrupted thread's frames, which points at it. Turn it on with `profile: true` or `SLICC_PROFILE=1` to get one CPU profile per target and snapshot in the test's artifact directory, and the 15 frames with the most self time in the repo's own scripts in `hotspots.md`. Without it, `hotspots.md` says that profiling is off.
275
275
 
@@ -66,7 +66,7 @@ export function commandLine(
66
66
  ]);
67
67
  const base = flags.filter((flag) => !dropped.has(flag));
68
68
  const load = loaded ? ['--enable-unsafe-extension-debugging'] : [];
69
- const mode = headless && !realistic ? ['--headless=new'] : [];
69
+ const mode = headless && !realistic ? ['--headless=new'] : ['--enable-unsafe-swiftshader'];
70
70
  return [...mode, ...base, ...load, ...extra, `--user-data-dir=${profile}`, 'about:blank'];
71
71
  }
72
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-shared-web",
3
- "version": "2.8.3",
3
+ "version": "2.8.5",
4
4
  "description": "Shared Renovate, Biome, TypeScript, lefthook and GitHub Actions configuration, plus the CDP integration-test harness, for SLICC's web repos",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@ai-ecoverse/slicc-browsers": "1.18.6",
70
- "@ai-ecoverse/slicc-cdp": "1.31.1",
70
+ "@ai-ecoverse/slicc-cdp": "1.31.2",
71
71
  "@biomejs/biome": "2.5.15",
72
72
  "lefthook": "2.2.2",
73
73
  "monocart-coverage-reports": "2.13.2",