@ai-ecoverse/slicc-shared-web 2.9.0 → 2.10.0

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.
Files changed (2) hide show
  1. package/README.md +4 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -76,6 +76,7 @@ The caller cancels superseded runs on pull requests only, so a push to `main` ne
76
76
 
77
77
  - the pull request's head, with full history, as the working directory, and its base in `$RUNNER_TEMP/base`, each after `npm ci` (claude-code-action needs the working directory to be a checkout, and a base nested inside it would break the head's Biome config). Everything else the reviewers get or write (the prompt, context, integration artifacts, `browsers.json`, findings and screenshots) is in `$RUNNER_TEMP/review`, outside the checkout, so a reviewer's `npm run lint` sees only the repository;
78
78
  - `$RUNNER_TEMP/review/integration/`, every shard's artifact;
79
+ - `$RUNNER_TEMP/review/artifacts/`, with `artifacts` set: the [caller's own artifacts](#artifacts-the-caller-built) that match it;
79
80
  - `$RUNNER_TEMP/review/context/`, from the `context` job: the pull request's diff, files and commits from git and its title, body and labels from the event, which cost no GitHub API call, then its comments and reviews and the repo's issues and recent pull requests from the REST API, each retried once and listed in `missing.txt` when the repo's `GITHUB_TOKEN` quota (1,000 requests an hour, shared by every run in the repo) runs out, rather than failing the job;
80
81
  - `$RUNNER_TEMP/review/browsers.json`: four headed Chrome instances on one machine (on Xvfb display `:99` when the runner has no `DISPLAY`, since headless Chrome behaves slightly differently), `head` and `base` each linked through the extension and through slicc-cli, on CDP ports 9301 to 9304. For each one the job runs `review-browser` (by default `npm run --if-present review:browser`) in that side's tree with `SLICC_REVIEW_SIDE` (`head` or `base`), `SLICC_REVIEW_LINK` (`extension` or `cli`) and `SLICC_REVIEW_CDP`, so the repo loads its own build into that browser. Every one of them also runs the [harness extension](#harness-extension) (loaded with `--load-extension`), so the review sees pages the way a user with a content-script extension does;
81
82
  - `review-prompt`, appended to the shared prompt.
@@ -97,6 +98,8 @@ Each reviewer answers with `findings.json`, held to one JSON schema:
97
98
 
98
99
  **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
100
 
101
+ **Artifacts the caller built.** A caller whose own jobs build something the tests or the reviewers need (packages, say) runs them before the pipeline (`needs:` on the job that `uses:` it) and names them with `artifacts`, a [download-artifact](https://github.com/actions/download-artifact) `pattern` such as `host-*`. Every test shard gets the matching artifacts of the run in `$RUNNER_TEMP/artifacts/<artifact>/`, and each reviewer in `$RUNNER_TEMP/review/artifacts/<artifact>/`, before `review-browser` runs, so the hook can load the change's build into both sides' browsers; the test step and the hook get that directory as `SLICC_ARTIFACTS`, and the prompt names it. Without `artifacts` nothing is downloaded and `SLICC_ARTIFACTS` is empty.
102
+
100
103
  **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
104
 
102
105
  ### Which pull requests get a review
@@ -127,6 +130,7 @@ The commands in `lint`, `test`, `deploy`, `review-browser` and `after-release` r
127
130
  | `deploy` | none | a command that deploys to staging |
128
131
  | `deploy-secrets` | all | newline- or space-separated secret names (any case) that `deploy` gets |
129
132
  | `review-browser` | `npm run --if-present review:browser` | |
133
+ | `artifacts` | none | a download-artifact `pattern` of this run's artifacts that the test shards and the reviewers get, as `SLICC_ARTIFACTS` |
130
134
  | `review-prompt` | none | |
131
135
  | `review-timeout-minutes` | `60` | how long each reviewer may take |
132
136
  | `review-screenshots` | `30` | the most screenshots a reviewer may attach |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-shared-web",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
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",