@webpieces/rules-config 0.4.477 → 0.4.479

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpieces/rules-config",
3
- "version": "0.4.477",
3
+ "version": "0.4.479",
4
4
  "description": "Shared webpieces.config.json loader. Single source of truth for validation rule configuration consumed by @webpieces/ai-hook-rules, @webpieces/code-rules, and @webpieces/nx-webpieces-rules.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -9,12 +9,17 @@
9
9
  # TO ENABLE (client repo):
10
10
  # 1. Copy this file to .github/workflows/webpieces-pr-gate.yml and commit it.
11
11
  # 2. Set a committed "gateSalt" under the pr-gate section of webpieces.config.json (any non-empty string).
12
- # 3. In branch-protection for `main`, mark the "webpieces/pr-gate" COMMIT STATUS required (NOT this
13
- # workflow's job). wp-finish-upsert-pr posts that status directly on the head sha AFTER editing the
14
- # PR body, so it is race-free: the push fires `synchronize` before the body edit, and a check that
15
- # read the body alone would see the previous head's token and flap. The status is attached to the
16
- # sha and simply does not exist until the gated flow (or this workflow) posts it. (Only a repo admin
17
- # can set required checks webpieces cannot do it for you.)
12
+ # 3. In branch-protection for `main`, mark THIS WORKFLOW'S JOB required:
13
+ # Webpieces PR Gate / Verify webpieces gate token
14
+ # That is the ONE required check there is deliberately nothing else to pick. (Only a repo admin
15
+ # can set required checks; webpieces cannot do it for you.)
16
+ #
17
+ # NOTE if you are upgrading: earlier versions ALSO posted a `webpieces/pr-gate` commit status, and told
18
+ # you to require THAT instead of the job. It is gone. It only existed to recover from a race where
19
+ # wp-finish-upsert-pr pushed before writing the PR body — the body is now written FIRST, so the race
20
+ # cannot happen and the job is safe to require on its own. If you had `webpieces/pr-gate` marked required
21
+ # in branch protection, REPOINT it at the job above, or that context sits Pending forever and blocks
22
+ # every PR.
18
23
  #
19
24
  # NOTE: the salt is committed/obscurity-grade — it stops unhooked teammates, but a determined reader can
20
25
  # read it and forge. It is deliberately not cryptographically sound; see RESPONSE-pr-gate-ci-enforcement.
@@ -26,13 +31,16 @@
26
31
  name: Webpieces PR Gate
27
32
  on:
28
33
  pull_request:
29
- # `edited` matters: it re-runs after wp-finish-upsert-pr rewrites the PR body, a fallback for the
30
- # push-before-edit ordering. The authoritative signal is the webpieces/pr-gate commit status, though.
34
+ # `edited` is LOAD-BEARING, not a fallback — do NOT remove it. wp-start-upsert-pr pushes too, and that
35
+ # push fires `synchronize` while the PR body still carries the PREVIOUS run's token, so the check goes
36
+ # red. By the time wp-finish-upsert-pr runs, HEAD usually has not moved, so its push is a no-op that
37
+ # fires NO event — the only thing that re-triggers this job and clears the red is the `edited` event
38
+ # from finish writing the new body. Drop `edited` and every iteration leaves a stale red.
39
+ # `synchronize` is equally required: it is what catches an unhooked teammate pushing over a gated PR.
31
40
  types: [opened, edited, synchronize, reopened]
32
41
  permissions:
33
42
  contents: read
34
43
  pull-requests: read
35
- statuses: write # wp-check-pr posts the webpieces/pr-gate commit status
36
44
  jobs:
37
45
  webpieces-pr-gate:
38
46
  runs-on: ubuntu-latest