open-pstack 0.0.0-stage → 0.9.150
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/LICENSE +22 -0
- package/LICENSE-cursor-team-kit +21 -0
- package/LICENSE-thermos +21 -0
- package/NOTICE-skills.md +13 -0
- package/NOTICE.md +62 -0
- package/bin/open-pstack.mjs +4 -0
- package/lib/bundle.mjs +42 -0
- package/lib/cli.mjs +211 -0
- package/lib/detect.mjs +28 -0
- package/lib/harnesses.mjs +136 -0
- package/lib/steps.mjs +93 -0
- package/package.json +30 -4
- package/plugin/.antigravity-plugin/plugin.json +8 -0
- package/plugin/.claude-plugin/icon.png +0 -0
- package/plugin/.claude-plugin/plugin.json +31 -0
- package/plugin/.codex-plugin/plugin.json +52 -0
- package/plugin/.github/plugin/plugin.json +15 -0
- package/plugin/.grok-plugin/plugin.json +9 -0
- package/plugin/.muse-plugin/plugin.json +381 -0
- package/plugin/LICENSE +22 -0
- package/plugin/README.md +27 -0
- package/plugin/agents/comment-sicko.md +34 -0
- package/plugin/agents/poteto-agent.md +8 -0
- package/plugin/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
- package/plugin/agents/thermo-nuclear-review-subagent.md +28 -0
- package/plugin/assets/pstack-icon.png +0 -0
- package/plugin/assets/pstack-icon.prompt.txt +8 -0
- package/plugin/grok/skills/pstack-routing/SKILL.md +8 -0
- package/plugin/hooks/agy-context.awk +9 -0
- package/plugin/hooks/codex-hooks.json +17 -0
- package/plugin/hooks/copilot-context.awk +44 -0
- package/plugin/hooks/copilot-hooks.json +29 -0
- package/plugin/hooks/hooks.json +16 -0
- package/plugin/hooks/json.awk +164 -0
- package/plugin/hooks/kimi-instructions.md +17 -0
- package/plugin/hooks/muse-context.awk +31 -0
- package/plugin/hooks/pre-tool-use.awk +152 -0
- package/plugin/hooks/pre-tool-use.sh +16 -0
- package/plugin/hooks/script-contracts.awk +53 -0
- package/plugin/hooks/session-start-agy.md +17 -0
- package/plugin/hooks/session-start-context.md +15 -0
- package/plugin/hooks/session-start-copilot-setup.md +1 -0
- package/plugin/hooks/session-start-copilot-sheet.md +1 -0
- package/plugin/hooks/session-start-copilot.md +3 -0
- package/plugin/hooks/session-start-minimax.md +17 -0
- package/plugin/hooks/session-start-muse-sheet.md +1 -0
- package/plugin/hooks/session-start-muse.md +17 -0
- package/plugin/hooks/session-start-opencode.md +17 -0
- package/plugin/hooks/session-start.ps1 +169 -0
- package/plugin/hooks/session-start.sh +107 -0
- package/plugin/hooks.json +10 -0
- package/plugin/models.json +60 -0
- package/plugin/omp/index.mjs +34 -0
- package/plugin/opencode/index.js +49 -0
- package/plugin/package.json +8 -0
- package/plugin/pi/agent-files.ts +117 -0
- package/plugin/pi/agent-text.ts +99 -0
- package/plugin/pi/agent-tools.ts +148 -0
- package/plugin/pi/agents.ts +510 -0
- package/plugin/pi/ask.ts +87 -0
- package/plugin/pi/child.ts +313 -0
- package/plugin/pi/config.ts +208 -0
- package/plugin/pi/hc-child.ts +210 -0
- package/plugin/pi/index.ts +45 -0
- package/plugin/pi/one-shot.ts +90 -0
- package/plugin/pi/path-skills.ts +54 -0
- package/plugin/pi/prompt.ts +39 -0
- package/plugin/pi/schedule.ts +254 -0
- package/plugin/pi/slash.ts +106 -0
- package/plugin/pi/sleep-wait.ts +76 -0
- package/plugin/pi/worktree.ts +87 -0
- package/plugin/skills/architect/SKILL.md +20 -0
- package/plugin/skills/arena/SKILL.md +66 -0
- package/plugin/skills/automate-me/SKILL.md +111 -0
- package/plugin/skills/babysit/SKILL.md +68 -0
- package/plugin/skills/benchmark-checklist/SKILL.md +38 -0
- package/plugin/skills/blast-radius/SKILL.md +49 -0
- package/plugin/skills/bro/SKILL.md +6 -0
- package/plugin/skills/correct/SKILL.md +31 -0
- package/plugin/skills/create-formal-verification-skill/SKILL.md +50 -0
- package/plugin/skills/create-verification-skill/SKILL.md +51 -0
- package/plugin/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/plugin/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/plugin/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/plugin/skills/deslop/SKILL.md +24 -0
- package/plugin/skills/figure-it-out/SKILL.md +51 -0
- package/plugin/skills/fix-ci/SKILL.md +29 -0
- package/plugin/skills/fix-merge-conflicts/SKILL.md +32 -0
- package/plugin/skills/get-pr-comments/SKILL.md +23 -0
- package/plugin/skills/how/SKILL.md +28 -0
- package/plugin/skills/in-your-own-words/SKILL.md +6 -0
- package/plugin/skills/interrogate/SKILL.md +48 -0
- package/plugin/skills/ketchup/SKILL.md +42 -0
- package/plugin/skills/ketchup-video/SKILL.md +28 -0
- package/plugin/skills/maintain-formal-verification-skill/SKILL.md +65 -0
- package/plugin/skills/maintain-verification-skill/SKILL.md +46 -0
- package/plugin/skills/make-pr-easy-to-review/SKILL.md +59 -0
- package/plugin/skills/no-comments/SKILL.md +45 -0
- package/plugin/skills/poteto-help/SKILL.md +148 -0
- package/plugin/skills/poteto-help/references/prompting.md +51 -0
- package/plugin/skills/poteto-help/references/recipes.md +51 -0
- package/plugin/skills/poteto-mode/SKILL.md +132 -0
- package/plugin/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/plugin/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/plugin/skills/poteto-mode/playbooks/autopilot-full.md +31 -0
- package/plugin/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/plugin/skills/poteto-mode/playbooks/babysit.md +10 -0
- package/plugin/skills/poteto-mode/playbooks/bug-fix.md +32 -0
- package/plugin/skills/poteto-mode/playbooks/eval.md +25 -0
- package/plugin/skills/poteto-mode/playbooks/feature.md +21 -0
- package/plugin/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/plugin/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/plugin/skills/poteto-mode/playbooks/multi-phase-plan.md +13 -0
- package/plugin/skills/poteto-mode/playbooks/opening-a-pr.md +9 -0
- package/plugin/skills/poteto-mode/playbooks/pause-safely.md +11 -0
- package/plugin/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/plugin/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/plugin/skills/poteto-mode/playbooks/refactoring.md +18 -0
- package/plugin/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/plugin/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/plugin/skills/poteto-mode/playbooks/shipping.md +16 -0
- package/plugin/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/plugin/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/plugin/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/plugin/skills/poteto-mode/references/agents/comment-sicko.md +34 -0
- package/plugin/skills/poteto-mode/references/agy-tools.md +100 -0
- package/plugin/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/plugin/skills/poteto-mode/references/cloud-session-pr-reads.md +29 -0
- package/plugin/skills/poteto-mode/references/codex-tools.md +110 -0
- package/plugin/skills/poteto-mode/references/copilot-tools.md +144 -0
- package/plugin/skills/poteto-mode/references/dsh-tools.md +51 -0
- package/plugin/skills/poteto-mode/references/grok.md +50 -0
- package/plugin/skills/poteto-mode/references/kimi-tools.md +40 -0
- package/plugin/skills/poteto-mode/references/licenses/LICENSE +22 -0
- package/plugin/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
- package/plugin/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
- package/plugin/skills/poteto-mode/references/licenses/NOTICE.md +13 -0
- package/plugin/skills/poteto-mode/references/merge-safety.md +43 -0
- package/plugin/skills/poteto-mode/references/minimax-tools.md +93 -0
- package/plugin/skills/poteto-mode/references/muse-tools.md +105 -0
- package/plugin/skills/poteto-mode/references/omp-tools.md +45 -0
- package/plugin/skills/poteto-mode/references/opencode-tools.md +30 -0
- package/plugin/skills/poteto-mode/references/pi-tools.md +120 -0
- package/plugin/skills/poteto-mode/references/resume-storage.md +20 -0
- package/plugin/skills/poteto-mode/scripts/.prettierignore +19 -0
- package/plugin/skills/poteto-mode/scripts/.prettierrc.json +3 -0
- package/plugin/skills/poteto-mode/scripts/bootstrap.ts +71 -0
- package/plugin/skills/poteto-mode/scripts/bun.lock +67 -0
- package/plugin/skills/poteto-mode/scripts/check-playbooks.mjs +165 -0
- package/plugin/skills/poteto-mode/scripts/codex-session-effort.mjs +94 -0
- package/plugin/skills/poteto-mode/scripts/package.json +16 -0
- package/plugin/skills/poteto-mode/scripts/resume.mjs +139 -0
- package/plugin/skills/poteto-mode/scripts/tsconfig.json +14 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/check-suites.ts +203 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/cli.port.test.ts +88 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/cli.test.ts +383 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/cli.ts +283 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/deadline.ts +20 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +163 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/fresh-install.test.ts +35 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/github.port.test.ts +1119 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/github.test.ts +506 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/github.ts +979 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/head-checks.ts +37 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/integrity.test.ts +887 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/landing.ts +92 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/live-merge-safety.mjs +142 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/policy.port.test.ts +945 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/policy.test.ts +492 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/policy.ts +966 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/query-error.ts +36 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/render.ts +211 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/ship-pr +6 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping-cli.test.ts +159 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping-cli.ts +65 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.test-helper.ts +48 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.test.ts +360 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/shipping.ts +235 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/transport.test.ts +588 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/types.compile.ts +109 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/types.ts +502 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/workflow-runs.ts +217 -0
- package/plugin/skills/poteto-mode/scripts/watch-pr/wrapper.test.ts +20 -0
- package/plugin/skills/poteto-mode/scripts/worktree-audit.mjs +492 -0
- package/plugin/skills/poteto-mode/worker.md +11 -0
- package/plugin/skills/principle-attack-the-premise/SKILL.md +15 -0
- package/plugin/skills/principle-boundary-discipline/SKILL.md +11 -0
- package/plugin/skills/principle-build-the-lever/SKILL.md +15 -0
- package/plugin/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/plugin/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/plugin/skills/principle-experience-first/SKILL.md +19 -0
- package/plugin/skills/principle-explain-the-number/SKILL.md +14 -0
- package/plugin/skills/principle-fix-root-causes/SKILL.md +14 -0
- package/plugin/skills/principle-foundational-thinking/SKILL.md +13 -0
- package/plugin/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/plugin/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/plugin/skills/principle-make-operations-idempotent/SKILL.md +15 -0
- package/plugin/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/plugin/skills/principle-minimize-reader-load/SKILL.md +15 -0
- package/plugin/skills/principle-model-the-domain/SKILL.md +15 -0
- package/plugin/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/plugin/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/plugin/skills/principle-prove-it-works/SKILL.md +17 -0
- package/plugin/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/plugin/skills/principle-separate-before-serializing-shared-state/SKILL.md +11 -0
- package/plugin/skills/principle-sequence-verifiable-units/SKILL.md +13 -0
- package/plugin/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/plugin/skills/principle-test-behavior-not-implementation/SKILL.md +16 -0
- package/plugin/skills/principle-type-system-discipline/SKILL.md +15 -0
- package/plugin/skills/recall/SKILL.md +43 -0
- package/plugin/skills/reflect/SKILL.md +33 -0
- package/plugin/skills/reflect/scripts/claude-project-dir.mjs +121 -0
- package/plugin/skills/reflect/scripts/find-transcript.mjs +218 -0
- package/plugin/skills/setup-pstack/SKILL.md +104 -0
- package/plugin/skills/setup-pstack/copilot.md +88 -0
- package/plugin/skills/setup-pstack/references/runtimes.md +77 -0
- package/plugin/skills/setup-pstack/scripts/check-sheet.awk +10 -0
- package/plugin/skills/setup-pstack/scripts/check-sheet.sh +20 -0
- package/plugin/skills/setup-pstack/scripts/read-sheet.sh +24 -0
- package/plugin/skills/setup-pstack/scripts/sheet.awk +152 -0
- package/plugin/skills/sharpen/SKILL.md +15 -0
- package/plugin/skills/show-me-your-work/SKILL.md +89 -0
- package/plugin/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/plugin/skills/show-me-your-work/scripts/log.sh +58 -0
- package/plugin/skills/statechart/SKILL.md +81 -0
- package/plugin/skills/statechart/references/render.md +93 -0
- package/plugin/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/plugin/skills/statechart/scripts/backends/mermaid.ts +249 -0
- package/plugin/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/plugin/skills/statechart/scripts/backends/report.ts +177 -0
- package/plugin/skills/statechart/scripts/bun.lock +17 -0
- package/plugin/skills/statechart/scripts/frontends/config.ts +276 -0
- package/plugin/skills/statechart/scripts/frontends/dot.ts +77 -0
- package/plugin/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/plugin/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/plugin/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/plugin/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/plugin/skills/statechart/scripts/frontends/value.ts +166 -0
- package/plugin/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/plugin/skills/statechart/scripts/frontends/view.ts +119 -0
- package/plugin/skills/statechart/scripts/ir.ts +547 -0
- package/plugin/skills/statechart/scripts/janitor.ts +13 -0
- package/plugin/skills/statechart/scripts/kill.ts +15 -0
- package/plugin/skills/statechart/scripts/package.json +11 -0
- package/plugin/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/plugin/skills/statechart/scripts/passes/label.ts +269 -0
- package/plugin/skills/statechart/scripts/passes/lift.ts +85 -0
- package/plugin/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/plugin/skills/statechart/scripts/passes/paths.ts +60 -0
- package/plugin/skills/statechart/scripts/passes/reach.ts +135 -0
- package/plugin/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/plugin/skills/statechart/scripts/passes/regions.ts +295 -0
- package/plugin/skills/statechart/scripts/pipeline.ts +76 -0
- package/plugin/skills/statechart/scripts/run.ts +545 -0
- package/plugin/skills/statechart/scripts/statechart +29 -0
- package/plugin/skills/statechart/scripts/statechart.ts +166 -0
- package/plugin/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/plugin/skills/statechart/scripts/test/chart.test.ts +1253 -0
- package/plugin/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/plugin/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/plugin/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/plugin/skills/statechart/scripts/test/child-env.test.ts +15 -0
- package/plugin/skills/statechart/scripts/test/cli.test.ts +1353 -0
- package/plugin/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/plugin/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/chart.mmd +28 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/plugin/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/plugin/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/plugin/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/plugin/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/plugin/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/plugin/skills/statechart/scripts/test/corpus.test.ts +453 -0
- package/plugin/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/plugin/skills/statechart/scripts/test/drawn.ts +20 -0
- package/plugin/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/plugin/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/plugin/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/plugin/skills/statechart/scripts/test/java.ts +63 -0
- package/plugin/skills/statechart/scripts/test/labels.ts +648 -0
- package/plugin/skills/statechart/scripts/test/messages.test.ts +226 -0
- package/plugin/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/plugin/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/plugin/skills/statechart/scripts/test/render.test.ts +145 -0
- package/plugin/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/plugin/skills/statechart/scripts/test/tlc.ts +158 -0
- package/plugin/skills/statechart/scripts/tsconfig.json +11 -0
- package/plugin/skills/statechart/scripts/worker.ts +35 -0
- package/plugin/skills/swarm/SKILL.md +58 -0
- package/plugin/skills/tdd/SKILL.md +41 -0
- package/plugin/skills/teach/SKILL.md +28 -0
- package/plugin/skills/technical-writing/SKILL.md +69 -0
- package/plugin/skills/thermo-nuclear-code-quality-review/SKILL.md +201 -0
- package/plugin/skills/thermo-nuclear-review/SKILL.md +50 -0
- package/plugin/skills/thermos/SKILL.md +40 -0
- package/plugin/skills/typescript-best-practices/SKILL.md +32 -0
- package/plugin/skills/typescript-best-practices/references/patterns.md +328 -0
- package/plugin/skills/unslop/SKILL.md +39 -0
- package/plugin/skills/what-did-i-get-done/SKILL.md +31 -0
- package/plugin/skills/why/SKILL.md +16 -0
- package/README.md +0 -3
|
@@ -0,0 +1,1119 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import { parseSuiteRead } from "./check-suites.ts";
|
|
3
|
+
import { WatchDeadline } from "./deadline.ts";
|
|
4
|
+
import {
|
|
5
|
+
ChecksUnavailable,
|
|
6
|
+
WatcherQueryError,
|
|
7
|
+
discoverStack,
|
|
8
|
+
orderStack,
|
|
9
|
+
parseFastCheck,
|
|
10
|
+
parsePullRequest,
|
|
11
|
+
parseReviewThreadPage,
|
|
12
|
+
PR_FACTS_QUERY,
|
|
13
|
+
resolveChecks,
|
|
14
|
+
resolveContext,
|
|
15
|
+
resolveReviewThreads,
|
|
16
|
+
runJson,
|
|
17
|
+
unsettledSuiteChecks,
|
|
18
|
+
} from "./github.ts";
|
|
19
|
+
import { fakeReader } from "./fakes.test-helper.ts";
|
|
20
|
+
import type { PrContext } from "./types.ts";
|
|
21
|
+
import { parsePrNumber } from "./types.ts";
|
|
22
|
+
import { resolveWorkflowRunChecks } from "./workflow-runs.ts";
|
|
23
|
+
|
|
24
|
+
const context = {
|
|
25
|
+
owner: "owner",
|
|
26
|
+
repo: "repo",
|
|
27
|
+
number: parsePrNumber(42),
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const numbers = (stack: readonly PrContext[]): number[] =>
|
|
31
|
+
stack.map((pr) => Number(pr.number));
|
|
32
|
+
|
|
33
|
+
describe("checks fallback chain", () => {
|
|
34
|
+
it("reads no checks when gh reports none and the head commit has no rollup", async () => {
|
|
35
|
+
const reader = fakeReader({
|
|
36
|
+
fastPath: { kind: "none-reported" },
|
|
37
|
+
rollupPages: [{ kind: "no-rollup" }],
|
|
38
|
+
});
|
|
39
|
+
expect(await resolveChecks(reader, context)).toEqual({
|
|
40
|
+
kind: "no-checks",
|
|
41
|
+
checks: [],
|
|
42
|
+
});
|
|
43
|
+
expect(reader.calls).toEqual(["checksFastPath", "checkRollupPage:null"]);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("fails closed when only one read says there are no checks", async () => {
|
|
47
|
+
const oneSided = [
|
|
48
|
+
{
|
|
49
|
+
fastPath: { kind: "unusable", exitCode: 1, stderr: "HTTP 401" },
|
|
50
|
+
rollupPages: [{ kind: "no-rollup" }],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
fastPath: { kind: "checks", checks: [] },
|
|
54
|
+
rollupPages: [{ kind: "no-rollup" }],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
fastPath: { kind: "none-reported" },
|
|
58
|
+
rollupPages: [{ kind: "contexts", checks: [], endCursor: null }],
|
|
59
|
+
},
|
|
60
|
+
] as const;
|
|
61
|
+
for (const options of oneSided)
|
|
62
|
+
await expect(
|
|
63
|
+
resolveChecks(fakeReader(options), context)
|
|
64
|
+
).rejects.toBeInstanceOf(ChecksUnavailable);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("rejects a rollup cursor that does not advance instead of paging on", async () => {
|
|
68
|
+
const stuck = { kind: "contexts", checks: [], endCursor: "same" } as const;
|
|
69
|
+
const reader = fakeReader({
|
|
70
|
+
fastPath: { kind: "checks", checks: [] },
|
|
71
|
+
rollupPages: [
|
|
72
|
+
stuck,
|
|
73
|
+
stuck,
|
|
74
|
+
{ kind: "contexts", checks: [], endCursor: null },
|
|
75
|
+
],
|
|
76
|
+
});
|
|
77
|
+
await expect(resolveChecks(reader, context)).rejects.toMatchObject({
|
|
78
|
+
failure: {
|
|
79
|
+
kind: "missing-field",
|
|
80
|
+
retryable: true,
|
|
81
|
+
detail: expect.stringContaining("must advance"),
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
expect(reader.calls).toEqual([
|
|
85
|
+
"checksFastPath",
|
|
86
|
+
"checkRollupPage:null",
|
|
87
|
+
"checkRollupPage:same",
|
|
88
|
+
]);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("rejects a rollup cursor that returns to an earlier page after moving on", async () => {
|
|
92
|
+
const page = (endCursor: string | null) =>
|
|
93
|
+
({ kind: "contexts", checks: [], endCursor }) as const;
|
|
94
|
+
const reader = fakeReader({
|
|
95
|
+
fastPath: { kind: "checks", checks: [] },
|
|
96
|
+
rollupPages: [page("a"), page("b"), page("a"), page(null)],
|
|
97
|
+
});
|
|
98
|
+
await expect(resolveChecks(reader, context)).rejects.toMatchObject({
|
|
99
|
+
failure: {
|
|
100
|
+
kind: "missing-field",
|
|
101
|
+
detail: expect.stringContaining("must advance"),
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
expect(reader.calls).toEqual([
|
|
105
|
+
"checksFastPath",
|
|
106
|
+
"checkRollupPage:null",
|
|
107
|
+
"checkRollupPage:a",
|
|
108
|
+
"checkRollupPage:b",
|
|
109
|
+
]);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it("propagates a failed rollup query instead of reading it as no checks", async () => {
|
|
113
|
+
const reader = fakeReader({ fastPath: { kind: "none-reported" } });
|
|
114
|
+
const failure = new WatcherQueryError({
|
|
115
|
+
kind: "command-exit",
|
|
116
|
+
retryable: true,
|
|
117
|
+
code: 1,
|
|
118
|
+
detail: "HTTP 502",
|
|
119
|
+
});
|
|
120
|
+
reader.checkRollupPage = async () => {
|
|
121
|
+
throw failure;
|
|
122
|
+
};
|
|
123
|
+
await expect(resolveChecks(reader, context)).rejects.toBe(failure);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
describe("check suites no check read shows", () => {
|
|
128
|
+
const head = "a66c327af02be3cd643c1f0a163ee00967fbc6c0";
|
|
129
|
+
const suite = (fields: Record<string, unknown> = {}) => ({
|
|
130
|
+
head_sha: head,
|
|
131
|
+
status: "completed",
|
|
132
|
+
conclusion: "action_required",
|
|
133
|
+
app: { slug: "github-actions", name: "GitHub Actions" },
|
|
134
|
+
latest_check_runs_count: 0,
|
|
135
|
+
...fields,
|
|
136
|
+
});
|
|
137
|
+
const pages = (...suites: unknown[]) => [
|
|
138
|
+
{ total_count: suites.length, check_suites: suites },
|
|
139
|
+
];
|
|
140
|
+
const checksOf = (...args: Parameters<typeof unsettledSuiteChecks>) =>
|
|
141
|
+
unsettledSuiteChecks(...args).checks;
|
|
142
|
+
|
|
143
|
+
it("reads an Actions suite waiting for approval as a failed check that names the approval", () => {
|
|
144
|
+
expect(checksOf(pages(suite()), head, "no-checks")).toEqual([
|
|
145
|
+
{
|
|
146
|
+
kind: "failed",
|
|
147
|
+
source: "check-suites",
|
|
148
|
+
name: "GitHub Actions check suite",
|
|
149
|
+
reportedState: "ACTION_REQUIRED",
|
|
150
|
+
description: expect.stringContaining("maintainer approval"),
|
|
151
|
+
link: "",
|
|
152
|
+
workflow: "",
|
|
153
|
+
},
|
|
154
|
+
]);
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it("reads a failed suite as a failed check and an unfinished one as pending", () => {
|
|
158
|
+
for (const conclusion of [
|
|
159
|
+
"failure",
|
|
160
|
+
"cancelled",
|
|
161
|
+
"timed_out",
|
|
162
|
+
"startup_failure",
|
|
163
|
+
"stale",
|
|
164
|
+
])
|
|
165
|
+
expect(
|
|
166
|
+
checksOf(pages(suite({ conclusion })), head, "no-checks")
|
|
167
|
+
).toMatchObject([
|
|
168
|
+
{ kind: "failed", reportedState: conclusion.toUpperCase() },
|
|
169
|
+
]);
|
|
170
|
+
for (const status of ["queued", "in_progress", "waiting", "requested"])
|
|
171
|
+
expect(
|
|
172
|
+
checksOf(pages(suite({ status, conclusion: null })), head, "no-checks")
|
|
173
|
+
).toMatchObject([
|
|
174
|
+
{ kind: "pending", reportedState: status.toUpperCase() },
|
|
175
|
+
]);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
it("reads no check from no suites or suites that finished cleanly", () => {
|
|
179
|
+
expect(checksOf(pages(), head, "no-checks")).toEqual([]);
|
|
180
|
+
for (const conclusion of ["success", "neutral", "skipped"])
|
|
181
|
+
expect(checksOf(pages(suite({ conclusion })), head, "no-checks")).toEqual(
|
|
182
|
+
[]
|
|
183
|
+
);
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it("ignores another app's queued suite with no runs, but not Actions'", () => {
|
|
187
|
+
const idle = { status: "queued", conclusion: null };
|
|
188
|
+
expect(
|
|
189
|
+
checksOf(
|
|
190
|
+
pages(suite({ ...idle, app: { slug: "claude", name: "Claude" } })),
|
|
191
|
+
head,
|
|
192
|
+
"no-checks"
|
|
193
|
+
)
|
|
194
|
+
).toEqual([]);
|
|
195
|
+
for (const fields of [
|
|
196
|
+
{ app: { slug: "github-actions" } },
|
|
197
|
+
{ app: null },
|
|
198
|
+
{ app: {} },
|
|
199
|
+
{ app: { slug: "claude" }, latest_check_runs_count: 1 },
|
|
200
|
+
{ app: { slug: "claude" }, latest_check_runs_count: undefined },
|
|
201
|
+
])
|
|
202
|
+
expect(
|
|
203
|
+
checksOf(pages(suite({ ...idle, ...fields })), head, "no-checks")
|
|
204
|
+
).toMatchObject([{ kind: "pending", name: "Unknown app check suite" }]);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
it("counts an expected app's queued suite with no runs as pending in both reads, and lists the apps it did not count", () => {
|
|
208
|
+
const azure = suite({
|
|
209
|
+
status: "queued",
|
|
210
|
+
conclusion: null,
|
|
211
|
+
app: { slug: "azure-pipelines", name: "Azure Pipelines" },
|
|
212
|
+
});
|
|
213
|
+
for (const checksRead of ["no-checks", "reported"] as const) {
|
|
214
|
+
expect(
|
|
215
|
+
unsettledSuiteChecks(pages(azure), head, checksRead, [
|
|
216
|
+
"azure-pipelines",
|
|
217
|
+
])
|
|
218
|
+
).toEqual({
|
|
219
|
+
checks: [
|
|
220
|
+
{
|
|
221
|
+
kind: "pending",
|
|
222
|
+
source: "check-suites",
|
|
223
|
+
name: "Azure Pipelines check suite",
|
|
224
|
+
reportedState: "QUEUED",
|
|
225
|
+
description: "has not finished",
|
|
226
|
+
link: "",
|
|
227
|
+
workflow: "",
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
queuedWithoutRuns: [],
|
|
231
|
+
});
|
|
232
|
+
expect(unsettledSuiteChecks(pages(azure), head, checksRead)).toEqual({
|
|
233
|
+
checks: [],
|
|
234
|
+
queuedWithoutRuns: [
|
|
235
|
+
{ name: "Azure Pipelines", slug: "azure-pipelines" },
|
|
236
|
+
],
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it("beside reported checks, counts only a suite with no runs that waits for approval or for Actions to start", () => {
|
|
242
|
+
const reported = (fields: Record<string, unknown>) =>
|
|
243
|
+
checksOf(pages(suite(fields)), head, "reported");
|
|
244
|
+
expect(reported({})).toMatchObject([
|
|
245
|
+
{ kind: "failed", reportedState: "ACTION_REQUIRED" },
|
|
246
|
+
]);
|
|
247
|
+
expect(reported({ status: "queued", conclusion: null })).toMatchObject([
|
|
248
|
+
{ kind: "pending", reportedState: "QUEUED" },
|
|
249
|
+
]);
|
|
250
|
+
for (const fields of [
|
|
251
|
+
{ conclusion: "cancelled" },
|
|
252
|
+
{ conclusion: "failure" },
|
|
253
|
+
{ conclusion: "cancelled", latest_check_runs_count: 3 },
|
|
254
|
+
{ status: "in_progress", conclusion: null, latest_check_runs_count: 2 },
|
|
255
|
+
{
|
|
256
|
+
status: "in_progress",
|
|
257
|
+
conclusion: null,
|
|
258
|
+
app: { slug: "wip", name: "WIP" },
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
app: { slug: "code-review-gate", name: "Gate App" },
|
|
262
|
+
latest_check_runs_count: 1,
|
|
263
|
+
},
|
|
264
|
+
])
|
|
265
|
+
expect(reported(fields)).toEqual([]);
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
it("finds a gated suite on a later page", () => {
|
|
269
|
+
const twoPages = [
|
|
270
|
+
...pages(suite({ conclusion: "success" })),
|
|
271
|
+
...pages(suite()),
|
|
272
|
+
];
|
|
273
|
+
expect(checksOf(twoPages, head, "no-checks")).toMatchObject([
|
|
274
|
+
{ kind: "failed", reportedState: "ACTION_REQUIRED" },
|
|
275
|
+
]);
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
it("requires a valid run count to decide whether reported checks cover a suite", () => {
|
|
279
|
+
for (const count of [undefined, null, "0", -1, 0.5]) {
|
|
280
|
+
expect(() =>
|
|
281
|
+
checksOf(
|
|
282
|
+
pages(suite({ latest_check_runs_count: count })),
|
|
283
|
+
head,
|
|
284
|
+
"reported"
|
|
285
|
+
)
|
|
286
|
+
).toThrow(/latest_check_runs_count/);
|
|
287
|
+
}
|
|
288
|
+
const covered = suite({
|
|
289
|
+
latest_check_runs_count: 1,
|
|
290
|
+
status: null,
|
|
291
|
+
conclusion: null,
|
|
292
|
+
});
|
|
293
|
+
expect(checksOf(pages(covered), head, "reported")).toEqual([]);
|
|
294
|
+
expect(() => checksOf(pages(covered), head, "no-checks")).toThrow(
|
|
295
|
+
/check suite.status/
|
|
296
|
+
);
|
|
297
|
+
expect(() =>
|
|
298
|
+
checksOf(pages({ ...covered, head_sha: "other" }), head, "reported")
|
|
299
|
+
).toThrow(/must match the queried head/);
|
|
300
|
+
expect(() =>
|
|
301
|
+
checksOf(pages(suite({ conclusion: null })), head, "reported")
|
|
302
|
+
).toThrow(/conclusion of a completed suite/);
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
it("tells the reader which provider requires action", () => {
|
|
306
|
+
for (const mode of ["reported", "no-checks"] as const) {
|
|
307
|
+
const checks = checksOf(
|
|
308
|
+
pages(suite({ app: { slug: "external-ci", name: "External CI" } })),
|
|
309
|
+
head,
|
|
310
|
+
mode
|
|
311
|
+
);
|
|
312
|
+
expect(checks).toMatchObject([
|
|
313
|
+
{
|
|
314
|
+
source: "check-suites",
|
|
315
|
+
kind: "failed",
|
|
316
|
+
reportedState: "ACTION_REQUIRED",
|
|
317
|
+
description: expect.stringContaining(
|
|
318
|
+
"review the check details for External CI"
|
|
319
|
+
),
|
|
320
|
+
},
|
|
321
|
+
]);
|
|
322
|
+
}
|
|
323
|
+
expect(
|
|
324
|
+
checksOf(pages(suite({ latest_check_runs_count: 2 })), head, "no-checks")
|
|
325
|
+
).toMatchObject([
|
|
326
|
+
{
|
|
327
|
+
description: expect.stringContaining(
|
|
328
|
+
"review the check details for GitHub Actions"
|
|
329
|
+
),
|
|
330
|
+
},
|
|
331
|
+
]);
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
it("fails closed on a response that cannot certify this head", () => {
|
|
335
|
+
for (const [value, detail] of [
|
|
336
|
+
[[], /check suite pages/],
|
|
337
|
+
[[{ total_count: 1 }], /check_suites/],
|
|
338
|
+
[
|
|
339
|
+
pages(suite({ head_sha: "b".repeat(40) })),
|
|
340
|
+
/must match the queried head/,
|
|
341
|
+
],
|
|
342
|
+
[pages(suite({ conclusion: null })), /conclusion of a completed suite/],
|
|
343
|
+
] as const)
|
|
344
|
+
expect(() => checksOf(value, head, "no-checks")).toThrow(detail);
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
describe("workflow runs identify current startup failures", () => {
|
|
349
|
+
const head = "a66c327af02be3cd643c1f0a163ee00967fbc6c0";
|
|
350
|
+
const run = (fields: Record<string, unknown> = {}) => ({
|
|
351
|
+
id: 10,
|
|
352
|
+
workflow_id: 20,
|
|
353
|
+
check_suite_id: 30,
|
|
354
|
+
event: "pull_request",
|
|
355
|
+
head_sha: head,
|
|
356
|
+
status: "completed",
|
|
357
|
+
conclusion: "startup_failure",
|
|
358
|
+
created_at: "2026-11-19T10:00:00Z",
|
|
359
|
+
name: "CI",
|
|
360
|
+
html_url: "https://github.com/owner/repo/actions/runs/10",
|
|
361
|
+
...fields,
|
|
362
|
+
});
|
|
363
|
+
const pages = (...runs: unknown[]) => [
|
|
364
|
+
{ total_count: runs.length, workflow_runs: runs },
|
|
365
|
+
];
|
|
366
|
+
const suitePages = (
|
|
367
|
+
count = 0,
|
|
368
|
+
successors: Record<string, unknown>[] = []
|
|
369
|
+
) => [
|
|
370
|
+
{
|
|
371
|
+
total_count: 1 + successors.length,
|
|
372
|
+
check_suites: [
|
|
373
|
+
{
|
|
374
|
+
id: 30,
|
|
375
|
+
head_sha: head,
|
|
376
|
+
status: "completed",
|
|
377
|
+
conclusion: "startup_failure",
|
|
378
|
+
app: { slug: "github-actions" },
|
|
379
|
+
latest_check_runs_count: count,
|
|
380
|
+
},
|
|
381
|
+
...successors,
|
|
382
|
+
],
|
|
383
|
+
},
|
|
384
|
+
];
|
|
385
|
+
const resolve = (
|
|
386
|
+
workflowPages: unknown,
|
|
387
|
+
suites: unknown,
|
|
388
|
+
checksRead: "reported" | "no-checks" = "reported"
|
|
389
|
+
) =>
|
|
390
|
+
resolveWorkflowRunChecks(
|
|
391
|
+
workflowPages,
|
|
392
|
+
parseSuiteRead(suites, head, checksRead),
|
|
393
|
+
head
|
|
394
|
+
).checks;
|
|
395
|
+
|
|
396
|
+
it("blocks on a current startup failure beside reported checks", () => {
|
|
397
|
+
expect(resolve(pages(run()), suitePages())).toMatchObject([
|
|
398
|
+
{
|
|
399
|
+
source: "check-suites",
|
|
400
|
+
kind: "failed",
|
|
401
|
+
name: "CI workflow",
|
|
402
|
+
reportedState: "STARTUP_FAILURE",
|
|
403
|
+
link: "https://github.com/owner/repo/actions/runs/10",
|
|
404
|
+
},
|
|
405
|
+
]);
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
it("suppresses only a later success of the same workflow and event", () => {
|
|
409
|
+
const older = run();
|
|
410
|
+
const newerSuccess = run({
|
|
411
|
+
id: 11,
|
|
412
|
+
conclusion: "success",
|
|
413
|
+
created_at: "2026-11-19T10:01:00Z",
|
|
414
|
+
});
|
|
415
|
+
for (const ordered of [
|
|
416
|
+
[older, newerSuccess],
|
|
417
|
+
[newerSuccess, older],
|
|
418
|
+
])
|
|
419
|
+
expect(resolve(pages(...ordered), suitePages())).toEqual([]);
|
|
420
|
+
const otherEvent = run({
|
|
421
|
+
id: 11,
|
|
422
|
+
event: "push",
|
|
423
|
+
conclusion: "success",
|
|
424
|
+
created_at: "2026-11-19T10:01:00Z",
|
|
425
|
+
});
|
|
426
|
+
for (const ordered of [
|
|
427
|
+
[older, otherEvent],
|
|
428
|
+
[otherEvent, older],
|
|
429
|
+
])
|
|
430
|
+
expect(resolve(pages(...ordered), suitePages())).toMatchObject([
|
|
431
|
+
{ reportedState: "STARTUP_FAILURE" },
|
|
432
|
+
]);
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
it("preserves a current pending run", () => {
|
|
436
|
+
expect(
|
|
437
|
+
resolve(
|
|
438
|
+
pages(run({ status: "in_progress", conclusion: null })),
|
|
439
|
+
suitePages()
|
|
440
|
+
)
|
|
441
|
+
).toMatchObject([{ kind: "pending", reportedState: "IN_PROGRESS" }]);
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
it("fails closed when workflow identity or status is absent", () => {
|
|
445
|
+
expect(() =>
|
|
446
|
+
resolve(pages(run({ workflow_id: undefined })), suitePages())
|
|
447
|
+
).toThrow(/workflow run.workflow_id/);
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
it("does not duplicate a workflow whose suite already has reported runs", () => {
|
|
451
|
+
expect(
|
|
452
|
+
resolve(pages(run({ conclusion: "success" })), suitePages(1))
|
|
453
|
+
).toEqual([]);
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
it("fails closed when the zero-run evidence is incomplete", () => {
|
|
457
|
+
for (const checksRead of ["reported", "no-checks"] as const)
|
|
458
|
+
expect(() =>
|
|
459
|
+
resolve(pages(run()), suitePages(Number.NaN), checksRead)
|
|
460
|
+
).toThrow(/check suite.latest_check_runs_count/);
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
it("fails closed when a failed zero-run suite has no matching workflow row", () => {
|
|
464
|
+
for (const workflowPages of [
|
|
465
|
+
pages(),
|
|
466
|
+
pages({ ...run(), check_suite_id: 999, conclusion: "success" }),
|
|
467
|
+
])
|
|
468
|
+
expect(() => resolve(workflowPages, suitePages())).toThrow(
|
|
469
|
+
/workflow runs for failed check suite/
|
|
470
|
+
);
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
it("uses display title and path when the workflow name is null", () => {
|
|
474
|
+
expect(
|
|
475
|
+
resolve(
|
|
476
|
+
pages(
|
|
477
|
+
run({
|
|
478
|
+
name: null,
|
|
479
|
+
display_title: "Display title",
|
|
480
|
+
conclusion: "STARTUP_FAILURE",
|
|
481
|
+
})
|
|
482
|
+
),
|
|
483
|
+
suitePages()
|
|
484
|
+
)
|
|
485
|
+
).toMatchObject([{ name: "Display title workflow" }]);
|
|
486
|
+
expect(
|
|
487
|
+
resolve(
|
|
488
|
+
pages(
|
|
489
|
+
run({
|
|
490
|
+
name: null,
|
|
491
|
+
display_title: null,
|
|
492
|
+
path: ".github/workflows/ci.yml",
|
|
493
|
+
})
|
|
494
|
+
),
|
|
495
|
+
suitePages()
|
|
496
|
+
)
|
|
497
|
+
).toMatchObject([{ name: ".github/workflows/ci.yml workflow" }]);
|
|
498
|
+
});
|
|
499
|
+
|
|
500
|
+
it("normalizes REST case and ignores unrelated runs and suites", () => {
|
|
501
|
+
expect(
|
|
502
|
+
resolve(
|
|
503
|
+
pages(
|
|
504
|
+
run({
|
|
505
|
+
status: "COMPLETED",
|
|
506
|
+
conclusion: "STARTUP_FAILURE",
|
|
507
|
+
}),
|
|
508
|
+
run({
|
|
509
|
+
id: 99,
|
|
510
|
+
workflow_id: 99,
|
|
511
|
+
check_suite_id: 999,
|
|
512
|
+
status: "completed",
|
|
513
|
+
conclusion: "success",
|
|
514
|
+
})
|
|
515
|
+
),
|
|
516
|
+
[
|
|
517
|
+
{
|
|
518
|
+
total_count: 2,
|
|
519
|
+
check_suites: [
|
|
520
|
+
{
|
|
521
|
+
id: 30,
|
|
522
|
+
head_sha: head,
|
|
523
|
+
status: "COMPLETED",
|
|
524
|
+
conclusion: "STARTUP_FAILURE",
|
|
525
|
+
app: { slug: "GITHUB-ACTIONS" },
|
|
526
|
+
latest_check_runs_count: 0,
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
head_sha: head,
|
|
530
|
+
status: "completed",
|
|
531
|
+
conclusion: "failure",
|
|
532
|
+
app: { slug: "third-party" },
|
|
533
|
+
latest_check_runs_count: 0,
|
|
534
|
+
},
|
|
535
|
+
],
|
|
536
|
+
},
|
|
537
|
+
]
|
|
538
|
+
)
|
|
539
|
+
).toMatchObject([{ reportedState: "STARTUP_FAILURE" }]);
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
it("fails closed on an unknown completed conclusion in an identified workflow", () => {
|
|
543
|
+
expect(() =>
|
|
544
|
+
resolve(pages(run({ conclusion: "new_future_state" })), suitePages())
|
|
545
|
+
).toThrow(/workflow run.conclusion/);
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
it("counts only startup_failure as a failure, leaving cancelled and other conclusions alone", () => {
|
|
549
|
+
for (const conclusion of [
|
|
550
|
+
"action_required",
|
|
551
|
+
"neutral",
|
|
552
|
+
"skipped",
|
|
553
|
+
"cancelled",
|
|
554
|
+
"failure",
|
|
555
|
+
"timed_out",
|
|
556
|
+
"stale",
|
|
557
|
+
])
|
|
558
|
+
expect(resolve(pages(run({ conclusion })), suitePages())).toEqual([]);
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
// Replays grafana/grafana#138385 at 038471dc2a94b1d373bddf1995b9d06249728d49:
|
|
562
|
+
// a cancel-in-progress workflow left a zero-run cancelled suite in the same
|
|
563
|
+
// second as the passing run.
|
|
564
|
+
it("ignores grafana-style zero-run cancelled suites beside a same-second green run", () => {
|
|
565
|
+
const grafanaHead = "038471dc2a94b1d373bddf1995b9d06249728d49";
|
|
566
|
+
const grafanaSuites = [
|
|
567
|
+
{
|
|
568
|
+
total_count: 3,
|
|
569
|
+
check_suites: [
|
|
570
|
+
{
|
|
571
|
+
id: 101,
|
|
572
|
+
head_sha: grafanaHead,
|
|
573
|
+
status: "completed",
|
|
574
|
+
conclusion: "cancelled",
|
|
575
|
+
app: { slug: "github-actions", name: "GitHub Actions" },
|
|
576
|
+
latest_check_runs_count: 1,
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
id: 102,
|
|
580
|
+
head_sha: grafanaHead,
|
|
581
|
+
status: "completed",
|
|
582
|
+
conclusion: "success",
|
|
583
|
+
app: { slug: "github-actions", name: "GitHub Actions" },
|
|
584
|
+
latest_check_runs_count: 1,
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
id: 103,
|
|
588
|
+
head_sha: grafanaHead,
|
|
589
|
+
status: "completed",
|
|
590
|
+
conclusion: "cancelled",
|
|
591
|
+
app: { slug: "github-actions", name: "GitHub Actions" },
|
|
592
|
+
latest_check_runs_count: 0,
|
|
593
|
+
},
|
|
594
|
+
],
|
|
595
|
+
},
|
|
596
|
+
];
|
|
597
|
+
const parsed = parseSuiteRead(grafanaSuites, grafanaHead, "reported");
|
|
598
|
+
expect(parsed.startupFailureSuites).toEqual([]);
|
|
599
|
+
expect(parsed.entries).toEqual([]);
|
|
600
|
+
|
|
601
|
+
// Even when workflow runs are queried for another workflow's startup_failure,
|
|
602
|
+
// the cancelled zero-run workflow does not produce a false failure.
|
|
603
|
+
const grafanaRuns = [
|
|
604
|
+
{
|
|
605
|
+
id: 44577615023,
|
|
606
|
+
workflow_id: 500,
|
|
607
|
+
check_suite_id: 103,
|
|
608
|
+
event: "pull_request",
|
|
609
|
+
head_sha: grafanaHead,
|
|
610
|
+
status: "completed",
|
|
611
|
+
conclusion: "cancelled",
|
|
612
|
+
created_at: "2026-11-19T17:28:50Z",
|
|
613
|
+
name: "Unified Storage Compatibility",
|
|
614
|
+
html_url: "https://github.com/grafana/grafana/actions/runs/44577615023",
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
id: 44577614969,
|
|
618
|
+
workflow_id: 500,
|
|
619
|
+
check_suite_id: 102,
|
|
620
|
+
event: "pull_request",
|
|
621
|
+
head_sha: grafanaHead,
|
|
622
|
+
status: "completed",
|
|
623
|
+
conclusion: "success",
|
|
624
|
+
created_at: "2026-11-19T17:28:50Z",
|
|
625
|
+
name: "Unified Storage Compatibility",
|
|
626
|
+
html_url: "https://github.com/grafana/grafana/actions/runs/44577614969",
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
id: 44577612080,
|
|
630
|
+
workflow_id: 500,
|
|
631
|
+
check_suite_id: 101,
|
|
632
|
+
event: "pull_request",
|
|
633
|
+
head_sha: grafanaHead,
|
|
634
|
+
status: "completed",
|
|
635
|
+
conclusion: "cancelled",
|
|
636
|
+
created_at: "2026-11-19T17:28:49Z",
|
|
637
|
+
name: "Unified Storage Compatibility",
|
|
638
|
+
html_url: "https://github.com/grafana/grafana/actions/runs/44577612080",
|
|
639
|
+
},
|
|
640
|
+
];
|
|
641
|
+
expect(
|
|
642
|
+
resolveWorkflowRunChecks(pages(...grafanaRuns), parsed, grafanaHead)
|
|
643
|
+
.checks
|
|
644
|
+
).toEqual([]);
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
it("keeps a zero-run failure when a later same-identity run is neutral, skipped, or cancelled regardless of input order", () => {
|
|
648
|
+
for (const conclusion of ["neutral", "skipped", "cancelled"]) {
|
|
649
|
+
const older = run();
|
|
650
|
+
const newer = run({
|
|
651
|
+
id: 11,
|
|
652
|
+
check_suite_id: 31,
|
|
653
|
+
conclusion,
|
|
654
|
+
created_at: "2026-11-19T10:01:00Z",
|
|
655
|
+
});
|
|
656
|
+
const suites = suitePages(0, [
|
|
657
|
+
{
|
|
658
|
+
id: 31,
|
|
659
|
+
head_sha: head,
|
|
660
|
+
status: "completed",
|
|
661
|
+
conclusion,
|
|
662
|
+
app: { slug: "github-actions" },
|
|
663
|
+
latest_check_runs_count: 0,
|
|
664
|
+
},
|
|
665
|
+
]);
|
|
666
|
+
// Test both oldest-first and the GitHub API's newest-first ordering.
|
|
667
|
+
for (const ordered of [
|
|
668
|
+
[older, newer],
|
|
669
|
+
[newer, older],
|
|
670
|
+
])
|
|
671
|
+
expect(resolve(pages(...ordered), suites)).toMatchObject([
|
|
672
|
+
{ kind: "failed", reportedState: "STARTUP_FAILURE" },
|
|
673
|
+
]);
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
it("reports a newer pending run and clears a newer success even when the successor suite count is nonzero", () => {
|
|
678
|
+
const older = run();
|
|
679
|
+
const newerPending = run({
|
|
680
|
+
id: 11,
|
|
681
|
+
check_suite_id: 31,
|
|
682
|
+
status: "in_progress",
|
|
683
|
+
conclusion: null,
|
|
684
|
+
created_at: "2026-11-19T10:01:00Z",
|
|
685
|
+
});
|
|
686
|
+
const pendingSuites = suitePages(0, [
|
|
687
|
+
{
|
|
688
|
+
id: 31,
|
|
689
|
+
head_sha: head,
|
|
690
|
+
status: "in_progress",
|
|
691
|
+
conclusion: null,
|
|
692
|
+
app: { slug: "github-actions" },
|
|
693
|
+
latest_check_runs_count: 2,
|
|
694
|
+
},
|
|
695
|
+
]);
|
|
696
|
+
for (const ordered of [
|
|
697
|
+
[older, newerPending],
|
|
698
|
+
[newerPending, older],
|
|
699
|
+
])
|
|
700
|
+
expect(resolve(pages(...ordered), pendingSuites)).toMatchObject([
|
|
701
|
+
{ kind: "pending", reportedState: "IN_PROGRESS" },
|
|
702
|
+
]);
|
|
703
|
+
|
|
704
|
+
const newerSuccess = run({
|
|
705
|
+
id: 12,
|
|
706
|
+
check_suite_id: 32,
|
|
707
|
+
conclusion: "success",
|
|
708
|
+
created_at: "2026-11-19T10:01:00Z",
|
|
709
|
+
});
|
|
710
|
+
const successSuites = suitePages(0, [
|
|
711
|
+
{
|
|
712
|
+
id: 32,
|
|
713
|
+
head_sha: head,
|
|
714
|
+
status: "completed",
|
|
715
|
+
conclusion: "success",
|
|
716
|
+
app: { slug: "github-actions" },
|
|
717
|
+
latest_check_runs_count: 2,
|
|
718
|
+
},
|
|
719
|
+
]);
|
|
720
|
+
for (const ordered of [
|
|
721
|
+
[older, newerSuccess],
|
|
722
|
+
[newerSuccess, older],
|
|
723
|
+
])
|
|
724
|
+
expect(resolve(pages(...ordered), successSuites)).toEqual([]);
|
|
725
|
+
});
|
|
726
|
+
|
|
727
|
+
it("lets a newer pending rerun supersede an older failure regardless of input order", () => {
|
|
728
|
+
const older = run();
|
|
729
|
+
const newer = run({
|
|
730
|
+
id: 11,
|
|
731
|
+
check_suite_id: 31,
|
|
732
|
+
status: "in_progress",
|
|
733
|
+
conclusion: null,
|
|
734
|
+
created_at: "2026-11-19T10:01:00Z",
|
|
735
|
+
});
|
|
736
|
+
const suites = [
|
|
737
|
+
{
|
|
738
|
+
total_count: 2,
|
|
739
|
+
check_suites: [
|
|
740
|
+
{
|
|
741
|
+
id: 30,
|
|
742
|
+
head_sha: head,
|
|
743
|
+
status: "completed",
|
|
744
|
+
conclusion: "startup_failure",
|
|
745
|
+
app: { slug: "github-actions" },
|
|
746
|
+
latest_check_runs_count: 0,
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
id: 31,
|
|
750
|
+
head_sha: head,
|
|
751
|
+
status: "in_progress",
|
|
752
|
+
conclusion: null,
|
|
753
|
+
app: { slug: "github-actions" },
|
|
754
|
+
latest_check_runs_count: 0,
|
|
755
|
+
},
|
|
756
|
+
],
|
|
757
|
+
},
|
|
758
|
+
];
|
|
759
|
+
for (const ordered of [
|
|
760
|
+
[older, newer],
|
|
761
|
+
[newer, older],
|
|
762
|
+
])
|
|
763
|
+
expect(resolve(pages(...ordered), suites)).toMatchObject([
|
|
764
|
+
{ kind: "pending", reportedState: "IN_PROGRESS" },
|
|
765
|
+
]);
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
it("correlates pending and approval successors with non-completed suites", () => {
|
|
769
|
+
expect(
|
|
770
|
+
resolve(
|
|
771
|
+
pages(
|
|
772
|
+
run({
|
|
773
|
+
id: 12,
|
|
774
|
+
workflow_id: 22,
|
|
775
|
+
check_suite_id: 32,
|
|
776
|
+
status: "in_progress",
|
|
777
|
+
conclusion: null,
|
|
778
|
+
created_at: "2026-11-19T10:02:00Z",
|
|
779
|
+
}),
|
|
780
|
+
run({
|
|
781
|
+
id: 11,
|
|
782
|
+
workflow_id: 20,
|
|
783
|
+
check_suite_id: 31,
|
|
784
|
+
status: "in_progress",
|
|
785
|
+
conclusion: null,
|
|
786
|
+
created_at: "2026-11-19T10:01:00Z",
|
|
787
|
+
}),
|
|
788
|
+
run()
|
|
789
|
+
),
|
|
790
|
+
suitePages(0, [
|
|
791
|
+
{
|
|
792
|
+
id: 31,
|
|
793
|
+
head_sha: head,
|
|
794
|
+
status: "in_progress",
|
|
795
|
+
conclusion: null,
|
|
796
|
+
app: { slug: "github-actions" },
|
|
797
|
+
latest_check_runs_count: 0,
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
id: 32,
|
|
801
|
+
head_sha: head,
|
|
802
|
+
status: "action_required",
|
|
803
|
+
conclusion: "success",
|
|
804
|
+
app: { slug: "github-actions" },
|
|
805
|
+
latest_check_runs_count: 0,
|
|
806
|
+
},
|
|
807
|
+
])
|
|
808
|
+
)
|
|
809
|
+
).toMatchObject([
|
|
810
|
+
{ kind: "pending", reportedState: "IN_PROGRESS" },
|
|
811
|
+
{ kind: "pending", reportedState: "IN_PROGRESS" },
|
|
812
|
+
]);
|
|
813
|
+
});
|
|
814
|
+
});
|
|
815
|
+
|
|
816
|
+
it("reports a binary that cannot be spawned as a query failure that does not retry", async () => {
|
|
817
|
+
await expect(
|
|
818
|
+
runJson(
|
|
819
|
+
["/nonexistent/watch-pr-missing-gh", "pr", "view"],
|
|
820
|
+
new WatchDeadline(0, () => 0)
|
|
821
|
+
)
|
|
822
|
+
).rejects.toMatchObject({
|
|
823
|
+
failure: {
|
|
824
|
+
kind: "spawn-failed",
|
|
825
|
+
retryable: false,
|
|
826
|
+
detail: expect.stringContaining("ENOENT"),
|
|
827
|
+
},
|
|
828
|
+
});
|
|
829
|
+
});
|
|
830
|
+
|
|
831
|
+
describe("fast-path check mapping", () => {
|
|
832
|
+
// gh's aggregate.go files every state it does not name into the pending
|
|
833
|
+
// bucket, including completed conclusions.
|
|
834
|
+
it("fails completed conclusions that gh buckets as pending", () => {
|
|
835
|
+
for (const state of ["STARTUP_FAILURE", "STALE"]) {
|
|
836
|
+
expect(
|
|
837
|
+
parseFastCheck({ name: "ci", state, bucket: "pending" })
|
|
838
|
+
).toMatchObject({ kind: "failed", reportedState: state });
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
|
|
842
|
+
it("keeps in-flight states pending", () => {
|
|
843
|
+
for (const state of [
|
|
844
|
+
"EXPECTED",
|
|
845
|
+
"REQUESTED",
|
|
846
|
+
"WAITING",
|
|
847
|
+
"QUEUED",
|
|
848
|
+
"PENDING",
|
|
849
|
+
"IN_PROGRESS",
|
|
850
|
+
]) {
|
|
851
|
+
expect(
|
|
852
|
+
parseFastCheck({ name: "ci", state, bucket: "pending" })
|
|
853
|
+
).toMatchObject({ kind: "pending", reportedState: state });
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
});
|
|
857
|
+
|
|
858
|
+
describe("closed enum parsing", () => {
|
|
859
|
+
const rawPullRequest = {
|
|
860
|
+
mergeable: "MERGEABLE",
|
|
861
|
+
mergeStateStatus: "CLEAN",
|
|
862
|
+
reviewDecision: "APPROVED",
|
|
863
|
+
headRefOid: "head",
|
|
864
|
+
baseRef: { target: { oid: "base" } },
|
|
865
|
+
headRefName: "feature",
|
|
866
|
+
baseRefName: "main",
|
|
867
|
+
state: "OPEN",
|
|
868
|
+
mergedAt: null,
|
|
869
|
+
isDraft: false,
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
it("uses the current base target when the scalar base OID is stale", () => {
|
|
873
|
+
expect(
|
|
874
|
+
parsePullRequest(
|
|
875
|
+
{
|
|
876
|
+
...rawPullRequest,
|
|
877
|
+
baseRefOid: "stale-base",
|
|
878
|
+
baseRef: { target: { oid: "current-base" } },
|
|
879
|
+
},
|
|
880
|
+
context
|
|
881
|
+
).baseRefOid
|
|
882
|
+
).toBe("current-base");
|
|
883
|
+
});
|
|
884
|
+
|
|
885
|
+
it("queries the current base target with the other PR facts", () => {
|
|
886
|
+
expect(PR_FACTS_QUERY).toContain("baseRef { target { oid } }");
|
|
887
|
+
expect(PR_FACTS_QUERY).not.toContain("baseRefOid");
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
it("fails closed when the current base ref is null or missing", () => {
|
|
891
|
+
const missingBaseRef = Object.fromEntries(
|
|
892
|
+
Object.entries(rawPullRequest).filter(([key]) => key !== "baseRef")
|
|
893
|
+
);
|
|
894
|
+
for (const value of [{ ...rawPullRequest, baseRef: null }, missingBaseRef])
|
|
895
|
+
expect(() => parsePullRequest(value, context)).toThrow(WatcherQueryError);
|
|
896
|
+
});
|
|
897
|
+
});
|
|
898
|
+
|
|
899
|
+
describe("review thread pagination", () => {
|
|
900
|
+
it("rejects a page that promises more pages without a cursor", () => {
|
|
901
|
+
for (const endCursor of [null, ""]) {
|
|
902
|
+
const response = {
|
|
903
|
+
data: {
|
|
904
|
+
repository: {
|
|
905
|
+
pullRequest: {
|
|
906
|
+
reviewThreads: {
|
|
907
|
+
pageInfo: { hasNextPage: true, endCursor },
|
|
908
|
+
nodes: [],
|
|
909
|
+
},
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
},
|
|
913
|
+
};
|
|
914
|
+
expect(() => parseReviewThreadPage(response)).toThrow(WatcherQueryError);
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
|
|
918
|
+
it("rejects a thread cursor that does not advance instead of paging on", async () => {
|
|
919
|
+
const stuck = { threads: [], endCursor: "same" };
|
|
920
|
+
const reader = fakeReader({
|
|
921
|
+
threadPages: [stuck, stuck, { threads: [], endCursor: null }],
|
|
922
|
+
});
|
|
923
|
+
await expect(resolveReviewThreads(reader, context)).rejects.toMatchObject({
|
|
924
|
+
failure: {
|
|
925
|
+
kind: "missing-field",
|
|
926
|
+
retryable: true,
|
|
927
|
+
detail: expect.stringContaining(
|
|
928
|
+
"reviewThreads.pageInfo.endCursor must advance"
|
|
929
|
+
),
|
|
930
|
+
},
|
|
931
|
+
});
|
|
932
|
+
expect(reader.calls).toEqual([
|
|
933
|
+
"reviewThreadPage:null",
|
|
934
|
+
"reviewThreadPage:same",
|
|
935
|
+
]);
|
|
936
|
+
});
|
|
937
|
+
});
|
|
938
|
+
|
|
939
|
+
describe("context and stack discovery", () => {
|
|
940
|
+
it("refuses to pair the checkout's PR number with a different explicit repository", async () => {
|
|
941
|
+
const reader = fakeReader({
|
|
942
|
+
current: { owner: "acme", repo: "web", number: parsePrNumber(57) },
|
|
943
|
+
});
|
|
944
|
+
const resolved = resolveContext({
|
|
945
|
+
reader,
|
|
946
|
+
owner: "acme",
|
|
947
|
+
repo: "api",
|
|
948
|
+
pr: null,
|
|
949
|
+
});
|
|
950
|
+
await expect(resolved).rejects.toBeInstanceOf(WatcherQueryError);
|
|
951
|
+
await expect(resolved).rejects.toMatchObject({
|
|
952
|
+
failure: { retryable: false },
|
|
953
|
+
});
|
|
954
|
+
});
|
|
955
|
+
|
|
956
|
+
it("accepts an explicit repository that matches the checkout's PR", async () => {
|
|
957
|
+
const reader = fakeReader({
|
|
958
|
+
current: { owner: "acme", repo: "web", number: parsePrNumber(57) },
|
|
959
|
+
});
|
|
960
|
+
expect(
|
|
961
|
+
await resolveContext({ reader, owner: "ACME", repo: "Web", pr: null })
|
|
962
|
+
).toEqual({ owner: "ACME", repo: "Web", number: parsePrNumber(57) });
|
|
963
|
+
});
|
|
964
|
+
|
|
965
|
+
it("keeps a PR whose head is the default branch out of every stack", () => {
|
|
966
|
+
const repo = { owner: "owner", repo: "repo" };
|
|
967
|
+
const backport = parsePrNumber(2);
|
|
968
|
+
const open = [
|
|
969
|
+
{
|
|
970
|
+
number: backport,
|
|
971
|
+
headRepository: repo,
|
|
972
|
+
headRefName: "main",
|
|
973
|
+
baseRefName: "release",
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
number: context.number,
|
|
977
|
+
headRepository: repo,
|
|
978
|
+
headRefName: "feature",
|
|
979
|
+
baseRefName: "main",
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
number: parsePrNumber(43),
|
|
983
|
+
headRepository: repo,
|
|
984
|
+
headRefName: "upstack",
|
|
985
|
+
baseRefName: "feature",
|
|
986
|
+
},
|
|
987
|
+
];
|
|
988
|
+
expect(numbers(orderStack(context, "main", open))).toEqual([42, 43]);
|
|
989
|
+
expect(
|
|
990
|
+
numbers(orderStack({ ...context, number: backport }, "main", open))
|
|
991
|
+
).toEqual([2]);
|
|
992
|
+
});
|
|
993
|
+
|
|
994
|
+
it("keeps a PR that brings the default branch into a feature branch out of that feature's stack", () => {
|
|
995
|
+
const repo = { owner: "owner", repo: "repo" };
|
|
996
|
+
const sync = parsePrNumber(7);
|
|
997
|
+
const open = [
|
|
998
|
+
{
|
|
999
|
+
number: context.number,
|
|
1000
|
+
headRepository: repo,
|
|
1001
|
+
headRefName: "feature",
|
|
1002
|
+
baseRefName: "main",
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
number: sync,
|
|
1006
|
+
headRepository: repo,
|
|
1007
|
+
headRefName: "main",
|
|
1008
|
+
baseRefName: "feature",
|
|
1009
|
+
},
|
|
1010
|
+
];
|
|
1011
|
+
expect(numbers(orderStack(context, "main", open))).toEqual([42]);
|
|
1012
|
+
expect(
|
|
1013
|
+
numbers(orderStack({ ...context, number: sync }, "main", open))
|
|
1014
|
+
).toEqual([7]);
|
|
1015
|
+
});
|
|
1016
|
+
|
|
1017
|
+
it("still stacks a fork PR whose head branch has the default branch's name", () => {
|
|
1018
|
+
const fork = parsePrNumber(50);
|
|
1019
|
+
const open = [
|
|
1020
|
+
{
|
|
1021
|
+
number: context.number,
|
|
1022
|
+
headRepository: { owner: "owner", repo: "repo" },
|
|
1023
|
+
headRefName: "feature",
|
|
1024
|
+
baseRefName: "main",
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
number: fork,
|
|
1028
|
+
headRepository: { owner: "contributor", repo: "repo" },
|
|
1029
|
+
headRefName: "main",
|
|
1030
|
+
baseRefName: "feature",
|
|
1031
|
+
},
|
|
1032
|
+
];
|
|
1033
|
+
expect(numbers(orderStack(context, "main", open))).toEqual([42, 50]);
|
|
1034
|
+
expect(
|
|
1035
|
+
numbers(orderStack({ ...context, number: fork }, "main", open))
|
|
1036
|
+
).toEqual([42, 50]);
|
|
1037
|
+
});
|
|
1038
|
+
|
|
1039
|
+
it("stops at the default branch when it is an integration branch with a release PR", () => {
|
|
1040
|
+
const repo = { owner: "owner", repo: "repo" };
|
|
1041
|
+
const open = [
|
|
1042
|
+
{
|
|
1043
|
+
number: parsePrNumber(500),
|
|
1044
|
+
headRepository: repo,
|
|
1045
|
+
headRefName: "develop",
|
|
1046
|
+
baseRefName: "main",
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
number: parsePrNumber(612),
|
|
1050
|
+
headRepository: repo,
|
|
1051
|
+
headRefName: "feature/login",
|
|
1052
|
+
baseRefName: "develop",
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
number: parsePrNumber(613),
|
|
1056
|
+
headRepository: repo,
|
|
1057
|
+
headRefName: "fix/typo",
|
|
1058
|
+
baseRefName: "develop",
|
|
1059
|
+
},
|
|
1060
|
+
];
|
|
1061
|
+
expect(
|
|
1062
|
+
numbers(
|
|
1063
|
+
orderStack({ ...repo, number: parsePrNumber(612) }, "develop", open)
|
|
1064
|
+
)
|
|
1065
|
+
).toEqual([612]);
|
|
1066
|
+
expect(
|
|
1067
|
+
numbers(
|
|
1068
|
+
orderStack({ ...repo, number: parsePrNumber(500) }, "develop", open)
|
|
1069
|
+
)
|
|
1070
|
+
).toEqual([500]);
|
|
1071
|
+
});
|
|
1072
|
+
|
|
1073
|
+
it("reads the default branch once while discovering a stack", async () => {
|
|
1074
|
+
const reader = fakeReader({ defaultBranch: "trunk" });
|
|
1075
|
+
expect(await discoverStack(reader, context)).toEqual([context]);
|
|
1076
|
+
expect(reader.calls).toEqual(["openPullRequests", "defaultBranch"]);
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
it("orders a discovered stack around the default branch the repository reports", async () => {
|
|
1080
|
+
const repo = { owner: "owner", repo: "repo" };
|
|
1081
|
+
const reader = fakeReader({
|
|
1082
|
+
defaultBranch: "develop",
|
|
1083
|
+
openPullRequests: [
|
|
1084
|
+
{
|
|
1085
|
+
number: parsePrNumber(500),
|
|
1086
|
+
headRepository: repo,
|
|
1087
|
+
headRefName: "develop",
|
|
1088
|
+
baseRefName: "main",
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
number: context.number,
|
|
1092
|
+
headRepository: repo,
|
|
1093
|
+
headRefName: "feature",
|
|
1094
|
+
baseRefName: "develop",
|
|
1095
|
+
},
|
|
1096
|
+
],
|
|
1097
|
+
});
|
|
1098
|
+
expect(numbers(await discoverStack(reader, context))).toEqual([42]);
|
|
1099
|
+
});
|
|
1100
|
+
|
|
1101
|
+
it("refuses a full open-PR page, which may have cut the stack", async () => {
|
|
1102
|
+
const openPrs = (count: number) =>
|
|
1103
|
+
Array.from({ length: count }, (_, index) => ({
|
|
1104
|
+
number: parsePrNumber(index + 1),
|
|
1105
|
+
headRepository: { owner: "owner", repo: "repo" },
|
|
1106
|
+
headRefName: `branch-${index + 1}`,
|
|
1107
|
+
baseRefName: "main",
|
|
1108
|
+
}));
|
|
1109
|
+
await expect(
|
|
1110
|
+
discoverStack(fakeReader({ openPullRequests: openPrs(300) }), context)
|
|
1111
|
+
).rejects.toMatchObject({ failure: { kind: "invalid-stack" } });
|
|
1112
|
+
expect(
|
|
1113
|
+
await discoverStack(
|
|
1114
|
+
fakeReader({ openPullRequests: openPrs(299) }),
|
|
1115
|
+
context
|
|
1116
|
+
)
|
|
1117
|
+
).toEqual([context]);
|
|
1118
|
+
});
|
|
1119
|
+
});
|