pstack-claude-mirror 0.0.0-stage → 0.9.133
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/.claude-plugin/marketplace.json +16 -0
- package/CHANGES.md +1110 -0
- package/LICENSE +22 -0
- package/LICENSE-cursor-team-kit +21 -0
- package/LICENSE-mirror +27 -0
- package/LICENSE-thermos +21 -0
- package/NOTICE-skills.md +13 -0
- package/NOTICE.md +62 -0
- package/README.md +84 -2
- package/UPSTREAM-README.md +243 -0
- package/bin/pstack-claude.mjs +183 -0
- package/docs/reference.md +247 -0
- package/package.json +88 -4
- package/plugins/pstack/.antigravity-plugin/plugin.json +8 -0
- package/plugins/pstack/.claude-plugin/icon.png +0 -0
- package/plugins/pstack/.claude-plugin/plugin.json +31 -0
- package/plugins/pstack/.codex-plugin/plugin.json +52 -0
- package/plugins/pstack/.github/plugin/plugin.json +15 -0
- package/plugins/pstack/.grok-plugin/plugin.json +9 -0
- package/plugins/pstack/.muse-plugin/plugin.json +381 -0
- package/plugins/pstack/README.md +27 -0
- package/plugins/pstack/agents/comment-sicko.md +34 -0
- package/plugins/pstack/agents/poteto-agent.md +8 -0
- package/plugins/pstack/agents/thermo-nuclear-code-quality-review-subagent.md +23 -0
- package/plugins/pstack/agents/thermo-nuclear-review-subagent.md +28 -0
- package/plugins/pstack/assets/pstack-icon.png +0 -0
- package/plugins/pstack/assets/pstack-icon.prompt.txt +8 -0
- package/plugins/pstack/grok/skills/pstack-routing/SKILL.md +8 -0
- package/plugins/pstack/hooks/agy-context.awk +9 -0
- package/plugins/pstack/hooks/codex-hooks.json +17 -0
- package/plugins/pstack/hooks/copilot-context.awk +44 -0
- package/plugins/pstack/hooks/copilot-hooks.json +27 -0
- package/plugins/pstack/hooks/hooks.json +16 -0
- package/plugins/pstack/hooks/json.awk +164 -0
- package/plugins/pstack/hooks/kimi-instructions.md +17 -0
- package/plugins/pstack/hooks/muse-context.awk +31 -0
- package/plugins/pstack/hooks/pre-tool-use.awk +152 -0
- package/plugins/pstack/hooks/pre-tool-use.sh +16 -0
- package/plugins/pstack/hooks/script-contracts.awk +55 -0
- package/plugins/pstack/hooks/session-start-agy.md +17 -0
- package/plugins/pstack/hooks/session-start-context.md +15 -0
- package/plugins/pstack/hooks/session-start-copilot-setup.md +1 -0
- package/plugins/pstack/hooks/session-start-copilot-sheet.md +1 -0
- package/plugins/pstack/hooks/session-start-copilot.md +3 -0
- package/plugins/pstack/hooks/session-start-minimax.md +17 -0
- package/plugins/pstack/hooks/session-start-muse-sheet.md +1 -0
- package/plugins/pstack/hooks/session-start-muse.md +17 -0
- package/plugins/pstack/hooks/session-start-opencode.md +17 -0
- package/plugins/pstack/hooks/session-start.ps1 +105 -0
- package/plugins/pstack/hooks/session-start.sh +95 -0
- package/plugins/pstack/hooks.json +10 -0
- package/plugins/pstack/models.json +67 -0
- package/plugins/pstack/omp/index.mjs +34 -0
- package/plugins/pstack/opencode/index.js +49 -0
- package/plugins/pstack/package.json +8 -0
- package/plugins/pstack/pi/agent-files.ts +117 -0
- package/plugins/pstack/pi/agent-text.ts +99 -0
- package/plugins/pstack/pi/agent-tools.ts +148 -0
- package/plugins/pstack/pi/agents.ts +486 -0
- package/plugins/pstack/pi/ask.ts +87 -0
- package/plugins/pstack/pi/child.ts +310 -0
- package/plugins/pstack/pi/config.ts +178 -0
- package/plugins/pstack/pi/index.ts +44 -0
- package/plugins/pstack/pi/one-shot.ts +90 -0
- package/plugins/pstack/pi/path-skills.ts +54 -0
- package/plugins/pstack/pi/prompt.ts +39 -0
- package/plugins/pstack/pi/schedule.ts +254 -0
- package/plugins/pstack/pi/slash.ts +92 -0
- package/plugins/pstack/pi/sleep-wait.ts +76 -0
- package/plugins/pstack/pi/worktree.ts +74 -0
- package/plugins/pstack/skills/architect/SKILL.md +100 -0
- package/plugins/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/plugins/pstack/skills/architect/references/rationale-template.md +39 -0
- package/plugins/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/plugins/pstack/skills/arena/SKILL.md +66 -0
- package/plugins/pstack/skills/automate-me/SKILL.md +111 -0
- package/plugins/pstack/skills/babysit/SKILL.md +68 -0
- package/plugins/pstack/skills/benchmark-checklist/SKILL.md +38 -0
- package/plugins/pstack/skills/blast-radius/SKILL.md +49 -0
- package/plugins/pstack/skills/bro/SKILL.md +6 -0
- package/plugins/pstack/skills/correct/SKILL.md +31 -0
- package/plugins/pstack/skills/create-formal-verification-skill/SKILL.md +50 -0
- package/plugins/pstack/skills/create-verification-skill/SKILL.md +51 -0
- package/plugins/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/plugins/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/plugins/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/plugins/pstack/skills/deslop/SKILL.md +24 -0
- package/plugins/pstack/skills/figure-it-out/SKILL.md +51 -0
- package/plugins/pstack/skills/fix-ci/SKILL.md +29 -0
- package/plugins/pstack/skills/fix-merge-conflicts/SKILL.md +32 -0
- package/plugins/pstack/skills/get-pr-comments/SKILL.md +23 -0
- package/plugins/pstack/skills/how/SKILL.md +54 -0
- package/plugins/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/plugins/pstack/skills/how/references/explorer-prompt.md +35 -0
- package/plugins/pstack/skills/in-your-own-words/SKILL.md +6 -0
- package/plugins/pstack/skills/interrogate/SKILL.md +48 -0
- package/plugins/pstack/skills/ketchup/SKILL.md +42 -0
- package/plugins/pstack/skills/ketchup-video/SKILL.md +28 -0
- package/plugins/pstack/skills/maintain-formal-verification-skill/SKILL.md +65 -0
- package/plugins/pstack/skills/maintain-verification-skill/SKILL.md +46 -0
- package/plugins/pstack/skills/make-pr-easy-to-review/SKILL.md +59 -0
- package/plugins/pstack/skills/no-comments/SKILL.md +45 -0
- package/plugins/pstack/skills/poteto-help/SKILL.md +149 -0
- package/plugins/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/plugins/pstack/skills/poteto-help/references/recipes.md +51 -0
- package/plugins/pstack/skills/poteto-mode/SKILL.md +174 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/autopilot-full.md +31 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/babysit.md +23 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +158 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +34 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/orchestrate.md +27 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/pause-safely.md +11 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/refactoring.md +18 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/shipping.md +16 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/plugins/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/plugins/pstack/skills/poteto-mode/references/agents/comment-sicko.md +34 -0
- package/plugins/pstack/skills/poteto-mode/references/agy-tools.md +99 -0
- package/plugins/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/plugins/pstack/skills/poteto-mode/references/codex-tools.md +109 -0
- package/plugins/pstack/skills/poteto-mode/references/copilot-tools.md +143 -0
- package/plugins/pstack/skills/poteto-mode/references/grok.md +50 -0
- package/plugins/pstack/skills/poteto-mode/references/kimi-tools.md +40 -0
- package/plugins/pstack/skills/poteto-mode/references/licenses/LICENSE +22 -0
- package/plugins/pstack/skills/poteto-mode/references/licenses/LICENSE-cursor-team-kit +21 -0
- package/plugins/pstack/skills/poteto-mode/references/licenses/LICENSE-thermos +21 -0
- package/plugins/pstack/skills/poteto-mode/references/licenses/NOTICE.md +13 -0
- package/plugins/pstack/skills/poteto-mode/references/merge-safety.md +43 -0
- package/plugins/pstack/skills/poteto-mode/references/minimax-tools.md +93 -0
- package/plugins/pstack/skills/poteto-mode/references/muse-tools.md +105 -0
- package/plugins/pstack/skills/poteto-mode/references/omp-tools.md +39 -0
- package/plugins/pstack/skills/poteto-mode/references/opencode-tools.md +29 -0
- package/plugins/pstack/skills/poteto-mode/references/pi-tools.md +117 -0
- package/plugins/pstack/skills/poteto-mode/references/resume-storage.md +20 -0
- package/plugins/pstack/skills/poteto-mode/scripts/.prettierignore +23 -0
- package/plugins/pstack/skills/poteto-mode/scripts/.prettierrc.json +3 -0
- package/plugins/pstack/skills/poteto-mode/scripts/bootstrap.ts +71 -0
- package/plugins/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
- package/plugins/pstack/skills/poteto-mode/scripts/check-plan.mjs +214 -0
- package/plugins/pstack/skills/poteto-mode/scripts/check-plan.test.ts +115 -0
- package/plugins/pstack/skills/poteto-mode/scripts/check-playbooks.mjs +71 -0
- package/plugins/pstack/skills/poteto-mode/scripts/codex-session-effort.mjs +66 -0
- package/plugins/pstack/skills/poteto-mode/scripts/package.json +16 -0
- package/plugins/pstack/skills/poteto-mode/scripts/resume.mjs +139 -0
- package/plugins/pstack/skills/poteto-mode/scripts/tsconfig.json +14 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +383 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +266 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/deadline.ts +20 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +157 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/fresh-install.test.ts +35 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +902 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +922 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/integrity.test.ts +887 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/landing.ts +92 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/live-merge-safety.mjs +142 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +1151 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +956 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +200 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/ship-pr +6 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping-cli.test.ts +159 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping-cli.ts +65 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping.test-helper.ts +48 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping.test.ts +360 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/shipping.ts +235 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/transport.test.ts +211 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +108 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +474 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/plugins/pstack/skills/poteto-mode/scripts/watch-pr/wrapper.test.ts +20 -0
- package/plugins/pstack/skills/poteto-mode/scripts/worktree-audit.mjs +434 -0
- package/plugins/pstack/skills/principle-attack-the-premise/SKILL.md +21 -0
- package/plugins/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/plugins/pstack/skills/principle-build-the-lever/SKILL.md +24 -0
- package/plugins/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +11 -0
- package/plugins/pstack/skills/principle-exhaust-the-design-space/SKILL.md +9 -0
- package/plugins/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/plugins/pstack/skills/principle-explain-the-number/SKILL.md +18 -0
- package/plugins/pstack/skills/principle-fix-root-causes/SKILL.md +21 -0
- package/plugins/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/plugins/pstack/skills/principle-guard-the-context-window/SKILL.md +12 -0
- package/plugins/pstack/skills/principle-laziness-protocol/SKILL.md +10 -0
- package/plugins/pstack/skills/principle-make-operations-idempotent/SKILL.md +22 -0
- package/plugins/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +14 -0
- package/plugins/pstack/skills/principle-minimize-reader-load/SKILL.md +18 -0
- package/plugins/pstack/skills/principle-model-the-domain/SKILL.md +24 -0
- package/plugins/pstack/skills/principle-never-block-on-the-human/SKILL.md +15 -0
- package/plugins/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/plugins/pstack/skills/principle-prove-it-works/SKILL.md +27 -0
- package/plugins/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/plugins/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/plugins/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/plugins/pstack/skills/principle-subtract-before-you-add/SKILL.md +18 -0
- package/plugins/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +20 -0
- package/plugins/pstack/skills/principle-type-system-discipline/SKILL.md +13 -0
- package/plugins/pstack/skills/recall/SKILL.md +43 -0
- package/plugins/pstack/skills/reflect/SKILL.md +89 -0
- package/plugins/pstack/skills/reflect/references/divergent-reviewer.md +38 -0
- package/plugins/pstack/skills/reflect/references/judgment-reviewer.md +37 -0
- package/plugins/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/plugins/pstack/skills/reflect/references/tooling-reviewer.md +48 -0
- package/plugins/pstack/skills/reflect/scripts/claude-project-dir.mjs +121 -0
- package/plugins/pstack/skills/reflect/scripts/find-transcript.mjs +218 -0
- package/plugins/pstack/skills/setup-pstack/SKILL.md +109 -0
- package/plugins/pstack/skills/setup-pstack/copilot.md +88 -0
- package/plugins/pstack/skills/setup-pstack/references/runtimes.md +75 -0
- package/plugins/pstack/skills/setup-pstack/scripts/check-sheet.awk +10 -0
- package/plugins/pstack/skills/setup-pstack/scripts/check-sheet.sh +20 -0
- package/plugins/pstack/skills/setup-pstack/scripts/read-sheet.sh +24 -0
- package/plugins/pstack/skills/setup-pstack/scripts/sheet.awk +160 -0
- package/plugins/pstack/skills/sharpen/SKILL.md +15 -0
- package/plugins/pstack/skills/show-me-your-work/SKILL.md +89 -0
- package/plugins/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/plugins/pstack/skills/show-me-your-work/scripts/log.sh +58 -0
- package/plugins/pstack/skills/statechart/SKILL.md +81 -0
- package/plugins/pstack/skills/statechart/references/render.md +93 -0
- package/plugins/pstack/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/plugins/pstack/skills/statechart/scripts/backends/mermaid.ts +201 -0
- package/plugins/pstack/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/plugins/pstack/skills/statechart/scripts/backends/report.ts +177 -0
- package/plugins/pstack/skills/statechart/scripts/bun.lock +17 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/config.ts +276 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/dot.ts +74 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/value.ts +166 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/plugins/pstack/skills/statechart/scripts/frontends/view.ts +119 -0
- package/plugins/pstack/skills/statechart/scripts/ir.ts +547 -0
- package/plugins/pstack/skills/statechart/scripts/janitor.ts +12 -0
- package/plugins/pstack/skills/statechart/scripts/package.json +11 -0
- package/plugins/pstack/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/plugins/pstack/skills/statechart/scripts/passes/label.ts +269 -0
- package/plugins/pstack/skills/statechart/scripts/passes/lift.ts +85 -0
- package/plugins/pstack/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/plugins/pstack/skills/statechart/scripts/passes/paths.ts +60 -0
- package/plugins/pstack/skills/statechart/scripts/passes/reach.ts +135 -0
- package/plugins/pstack/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/plugins/pstack/skills/statechart/scripts/passes/regions.ts +295 -0
- package/plugins/pstack/skills/statechart/scripts/pipeline.ts +76 -0
- package/plugins/pstack/skills/statechart/scripts/run.ts +526 -0
- package/plugins/pstack/skills/statechart/scripts/statechart +29 -0
- package/plugins/pstack/skills/statechart/scripts/statechart.ts +171 -0
- package/plugins/pstack/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/plugins/pstack/skills/statechart/scripts/test/chart.test.ts +1210 -0
- package/plugins/pstack/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/plugins/pstack/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/plugins/pstack/skills/statechart/scripts/test/child-env.test.ts +15 -0
- package/plugins/pstack/skills/statechart/scripts/test/cli.test.ts +1323 -0
- package/plugins/pstack/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/chart.mmd +27 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/plugins/pstack/skills/statechart/scripts/test/corpus.test.ts +415 -0
- package/plugins/pstack/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/plugins/pstack/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/plugins/pstack/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/plugins/pstack/skills/statechart/scripts/test/java.ts +63 -0
- package/plugins/pstack/skills/statechart/scripts/test/labels.ts +643 -0
- package/plugins/pstack/skills/statechart/scripts/test/messages.test.ts +227 -0
- package/plugins/pstack/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/plugins/pstack/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/plugins/pstack/skills/statechart/scripts/test/render.test.ts +81 -0
- package/plugins/pstack/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/plugins/pstack/skills/statechart/scripts/test/tlc.ts +158 -0
- package/plugins/pstack/skills/statechart/scripts/tsconfig.json +11 -0
- package/plugins/pstack/skills/statechart/scripts/worker.ts +35 -0
- package/plugins/pstack/skills/swarm/SKILL.md +58 -0
- package/plugins/pstack/skills/tdd/SKILL.md +41 -0
- package/plugins/pstack/skills/teach/SKILL.md +28 -0
- package/plugins/pstack/skills/technical-writing/SKILL.md +105 -0
- package/plugins/pstack/skills/thermo-nuclear-code-quality-review/SKILL.md +201 -0
- package/plugins/pstack/skills/thermo-nuclear-review/SKILL.md +50 -0
- package/plugins/pstack/skills/thermos/SKILL.md +40 -0
- package/plugins/pstack/skills/typescript-best-practices/SKILL.md +32 -0
- package/plugins/pstack/skills/typescript-best-practices/references/patterns.md +328 -0
- package/plugins/pstack/skills/unslop/SKILL.md +61 -0
- package/plugins/pstack/skills/what-did-i-get-done/SKILL.md +31 -0
- package/plugins/pstack/skills/why/SKILL.md +116 -0
- package/plugins/pstack/skills/why/references/epistemics.md +79 -0
- package/plugins/pstack/skills/why/references/investigator-prompt.md +86 -0
- package/plugins/pstack/skills/why/references/source-playbook.md +17 -0
- package/plugins/pstack/skills/why/references/sources/code-archaeology.md +51 -0
- package/plugins/pstack/skills/why/references/sources/databricks.md +70 -0
- package/plugins/pstack/skills/why/references/sources/datadog.md +97 -0
- package/plugins/pstack/skills/why/references/sources/incident-postmortem.md +5 -0
- package/plugins/pstack/skills/why/references/sources/linear.md +48 -0
- package/plugins/pstack/skills/why/references/sources/notion.md +55 -0
- package/plugins/pstack/skills/why/references/sources/sentry.md +66 -0
- package/plugins/pstack/skills/why/references/sources/slack.md +17 -0
- package/plugins/pstack/skills/why/references/synthesizer-prompt.md +130 -0
- package/tools/forks.json +398 -0
- package/tools/substitutions.json +646 -0
- package/tools/upstream.json +53 -0
|
@@ -0,0 +1,887 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import { DeadlineExceeded, WatchDeadline } from "./deadline.ts";
|
|
3
|
+
import { fakeReader, pendingCheck, failedCheck } from "./fakes.test-helper.ts";
|
|
4
|
+
import type { FakeReaderOptions } from "./fakes.test-helper.ts";
|
|
5
|
+
import { orderStack, parsePullRequest, WatcherQueryError } from "./github.ts";
|
|
6
|
+
import {
|
|
7
|
+
flag,
|
|
8
|
+
nullableText,
|
|
9
|
+
object,
|
|
10
|
+
oneOf,
|
|
11
|
+
parseContext,
|
|
12
|
+
parseLandingRevision,
|
|
13
|
+
text,
|
|
14
|
+
} from "./landing.ts";
|
|
15
|
+
import {
|
|
16
|
+
classifyPr,
|
|
17
|
+
readSnapshot,
|
|
18
|
+
runSimple,
|
|
19
|
+
runQueued,
|
|
20
|
+
selectTierMajorStackDecision,
|
|
21
|
+
} from "./policy.ts";
|
|
22
|
+
import { renderPretty } from "./render.ts";
|
|
23
|
+
import {
|
|
24
|
+
parsePrNumber,
|
|
25
|
+
type MergeBlocker,
|
|
26
|
+
type ProgressVerdict,
|
|
27
|
+
} from "./types.ts";
|
|
28
|
+
|
|
29
|
+
const context = { owner: "owner", repo: "repo", number: parsePrNumber(1) };
|
|
30
|
+
const options = {
|
|
31
|
+
interval: 60,
|
|
32
|
+
sweepInterval: 300,
|
|
33
|
+
timeout: 1,
|
|
34
|
+
maxQueryErrors: 5,
|
|
35
|
+
allowDraft: false,
|
|
36
|
+
};
|
|
37
|
+
const unbounded = new WatchDeadline(0, () => 0);
|
|
38
|
+
const snapshotArgs = {
|
|
39
|
+
context,
|
|
40
|
+
pendingHistory: "include" as const,
|
|
41
|
+
allowDraft: false,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
describe("commit identity", () => {
|
|
45
|
+
const rawPullRequest = {
|
|
46
|
+
mergeable: "MERGEABLE",
|
|
47
|
+
mergeStateStatus: "CLEAN",
|
|
48
|
+
reviewDecision: "APPROVED",
|
|
49
|
+
headRefOid: "head",
|
|
50
|
+
baseRef: { target: { oid: "base" } },
|
|
51
|
+
headRefName: "feature",
|
|
52
|
+
baseRefName: "main",
|
|
53
|
+
state: "OPEN",
|
|
54
|
+
mergedAt: null,
|
|
55
|
+
isDraft: false,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
it("rejects an open PR without a head or base commit where it is parsed", () => {
|
|
59
|
+
for (const missing of [
|
|
60
|
+
{ headRefOid: null },
|
|
61
|
+
{ baseRef: { target: { oid: "" } } },
|
|
62
|
+
])
|
|
63
|
+
expect(() =>
|
|
64
|
+
parsePullRequest({ ...rawPullRequest, ...missing }, context)
|
|
65
|
+
).toThrow(WatcherQueryError);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("accepts a merged PR whose head and base commits are gone", () => {
|
|
69
|
+
expect(
|
|
70
|
+
parsePullRequest(
|
|
71
|
+
{
|
|
72
|
+
...rawPullRequest,
|
|
73
|
+
state: "MERGED",
|
|
74
|
+
mergedAt: "2026-07-26T00:00:00Z",
|
|
75
|
+
headRefOid: null,
|
|
76
|
+
baseRef: null,
|
|
77
|
+
},
|
|
78
|
+
context
|
|
79
|
+
)
|
|
80
|
+
).toMatchObject({ state: "MERGED", headRefOid: null, baseRefOid: null });
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("rejects a missing expected commit instead of treating it as a null rollup", async () => {
|
|
84
|
+
const reader = fakeReader({
|
|
85
|
+
facts: { headRefOid: "old", mergeStateStatus: "BLOCKED" },
|
|
86
|
+
commitRollups: [{ oid: "new", state: "FAILURE" }],
|
|
87
|
+
});
|
|
88
|
+
await expect(readSnapshot({ ...snapshotArgs, reader })).rejects.toThrow(
|
|
89
|
+
WatcherQueryError
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it("keeps an explicitly absent rollup distinct from a missing commit", async () => {
|
|
94
|
+
const reader = fakeReader({
|
|
95
|
+
commitRollups: [{ oid: "head", state: null }],
|
|
96
|
+
});
|
|
97
|
+
expect(
|
|
98
|
+
classifyPr(await readSnapshot({ ...snapshotArgs, reader })).kind
|
|
99
|
+
).toBe("ready");
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("includes the checked commit in a ready proof", async () => {
|
|
103
|
+
expect(
|
|
104
|
+
classifyPr(await readSnapshot({ ...snapshotArgs, reader: fakeReader() }))
|
|
105
|
+
).toMatchObject({
|
|
106
|
+
kind: "ready",
|
|
107
|
+
pr: {
|
|
108
|
+
proof: {
|
|
109
|
+
revision: {
|
|
110
|
+
context,
|
|
111
|
+
headRefOid: "head",
|
|
112
|
+
baseRefName: "main",
|
|
113
|
+
baseRefOid: "base",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("rejects a changed head even when earlier checks and rollups passed", async () => {
|
|
121
|
+
const reader = fakeReader({ factsOnReread: { headRefOid: "replacement" } });
|
|
122
|
+
await expect(readSnapshot({ ...snapshotArgs, reader })).rejects.toThrow(
|
|
123
|
+
"PR changed while collecting head against main: headRefOid head -> replacement"
|
|
124
|
+
);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it("rejects a retarget even when the head and checks remain unchanged", async () => {
|
|
128
|
+
const reader = fakeReader({ factsOnReread: { baseRefName: "release" } });
|
|
129
|
+
await expect(readSnapshot({ ...snapshotArgs, reader })).rejects.toThrow(
|
|
130
|
+
"PR changed while collecting"
|
|
131
|
+
);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it("rejects base movement with the same head and base branch", async () => {
|
|
135
|
+
const reader = fakeReader({ factsOnReread: { baseRefOid: "advanced" } });
|
|
136
|
+
await expect(readSnapshot({ ...snapshotArgs, reader })).rejects.toThrow(
|
|
137
|
+
"PR changed while collecting"
|
|
138
|
+
);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it("detects current base movement when the PR's scalar base OID stays stale", async () => {
|
|
142
|
+
const base = fakeReader();
|
|
143
|
+
let reads = 0;
|
|
144
|
+
const reader = {
|
|
145
|
+
...base,
|
|
146
|
+
async pullRequest(requested: typeof context) {
|
|
147
|
+
const baseRefOid = reads++ === 0 ? "base" : "advanced";
|
|
148
|
+
return parsePullRequest(
|
|
149
|
+
{
|
|
150
|
+
...rawPullRequest,
|
|
151
|
+
baseRefOid: "stale-base",
|
|
152
|
+
baseRef: { target: { oid: baseRefOid } },
|
|
153
|
+
},
|
|
154
|
+
requested
|
|
155
|
+
);
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
await expect(readSnapshot({ ...snapshotArgs, reader })).rejects.toThrow(
|
|
159
|
+
"PR changed while collecting"
|
|
160
|
+
);
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it("cannot report ready when the destination query is unavailable", async () => {
|
|
164
|
+
const base = fakeReader();
|
|
165
|
+
let reads = 0;
|
|
166
|
+
const reader = {
|
|
167
|
+
...base,
|
|
168
|
+
async pullRequest(requested: typeof context) {
|
|
169
|
+
if (++reads > 1)
|
|
170
|
+
throw new WatcherQueryError({
|
|
171
|
+
kind: "command-exit",
|
|
172
|
+
retryable: true,
|
|
173
|
+
code: 1,
|
|
174
|
+
detail: "destination unavailable",
|
|
175
|
+
});
|
|
176
|
+
return base.pullRequest(requested);
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
const verdict = await runSimple({
|
|
180
|
+
dependencies: {
|
|
181
|
+
reader,
|
|
182
|
+
emit() {},
|
|
183
|
+
clock: { now: () => 0, observedAt: () => "fixture", async sleep() {} },
|
|
184
|
+
deadline: unbounded,
|
|
185
|
+
},
|
|
186
|
+
contexts: [context],
|
|
187
|
+
mode: "single",
|
|
188
|
+
statusOnly: false,
|
|
189
|
+
options: { ...options, maxQueryErrors: 1 },
|
|
190
|
+
});
|
|
191
|
+
expect(verdict).toMatchObject({
|
|
192
|
+
kind: "BLOCKER",
|
|
193
|
+
blocker: { kind: "status-query" },
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it("retries a changed head and only proves the stable observation", async () => {
|
|
198
|
+
const reader = fakeReader({
|
|
199
|
+
factsOnReread: { headRefOid: "replacement" },
|
|
200
|
+
commitRollups: [
|
|
201
|
+
{ oid: "head", state: "SUCCESS" },
|
|
202
|
+
{ oid: "replacement", state: "SUCCESS" },
|
|
203
|
+
],
|
|
204
|
+
});
|
|
205
|
+
const verdict = await runSimple({
|
|
206
|
+
dependencies: {
|
|
207
|
+
reader,
|
|
208
|
+
emit() {},
|
|
209
|
+
clock: { now: () => 0, observedAt: () => "fixture", async sleep() {} },
|
|
210
|
+
deadline: unbounded,
|
|
211
|
+
},
|
|
212
|
+
contexts: [context],
|
|
213
|
+
mode: "single",
|
|
214
|
+
statusOnly: false,
|
|
215
|
+
options,
|
|
216
|
+
});
|
|
217
|
+
expect(reader.calls.filter((call) => call === "pullRequest")).toHaveLength(
|
|
218
|
+
4
|
|
219
|
+
);
|
|
220
|
+
expect(verdict).toMatchObject({
|
|
221
|
+
kind: "READY",
|
|
222
|
+
scope: {
|
|
223
|
+
pr: {
|
|
224
|
+
proof: {
|
|
225
|
+
revision: {
|
|
226
|
+
context,
|
|
227
|
+
headRefOid: "replacement",
|
|
228
|
+
baseRefName: "main",
|
|
229
|
+
baseRefOid: "base",
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
describe("stack branch ambiguity", () => {
|
|
239
|
+
const pr = (number: number, headRefName: string, baseRefName: string) => ({
|
|
240
|
+
number: parsePrNumber(number),
|
|
241
|
+
headRepository: context,
|
|
242
|
+
headRefName,
|
|
243
|
+
baseRefName,
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
it("ignores duplicate heads outside the requested stack", () => {
|
|
247
|
+
const result = orderStack(context, "main", [
|
|
248
|
+
pr(1, "feature", "main"),
|
|
249
|
+
pr(2, "hotfix", "main"),
|
|
250
|
+
pr(3, "hotfix", "release"),
|
|
251
|
+
pr(4, "child", "feature"),
|
|
252
|
+
]);
|
|
253
|
+
expect(result.map((row) => row.number)).toEqual([
|
|
254
|
+
parsePrNumber(1),
|
|
255
|
+
parsePrNumber(4),
|
|
256
|
+
]);
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
it("keeps a missing seed independent of unrelated duplicate heads", () => {
|
|
260
|
+
expect(
|
|
261
|
+
orderStack(context, "main", [
|
|
262
|
+
pr(2, "hotfix", "main"),
|
|
263
|
+
pr(3, "hotfix", "release"),
|
|
264
|
+
])
|
|
265
|
+
).toEqual([context]);
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
it("rejects an ambiguous downstack parent", () => {
|
|
269
|
+
expect(() =>
|
|
270
|
+
orderStack(context, "main", [
|
|
271
|
+
pr(1, "feature", "hotfix"),
|
|
272
|
+
pr(2, "hotfix", "main"),
|
|
273
|
+
pr(3, "hotfix", "release"),
|
|
274
|
+
])
|
|
275
|
+
).toThrow("multiple PRs have the same repository branch: hotfix");
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
it("rejects an ambiguous parent when traversing descendants", () => {
|
|
279
|
+
expect(() =>
|
|
280
|
+
orderStack(context, "main", [
|
|
281
|
+
pr(1, "feature", "main"),
|
|
282
|
+
pr(2, "hotfix", "feature"),
|
|
283
|
+
pr(3, "hotfix", "release"),
|
|
284
|
+
pr(4, "child", "hotfix"),
|
|
285
|
+
])
|
|
286
|
+
).toThrow("multiple PRs have the same repository branch: hotfix");
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
it("rejects a repository-local cycle without walking forever", () => {
|
|
291
|
+
expect(() =>
|
|
292
|
+
orderStack(context, "main", [
|
|
293
|
+
{
|
|
294
|
+
number: context.number,
|
|
295
|
+
headRepository: context,
|
|
296
|
+
headRefName: "a",
|
|
297
|
+
baseRefName: "b",
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
number: parsePrNumber(2),
|
|
301
|
+
headRepository: context,
|
|
302
|
+
headRefName: "b",
|
|
303
|
+
baseRefName: "a",
|
|
304
|
+
},
|
|
305
|
+
])
|
|
306
|
+
).toThrow("cycle in PR stack");
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
it("includes a fork PR whose base genuinely depends on a local parent", () => {
|
|
310
|
+
const result = orderStack(context, "main", [
|
|
311
|
+
{
|
|
312
|
+
number: context.number,
|
|
313
|
+
headRepository: context,
|
|
314
|
+
headRefName: "base",
|
|
315
|
+
baseRefName: "main",
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
number: parsePrNumber(2),
|
|
319
|
+
headRepository: { owner: "fork", repo: "repo" },
|
|
320
|
+
headRefName: "foreign",
|
|
321
|
+
baseRefName: "base",
|
|
322
|
+
},
|
|
323
|
+
]);
|
|
324
|
+
expect(result.map((pr) => pr.number)).toEqual([
|
|
325
|
+
context.number,
|
|
326
|
+
parsePrNumber(2),
|
|
327
|
+
]);
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
it("does not attach children to a same-named branch in a fork", () => {
|
|
331
|
+
const result = orderStack(context, "main", [
|
|
332
|
+
{
|
|
333
|
+
number: context.number,
|
|
334
|
+
headRepository: { owner: "fork", repo: "repo" },
|
|
335
|
+
headRefName: "feature",
|
|
336
|
+
baseRefName: "main",
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
number: parsePrNumber(2),
|
|
340
|
+
headRepository: context,
|
|
341
|
+
headRefName: "child",
|
|
342
|
+
baseRefName: "feature",
|
|
343
|
+
},
|
|
344
|
+
]);
|
|
345
|
+
expect(result).toEqual([context]);
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
describe("deadline", () => {
|
|
349
|
+
for (const mode of ["single", "queued"] as const) {
|
|
350
|
+
it(`${mode} stops at the deadline before another observation`, async () => {
|
|
351
|
+
let now = 0;
|
|
352
|
+
const sleeps: number[] = [];
|
|
353
|
+
const reader = fakeReader({
|
|
354
|
+
fastPath: { kind: "checks", checks: [pendingCheck()] },
|
|
355
|
+
});
|
|
356
|
+
const dependencies = {
|
|
357
|
+
reader,
|
|
358
|
+
emit() {},
|
|
359
|
+
clock: {
|
|
360
|
+
now: () => now,
|
|
361
|
+
observedAt: () => "fixture",
|
|
362
|
+
async sleep(seconds: number) {
|
|
363
|
+
sleeps.push(seconds);
|
|
364
|
+
now += seconds;
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
deadline: new WatchDeadline(options.timeout, () => now),
|
|
368
|
+
};
|
|
369
|
+
const result =
|
|
370
|
+
mode === "single"
|
|
371
|
+
? await runSimple({
|
|
372
|
+
dependencies,
|
|
373
|
+
contexts: [context],
|
|
374
|
+
mode: "single",
|
|
375
|
+
statusOnly: false,
|
|
376
|
+
options,
|
|
377
|
+
})
|
|
378
|
+
: await runQueued({ dependencies, contexts: [context], options });
|
|
379
|
+
expect(result.kind).toBe("TIMEOUT");
|
|
380
|
+
expect(sleeps).toEqual([1]);
|
|
381
|
+
expect(now).toBe(1);
|
|
382
|
+
expect(
|
|
383
|
+
reader.calls.filter((call) => call === "pullRequest")
|
|
384
|
+
).toHaveLength(2);
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
it("bounds a retry by remaining time", async () => {
|
|
389
|
+
let now = 0;
|
|
390
|
+
let reads = 0;
|
|
391
|
+
const reader = {
|
|
392
|
+
...fakeReader(),
|
|
393
|
+
async pullRequest(): Promise<never> {
|
|
394
|
+
reads++;
|
|
395
|
+
throw new WatcherQueryError({
|
|
396
|
+
kind: "command-exit",
|
|
397
|
+
retryable: true,
|
|
398
|
+
code: 1,
|
|
399
|
+
detail: "fixture",
|
|
400
|
+
});
|
|
401
|
+
},
|
|
402
|
+
};
|
|
403
|
+
const result = await runSimple({
|
|
404
|
+
dependencies: {
|
|
405
|
+
reader,
|
|
406
|
+
emit() {},
|
|
407
|
+
clock: {
|
|
408
|
+
now: () => now,
|
|
409
|
+
observedAt: () => "fixture",
|
|
410
|
+
async sleep(seconds) {
|
|
411
|
+
now += seconds;
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
deadline: new WatchDeadline(options.timeout, () => now),
|
|
415
|
+
},
|
|
416
|
+
contexts: [context],
|
|
417
|
+
mode: "single",
|
|
418
|
+
statusOnly: false,
|
|
419
|
+
options,
|
|
420
|
+
});
|
|
421
|
+
expect(result.kind).toBe("TIMEOUT");
|
|
422
|
+
expect(now).toBe(1);
|
|
423
|
+
expect(reads).toBe(1);
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
function dependenciesWithReadOutlivingBudget(
|
|
427
|
+
readerOptions: FakeReaderOptions = {},
|
|
428
|
+
failure?: () => Error
|
|
429
|
+
) {
|
|
430
|
+
let now = 0;
|
|
431
|
+
const base = fakeReader(readerOptions);
|
|
432
|
+
const emitted: ProgressVerdict[] = [];
|
|
433
|
+
return {
|
|
434
|
+
reader: {
|
|
435
|
+
...base,
|
|
436
|
+
async pullRequest(requested: typeof context) {
|
|
437
|
+
now += 2;
|
|
438
|
+
if (failure !== undefined) throw failure();
|
|
439
|
+
return base.pullRequest(requested);
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
emitted,
|
|
443
|
+
emit(verdict: ProgressVerdict) {
|
|
444
|
+
emitted.push(verdict);
|
|
445
|
+
},
|
|
446
|
+
clock: {
|
|
447
|
+
now: () => now,
|
|
448
|
+
observedAt: () => "fixture",
|
|
449
|
+
async sleep(seconds: number) {
|
|
450
|
+
now += seconds;
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
deadline: new WatchDeadline(options.timeout, () => now),
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
const commandExit = () =>
|
|
457
|
+
new WatcherQueryError({
|
|
458
|
+
kind: "command-exit",
|
|
459
|
+
retryable: true,
|
|
460
|
+
code: 1,
|
|
461
|
+
detail: "fixture",
|
|
462
|
+
});
|
|
463
|
+
const single = {
|
|
464
|
+
contexts: [context],
|
|
465
|
+
mode: "single",
|
|
466
|
+
statusOnly: false,
|
|
467
|
+
} as const;
|
|
468
|
+
|
|
469
|
+
it("times out with the read failure when a retryable read fails past the deadline", async () => {
|
|
470
|
+
const dependencies = dependenciesWithReadOutlivingBudget({}, commandExit);
|
|
471
|
+
const result = await runSimple({ ...single, dependencies, options });
|
|
472
|
+
expect(result).toMatchObject({
|
|
473
|
+
kind: "TIMEOUT",
|
|
474
|
+
reason: {
|
|
475
|
+
kind: "status-unavailable",
|
|
476
|
+
failure: { kind: "command-exit" },
|
|
477
|
+
},
|
|
478
|
+
});
|
|
479
|
+
expect(dependencies.emitted).toMatchObject([
|
|
480
|
+
{ kind: "RETRY", retryInSeconds: 0 },
|
|
481
|
+
]);
|
|
482
|
+
expect(dependencies.clock.now()).toBe(2);
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
it("reports the status-query blocker when a read past the deadline exhausts the error budget", async () => {
|
|
486
|
+
const result = await runSimple({
|
|
487
|
+
...single,
|
|
488
|
+
dependencies: dependenciesWithReadOutlivingBudget({}, commandExit),
|
|
489
|
+
options: { ...options, maxQueryErrors: 1 },
|
|
490
|
+
});
|
|
491
|
+
expect(result).toMatchObject({
|
|
492
|
+
kind: "BLOCKER",
|
|
493
|
+
exitCode: 7,
|
|
494
|
+
blocker: { kind: "status-query", failures: 1 },
|
|
495
|
+
});
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
it("times out without retrying a cancelled command, even while the loop budget has time left", async () => {
|
|
499
|
+
let cancellations = 0;
|
|
500
|
+
const dependencies = dependenciesWithReadOutlivingBudget({}, () =>
|
|
501
|
+
++cancellations > 1
|
|
502
|
+
? new Error("read again after cancellation")
|
|
503
|
+
: new DeadlineExceeded()
|
|
504
|
+
);
|
|
505
|
+
const result = await runSimple({
|
|
506
|
+
...single,
|
|
507
|
+
dependencies: { ...dependencies, deadline: unbounded },
|
|
508
|
+
options,
|
|
509
|
+
});
|
|
510
|
+
expect(result).toMatchObject({
|
|
511
|
+
kind: "TIMEOUT",
|
|
512
|
+
reason: { kind: "status-unavailable", failure: { kind: "deadline" } },
|
|
513
|
+
});
|
|
514
|
+
expect(cancellations).toBe(1);
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
it("reports a READY observation that completes past the deadline", async () => {
|
|
518
|
+
const result = await runSimple({
|
|
519
|
+
dependencies: dependenciesWithReadOutlivingBudget(),
|
|
520
|
+
contexts: [context],
|
|
521
|
+
mode: "single",
|
|
522
|
+
statusOnly: false,
|
|
523
|
+
options,
|
|
524
|
+
});
|
|
525
|
+
expect(result.kind).toBe("READY");
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
for (const [mode, reason] of [
|
|
529
|
+
["single", "pending-checks"],
|
|
530
|
+
["queued", "queued-stack"],
|
|
531
|
+
] as const) {
|
|
532
|
+
it(`${mode} keeps the ${reason} reason when a waiting observation completes past the deadline`, async () => {
|
|
533
|
+
const dependencies = dependenciesWithReadOutlivingBudget({
|
|
534
|
+
fastPath: { kind: "checks", checks: [pendingCheck()] },
|
|
535
|
+
});
|
|
536
|
+
const result =
|
|
537
|
+
mode === "single"
|
|
538
|
+
? await runSimple({
|
|
539
|
+
dependencies,
|
|
540
|
+
contexts: [context],
|
|
541
|
+
mode: "single",
|
|
542
|
+
statusOnly: false,
|
|
543
|
+
options,
|
|
544
|
+
})
|
|
545
|
+
: await runQueued({ dependencies, contexts: [context], options });
|
|
546
|
+
expect(result).toMatchObject({
|
|
547
|
+
kind: "TIMEOUT",
|
|
548
|
+
reason: { kind: reason },
|
|
549
|
+
});
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
it("keeps queued pending checks waiting and stops when they fail without advancing", async () => {
|
|
555
|
+
let failed = false;
|
|
556
|
+
const reader = {
|
|
557
|
+
...fakeReader(),
|
|
558
|
+
async checksFastPath() {
|
|
559
|
+
return {
|
|
560
|
+
kind: "checks" as const,
|
|
561
|
+
checks: [
|
|
562
|
+
failed
|
|
563
|
+
? failedCheck("required-build")
|
|
564
|
+
: pendingCheck("required-build"),
|
|
565
|
+
],
|
|
566
|
+
};
|
|
567
|
+
},
|
|
568
|
+
};
|
|
569
|
+
const events: string[] = [];
|
|
570
|
+
const verdict = await runQueued({
|
|
571
|
+
dependencies: {
|
|
572
|
+
reader,
|
|
573
|
+
emit(event) {
|
|
574
|
+
events.push(event.kind);
|
|
575
|
+
},
|
|
576
|
+
clock: {
|
|
577
|
+
now: () => 0,
|
|
578
|
+
observedAt: () => "fixture",
|
|
579
|
+
async sleep() {
|
|
580
|
+
failed = true;
|
|
581
|
+
},
|
|
582
|
+
},
|
|
583
|
+
deadline: unbounded,
|
|
584
|
+
},
|
|
585
|
+
contexts: [context],
|
|
586
|
+
options,
|
|
587
|
+
});
|
|
588
|
+
expect(events).toContain("WAITING");
|
|
589
|
+
expect(events).not.toContain("ADVANCE");
|
|
590
|
+
expect(events).not.toContain("COMPLETE");
|
|
591
|
+
expect(verdict).toMatchObject({
|
|
592
|
+
kind: "BLOCKER",
|
|
593
|
+
blocker: { kind: "failing-checks" },
|
|
594
|
+
});
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
describe("merge gate", () => {
|
|
598
|
+
const cases: readonly [
|
|
599
|
+
string,
|
|
600
|
+
FakeReaderOptions["facts"],
|
|
601
|
+
boolean,
|
|
602
|
+
ReturnType<typeof classifyPr>,
|
|
603
|
+
][] = [
|
|
604
|
+
[
|
|
605
|
+
"closed",
|
|
606
|
+
{ state: "CLOSED" },
|
|
607
|
+
false,
|
|
608
|
+
{
|
|
609
|
+
kind: "blocker",
|
|
610
|
+
blocker: {
|
|
611
|
+
kind: "merge-gate",
|
|
612
|
+
pr: context,
|
|
613
|
+
reason: "closed-without-merge",
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
],
|
|
617
|
+
[
|
|
618
|
+
"draft",
|
|
619
|
+
{ isDraft: true, reviewDecision: "CHANGES_REQUESTED" },
|
|
620
|
+
false,
|
|
621
|
+
{
|
|
622
|
+
kind: "blocker",
|
|
623
|
+
blocker: { kind: "merge-gate", pr: context, reason: "draft-pr" },
|
|
624
|
+
},
|
|
625
|
+
],
|
|
626
|
+
[
|
|
627
|
+
"changes requested",
|
|
628
|
+
{ reviewDecision: "CHANGES_REQUESTED", mergeStateStatus: "BLOCKED" },
|
|
629
|
+
true,
|
|
630
|
+
{
|
|
631
|
+
kind: "blocker",
|
|
632
|
+
blocker: {
|
|
633
|
+
kind: "merge-gate",
|
|
634
|
+
pr: context,
|
|
635
|
+
reason: "changes-requested",
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
],
|
|
639
|
+
[
|
|
640
|
+
"review required",
|
|
641
|
+
{ reviewDecision: "REVIEW_REQUIRED", mergeStateStatus: "BLOCKED" },
|
|
642
|
+
false,
|
|
643
|
+
{
|
|
644
|
+
kind: "blocker",
|
|
645
|
+
blocker: { kind: "merge-gate", pr: context, reason: "review-required" },
|
|
646
|
+
},
|
|
647
|
+
],
|
|
648
|
+
[
|
|
649
|
+
"branch protection",
|
|
650
|
+
{ mergeStateStatus: "BLOCKED" },
|
|
651
|
+
false,
|
|
652
|
+
{
|
|
653
|
+
kind: "blocker",
|
|
654
|
+
blocker: { kind: "merge-gate", pr: context, reason: "merge-blocked" },
|
|
655
|
+
},
|
|
656
|
+
],
|
|
657
|
+
];
|
|
658
|
+
for (const [name, facts, allowDraft, expected] of cases)
|
|
659
|
+
it(`blocks a ${name} PR with its gate reason`, async () => {
|
|
660
|
+
const row = await readSnapshot({
|
|
661
|
+
...snapshotArgs,
|
|
662
|
+
reader: fakeReader({ facts }),
|
|
663
|
+
});
|
|
664
|
+
expect(classifyPr(row, allowDraft)).toEqual(expected);
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
for (const [isDraft, allowDraft, reviewDecision, draft] of [
|
|
668
|
+
[false, false, "APPROVED", "not-draft"],
|
|
669
|
+
[true, true, null, "draft-allowed"],
|
|
670
|
+
] as const)
|
|
671
|
+
it(`proves an open gate with review ${reviewDecision} and ${draft}`, async () => {
|
|
672
|
+
const row = await readSnapshot({
|
|
673
|
+
...snapshotArgs,
|
|
674
|
+
reader: fakeReader({ facts: { isDraft, reviewDecision } }),
|
|
675
|
+
});
|
|
676
|
+
expect(classifyPr(row, allowDraft)).toMatchObject({
|
|
677
|
+
kind: "ready",
|
|
678
|
+
pr: { proof: { gate: { state: "OPEN", reviewDecision, draft } } },
|
|
679
|
+
});
|
|
680
|
+
});
|
|
681
|
+
|
|
682
|
+
for (const [reason, action] of [
|
|
683
|
+
[
|
|
684
|
+
"closed-without-merge",
|
|
685
|
+
"restore or remove the closed PR from the queued stack",
|
|
686
|
+
],
|
|
687
|
+
[
|
|
688
|
+
"draft-pr",
|
|
689
|
+
"mark the PR ready for review before waiting for the merge queue",
|
|
690
|
+
],
|
|
691
|
+
[
|
|
692
|
+
"changes-requested",
|
|
693
|
+
"resolve the changes-requested review before waiting for the merge queue",
|
|
694
|
+
],
|
|
695
|
+
["review-required", "get the required approving review"],
|
|
696
|
+
[
|
|
697
|
+
"merge-blocked",
|
|
698
|
+
"find the branch protection rule holding the merge (mergeStateStatus=BLOCKED with clean CI)",
|
|
699
|
+
],
|
|
700
|
+
[
|
|
701
|
+
"behind-base",
|
|
702
|
+
"update the branch with its base before waiting for the merge queue (mergeStateStatus=BEHIND)",
|
|
703
|
+
],
|
|
704
|
+
] as const)
|
|
705
|
+
it(`renders the ${reason} action`, () => {
|
|
706
|
+
expect(
|
|
707
|
+
renderPretty({
|
|
708
|
+
schemaVersion: 1,
|
|
709
|
+
sequence: 1,
|
|
710
|
+
observedAt: "fixture",
|
|
711
|
+
mode: "single",
|
|
712
|
+
kind: "BLOCKER",
|
|
713
|
+
terminal: true,
|
|
714
|
+
exitCode: 6,
|
|
715
|
+
blocker: { kind: "merge-gate", pr: context, reason },
|
|
716
|
+
})
|
|
717
|
+
).toBe(`BLOCKER: ${reason}\npr=1\naction=${action}\n`);
|
|
718
|
+
});
|
|
719
|
+
|
|
720
|
+
it("shows a branch behind its base in the status table", async () => {
|
|
721
|
+
const row = await readSnapshot({
|
|
722
|
+
...snapshotArgs,
|
|
723
|
+
reader: fakeReader({ facts: { mergeStateStatus: "BEHIND" } }),
|
|
724
|
+
});
|
|
725
|
+
expect(
|
|
726
|
+
renderPretty({
|
|
727
|
+
schemaVersion: 1,
|
|
728
|
+
sequence: 1,
|
|
729
|
+
observedAt: "fixture",
|
|
730
|
+
mode: "single",
|
|
731
|
+
kind: "STATUS",
|
|
732
|
+
terminal: true,
|
|
733
|
+
exitCode: 0,
|
|
734
|
+
reason: "status-only",
|
|
735
|
+
rows: [row],
|
|
736
|
+
})
|
|
737
|
+
).toContain("| ⚠️ behind base |");
|
|
738
|
+
});
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
describe("blocker producers", () => {
|
|
742
|
+
const thread = {
|
|
743
|
+
id: "t1",
|
|
744
|
+
firstComment: null,
|
|
745
|
+
isBugbot: false,
|
|
746
|
+
bugbotReviewPasses: 0,
|
|
747
|
+
};
|
|
748
|
+
const rungs: readonly (readonly [MergeBlocker["kind"], FakeReaderOptions])[] =
|
|
749
|
+
[
|
|
750
|
+
["merge-conflicts", { facts: { mergeable: "CONFLICTING" } }],
|
|
751
|
+
["review-threads", { threads: [thread] }],
|
|
752
|
+
[
|
|
753
|
+
"failing-checks",
|
|
754
|
+
{ fastPath: { kind: "checks", checks: [failedCheck()] } },
|
|
755
|
+
],
|
|
756
|
+
["merge-gate", { facts: { isDraft: true } }],
|
|
757
|
+
];
|
|
758
|
+
const snapshot = (options: FakeReaderOptions, number: number) => {
|
|
759
|
+
const pr = { ...context, number: parsePrNumber(number) };
|
|
760
|
+
return readSnapshot({
|
|
761
|
+
...snapshotArgs,
|
|
762
|
+
context: pr,
|
|
763
|
+
reader: fakeReader({ ...options, current: pr }),
|
|
764
|
+
});
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
for (const [index, [kind]] of rungs.entries()) {
|
|
768
|
+
it(`classifies a PR as ${kind} over every lower-priority blocker`, async () => {
|
|
769
|
+
let options: FakeReaderOptions = {};
|
|
770
|
+
for (const [, rung] of rungs.slice(index))
|
|
771
|
+
options = {
|
|
772
|
+
...options,
|
|
773
|
+
...rung,
|
|
774
|
+
facts: { ...options.facts, ...rung.facts },
|
|
775
|
+
};
|
|
776
|
+
expect(classifyPr(await snapshot(options, 1))).toMatchObject({
|
|
777
|
+
kind: "blocker",
|
|
778
|
+
blocker: { kind },
|
|
779
|
+
});
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
it(`reports ${kind} in a stack before any lower tier in an earlier PR`, async () => {
|
|
783
|
+
const rows = await Promise.all(
|
|
784
|
+
rungs
|
|
785
|
+
.slice(index)
|
|
786
|
+
.map(([, options], offset) => snapshot(options, index + offset + 1))
|
|
787
|
+
);
|
|
788
|
+
const [first, ...rest] = rows.reverse();
|
|
789
|
+
expect(selectTierMajorStackDecision([first, ...rest])).toMatchObject({
|
|
790
|
+
kind: "blocker",
|
|
791
|
+
blocker: { kind, pr: { number: index + 1 } },
|
|
792
|
+
});
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
|
|
797
|
+
describe("landing validators", () => {
|
|
798
|
+
const failure = (parse: () => unknown) => {
|
|
799
|
+
try {
|
|
800
|
+
parse();
|
|
801
|
+
} catch (error) {
|
|
802
|
+
if (error instanceof WatcherQueryError) return error.failure;
|
|
803
|
+
throw error;
|
|
804
|
+
}
|
|
805
|
+
throw new Error("expected a validation failure");
|
|
806
|
+
};
|
|
807
|
+
for (const [name, parse, detail] of [
|
|
808
|
+
[
|
|
809
|
+
"object",
|
|
810
|
+
() => object([], "landing record"),
|
|
811
|
+
"landing record must be an object",
|
|
812
|
+
],
|
|
813
|
+
[
|
|
814
|
+
"text",
|
|
815
|
+
() => text("", "headRefOid"),
|
|
816
|
+
"headRefOid must be a non-empty string",
|
|
817
|
+
],
|
|
818
|
+
[
|
|
819
|
+
"nullableText",
|
|
820
|
+
() => nullableText(0, "queue entry id"),
|
|
821
|
+
"queue entry id must be a non-empty string",
|
|
822
|
+
],
|
|
823
|
+
[
|
|
824
|
+
"oneOf",
|
|
825
|
+
() => oneOf("DRAFT", ["OPEN"], "PR state"),
|
|
826
|
+
"missing or invalid PR state",
|
|
827
|
+
],
|
|
828
|
+
["flag", () => flag(null, "autoMerge state"), "missing autoMerge state"],
|
|
829
|
+
[
|
|
830
|
+
"parseContext",
|
|
831
|
+
() => parseContext({ owner: "a/b", repo: "r", number: 1 }),
|
|
832
|
+
"owner and repo must be individual repository names",
|
|
833
|
+
],
|
|
834
|
+
[
|
|
835
|
+
"parseLandingRevision",
|
|
836
|
+
() =>
|
|
837
|
+
parseLandingRevision({
|
|
838
|
+
context,
|
|
839
|
+
headRefOid: "head",
|
|
840
|
+
baseRefName: "main",
|
|
841
|
+
}),
|
|
842
|
+
"baseRefOid must be a non-empty string",
|
|
843
|
+
],
|
|
844
|
+
] as const)
|
|
845
|
+
it(`${name} rejects with a retryable missing-field failure`, () => {
|
|
846
|
+
expect(failure(parse)).toEqual({
|
|
847
|
+
kind: "missing-field",
|
|
848
|
+
retryable: true,
|
|
849
|
+
detail,
|
|
850
|
+
});
|
|
851
|
+
});
|
|
852
|
+
|
|
853
|
+
it("returns valid values unchanged", () => {
|
|
854
|
+
const fields = { key: 1 };
|
|
855
|
+
expect(object(fields, "fields")).toBe(fields);
|
|
856
|
+
expect(text("head", "headRefOid")).toBe("head");
|
|
857
|
+
expect(nullableText(null, "queue entry id")).toBeNull();
|
|
858
|
+
expect(oneOf("MERGED", ["OPEN", "MERGED"], "PR state")).toBe("MERGED");
|
|
859
|
+
expect(flag(false, "autoMerge state")).toBe(false);
|
|
860
|
+
});
|
|
861
|
+
|
|
862
|
+
it("reports an open PR's missing head commit as its own failure", () => {
|
|
863
|
+
expect(
|
|
864
|
+
failure(() =>
|
|
865
|
+
parsePullRequest(
|
|
866
|
+
{
|
|
867
|
+
mergeable: "MERGEABLE",
|
|
868
|
+
mergeStateStatus: "CLEAN",
|
|
869
|
+
reviewDecision: "APPROVED",
|
|
870
|
+
headRefOid: null,
|
|
871
|
+
baseRef: { target: { oid: "base" } },
|
|
872
|
+
headRefName: "feature",
|
|
873
|
+
baseRefName: "main",
|
|
874
|
+
state: "OPEN",
|
|
875
|
+
mergedAt: null,
|
|
876
|
+
isDraft: false,
|
|
877
|
+
},
|
|
878
|
+
context
|
|
879
|
+
)
|
|
880
|
+
)
|
|
881
|
+
).toEqual({
|
|
882
|
+
kind: "missing-field",
|
|
883
|
+
retryable: true,
|
|
884
|
+
detail: "headRefOid must be a non-empty string",
|
|
885
|
+
});
|
|
886
|
+
});
|
|
887
|
+
});
|