pi-gauntlet 8.4.8 → 8.4.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 +10 -0
- package/README.md +12 -6
- package/extensions/telemetry-settlement-contract.test.ts +29 -1
- package/package.json +2 -2
- package/skills/gatekeep-pr/SKILL.md +39 -28
- package/skills/gatekeep-pr/reference/batch.md +10 -10
- package/skills/gatekeep-pr/reference/cleanup.md +5 -5
- package/skills/gatekeep-pr/reference/findings.md +28 -13
- package/skills/gatekeep-pr/reference/menus.md +103 -74
- package/skills/gatekeep-pr/reference/post-selection-loop.md +31 -17
- package/skills/gatekeep-pr/reference/report.md +33 -101
- package/skills/gatekeep-pr/reference/sync.md +1 -1
- package/skills/gatekeep-pr/verification-brief.md +6 -6
- package/skills/gatekeep-pr/reference/decision-menu.md +0 -53
|
@@ -97,11 +97,11 @@ provisioning, so it never re-reads; step 2 re-reads once after provisioning (`re
|
|
|
97
97
|
- repair.poll_deadline: null | <absolute timestamp for the watch window; reference/post-selection-loop.md ### Wait course>
|
|
98
98
|
- repair.wave: null | { pre_wave_head, pushed_head, selected_ids, selected_payloads, sync: null | { pre_head, expected_remote_head }, action: fix-nits?, affected_claims, round_start_head, counted: false | true, counted_head, checkpoint_history: [], stage: apply | review | push, no_progress: { failed_prerequisite, observed_value, result_path }? }
|
|
99
99
|
- approved_head: null | <sha> # set by reference/post-selection-loop.md when gh pr review --approve exits 0; selects the approved template
|
|
100
|
-
-
|
|
100
|
+
- post_steps: [ { label, source, command: null | <exact command>, payload_file: null | <absolute path>, picked: false | true, result: null | <result> } ] # reference/post-selection-loop.md ### Post steps; preserve mapping and results through nested gates
|
|
101
101
|
- pr.review_requests: [ { __typename: User, login } | { __typename: Team, name, slug } ] # raw reviewRequests entries
|
|
102
102
|
- viewer: { login, is_author, role }
|
|
103
103
|
- prior_review: null | { id, state, commit, submitted_at, body, inline[ { id, path, original_line, body } ], delta: ancestor | not ancestor (<reason>) | unset }
|
|
104
|
-
- permissions: { viewer_permission, is_cross_repository, maintainer_can_modify, merge_state_status, can_update_branch, bypass_eligible, head_url, head_ref, head_pushable } # head_pushable is set in step 2 after provisioning (reference/assessment.md); merge_state_status is `BLOCKED`, `BEHIND`, `UNKNOWN`, `unreadable` (null), or any other GitHub value (`CLEAN`, `UNSTABLE`, `HAS_HOOKS`, `DIRTY`) and is written only from a `gh pr view` invocation that names `mergeStateStatus` (this call, the step-2 re-read, the step-2b re-gather (`reference/sync.md`), the pre-menu refresh before and after the single watch, compare-and-swap), never from an ad hoc GraphQL query or `gh pr list`, and never from a reply carrying `errors`; any field that cannot be read is the literal `unreadable`; menu availability derives from this block (reference/
|
|
104
|
+
- permissions: { viewer_permission, is_cross_repository, maintainer_can_modify, merge_state_status, can_update_branch, bypass_eligible, head_url, head_ref, head_pushable } # head_pushable is set in step 2 after provisioning (reference/assessment.md); merge_state_status is `BLOCKED`, `BEHIND`, `UNKNOWN`, `unreadable` (null), or any other GitHub value (`CLEAN`, `UNSTABLE`, `HAS_HOOKS`, `DIRTY`) and is written only from a `gh pr view` invocation that names `mergeStateStatus` (this call, the step-2 re-read, the step-2b re-gather (`reference/sync.md`), the pre-menu refresh before and after the single watch, compare-and-swap), never from an ad hoc GraphQL query or `gh pr list`, and never from a reply carrying `errors`; any field that cannot be read is the literal `unreadable`; menu availability derives from this block (reference/menus.md row tables)
|
|
105
105
|
- status_checks: [ { name, kind, status, conclusion, required, url, workflowName } ] # kind: check_run | status_context | unreadable, from the rollup entry's __typename; evidence semantics: Section B Evidence resolution; workflowName from the CheckRun rollup entry (absent on StatusContext)
|
|
106
106
|
- actions_runs: [ { databaseId, status, conclusion, workflowName, url } ] # from the fixed gh run list call on the assessed head
|
|
107
107
|
- comments: { inline[ { id, updated_at, user_type, body, ... } ], top_level[ { id, updated_at, user_type, body, ... } ], review_threads[]? } # retain REST body for source-review deltas; C# identity diffs on id/updated_at, Section C gates placeholder detection on user_type
|
|
@@ -195,7 +195,7 @@ Row precedence is top-down: the first matching row wins. The Fix wave row is an
|
|
|
195
195
|
|---|---|---|---|
|
|
196
196
|
| Opt-out | `local verification: always` in `## PR gate` | Run local command unconditionally; a Failed-CI block below still applies independently | Local; `local run: local verification: always` |
|
|
197
197
|
| Failed CI | Any blocking conclusion in the resolved set | Blocks: mints a `P#` (any resolved-set failure, required or not) and names the check in the evidence block; route the P# to the delivery wave under a set course, otherwise render initial; obstacle exits use `reference/menus.md`. A green local run never overrides it. Only the human `ci-infrastructure-broken` disposition - a pick, never a trigger - runs the fallback local run; merge stays withheld until that run is green | The disposition; plus the fallback run's result when the disposition triggered one |
|
|
198
|
-
| Held run | an `action_required` rollup CheckRun whose run matches an `actions_runs` entry, or an `actions_runs` entry with `action_required` and no rollup entry (a rollup CheckRun matches the `actions_runs` entry whose `databaseId` equals the run id parsed from the CheckRun's `detailsUrl`) | Pending: render `approve workflow run` when available - `viewer_permission` in `WRITE`/`MAINTAIN`/`ADMIN`, the rule `reference/
|
|
198
|
+
| Held run | an `action_required` rollup CheckRun whose run matches an `actions_runs` entry, or an `actions_runs` entry with `action_required` and no rollup entry (a rollup CheckRun matches the `actions_runs` entry whose `databaseId` equals the run id parsed from the CheckRun's `detailsUrl`) | Pending: render `approve workflow run` when available - `viewer_permission` in `WRITE`/`MAINTAIN`/`ADMIN`, the rule `reference/menus.md` `## action` owns; when the row is not available, or it was picked and the API returned 403 or 404, run the local command at once; the fresh Section B helper receives the resolved row `held run not approvable` in its task; an approved run that completes is re-resolved per `reference/fix-wave.md` `## Evidence after push`, which dispatches the claim-check-only helper | `local run: held run not approvable` when it fired, else n/a (waiting) |
|
|
199
199
|
| Pending | >=1 **binding** pending check, no blocking conclusion | record pending evidence; run a bounded watch only at delivery step 4 through `reference/post-selection-loop.md` `### Wait course`; never a local run, never an evidence-less merge; when a later re-resolve moves this head to CI-sufficient, the orchestrator dispatches a fresh Section B helper in claim-check-only mode (no local run) so every material claim gets a disposition | n/a (waiting) |
|
|
200
200
|
| CI-sufficient | >=1 `success`, zero blocking, zero binding pending | Skip local run | CI claim: check name(s), conclusion, assessed SHA, run URL |
|
|
201
201
|
| Fallback | No conclusive check: no checks on the assessed head, or only inert / fail-safe conclusions or only not-binding pending checks | Run local command (protocol below) | Local command + `log_path`; `local run: no conclusive check` |
|
|
@@ -316,7 +316,7 @@ its `[View job run](<url>)` link; the result decides the row's state:
|
|
|
316
316
|
| Bot-authored body whose first line starts with `**Claude encountered an error` (the producer's failure header) | `reviewer failed (error)` | no |
|
|
317
317
|
| run completed `success` while the prefix persists | `pending` until the body changes or one bounded delivery watch deadline expires, then `reviewer failed (stale placeholder)` | yes, then no |
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
Render a `pending` row through `reference/report.md`'s waits rule; keep `reviewer failed` rows replyless and unlabeled under `show evidence` only. A failed reviewer is information,
|
|
320
320
|
never a withhold.
|
|
321
321
|
|
|
322
322
|
**Reviewer run on the new head.** The placeholder is written from inside the
|
|
@@ -330,8 +330,8 @@ finished or error body), record that run's `workflowName` (from
|
|
|
330
330
|
`gh run view`) as the reviewer workflow for this run of the gate;
|
|
331
331
|
after every head move,
|
|
332
332
|
`gh run list -w <workflowName> -c <headRefOid>` names the reviewer run on the
|
|
333
|
-
new head.
|
|
334
|
-
|
|
333
|
+
new head. Render a run with `status != completed` through `reference/report.md`'s waits rule;
|
|
334
|
+
withhold pre-composed merge exactly like a `pending` row (delivery step 4 watches it).
|
|
335
335
|
No such comment -> no reviewer workflow known -> no window check;
|
|
336
336
|
`show evidence` says `reviewer workflow: unknown`.
|
|
337
337
|
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# gatekeep-pr: step 6 - menu
|
|
2
|
-
|
|
3
|
-
Read from SKILL.md step 6 with `menus.md`. Execute through `post-selection-loop.md` `### Next action`; recommendations confer no authority.
|
|
4
|
-
|
|
5
|
-
## Verbs
|
|
6
|
-
|
|
7
|
-
Read and apply [menu-layout](../../brainstorming/reference/menu-layout.md) before presenting rows and before numeric lookup. Render `<n>. <verb> - <consequence>` using the selected `menus.md` template. Keep `show evidence` hint-only and queued wait solely in the merge queued template.
|
|
8
|
-
|
|
9
|
-
- `assess` - post the current open Blockers with locators as one head-pinned review through `post-selection-loop.md` `### Fix wave`; with zero blockers post nothing, then render assess terminal. Perform no repair or sync. Keep C# thread replies behind reply.
|
|
10
|
-
- `deliver` - run the persistent delivery course through readiness, obstacle, or cap; at an obstacle continue under the cumulative accounting rules in `fix-wave.md` `## Wave`.
|
|
11
|
-
- `deliver with nits` - store deliver-nits and include every current and subsequently minted nit in delivery.
|
|
12
|
-
- `fix nits` - authorize exactly one delivery iteration without changing course; initialize missing accounting from `fix-wave.md` `## Wave` before work.
|
|
13
|
-
- `accept contract change` - invoke the proposal's owning amendment through `### Contract decision`; update the baseline only after completion.
|
|
14
|
-
- `preserve contract` - keep the baseline and independent blockers; resume scope-preserving course work without the rejected payload on that re-run.
|
|
15
|
-
- `approve` - approve someone else's non-draft PR with zero blockers; persist approved_head only after success.
|
|
16
|
-
- `approve workflow run` - execute `gh api --method POST repos/<base-owner>/<base-repo>/actions/runs/<id>/approve`, then refresh and watch under the course.
|
|
17
|
-
- `merge` - execute `gh pr merge --match-head-commit <assessed-sha>` with the resolved policy flag and all merge preconditions; append `--admin` only on the bypass path defined in `post-selection-loop.md` `### Merge course`; never infer approval from a setting.
|
|
18
|
-
- `reply` - post drafted replyable C# replies; exact `reply <n>` selects one.
|
|
19
|
-
- `post coverage to ticket` - post the rendered AC coverage block through the resolved tracker verb; renders only under the `own merge` template with issue and rows.
|
|
20
|
-
- `post coverage to PR` - post the same block with `gh pr comment <N> --body-file`; renders only under the `own merge` template.
|
|
21
|
-
- `cleanup` - run `cleanup.md` behind a terminal pick; name each resolved cleanup override command in the consequence, or say "tear down the gate's checkout and local branch (untracked files there are deleted)" with no override.
|
|
22
|
-
- `stop` - run `### Teardown`; delegate non-final stop to `cleanup.md` `## Non-final stop`, keeping terminal behavior distinct.
|
|
23
|
-
|
|
24
|
-
## Availability
|
|
25
|
-
|
|
26
|
-
Derive availability from the digest's permissions; `unreadable` fails closed. Omit unavailable rows and name concrete reasons in `Not offered:`; never render an unavailable row with a suffix.
|
|
27
|
-
|
|
28
|
-
| Row | Available when |
|
|
29
|
-
|---|---|
|
|
30
|
-
| `assess` | initial or obstacle course selection |
|
|
31
|
-
| `deliver`, `deliver with nits` | helpers exist, maxFixRounds is positive, head_pushable is true; deliver with nits additionally needs nits; use the template's continuation rules at an obstacle |
|
|
32
|
-
| `fix nits` | final template, nits remain outside the course, helpers and head_pushable true, accounting permits one iteration |
|
|
33
|
-
| `accept contract change`, `preserve contract` | pending recorded contract exception |
|
|
34
|
-
| `merge` | non-draft, viewer_permission `WRITE`, `MAINTAIN`, or `ADMIN`, all `### Merge preconditions` hold |
|
|
35
|
-
| `approve` | viewer.is_author false, zero blockers, non-draft |
|
|
36
|
-
| `approve workflow run` | held run on assessed head and viewer_permission `WRITE`, `MAINTAIN`, or `ADMIN` |
|
|
37
|
-
| `reply` | drafted reply exists and source review complete |
|
|
38
|
-
| `cleanup` | terminal template and cleanup_done false |
|
|
39
|
-
| `post coverage to ticket`, `post coverage to PR` | own merge template, not previously successful; ticket also needs issue and rows |
|
|
40
|
-
| `stop` | every template |
|
|
41
|
-
|
|
42
|
-
## Withhold reason resolver
|
|
43
|
-
|
|
44
|
-
Resolve every actual unmet `### Merge preconditions` reason through `post-selection-loop.md` `### Exit check`. Keep repairable gaps in the course, not a false readiness caused by missing WRITE permission. Render one concrete reason and locator rather than spinning.
|
|
45
|
-
|
|
46
|
-
| Observation | Render |
|
|
47
|
-
|---|---|
|
|
48
|
-
| BLOCKED with no eligible bypass and no local repair | Use findings.md `## Dispositions` for the actor-framed PR-comments line and obstacle verdict; render obstacle even with course unset, plus `Not offered: merge (blocked by GitHub)`; never attribute a named rule |
|
|
49
|
-
| UNKNOWN/unreadable after one re-poll | `stuck - merge state unknown`; `Not offered: merge (merge state unknown)` |
|
|
50
|
-
| binding pending check | name the check under PR comments, `Not offered: merge (<check name> pending)`; watch only at delivery step 4 |
|
|
51
|
-
| draft | `Not offered: merge (draft)` |
|
|
52
|
-
| below WRITE | `Not offered: merge (needs WRITE on <owner>/<repo>)` |
|
|
53
|
-
| other failed prerequisite | name its actual missing evidence/input or unsafe-state obstacle from Exit check |
|