open-pstack 0.9.175 → 0.9.176
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/NOTICE.md +4 -4
- package/package.json +1 -1
- package/plugin/.antigravity-plugin/plugin.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/.grok-plugin/plugin.json +1 -1
- package/plugin/.muse-plugin/plugin.json +1 -1
- package/plugin/hooks/agy-context.awk +12 -7
- package/plugin/hooks/session-start-agy-ignored.md +1 -0
- package/plugin/hooks/session-start.ps1 +23 -1
- package/plugin/hooks/session-start.sh +27 -5
- package/plugin/package.json +1 -1
- package/plugin/skills/poteto-mode/references/agy-tools.md +2 -2
- package/plugin/skills/poteto-mode/references/vibe-tools.md +1 -1
- package/plugin/skills/poteto-mode/scripts/watch-pr/check-suites.ts +78 -1
- package/plugin/skills/poteto-mode/scripts/watch-pr/github.port.test.ts +253 -1
- package/plugin/skills/poteto-mode/scripts/watch-pr/github.ts +21 -2
- package/plugin/skills/poteto-mode/scripts/watch-pr/transport.test.ts +5 -0
- package/plugin/vibe/ai.mistral.vibe/hooks.toml +12 -1
- package/plugin/vibe/plugin.json +1 -1
package/NOTICE.md
CHANGED
|
@@ -29,7 +29,7 @@ This plugin is a port of upstream MIT-licensed work. The port's modifications an
|
|
|
29
29
|
|
|
30
30
|
## What changed in the port
|
|
31
31
|
|
|
32
|
-
The port is editorial, not mechanical. [CHANGES.md](CHANGES.md) records each release's changes, and [`tools/substitutions.json`](tools/substitutions.json) lists the token rewrites with the reason for each.
|
|
32
|
+
The port is editorial, not mechanical. [CHANGES.md](https://github.com/michael-denyer/pstack-claude/blob/v0.9.176/CHANGES.md) records each release's changes, and [`tools/substitutions.json`](https://github.com/michael-denyer/pstack-claude/blob/v0.9.176/tools/substitutions.json) lists the token rewrites with the reason for each.
|
|
33
33
|
|
|
34
34
|
Summary of structural changes:
|
|
35
35
|
|
|
@@ -38,13 +38,13 @@ Summary of structural changes:
|
|
|
38
38
|
- Six skills imported from `cursor-team-kit`: `deslop`, `make-pr-easy-to-review`, `fix-ci`, `fix-merge-conflicts`, `get-pr-comments`, `what-did-i-get-done`. Five are copied verbatim with no rewiring needed. `deslop` is a policy fork that `tools/forks.json` declares.
|
|
39
39
|
- Three skills and two agents imported from `thermos`: `thermos`, `thermo-nuclear-review`, `thermo-nuclear-code-quality-review`, `thermo-nuclear-review-subagent`, and `thermo-nuclear-code-quality-review-subagent`. The skills' `subagent_type` values take the `pstack:` namespace, and the agents' parent-orchestration notes name Claude Code's tools; `tools/substitutions.json` lists each rewrite.
|
|
40
40
|
- `plugins/pstack/skills/babysit/` is independently authored as the Claude Code analog of Cursor's `/babysit` built-in. It has no upstream pstack equivalent; its workflow is informed by Cursor's public `/babysit` behavior. No code or prose was copied from any source.
|
|
41
|
-
- `plugins/pstack/skills/poteto-mode/scripts/` is vendored from upstream (`watch-pr`, `bootstrap.ts`, `package.json`, `bun.lock`). `worktree-audit.mjs` is a port-only rewrite of upstream's `worktree-audit.sh`, which `tools/upstream.json` excludes from sync; it reads the Claude Code, Codex, and Pi transcript directories instead of Cursor's and reports prunable worktrees. The port edits upstream files here and adds files of its own, such as `watch-pr/shipping.ts`. [`tools/forks.json`](tools/forks.json) lists each edited upstream file with the reason for the edit. `bun tools/sync.mjs pstack <pinned sha> --dry-run`, with the SHA from [`tools/upstream.json`](tools/upstream.json), prints those files with their changed-line counts, then lists the port-only files. The files on neither list are upstream's code under the upstream MIT license.
|
|
41
|
+
- `plugins/pstack/skills/poteto-mode/scripts/` is vendored from upstream (`watch-pr`, `bootstrap.ts`, `package.json`, `bun.lock`). `worktree-audit.mjs` is a port-only rewrite of upstream's `worktree-audit.sh`, which `tools/upstream.json` excludes from sync; it reads the Claude Code, Codex, and Pi transcript directories instead of Cursor's and reports prunable worktrees. The port edits upstream files here and adds files of its own, such as `watch-pr/shipping.ts`. [`tools/forks.json`](https://github.com/michael-denyer/pstack-claude/blob/v0.9.176/tools/forks.json) lists each edited upstream file with the reason for the edit. `bun tools/sync.mjs pstack <pinned sha> --dry-run`, with the SHA from [`tools/upstream.json`](https://github.com/michael-denyer/pstack-claude/blob/v0.9.176/tools/upstream.json), prints those files with their changed-line counts, then lists the port-only files. The files on neither list are upstream's code under the upstream MIT license.
|
|
42
42
|
- `plugins/pstack/agents/comment-sicko.md` is upstream's `Comment Sicko` agent, renamed to `comment-sicko` so the name works as a Claude Code `subagent_type`. The body is verbatim.
|
|
43
|
-
- A Codex build shares the same `skills/` tree. It adds `plugins/pstack/.codex-plugin/plugin.json`, a root `.agents/plugins/marketplace.json`, and `plugins/pstack/skills/poteto-mode/references/codex-tools.md` (the Claude-to-Codex tool, model, built-in, and per-skill map). Affected skill entry points link to this map. See the [reference](docs/reference.md#codex).
|
|
43
|
+
- A Codex build shares the same `skills/` tree. It adds `plugins/pstack/.codex-plugin/plugin.json`, a root `.agents/plugins/marketplace.json`, and `plugins/pstack/skills/poteto-mode/references/codex-tools.md` (the Claude-to-Codex tool, model, built-in, and per-skill map). Affected skill entry points link to this map. See the [reference](https://github.com/michael-denyer/pstack-claude/blob/v0.9.176/docs/reference.md#codex).
|
|
44
44
|
|
|
45
45
|
## Modifications
|
|
46
46
|
|
|
47
|
-
Per the MIT license, modifications are permitted. Skill bodies have been edited to substitute Cursor-specific primitives with their Claude Code equivalents (the substitution rules are in [`tools/substitutions.json`](tools/substitutions.json)). All upstream copyright notices in source files (where present) are preserved.
|
|
47
|
+
Per the MIT license, modifications are permitted. Skill bodies have been edited to substitute Cursor-specific primitives with their Claude Code equivalents (the substitution rules are in [`tools/substitutions.json`](https://github.com/michael-denyer/pstack-claude/blob/v0.9.176/tools/substitutions.json)). All upstream copyright notices in source files (where present) are preserved.
|
|
48
48
|
|
|
49
49
|
Port-authored files covered by this notice include:
|
|
50
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-pstack",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.176",
|
|
4
4
|
"description": "Install pstack into the agent harnesses on this machine: Claude Code, Codex, Pi, Copilot, Muse, OMP, Kimi, Grok, MiniMax, OpenCode, Antigravity, Vibe, and the shared skills directory.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.176",
|
|
4
4
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Antigravity. Original pstack by Lauren Tan (poteto).",
|
|
5
5
|
"author": "Michael Denyer",
|
|
6
6
|
"logo": "assets/pstack-icon.png",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack",
|
|
3
3
|
"displayName": "pstack (Claude Code port)",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.176",
|
|
5
5
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Claude Code. Original pstack by Lauren Tan (poteto).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Michael Denyer",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.176",
|
|
4
4
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Codex port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/codex-tools.md. Original pstack by Lauren Tan (poteto).",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Michael Denyer",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pstack",
|
|
3
3
|
"displayName": "pstack (GitHub Copilot port)",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.176",
|
|
5
5
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to GitHub Copilot CLI and app. Original pstack by Lauren Tan (poteto).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Michael Denyer",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "pstack",
|
|
4
4
|
"displayName": "pstack (Muse port)",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.176",
|
|
6
6
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. Rigorous agent workflows you can parallelize with confidence. Muse port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/muse-tools.md. Original pstack by Lauren Tan (poteto).",
|
|
7
7
|
"compat": {
|
|
8
8
|
"source": "native",
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# Prints the Antigravity SessionStart output: one JSON object whose injectSteps
|
|
2
2
|
# systemMessage is the poteto-mode mandate for Antigravity, followed by any
|
|
3
|
-
# checked role lines from the Antigravity model sheet
|
|
4
|
-
#
|
|
5
|
-
#
|
|
3
|
+
# checked role lines from the Antigravity model sheet and the names of the
|
|
4
|
+
# roles whose line the hook ignored. Run after json.awk and setup-pstack's
|
|
5
|
+
# sheet.awk, with the sheet as input, -v found=<1 when the sheet exists>, and
|
|
6
|
+
# PSTACK_HOOKS=<this directory> in the environment.
|
|
6
7
|
# Only known role lines whose entries are Antigravity invoke_subagent Model
|
|
7
8
|
# values (inherit, flash_lite, flash, pro) or pstack aliases (inherit-parent,
|
|
8
9
|
# auto) reach the output, rebuilt from their checked values, so no other text
|
|
9
|
-
# in the sheet does.
|
|
10
|
+
# in the sheet does. invoke_subagent takes no reasoning effort, so a known
|
|
11
|
+
# effort suffix is dropped before the check. A known role whose line fails it
|
|
12
|
+
# is named from the stamped role list, never from the sheet.
|
|
10
13
|
{ sheet_add($0) }
|
|
11
14
|
|
|
12
15
|
END {
|
|
@@ -15,21 +18,23 @@ END {
|
|
|
15
18
|
n = sheet_roles(roles, panel)
|
|
16
19
|
for (i = 1; i <= SHEET_N; i++) raw[sheet_key(SHEET[i])] = sheet_value(SHEET[i])
|
|
17
20
|
role_lines = ""
|
|
21
|
+
ignored = ""
|
|
18
22
|
for (i = 1; i <= n; i++) {
|
|
19
23
|
label = roles[i]
|
|
20
24
|
if (!(label in raw)) continue
|
|
21
25
|
m = split(raw[label], E, ",")
|
|
22
|
-
|
|
23
|
-
ok = 1
|
|
26
|
+
ok = m > 0
|
|
24
27
|
rebuilt = ""
|
|
25
28
|
for (j = 1; j <= m; j++) {
|
|
26
|
-
e = sheet_trim(E[j])
|
|
29
|
+
e = sheet_model(sheet_trim(E[j]))
|
|
27
30
|
if (!agy_model(e)) { ok = 0; break }
|
|
28
31
|
rebuilt = rebuilt (j > 1 ? ", " : "") e
|
|
29
32
|
}
|
|
30
33
|
if (ok) role_lines = role_lines (role_lines == "" ? "" : "\n") label ": " rebuilt
|
|
34
|
+
else ignored = ignored "\n" label
|
|
31
35
|
}
|
|
32
36
|
if (role_lines != "") body = body "\n\n" text("session-start-agy-sheet.md") "\n" role_lines
|
|
37
|
+
if (ignored != "") body = body "\n\n" text("session-start-agy-ignored.md") ignored
|
|
33
38
|
}
|
|
34
39
|
n = split(body, L, "\n")
|
|
35
40
|
out = ""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The hook ignored the saved line for each role below, because the line holds no entry, or an entry that is not `inherit`, `inherit-parent`, `auto`, `flash_lite`, `flash`, or `pro`. Omit `Model` for these roles, and tell the user that their saved choice for each was not applied:
|
|
@@ -115,8 +115,23 @@ switch -CaseSensitive ($Runtime) {
|
|
|
115
115
|
$sheet = Join-Path $sheetRoot 'pstack-models.md'
|
|
116
116
|
$context = 'session-start-context.md'
|
|
117
117
|
}
|
|
118
|
+
'vibe' {
|
|
119
|
+
# Vibe reads VIBE_HOME as Path(value).expanduser().resolve(): a
|
|
120
|
+
# leading ~ before either separator is the user profile, and a value
|
|
121
|
+
# rooted at a drive, a share, or the current drive's root names that
|
|
122
|
+
# folder. The hook runs in the plugin root, so any other relative
|
|
123
|
+
# value would name another folder than Vibe's; ignore it, as
|
|
124
|
+
# session-start.sh does. The sheet path is joined as text, since
|
|
125
|
+
# Join-Path fails on a drive that is not mapped.
|
|
126
|
+
$vibeHome = $env:VIBE_HOME
|
|
127
|
+
$sheetRoot = if ($vibeHome -cmatch '^~(?:$|[\\/])') { $env:USERPROFILE + $vibeHome.Substring(1) }
|
|
128
|
+
elseif ($vibeHome -match '^(?:[A-Za-z]:)?[\\/]') { $vibeHome }
|
|
129
|
+
else { Join-Path $env:USERPROFILE '.vibe' }
|
|
130
|
+
$sheet = [System.IO.Path]::Combine($sheetRoot, 'pstack-models.md')
|
|
131
|
+
$context = 'session-start-context.md'
|
|
132
|
+
}
|
|
118
133
|
default {
|
|
119
|
-
[Console]::Error.WriteLine("session-start.ps1: unknown runtime '$Runtime' (expected codex, copilot, or
|
|
134
|
+
[Console]::Error.WriteLine("session-start.ps1: unknown runtime '$Runtime' (expected codex, copilot, muse, or vibe)")
|
|
120
135
|
exit 2
|
|
121
136
|
}
|
|
122
137
|
}
|
|
@@ -165,5 +180,12 @@ if ($Runtime -ceq 'copilot') {
|
|
|
165
180
|
if ($close -ge 0) { $output = $output.Substring(0, $close) + "`n" + $notes + "`n" + $output.Substring($close) } else { $output += "`n" + $notes }
|
|
166
181
|
$output = (ConvertTo-Json -InputObject @{ additionalContext = $output + "`n" } -Compress) + "`n"
|
|
167
182
|
}
|
|
183
|
+
# Vibe reads one JSON object and adds hook_specific_output.additional_context
|
|
184
|
+
# to the session's next user message: the mandate without its final newline,
|
|
185
|
+
# as vibe-context.awk joins its lines.
|
|
186
|
+
if ($Runtime -ceq 'vibe') {
|
|
187
|
+
$text = AsText $output
|
|
188
|
+
$output = (ConvertTo-Json -InputObject @{ hook_specific_output = @{ additional_context = $text } } -Compress) + "`n"
|
|
189
|
+
}
|
|
168
190
|
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
|
|
169
191
|
[Console]::Write($output)
|
|
@@ -57,11 +57,33 @@ case "$runtime" in
|
|
|
57
57
|
: "${PLUGIN_ROOT:=$(CDPATH='' cd -- "$(dirname -- "$0")/.." && pwd)}"
|
|
58
58
|
# Vibe reads $VIBE_HOME when it is set and expands a leading ~. The hook
|
|
59
59
|
# runs in the plugin root, so any other relative value would name another
|
|
60
|
-
# directory than Vibe's; ignore it. Under Git Bash on Windows
|
|
61
|
-
#
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
# directory than Vibe's; ignore it. Under Git Bash on Windows the block
|
|
61
|
+
# below first turns each form Vibe reads into a drive-letter, `//` or `~/`
|
|
62
|
+
# value.
|
|
63
|
+
vibe_home=${VIBE_HOME:-}
|
|
64
|
+
# On Windows a backslash separates folders, so `~\vibe` is the `~/` form
|
|
65
|
+
# and `\\server\share\vibe` the `//` form. One leading separator names a
|
|
66
|
+
# folder on the current drive, as Vibe reads it, but Git's sh would read
|
|
67
|
+
# `/vibe` under Git's own root, so the drive goes in front.
|
|
68
|
+
case "$(uname -s 2>/dev/null || true)" in
|
|
69
|
+
MINGW* | MSYS* | CYGWIN*)
|
|
70
|
+
vibe_home=$(printf '%s' "$vibe_home" | tr '\134' /)
|
|
71
|
+
case "$vibe_home" in
|
|
72
|
+
//*) ;;
|
|
73
|
+
/*)
|
|
74
|
+
drive=$(cygpath -am . 2>/dev/null) || drive=
|
|
75
|
+
drive=${drive%%/*}
|
|
76
|
+
case "$drive" in
|
|
77
|
+
[A-Za-z]:) vibe_home=$drive$vibe_home ;;
|
|
78
|
+
*) vibe_home= ;;
|
|
79
|
+
esac
|
|
80
|
+
;;
|
|
81
|
+
esac
|
|
82
|
+
;;
|
|
83
|
+
esac
|
|
84
|
+
case "$vibe_home" in
|
|
85
|
+
/* | [A-Za-z]:[\\/]*) sheet="$vibe_home/pstack-models.md" ;;
|
|
86
|
+
"~" | "~"/*) sheet="$HOME${vibe_home#?}/pstack-models.md" ;;
|
|
65
87
|
*) sheet="$HOME/.vibe/pstack-models.md" ;;
|
|
66
88
|
esac
|
|
67
89
|
reader="${PLUGIN_ROOT}/skills/setup-pstack/scripts/read-sheet.sh"
|
package/plugin/package.json
CHANGED
|
@@ -41,7 +41,7 @@ poteto-mode's Subagents section sets Claude-specific defaults (`subagent_type: "
|
|
|
41
41
|
|
|
42
42
|
Skills name Claude Code model aliases in their Models sections. Those aliases do not resolve on Antigravity (`agy`). Antigravity's `invoke_subagent` `Model` parameter accepts only the tier values `inherit` (the default, which uses the parent session's active model), `flash_lite`, `flash`, and `pro`. It does not accept specific models such as Gemini 4 Argon, Carbon, or Neon, nor other model families. Passing `pro`, `flash`, or `flash_lite` routes subagents to fixed tier models instead of the parent session's active model.
|
|
43
43
|
|
|
44
|
-
- The model sheet is `~/.gemini/config/pstack-models.md`. It sits behind Antigravity's system protection boundary, so outside `/setup-pstack`, do not read or write it directly from agent tools. The plugin's `SessionStart` hook reads it and appends any valid role lines to the session context as the user's saved pstack model choices. Take role overrides from
|
|
44
|
+
- The model sheet is `~/.gemini/config/pstack-models.md`. It sits behind Antigravity's system protection boundary, so outside `/setup-pstack`, do not read or write it directly from agent tools. The plugin's `SessionStart` hook reads it and appends any valid role lines to the session context as the user's saved pstack model choices, without a reasoning effort, which `invoke_subagent` does not take. Take role overrides from those lines (or from `AGENTS.md` / `GEMINI.md` when pasted there). After them the hook names each role whose saved line it ignored. Omit `Model` for those roles.
|
|
45
45
|
- When no saved role override is present for a role-model skill (`arena`, `interrogate`, `no-comments`, `poteto-mode`, `swarm`, `thermos`), omit `Model` (equivalent to `inherit`) so subagents run on the parent session's active model. Do not run `setup-pstack` just because no sheet is injected, and do not pass `pro`, `flash`, or `flash_lite` unless a saved role line or the user explicitly asks for that tier.
|
|
46
46
|
- Pass a saved role's tier as `Model` on `invoke_subagent`. For `inherit`, `inherit-parent`, or `auto`, omit `Model`.
|
|
47
47
|
- Roles that default to the worker model (`feature, refactoring`) or strongest model (`strongest judgment`): omit `Model` (`inherit`) unless the user configured an explicit tier override.
|
|
@@ -51,7 +51,7 @@ Skills name Claude Code model aliases in their Models sections. Those aliases do
|
|
|
51
51
|
|
|
52
52
|
## Session routing hook
|
|
53
53
|
|
|
54
|
-
Antigravity runs the plugin's `SessionStart` hook when a new session starts. The hook outputs an `injectSteps` `systemMessage` JSON payload containing the Antigravity routing mandate
|
|
54
|
+
Antigravity runs the plugin's `SessionStart` hook when a new session starts. The hook outputs an `injectSteps` `systemMessage` JSON payload containing the Antigravity routing mandate, any valid saved role lines from `~/.gemini/config/pstack-models.md` (rebuilt from checked values so the agent never needs to read that protected file), and the names of any roles whose line it ignored, unless `~/.gemini/config/pstack-models.md` contains `session hook: off`.
|
|
55
55
|
|
|
56
56
|
## Driver and bundled skills pstack references
|
|
57
57
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vibe mapping
|
|
2
2
|
|
|
3
|
-
Vibe loads pstack as a native plugin. Its manifest registers each skill as `pstack:<name>`, so `poteto-mode` is invoked as `pstack:poteto-mode` with the `skill` tool, and it declares a `session_start` hook that adds the poteto-mode mandate to the session's next user message. The four bundled agents load as subagent configurations under their `pstack:` names. Vibe's native format needs the manifest at the plugin root, so the installer copies the build's manifest and its `ai.mistral.vibe` directory there after the shared tree.
|
|
3
|
+
Vibe loads pstack as a native plugin. Its manifest registers each skill as `pstack:<name>`, so `poteto-mode` is invoked as `pstack:poteto-mode` with the `skill` tool, and it declares a `session_start` hook that adds the poteto-mode mandate to the session's next user message. On native Windows the hook runs in the session's shell, as Vibe 3.2 picks it: Git Bash runs `session-start.sh`, and PowerShell, which Vibe uses when it finds no Git Bash, runs `session-start.ps1`. The four bundled agents load as subagent configurations under their `pstack:` names. Vibe's native format needs the manifest at the plugin root, so the installer copies the build's manifest and its `ai.mistral.vibe` directory there after the shared tree.
|
|
4
4
|
|
|
5
5
|
## Tool actions
|
|
6
6
|
|
|
@@ -20,11 +20,71 @@ export interface SuiteCheckEntry {
|
|
|
20
20
|
readonly check: SuiteCheck;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface RunningActionsSuite {
|
|
24
|
+
readonly id: number;
|
|
25
|
+
readonly status: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
export interface ParsedSuiteRead {
|
|
24
29
|
readonly entries: readonly SuiteCheckEntry[];
|
|
25
30
|
readonly queuedWithoutRuns: readonly SuiteApp[];
|
|
26
31
|
readonly actionsSuites: ReadonlyMap<number, ActionsSuiteEvidence>;
|
|
27
32
|
readonly startupFailureSuites: readonly StartupFailureSuite[];
|
|
33
|
+
/** Unfinished Actions suites with runs beside reported checks. */
|
|
34
|
+
readonly runningActionsSuites: readonly RunningActionsSuite[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Between two jobs of a workflow run, gh can list only passed jobs while the
|
|
38
|
+
// run's suite is unfinished. The next job was created at most 11 s after the
|
|
39
|
+
// job it waited on finished, over 158 such jobs on grafana, n8n and pytorch
|
|
40
|
+
// (2026-12-04). GitHub can also
|
|
41
|
+
// leave a suite unfinished long after its last run: on 8 such suites the
|
|
42
|
+
// newest run had finished 6 to 116 days before.
|
|
43
|
+
export const BETWEEN_JOBS_MS = 120_000;
|
|
44
|
+
|
|
45
|
+
// A suite with a finished run is between two jobs, and still pending, while
|
|
46
|
+
// its newest finish or the start of a run still going falls within
|
|
47
|
+
// BETWEEN_JOBS_MS. A queued run gets started_at when it is created. A suite
|
|
48
|
+
// with no finished run, such as Copilot's code review, which gh does not
|
|
49
|
+
// list, is left to the reported checks. now is the local clock against
|
|
50
|
+
// GitHub's timestamps: a clock fast by more than BETWEEN_JOBS_MS reads every
|
|
51
|
+
// such suite clean, and a slow one holds a stuck suite pending that much longer.
|
|
52
|
+
export function betweenJobsCheck(
|
|
53
|
+
suite: RunningActionsSuite,
|
|
54
|
+
pages: unknown,
|
|
55
|
+
now: number
|
|
56
|
+
): SuiteCheck | null {
|
|
57
|
+
if (!Array.isArray(pages)) missing("check run pages", pages);
|
|
58
|
+
let finished = false;
|
|
59
|
+
let newest = -Infinity;
|
|
60
|
+
for (const page of pages) {
|
|
61
|
+
if (!isRecord(page) || !Array.isArray(page.check_runs))
|
|
62
|
+
missing("check_runs", page);
|
|
63
|
+
for (const run of page.check_runs) {
|
|
64
|
+
if (!isRecord(run)) missing("check run", run);
|
|
65
|
+
const done =
|
|
66
|
+
text(run.status, "check run.status").toLowerCase() === "completed";
|
|
67
|
+
finished ||= done;
|
|
68
|
+
const field = done ? "completed_at" : "started_at";
|
|
69
|
+
const at = text(
|
|
70
|
+
run[field],
|
|
71
|
+
`check run.${field} of ${done ? "a completed" : "an unfinished"} run`
|
|
72
|
+
);
|
|
73
|
+
const time = Date.parse(at);
|
|
74
|
+
if (!Number.isFinite(time)) missing(`check run.${field}`, at);
|
|
75
|
+
newest = Math.max(newest, time);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (!finished || now - newest > BETWEEN_JOBS_MS) return null;
|
|
79
|
+
return {
|
|
80
|
+
kind: "pending",
|
|
81
|
+
source: "check-suites",
|
|
82
|
+
name: "GitHub Actions check suite",
|
|
83
|
+
reportedState: suite.status.toUpperCase(),
|
|
84
|
+
description: "has not finished",
|
|
85
|
+
link: "",
|
|
86
|
+
workflow: "",
|
|
87
|
+
};
|
|
28
88
|
}
|
|
29
89
|
|
|
30
90
|
function positiveInteger(value: unknown): number | null {
|
|
@@ -105,6 +165,7 @@ export function parseSuiteRead(
|
|
|
105
165
|
const queuedWithoutRuns: SuiteApp[] = [];
|
|
106
166
|
const actionsSuites = new Map<number, ActionsSuiteEvidence>();
|
|
107
167
|
const startupFailureSuites: StartupFailureSuite[] = [];
|
|
168
|
+
const runningActionsSuites: RunningActionsSuite[] = [];
|
|
108
169
|
for (const page of pages) {
|
|
109
170
|
if (!isRecord(page)) missing("check_suites", page);
|
|
110
171
|
if (!("check_suites" in page)) missing("check_suites");
|
|
@@ -145,6 +206,16 @@ export function parseSuiteRead(
|
|
|
145
206
|
? value.conclusion.toLowerCase()
|
|
146
207
|
: null,
|
|
147
208
|
});
|
|
209
|
+
if (
|
|
210
|
+
isActions &&
|
|
211
|
+
suiteId !== null &&
|
|
212
|
+
typeof value.status === "string" &&
|
|
213
|
+
value.status.toLowerCase() !== "completed"
|
|
214
|
+
)
|
|
215
|
+
runningActionsSuites.push({
|
|
216
|
+
id: suiteId,
|
|
217
|
+
status: value.status.toLowerCase(),
|
|
218
|
+
});
|
|
148
219
|
continue;
|
|
149
220
|
}
|
|
150
221
|
}
|
|
@@ -183,7 +254,13 @@ export function parseSuiteRead(
|
|
|
183
254
|
else if (check !== null) entries.push({ suiteId, check });
|
|
184
255
|
}
|
|
185
256
|
}
|
|
186
|
-
return {
|
|
257
|
+
return {
|
|
258
|
+
entries,
|
|
259
|
+
queuedWithoutRuns,
|
|
260
|
+
actionsSuites,
|
|
261
|
+
startupFailureSuites,
|
|
262
|
+
runningActionsSuites,
|
|
263
|
+
};
|
|
187
264
|
}
|
|
188
265
|
|
|
189
266
|
export function unsettledSuiteChecks(
|
|
@@ -3,7 +3,11 @@ import { spawnSync } from "node:child_process";
|
|
|
3
3
|
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
5
|
import { join } from "node:path";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
BETWEEN_JOBS_MS,
|
|
8
|
+
betweenJobsCheck,
|
|
9
|
+
parseSuiteRead,
|
|
10
|
+
} from "./check-suites.ts";
|
|
7
11
|
import { WatchDeadline } from "./deadline.ts";
|
|
8
12
|
import {
|
|
9
13
|
ChecksUnavailable,
|
|
@@ -269,6 +273,51 @@ describe("check suites no check read shows", () => {
|
|
|
269
273
|
expect(reported(fields)).toEqual([]);
|
|
270
274
|
});
|
|
271
275
|
|
|
276
|
+
it("beside reported checks, lists an unfinished Actions suite with runs for its check runs to decide", () => {
|
|
277
|
+
const running = (fields: Record<string, unknown>) =>
|
|
278
|
+
parseSuiteRead(pages(suite({ id: 7, ...fields })), head, "reported")
|
|
279
|
+
.runningActionsSuites;
|
|
280
|
+
expect(
|
|
281
|
+
running({
|
|
282
|
+
status: "in_progress",
|
|
283
|
+
conclusion: null,
|
|
284
|
+
latest_check_runs_count: 2,
|
|
285
|
+
})
|
|
286
|
+
).toEqual([{ id: 7, status: "in_progress" }]);
|
|
287
|
+
expect(
|
|
288
|
+
running({
|
|
289
|
+
status: "QUEUED",
|
|
290
|
+
conclusion: null,
|
|
291
|
+
latest_check_runs_count: 1,
|
|
292
|
+
})
|
|
293
|
+
).toEqual([{ id: 7, status: "queued" }]);
|
|
294
|
+
for (const fields of [
|
|
295
|
+
{ conclusion: "success", latest_check_runs_count: 2 },
|
|
296
|
+
{ status: "in_progress", conclusion: null },
|
|
297
|
+
{ status: null, conclusion: null, latest_check_runs_count: 1 },
|
|
298
|
+
{
|
|
299
|
+
status: "in_progress",
|
|
300
|
+
conclusion: null,
|
|
301
|
+
latest_check_runs_count: 1,
|
|
302
|
+
app: { slug: "external-ci", name: "External CI" },
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
status: "in_progress",
|
|
306
|
+
conclusion: null,
|
|
307
|
+
latest_check_runs_count: 1,
|
|
308
|
+
id: null,
|
|
309
|
+
},
|
|
310
|
+
])
|
|
311
|
+
expect(running(fields)).toEqual([]);
|
|
312
|
+
expect(
|
|
313
|
+
parseSuiteRead(
|
|
314
|
+
pages(suite({ id: 7, status: "in_progress", conclusion: null })),
|
|
315
|
+
head,
|
|
316
|
+
"no-checks"
|
|
317
|
+
).runningActionsSuites
|
|
318
|
+
).toEqual([]);
|
|
319
|
+
});
|
|
320
|
+
|
|
272
321
|
it("finds a gated suite on a later page", () => {
|
|
273
322
|
const twoPages = [
|
|
274
323
|
...pages(suite({ conclusion: "success" })),
|
|
@@ -349,6 +398,209 @@ describe("check suites no check read shows", () => {
|
|
|
349
398
|
});
|
|
350
399
|
});
|
|
351
400
|
|
|
401
|
+
describe("a workflow run between two of its jobs", () => {
|
|
402
|
+
const now = Date.parse("2026-12-04T03:00:00Z");
|
|
403
|
+
const ago = (seconds: number) => new Date(now - seconds * 1000).toISOString();
|
|
404
|
+
const runPages = (...runs: Record<string, unknown>[]) => [
|
|
405
|
+
{ total_count: runs.length, check_runs: runs },
|
|
406
|
+
];
|
|
407
|
+
const done = (seconds: number) => ({
|
|
408
|
+
status: "completed",
|
|
409
|
+
conclusion: "success",
|
|
410
|
+
completed_at: ago(seconds),
|
|
411
|
+
});
|
|
412
|
+
const running = { id: 9333, status: "in_progress" };
|
|
413
|
+
|
|
414
|
+
it("keeps a suite pending while its newest run finished within the window", () => {
|
|
415
|
+
expect(
|
|
416
|
+
betweenJobsCheck(running, runPages(done(400), done(5)), now)
|
|
417
|
+
).toEqual({
|
|
418
|
+
kind: "pending",
|
|
419
|
+
source: "check-suites",
|
|
420
|
+
name: "GitHub Actions check suite",
|
|
421
|
+
reportedState: "IN_PROGRESS",
|
|
422
|
+
description: "has not finished",
|
|
423
|
+
link: "",
|
|
424
|
+
workflow: "",
|
|
425
|
+
});
|
|
426
|
+
expect(
|
|
427
|
+
betweenJobsCheck(running, runPages(done(BETWEEN_JOBS_MS / 1000)), now)
|
|
428
|
+
).toMatchObject({ kind: "pending" });
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
// GitHub can leave a suite unfinished for weeks after its last run, as on
|
|
432
|
+
// grafana/grafana suite 107822784940.
|
|
433
|
+
it("reads no check from a suite whose runs all finished long ago", () => {
|
|
434
|
+
expect(
|
|
435
|
+
betweenJobsCheck(running, runPages(done(BETWEEN_JOBS_MS / 1000 + 1)), now)
|
|
436
|
+
).toBeNull();
|
|
437
|
+
expect(
|
|
438
|
+
betweenJobsCheck(running, runPages(done(30 * 24 * 3600)), now)
|
|
439
|
+
).toBeNull();
|
|
440
|
+
expect(betweenJobsCheck(running, runPages(), now)).toBeNull();
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
const started = (status: string, seconds: number) => ({
|
|
444
|
+
status,
|
|
445
|
+
completed_at: null,
|
|
446
|
+
started_at: ago(seconds),
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
// In #634's race the next job is often created between the gh pr checks
|
|
450
|
+
// read and the check-runs read.
|
|
451
|
+
it("keeps a suite pending while its next job has just been created", () => {
|
|
452
|
+
for (const status of ["queued", "in_progress", "QUEUED"])
|
|
453
|
+
expect(
|
|
454
|
+
betweenJobsCheck(running, runPages(done(5), started(status, 1)), now)
|
|
455
|
+
).toMatchObject({ kind: "pending" });
|
|
456
|
+
expect(
|
|
457
|
+
betweenJobsCheck(running, runPages(done(4000), started("queued", 1)), now)
|
|
458
|
+
).toMatchObject({ kind: "pending" });
|
|
459
|
+
expect(
|
|
460
|
+
betweenJobsCheck(
|
|
461
|
+
running,
|
|
462
|
+
runPages(done(4000), started("in_progress", 4000)),
|
|
463
|
+
now
|
|
464
|
+
)
|
|
465
|
+
).toBeNull();
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
// gh does not list Copilot's code review, whose suite holds one run.
|
|
469
|
+
it("reads no check from a suite with no finished run", () => {
|
|
470
|
+
expect(
|
|
471
|
+
betweenJobsCheck(running, runPages(started("in_progress", 1)), now)
|
|
472
|
+
).toBeNull();
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
it("fails closed on a check run it cannot date", () => {
|
|
476
|
+
for (const run of [
|
|
477
|
+
{ status: null },
|
|
478
|
+
{ status: "completed", completed_at: null },
|
|
479
|
+
{ status: "completed", completed_at: "yesterday" },
|
|
480
|
+
{ status: "queued", started_at: null },
|
|
481
|
+
{ status: "in_progress", started_at: "soon" },
|
|
482
|
+
])
|
|
483
|
+
expect(() => betweenJobsCheck(running, runPages(run), now)).toThrow(
|
|
484
|
+
/check run/
|
|
485
|
+
);
|
|
486
|
+
expect(() => betweenJobsCheck(running, [{}], now)).toThrow(/check_runs/);
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
// The stand-in from #634: gh lists a passed job from finished run 332 and a
|
|
490
|
+
// passed job from run 333, whose suite is still going. Each key of
|
|
491
|
+
// suiteRuns adds an in_progress suite with runs, whose check-runs read
|
|
492
|
+
// returns those pages, or fails when they are null.
|
|
493
|
+
const readHead = (suiteRuns: Record<number, unknown>) => {
|
|
494
|
+
const directory = mkdtempSync(join(tmpdir(), "watch-pr-between-jobs-"));
|
|
495
|
+
try {
|
|
496
|
+
const head = "a66c327af02be3cd643c1f0a163ee00967fbc6c0";
|
|
497
|
+
const suite = (
|
|
498
|
+
id: number,
|
|
499
|
+
status: string,
|
|
500
|
+
conclusion: string | null
|
|
501
|
+
) => ({
|
|
502
|
+
id,
|
|
503
|
+
head_sha: head,
|
|
504
|
+
status,
|
|
505
|
+
conclusion,
|
|
506
|
+
latest_check_runs_count: 1,
|
|
507
|
+
app: { slug: "github-actions", name: "GitHub Actions" },
|
|
508
|
+
});
|
|
509
|
+
const job = (name: string, run: number) => ({
|
|
510
|
+
name,
|
|
511
|
+
state: "SUCCESS",
|
|
512
|
+
bucket: "pass",
|
|
513
|
+
description: "",
|
|
514
|
+
workflow: "CI",
|
|
515
|
+
link: `https://github.com/owner/repo/actions/runs/${run}/job/1`,
|
|
516
|
+
});
|
|
517
|
+
const reply = (name: string, value: unknown) =>
|
|
518
|
+
writeFileSync(join(directory, name), JSON.stringify(value));
|
|
519
|
+
reply("checks.json", [job("lint", 332), job("Detect changes", 333)]);
|
|
520
|
+
const ids = Object.keys(suiteRuns).map(Number);
|
|
521
|
+
reply("suites.json", [
|
|
522
|
+
{
|
|
523
|
+
total_count: ids.length + 1,
|
|
524
|
+
check_suites: [
|
|
525
|
+
suite(9332, "completed", "success"),
|
|
526
|
+
...ids.map((id) => suite(id, "in_progress", null)),
|
|
527
|
+
],
|
|
528
|
+
},
|
|
529
|
+
]);
|
|
530
|
+
const cases = ids.map((id) => {
|
|
531
|
+
if (suiteRuns[id] === null)
|
|
532
|
+
return ` *check-suites/${id}/check-runs*) echo "HTTP 502: Bad Gateway" >&2; exit 1 ;;`;
|
|
533
|
+
reply(`runs-${id}.json`, suiteRuns[id]);
|
|
534
|
+
return ` *check-suites/${id}/check-runs*) cat '${directory}/runs-${id}.json' ;;`;
|
|
535
|
+
});
|
|
536
|
+
writeFileSync(
|
|
537
|
+
join(directory, "gh"),
|
|
538
|
+
`#!/bin/sh\ncase "$*" in\n "pr checks"*) cat '${directory}/checks.json' ;;\n${cases.join("\n")}\n *commits/${head}/check-suites*) cat '${directory}/suites.json' ;;\n *) echo "unexpected gh $*" >&2; exit 2 ;;\nesac\n`,
|
|
539
|
+
{ mode: 0o755 }
|
|
540
|
+
);
|
|
541
|
+
const program = `import { GhGitHubReader } from ${JSON.stringify(import.meta.dir + "/github.ts")};
|
|
542
|
+
import { WatchDeadline } from ${JSON.stringify(import.meta.dir + "/deadline.ts")};
|
|
543
|
+
import { resolveHeadChecks } from ${JSON.stringify(import.meta.dir + "/head-checks.ts")};
|
|
544
|
+
const reader = new GhGitHubReader(new WatchDeadline(0, Date.now), () => ${now});
|
|
545
|
+
try {
|
|
546
|
+
const read = await resolveHeadChecks(reader, { context: { owner: "owner", repo: "repo", number: 42 }, headRefOid: ${JSON.stringify(head)} });
|
|
547
|
+
console.log(JSON.stringify(read.checks.map((check) => check.kind + " " + check.name)));
|
|
548
|
+
} catch (error) {
|
|
549
|
+
console.log(JSON.stringify(error.failure));
|
|
550
|
+
}`;
|
|
551
|
+
const child = spawnSync(process.execPath, ["-e", program], {
|
|
552
|
+
encoding: "utf8",
|
|
553
|
+
timeout: 5000,
|
|
554
|
+
env: { ...process.env, PATH: directory + ":" + process.env.PATH },
|
|
555
|
+
});
|
|
556
|
+
expect({ status: child.status, stderr: child.stderr }).toEqual({
|
|
557
|
+
status: 0,
|
|
558
|
+
stderr: "",
|
|
559
|
+
});
|
|
560
|
+
return JSON.parse(child.stdout);
|
|
561
|
+
} finally {
|
|
562
|
+
rmSync(directory, { recursive: true, force: true });
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
const passed = ["passed lint", "passed Detect changes"];
|
|
567
|
+
const pending = [...passed, "pending GitHub Actions check suite"];
|
|
568
|
+
|
|
569
|
+
it("keeps the head pending through the real reader while the next job is due", () => {
|
|
570
|
+
expect(readHead({ 9333: runPages(done(5)) })).toEqual(pending);
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
it("keeps the head pending through the real reader once the next job is queued", () => {
|
|
574
|
+
expect(readHead({ 9333: runPages(done(5), started("queued", 1)) })).toEqual(
|
|
575
|
+
pending
|
|
576
|
+
);
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
it("reads the head clean through the real reader once the suite is stuck", () => {
|
|
580
|
+
expect(readHead({ 9333: runPages(done(30 * 24 * 3600)) })).toEqual(passed);
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
it("reads each unfinished suite, adding one pending check per suite between jobs", () => {
|
|
584
|
+
expect(
|
|
585
|
+
readHead({
|
|
586
|
+
9333: runPages(done(30 * 24 * 3600)),
|
|
587
|
+
9334: runPages(done(5)),
|
|
588
|
+
})
|
|
589
|
+
).toEqual(pending);
|
|
590
|
+
expect(
|
|
591
|
+
readHead({ 9333: runPages(done(5)), 9334: runPages(done(5)) })
|
|
592
|
+
).toEqual([...pending, "pending GitHub Actions check suite"]);
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
it("fails the read with a retryable query failure when a check-runs read fails", () => {
|
|
596
|
+
expect(readHead({ 9333: null })).toMatchObject({
|
|
597
|
+
kind: "command-exit",
|
|
598
|
+
retryable: true,
|
|
599
|
+
code: 1,
|
|
600
|
+
});
|
|
601
|
+
});
|
|
602
|
+
});
|
|
603
|
+
|
|
352
604
|
describe("workflow runs identify current startup failures", () => {
|
|
353
605
|
const head = "a66c327af02be3cd643c1f0a163ee00967fbc6c0";
|
|
354
606
|
const run = (fields: Record<string, unknown> = {}) => ({
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
+
betweenJobsCheck,
|
|
2
3
|
parseSuiteRead,
|
|
3
4
|
suiteReadOf,
|
|
4
5
|
unsettledSuiteChecks,
|
|
6
|
+
type SuiteCheckEntry,
|
|
5
7
|
} from "./check-suites.ts";
|
|
6
8
|
import { baseRefTargetOid, text } from "./landing.ts";
|
|
7
9
|
import {
|
|
@@ -547,7 +549,10 @@ function graphqlArgs(
|
|
|
547
549
|
}
|
|
548
550
|
|
|
549
551
|
export class GhGitHubReader implements T.GitHubReader {
|
|
550
|
-
constructor(
|
|
552
|
+
constructor(
|
|
553
|
+
private readonly deadline: WatchDeadline,
|
|
554
|
+
private readonly now: () => number = Date.now
|
|
555
|
+
) {}
|
|
551
556
|
private run(argv: readonly [string, ...string[]]): Promise<CommandResult> {
|
|
552
557
|
return run(argv, this.deadline);
|
|
553
558
|
}
|
|
@@ -760,12 +765,26 @@ export class GhGitHubReader implements T.GitHubReader {
|
|
|
760
765
|
const result = await this.slurp(
|
|
761
766
|
`repos/${context.owner}/${context.repo}/commits/${head}/check-suites?per_page=100`
|
|
762
767
|
);
|
|
763
|
-
const
|
|
768
|
+
const read = parseSuiteRead(
|
|
764
769
|
commandJson(result, "gh api check-suites"),
|
|
765
770
|
head,
|
|
766
771
|
checksRead,
|
|
767
772
|
expectedApps
|
|
768
773
|
);
|
|
774
|
+
const betweenJobs: SuiteCheckEntry[] = [];
|
|
775
|
+
for (const suite of read.runningActionsSuites) {
|
|
776
|
+
const path = `repos/${context.owner}/${context.repo}/check-suites/${suite.id}/check-runs?filter=latest&per_page=100`;
|
|
777
|
+
const check = betweenJobsCheck(
|
|
778
|
+
suite,
|
|
779
|
+
commandJson(
|
|
780
|
+
await this.slurp(path),
|
|
781
|
+
`gh api --paginate --slurp ${path}`
|
|
782
|
+
),
|
|
783
|
+
this.now()
|
|
784
|
+
);
|
|
785
|
+
if (check !== null) betweenJobs.push({ suiteId: suite.id, check });
|
|
786
|
+
}
|
|
787
|
+
const parsed = { ...read, entries: [...read.entries, ...betweenJobs] };
|
|
769
788
|
if (parsed.startupFailureSuites.length === 0) return suiteReadOf(parsed);
|
|
770
789
|
const workflowPages = await this.workflowRunPages(context, head);
|
|
771
790
|
return mergeWorkflowRunChecks(
|
|
@@ -93,6 +93,11 @@ if (scenario === 'graphql-rate-limited' && args[0] === 'api' && args[1] === 'gra
|
|
|
93
93
|
],
|
|
94
94
|
}[scenario] ?? [];
|
|
95
95
|
value = [{ total_count: suites.length, check_suites: suites }];
|
|
96
|
+
} else if (scenario === 'reported-startup-pending' && args.some(a => a.endsWith('/check-suites/31/check-runs?filter=latest&per_page=100'))) {
|
|
97
|
+
value = [{ total_count: 2, check_runs: [
|
|
98
|
+
{ status: 'completed', conclusion: 'success', completed_at: '2026-11-19T10:02:00Z' },
|
|
99
|
+
{ status: 'in_progress', conclusion: null, started_at: '2026-11-19T10:02:05Z', completed_at: null },
|
|
100
|
+
] }];
|
|
96
101
|
} else if (args.some(a => a.includes('/actions/runs?head_sha=head'))) {
|
|
97
102
|
if (!['startup-current', 'no-ci-startup-current', 'no-ci-startup-superseded', 'no-ci-startup-pending', 'no-ci-startup-racing', 'no-ci-startup-neutral', 'reported-startup-pending'].includes(scenario))
|
|
98
103
|
throw new Error('unexpected workflow-run lookup');
|
|
@@ -4,9 +4,20 @@
|
|
|
4
4
|
# user message. Vibe sets PLUGIN_ROOT and runs a plugin hook in the plugin root.
|
|
5
5
|
# The script goes through sh because Vibe's session staging does not keep the
|
|
6
6
|
# executable bit.
|
|
7
|
+
#
|
|
8
|
+
# On Windows, Vibe runs the command in the session's shell: Git Bash, or
|
|
9
|
+
# PowerShell when it finds no bash.exe. One line serves both. A backslash
|
|
10
|
+
# escapes a quote in sh and not in PowerShell, so PowerShell's string after
|
|
11
|
+
# `set pstack` ends at `"\"`: PowerShell runs hooks/session-start.ps1 and
|
|
12
|
+
# exits, and its `#` makes the rest a comment. It exits 1 when the script
|
|
13
|
+
# cannot run, since Vibe reports a hook as failed only on a non-zero exit.
|
|
14
|
+
# sh's string runs on to `\""`, so `set` only takes it as an argument, and sh
|
|
15
|
+
# runs session-start.sh. The PowerShell half sits inside sh's double quotes,
|
|
16
|
+
# where sh still expands `$(`, `${`, backticks, and `$name`, so it holds no
|
|
17
|
+
# `$(`, `${`, or backtick.
|
|
7
18
|
[[hooks]]
|
|
8
19
|
name = "pstack-routing"
|
|
9
20
|
type = "session_start"
|
|
10
|
-
command = "
|
|
21
|
+
command = 'set pstack "\" ; & ./hooks/session-start.ps1 vibe ; if (!$?) { exit 1 } ; exit $LASTEXITCODE # \"" ; sh "$PLUGIN_ROOT/hooks/session-start.sh" vibe'
|
|
11
22
|
timeout = 10.0
|
|
12
23
|
description = "Load pstack routing"
|
package/plugin/vibe/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "pstack",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.176",
|
|
5
5
|
"description": "If you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack to Vibe. Original pstack by Lauren Tan (poteto).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Michael Denyer",
|