deepmodebot 0.9.0 → 0.10.0
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/.agents/plugins/marketplace.json +20 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/.omp-plugin/marketplace.json +2 -2
- package/README.md +29 -5
- package/bin/deepmodebot.mjs +187 -10
- package/lib/clients.mjs +50 -3
- package/lib/tree.mjs +64 -10
- package/lib/version.mjs +26 -0
- package/native/dmb-gate/Cargo.toml +13 -0
- package/native/dmb-gate/src/agents.rs +77 -0
- package/native/dmb-gate/src/ci.rs +516 -0
- package/native/dmb-gate/src/cleanup.rs +198 -0
- package/native/dmb-gate/src/gap.rs +1376 -0
- package/native/dmb-gate/src/guard.rs +135 -0
- package/native/dmb-gate/src/main.rs +327 -0
- package/native/dmb-gate/src/map.rs +173 -0
- package/native/dmb-gate/src/perf.rs +347 -0
- package/native/dmb-gate/src/reward.rs +1214 -0
- package/native/dmb-gate/src/skill_check.rs +171 -0
- package/native/dmb-gate/src/slop.rs +1238 -0
- package/native/dmb-gate/src/ui.rs +842 -0
- package/native/dmb-gate/src/util.rs +260 -0
- package/native/dmb-net/go.mod +3 -0
- package/native/dmb-net/main.go +624 -0
- package/native/dmb-net/main_test.go +122 -0
- package/package.json +12 -2
- package/plugins/deepmodebot/.antigravity-plugin/plugin.json +1 -1
- package/plugins/deepmodebot/.antigravity-plugin/skills/deep/SKILL.md +5 -5
- package/plugins/deepmodebot/.antigravity-plugin/skills/pr-thread/SKILL.md +1 -1
- package/plugins/deepmodebot/.antigravity-plugin/skills/review-pr/SKILL.md +2 -2
- package/plugins/deepmodebot/.antigravity-plugin/skills/suggest/SKILL.md +13 -0
- package/plugins/deepmodebot/.antigravity-plugin/skills/tournament/SKILL.md +2 -2
- package/plugins/deepmodebot/.claude-plugin/plugin.json +1 -1
- package/plugins/deepmodebot/.codex-plugin/plugin.json +46 -0
- package/plugins/deepmodebot/agents/comment-sicko/agent.md +35 -0
- package/plugins/deepmodebot/agents/researcher/agent.md +33 -0
- package/plugins/deepmodebot/agents/reviewer/agent.md +4 -2
- package/plugins/deepmodebot/agents/scout/agent.md +11 -12
- package/plugins/deepmodebot/agents/security-reviewer/agent.md +2 -1
- package/plugins/deepmodebot/commands/deep.md +6 -6
- package/plugins/deepmodebot/commands/research.md +8 -0
- package/plugins/deepmodebot/commands/suggest.md +10 -0
- package/plugins/deepmodebot/commands/tournament.md +2 -2
- package/plugins/deepmodebot/hooks/hooks.json +2 -2
- package/plugins/deepmodebot/hooks.json +1 -1
- package/plugins/deepmodebot/scripts/antigravity-guard.mjs +140 -7
- package/plugins/deepmodebot/scripts/omp-mcp-server.mjs +179 -47
- package/plugins/deepmodebot/skills/agent-harnesses/SKILL.md +4 -6
- package/plugins/deepmodebot/skills/agent-harnesses/assets/sdks/check_antigravity.py +3 -0
- package/plugins/deepmodebot/skills/agent-harnesses/references/ai-native-tooling.md +4 -0
- package/plugins/deepmodebot/skills/agent-harnesses/references/ai-sdk-selection.md +3 -1
- package/plugins/deepmodebot/skills/agent-harnesses/references/antigravity.md +2 -2
- package/plugins/deepmodebot/skills/agent-harnesses/references/delegation-efficiency.md +12 -2
- package/plugins/deepmodebot/skills/agent-harnesses/references/protocols.md +11 -3
- package/plugins/deepmodebot/skills/app-automation-relay/SKILL.md +17 -0
- package/plugins/deepmodebot/skills/app-automation-relay/assets/relay_server.ts +364 -0
- package/plugins/deepmodebot/skills/app-automation-relay/references/adapter-cookbook.md +15 -0
- package/plugins/deepmodebot/skills/app-automation-relay/references/wire-protocol.md +23 -0
- package/plugins/deepmodebot/skills/cloud-devsecops/SKILL.md +4 -3
- package/plugins/deepmodebot/skills/cloud-devsecops/references/cloudflare-edge.md +43 -0
- package/plugins/deepmodebot/skills/cloud-devsecops/references/local-emulators.md +15 -2
- package/plugins/deepmodebot/skills/contribute/SKILL.md +3 -35
- package/plugins/deepmodebot/skills/create-formal-verification-skill/LICENSE +21 -0
- package/plugins/deepmodebot/skills/create-formal-verification-skill/NOTICE.md +16 -0
- package/plugins/deepmodebot/skills/create-formal-verification-skill/SKILL.md +71 -0
- package/plugins/deepmodebot/skills/create-verification-skill/SKILL.md +2 -2
- package/plugins/deepmodebot/skills/deep-learning/LICENSE +21 -0
- package/plugins/deepmodebot/skills/deep-learning/SKILL.md +33 -0
- package/plugins/deepmodebot/skills/deep-learning/references/neural-architectures.md +43 -0
- package/plugins/deepmodebot/skills/deep-learning/references/papers-and-repos.md +128 -0
- package/plugins/deepmodebot/skills/deep-learning/references/reinforcement-learning.md +57 -0
- package/plugins/deepmodebot/skills/deep-learning/references/training-optimization.md +40 -0
- package/plugins/deepmodebot/skills/deep-learning/references/weight-space-programming.md +76 -0
- package/plugins/deepmodebot/skills/deep-learning/scripts/hf_passes.py +166 -0
- package/plugins/deepmodebot/skills/deep-learning/scripts/wsp.py +493 -0
- package/plugins/deepmodebot/skills/deep-stack/SKILL.md +1 -1
- package/plugins/deepmodebot/skills/deep-stack/references/design-workflow.md +46 -92
- package/plugins/deepmodebot/skills/deep-stack/references/isolate.md +1 -0
- package/plugins/deepmodebot/skills/deep-stack/references/prove.md +6 -0
- package/plugins/deepmodebot/skills/deep-stack/references/stack.md +11 -1
- package/plugins/deepmodebot/skills/deepmodebot/SKILL.md +74 -145
- package/plugins/deepmodebot/skills/deepmodebot/assets/agents-md/agents_md.py +18 -6
- package/plugins/deepmodebot/skills/deepmodebot/assets/autoroute/autoroute.py +1021 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/cleanup/self_cleanup.py +305 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/contain/claude_guard.py +98 -5
- package/plugins/deepmodebot/skills/deepmodebot/assets/contain/omp-contain.ts +106 -5
- package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/design.py +3 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/record.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/rehearsal_gate.py +536 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/review.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/formal-verification/verify_proof.py +638 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/gap-audit/gap_audit.py +1053 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/gen-ui/gen_ui.py +1782 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/git-guardrails/git-guard-patterns.txt +7 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/git-guardrails/git-guard.sh +3 -2
- package/plugins/deepmodebot/skills/deepmodebot/assets/git-guardrails/git-guard.ts +9 -5
- package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/ghapp.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/install.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/local-ci/local_ci.py +540 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/local-ci/slop_gate.py +642 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/loop/loop.py +2 -1
- package/plugins/deepmodebot/skills/deepmodebot/assets/loop/plan.py +2 -1
- package/plugins/deepmodebot/skills/deepmodebot/assets/loop/windows_job.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/memory/project_memory.py +529 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/bench_harness.py +48 -21
- package/plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/perf_audit.py +339 -5
- package/plugins/deepmodebot/skills/deepmodebot/assets/pr-agent/diff_coverage.py +96 -6
- package/plugins/deepmodebot/skills/deepmodebot/assets/pr-agent/pr_agent_local.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/arena.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/show_thread.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/prompt-tools/prompt_tools.py +1239 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/quota-guard/quota_guard.py +424 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/repo-references.json +477 -1
- package/plugins/deepmodebot/skills/deepmodebot/assets/reward-guard/reward_guard.py +1597 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/rules/rule-paths.json +57 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/rules/rule_ledger.py +1645 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/scrape/yt_enrich.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/scrape/yt_meta.py +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/scrape/yt_transcript_relay.js +13 -10
- package/plugins/deepmodebot/skills/deepmodebot/assets/security-audit/static_sec_audit.py +275 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/self-grill/self_grill.py +1473 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/setup/model_setup.py +329 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/setup/project_setup.py +312 -0
- package/plugins/deepmodebot/skills/deepmodebot/assets/tournament/tournament.py +304 -18
- package/plugins/deepmodebot/skills/deepmodebot/assets/workspace-map/workspace_map.py +121 -78
- package/plugins/deepmodebot/skills/deepmodebot/references/README.md +14 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/catalog.md +16 -11
- package/plugins/deepmodebot/skills/deepmodebot/references/contain.md +2 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/delegation.md +14 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/flows.md +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/full-scope.md +9 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/babysit.md +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/end-to-end.md +12 -9
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/feature.md +7 -3
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/hillclimb.md +2 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/investigation.md +4 -4
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/opening-a-pr.md +1 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/perf-issue.md +13 -10
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/refactoring.md +6 -6
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/reference-rebuild.md +1 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/run-a-goal.md +3 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/setup.md +1 -2
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/visual-parity.md +1 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/work-a-queue.md +4 -2
- package/plugins/deepmodebot/skills/deepmodebot/references/principles/hardcore-mode.md +7 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/principles/no-reward-hacking.md +8 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/principles/test-behavior-not-implementation.md +2 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/principles/type-system-discipline.md +2 -2
- package/plugins/deepmodebot/skills/deepmodebot/references/rule-approval.md +51 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/architect.md +10 -24
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/architecture-review.md +5 -4
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/arena.md +3 -3
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/autoroute.md +49 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/blast-radius.md +1 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/catchup-video.md +13 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/correct.md +8 -7
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/course.md +2 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/devex-review.md +13 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/expand-contract.md +13 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/formal-verification.md +33 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/gen-ui.md +60 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/grill.md +2 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/how.md +7 -18
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/inner-loop.md +7 -7
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/model-setup.md +14 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/modernize-pr.md +15 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/mutation-testing.md +13 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/no-comments.md +5 -5
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/panel.md +7 -3
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/pr-conversation.md +1 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/pr-review.md +8 -5
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/pre-commit.md +1 -2
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/prior-art.md +33 -38
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/product-lens.md +12 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/prompt-upgrade.md +30 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/recall.md +1 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/reframe.md +18 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/release-and-canary.md +10 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/research.md +62 -89
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/security-audit.md +5 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/self-grill.md +54 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/sharpen.md +3 -3
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/show-me-your-work.md +7 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/sme-review.md +3 -2
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/suggest.md +24 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/swarm.md +7 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/teach.md +2 -2
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/tournament.md +12 -11
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/variant-analysis.md +11 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/video-forensics.md +46 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/visual-e2e.md +10 -1
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/webhook-ui.md +11 -0
- package/plugins/deepmodebot/skills/deepmodebot/references/techniques/writing-for-agents.md +6 -0
- package/plugins/deepmodebot/skills/deepmodebot/scripts/check_skill.py +7 -0
- package/plugins/deepmodebot/skills/deepmodebot/scripts/trending.py +141 -18
- package/plugins/deepmodebot/skills/deepmodebot/worker.md +16 -0
- package/plugins/deepmodebot/skills/domain-rules/SKILL.md +13 -119
- package/plugins/deepmodebot/skills/domain-rules/references/backend-system-design.md +19 -1
- package/plugins/deepmodebot/skills/domain-rules/references/engineering-practice.md +7 -0
- package/plugins/deepmodebot/skills/domain-rules/references/language-ecosystems.md +11 -0
- package/plugins/deepmodebot/skills/domain-rules/references/sources.md +108 -0
- package/plugins/deepmodebot/skills/frontend-ui/SKILL.md +30 -131
- package/plugins/deepmodebot/skills/frontend-ui/assets/themes/canvas.css +42 -0
- package/plugins/deepmodebot/skills/frontend-ui/assets/themes/editorial.css +39 -0
- package/plugins/deepmodebot/skills/frontend-ui/assets/themes/layouts.css +95 -0
- package/plugins/deepmodebot/skills/frontend-ui/assets/themes/swiss.css +40 -0
- package/plugins/deepmodebot/skills/frontend-ui/assets/themes/tactile.css +41 -0
- package/plugins/deepmodebot/skills/frontend-ui/assets/themes/workbench.css +50 -0
- package/plugins/deepmodebot/skills/frontend-ui/references/patterns/mobbin-animations.md +49 -0
- package/plugins/deepmodebot/skills/frontend-ui/references/patterns/mobbin-shipped-apps.md +46 -24
- package/plugins/deepmodebot/skills/frontend-ui/references/patterns/motion-clips.md +27 -258
- package/plugins/deepmodebot/skills/frontend-ui/references/patterns/motion-graphics.md +26 -51
- package/plugins/deepmodebot/skills/frontend-ui/references/patterns/pinterest-animations.md +22 -195
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/00-art-direction.md +39 -0
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/01-workflow.md +27 -24
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/02-review-rubric.md +23 -17
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/03-ai-tells.md +22 -45
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/04-components.md +11 -0
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/04a-agent-ui.md +32 -152
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/05-motion.md +36 -91
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/05a-motion-graphics.md +14 -120
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/06-typography-layout.md +11 -10
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/06a-color.md +9 -9
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/06b-media-icons-charts.md +19 -0
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/06c-product-shots-craft.md +42 -0
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/07-copy.md +5 -6
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/08-quality-floor.md +28 -56
- package/plugins/deepmodebot/skills/frontend-ui/references/playbook/09-steering-agents.md +9 -7
- package/plugins/deepmodebot/skills/frontend-ui/scripts/motion_diff.py +259 -0
- package/plugins/deepmodebot/skills/frontend-ui/scripts/ui_audit.py +496 -0
- package/plugins/deepmodebot/skills/maintain-formal-verification-skill/LICENSE +21 -0
- package/plugins/deepmodebot/skills/maintain-formal-verification-skill/NOTICE.md +16 -0
- package/plugins/deepmodebot/skills/maintain-formal-verification-skill/SKILL.md +68 -0
- package/plugins/deepmodebot/skills/maintain-verification-skill/SKILL.md +1 -1
- package/plugins/deepmodebot/skills/office-documents/SKILL.md +24 -0
- package/plugins/deepmodebot/skills/office-documents/references/documents-docx-pdf.md +15 -0
- package/plugins/deepmodebot/skills/office-documents/references/presentations-pptx.md +15 -0
- package/plugins/deepmodebot/skills/office-documents/references/spreadsheets-xlsx.md +15 -0
- package/plugins/deepmodebot/skills/office-documents/scripts/doc_audit.py +230 -0
- package/plugins/deepmodebot/skills/project-brief/SKILL.md +2 -19
- package/plugins/deepmodebot/skills/project-brief/assets/pr-overlap.py +4 -0
- package/plugins/deepmodebot/skills/project-brief/assets/sync-roadmap.py +4 -0
- package/plugins/deepmodebot/skills/project-brief/references/claim-contract.md +55 -0
- package/plugins/deepmodebot/skills/research/SKILL.md +18 -0
- package/plugins/deepmodebot/skills/secrets-and-auth/SKILL.md +1 -1
- package/plugins/deepmodebot/skills/seo-and-geo/SKILL.md +29 -0
- package/plugins/deepmodebot/skills/seo-and-geo/references/geo-and-agentic-web.md +30 -0
- package/plugins/deepmodebot/skills/seo-and-geo/references/technical-and-schema.md +25 -0
- package/plugins/deepmodebot/skills/seo-and-geo/scripts/seo_audit.py +282 -0
- package/plugins/deepmodebot/skills/software-architecture/SKILL.md +2 -2
- package/plugins/deepmodebot/skills/software-architecture/references/backend-infrastructure.md +5 -0
- package/plugins/deepmodebot/skills/software-architecture/references/monorepos.md +1 -0
- package/plugins/deepmodebot/skills/statechart/LICENSE +21 -0
- package/plugins/deepmodebot/skills/statechart/NOTICE.md +21 -0
- package/plugins/deepmodebot/skills/statechart/SKILL.md +106 -0
- package/plugins/deepmodebot/skills/statechart/references/render.md +93 -0
- package/plugins/deepmodebot/skills/statechart/references/tooling.md +78 -0
- package/plugins/deepmodebot/skills/statechart/scripts/backends/cfg.ts +33 -0
- package/plugins/deepmodebot/skills/statechart/scripts/backends/mermaid.ts +249 -0
- package/plugins/deepmodebot/skills/statechart/scripts/backends/plain-text.ts +72 -0
- package/plugins/deepmodebot/skills/statechart/scripts/backends/report.ts +177 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/config.ts +276 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/dot.ts +77 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/marks.ts +93 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/messages.ts +52 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/spec.ts +114 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/trace.ts +24 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/value.ts +166 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/verdict.ts +40 -0
- package/plugins/deepmodebot/skills/statechart/scripts/frontends/view.ts +119 -0
- package/plugins/deepmodebot/skills/statechart/scripts/ir.ts +547 -0
- package/plugins/deepmodebot/skills/statechart/scripts/janitor.ts +13 -0
- package/plugins/deepmodebot/skills/statechart/scripts/kill.ts +15 -0
- package/plugins/deepmodebot/skills/statechart/scripts/package.json +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/passes/annotate.ts +128 -0
- package/plugins/deepmodebot/skills/statechart/scripts/passes/label.ts +269 -0
- package/plugins/deepmodebot/skills/statechart/scripts/passes/lift.ts +85 -0
- package/plugins/deepmodebot/skills/statechart/scripts/passes/loop-check.ts +68 -0
- package/plugins/deepmodebot/skills/statechart/scripts/passes/paths.ts +60 -0
- package/plugins/deepmodebot/skills/statechart/scripts/passes/reach.ts +135 -0
- package/plugins/deepmodebot/skills/statechart/scripts/passes/region-check.ts +97 -0
- package/plugins/deepmodebot/skills/statechart/scripts/passes/regions.ts +295 -0
- package/plugins/deepmodebot/skills/statechart/scripts/pipeline.ts +76 -0
- package/plugins/deepmodebot/skills/statechart/scripts/run.ts +500 -0
- package/plugins/deepmodebot/skills/statechart/scripts/statechart +29 -0
- package/plugins/deepmodebot/skills/statechart/scripts/statechart.ts +165 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/ConfigOracle.java +63 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/chart.test.ts +1253 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/charts/Braces.mmd +7 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/charts/Escapes.mmd +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/charts/Phases.mmd +29 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/cli.test.ts +1344 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/config-fuzz.test.ts +263 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Counter/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Counter/Counter.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Counter/Counter.tla +10 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Counter/chart.mmd +9 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Counter/graph.dot +16 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Counter/report.md +7 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Counter/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Counter/verdict-1.out +49 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/ChartRun.out +60 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.cfg +4 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/CounterAction.tla +22 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/chart.mmd +26 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/graph.dot +19 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/report.md +20 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/verdict-1.out +56 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/verdict-2.out +82 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterAction/verdict-3.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/ChartRun.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/CounterDeadlock.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/chart.mmd +22 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/graph.dot +16 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/report.md +17 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-1.out +56 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterDeadlock/verdict-2.out +77 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/ChartRun.out +69 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.cfg +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/CounterFan.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/chart.mmd +85 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/graph.dot +70 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/report.md +12 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/verdict-1.out +67 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterFan/verdict-2.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/ChartRun.out +85 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.cfg +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/CounterGuard.tla +13 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/chart.mmd +5 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/graph.dot +10 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/report.md +31 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/verdict-1.out +64 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterGuard/verdict-2.out +77 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/ChartRun.out +55 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/CounterInitPast.tla +10 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/chart.mmd +12 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/graph.dot +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/report.md +12 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-1.out +33 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPast/verdict-2.out +54 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPastHolds/ChartRun.out +54 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPastHolds/CounterInitPastHolds.tla +10 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPastHolds/chart.mmd +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPastHolds/graph.dot +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPastHolds/report.md +7 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPastHolds/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInitPastHolds/verdict-1.out +46 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/ChartRun.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.cfg +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/CounterInstance.tla +10 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/CounterSteps.tla +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/chart.mmd +17 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/graph.dot +15 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/report.md +14 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/sany.out +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterInstance/verdict-1.out +78 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/ChartRun.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/CounterJump.tla +19 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/chart.mmd +26 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/graph.dot +22 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/report.md +12 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/verdict-1.out +58 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterJump/verdict-2.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.cfg +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/CounterLoop.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/chart.mmd +17 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/graph.dot +15 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/report.md +14 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterLoop/verdict-1.out +76 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/ChartRun.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/CounterOrder.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/chart.mmd +19 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/graph.dot +10 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/report.md +15 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/verdict-1.out +56 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterOrder/verdict-2.out +67 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/ChartRun.out +62 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.cfg +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/CounterRules.tla +24 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/Moves.tla +5 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/chart.mmd +22 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/graph.dot +10 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/report.md +23 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/sany.out +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/verdict-1.out +58 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/verdict-2.out +66 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/verdict-3.out +74 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterRules/verdict-4.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/ChartRun.out +58 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/CounterStart.tla +15 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/chart.mmd +18 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/graph.dot +13 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/report.md +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/verdict-1.out +33 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStart/verdict-2.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStop/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStop/CounterStop.tla +15 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStop/chart.mmd +7 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStop/graph.dot +13 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStop/report.md +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStop/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterStop/verdict-1.out +49 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/ChartRun.out +61 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.cfg +4 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/CounterTie.tla +14 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/chart.mmd +30 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/graph.dot +19 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/report.md +27 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/verdict-1.out +56 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/verdict-2.out +64 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/verdict-3.out +87 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTie/verdict-4.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/ChartRun.out +60 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/CounterTieInGraph.tla +12 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/chart.mmd +23 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/graph.dot +19 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/report.md +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-1.out +56 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterTieInGraph/verdict-2.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/ChartRun.out +61 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/CounterView.cfg +4 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/CounterView.tla +14 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/chart.mmd +23 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/graph.dot +19 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/report.md +27 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/verdict-1.out +56 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/verdict-2.out +64 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/verdict-3.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/verdict-3.out +87 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/verdict-4.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/CounterView/view.mjs +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/ChartRun.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/DieHard.cfg +4 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/DieHard.tla +38 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/chart.mmd +92 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/graph.dot +126 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/report.md +17 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/verdict-1.out +91 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/DieHard/verdict-2.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/ChartRun.out +61 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.cfg +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/FirstRule.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/chart.mmd +22 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/graph.dot +16 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/report.md +25 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/verdict-1.out +56 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/verdict-2.out +64 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/verdict-3.out +64 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/FirstRule/verdict-4.out +77 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.cfg +4 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/HiddenClock.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/chart.mmd +13 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/graph.dot +12 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/report.md +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/HiddenClock/verdict-1.out +72 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/Login.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/Login.tla +62 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/chart.mmd +28 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/graph.dot +40 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/report.md +7 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/sany.out +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/verdict-1.out +47 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Login/view.mjs +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.cfg +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/LoginGuarded.tla +64 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/chart.mmd +28 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/graph.dot +37 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/report.md +8 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/sany.out +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/verdict-1.out +47 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginGuarded/view.mjs +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/ChartRun.out +60 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/LoginParallel.tla +64 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/chart.mmd +44 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/graph.dot +58 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/report.md +17 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/sany.out +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/verdict-1.out +83 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/verdict-2.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/LoginParallel/view.mjs +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/ChartRun.out +60 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/MediaPlayer.tla +103 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/chart.mmd +43 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/graph.dot +93 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/report.md +14 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/sany.out +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-1.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/verdict-2.out +72 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayer/view.mjs +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.cfg +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/MediaPlayerFixed.tla +100 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/chart.mmd +31 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/graph.dot +85 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/report.md +9 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/sany.out +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/verdict-1.out +47 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerFixed/view.mjs +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/ChartRun.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayer.tla +103 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/MediaPlayerProps.tla +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/chart.mmd +42 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/graph.dot +93 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/report.md +19 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-1.out +61 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-2.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-3.out +61 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-4.out +66 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-5.out +58 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/verdict-6.out +49 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/MediaPlayerProps/view.mjs +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/PickWorker/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.cfg +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/PickWorker/PickWorker.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/PickWorker/chart.mmd +5 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/PickWorker/graph.dot +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/PickWorker/report.md +7 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/PickWorker/sany.out +5 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/PickWorker/verdict-1.out +70 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/ChartRun.out +61 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/Shadow.cfg +4 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/Shadow.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/ShadowLib.tla +6 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/ShadowSub.tla +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/chart.mmd +9 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/graph.dot +16 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/report.md +8 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/sany.out +4 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/Shadow/verdict-1.out +65 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/ChartRun.out +59 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.cfg +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/SpacedNames.tla +9 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/chart.mmd +23 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/graph.dot +17 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/report.md +15 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/sany.out +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/verdict-1.out +65 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/SpacedNames/verdict-2.out +75 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/ChartRun.out +69 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/TwoPhase.tla +75 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/chart.mmd +60 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/graph.dot +297 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/report.md +20 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/sany.out +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/verdict-1.out +95 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/verdict-2.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhase/view.mjs +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/ChartRun.out +57 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.cfg +3 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/TwoPhaseFixed.tla +75 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/chart.mmd +37 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/graph.dot +223 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/report.md +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/sany.out +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/verdict-1.out +47 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TwoPhaseFixed/view.mjs +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/ChartRun.out +75 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.cfg +5 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/TypeGuard.tla +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/chart.mmd +18 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/graph.dot +14 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/report.md +29 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/verdict-1.out +64 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/TypeGuard/verdict-2.out +75 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/ChartRun.out +58 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.cfg +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/UserNoDeadlock.tla +8 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/chart.mmd +22 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/graph.dot +16 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/report.md +15 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-1.out +56 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.exit +1 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus/UserNoDeadlock/verdict-2.out +77 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/corpus.test.ts +441 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/differential.test.ts +565 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/drawn.ts +20 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/grid/Grid.cfg +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/grid/Grid.tla +9 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/grid/sany.out +2 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/java.ts +63 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/labels.ts +648 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/messages.test.ts +226 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/pipeline.test.ts +270 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/plain-tlc.test.ts +255 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/render.test.ts +145 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/tlc-out.test.ts +90 -0
- package/plugins/deepmodebot/skills/statechart/scripts/test/tlc.ts +158 -0
- package/plugins/deepmodebot/skills/statechart/scripts/tsconfig.json +11 -0
- package/plugins/deepmodebot/skills/statechart/scripts/worker.ts +35 -0
- package/plugins/deepmodebot/skills/agent-harnesses/assets/sdks/bun.lock +0 -391
- package/plugins/deepmodebot/skills/deepmodebot/assets/agents-md/test_agents_md.py +0 -146
- package/plugins/deepmodebot/skills/deepmodebot/assets/contain/test_antigravity_guard.py +0 -483
- package/plugins/deepmodebot/skills/deepmodebot/assets/contain/test_audit_regressions.py +0 -139
- package/plugins/deepmodebot/skills/deepmodebot/assets/contain/test_contain.py +0 -301
- package/plugins/deepmodebot/skills/deepmodebot/assets/contain/test_omp_mcp.py +0 -602
- package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/test_design.py +0 -69
- package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/test_evidence.py +0 -160
- package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/test_record.py +0 -180
- package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/test_review.py +0 -265
- package/plugins/deepmodebot/skills/deepmodebot/assets/git-guardrails/test_git_guard.py +0 -192
- package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_bot.py +0 -2182
- package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_brand.py +0 -19
- package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_local_updates.py +0 -691
- package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_review_context.py +0 -127
- package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_workspace_cleanup.py +0 -496
- package/plugins/deepmodebot/skills/deepmodebot/assets/loop/test_loop.py +0 -1426
- package/plugins/deepmodebot/skills/deepmodebot/assets/loop/test_plan.py +0 -320
- package/plugins/deepmodebot/skills/deepmodebot/assets/loop/test_windows_job.py +0 -326
- package/plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/test_bench_harness.py +0 -55
- package/plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/test_perf_audit.py +0 -53
- package/plugins/deepmodebot/skills/deepmodebot/assets/pr-agent/test_diff_coverage.py +0 -94
- package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/test_arena.py +0 -610
- package/plugins/deepmodebot/skills/deepmodebot/assets/scrape/test_yt_enrich.py +0 -250
- package/plugins/deepmodebot/skills/deepmodebot/assets/tournament/test_tournament.py +0 -654
- package/plugins/deepmodebot/skills/deepmodebot/assets/workspace-map/test_workspace_map.py +0 -879
|
@@ -0,0 +1,1376 @@
|
|
|
1
|
+
use crate::util::{json_escape, parallel_map, walk_files};
|
|
2
|
+
use std::collections::{BTreeMap, BTreeSet};
|
|
3
|
+
use std::fs;
|
|
4
|
+
use std::path::{Path, PathBuf};
|
|
5
|
+
use std::process::ExitCode;
|
|
6
|
+
|
|
7
|
+
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
8
|
+
pub struct GapFinding {
|
|
9
|
+
pub severity: &'static str,
|
|
10
|
+
pub rule: &'static str,
|
|
11
|
+
pub file: String,
|
|
12
|
+
pub line: usize,
|
|
13
|
+
pub message: String,
|
|
14
|
+
pub fix: String,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const SCAN_EXTS: &[&str] = &[
|
|
18
|
+
"md", "py", "mjs", "cjs", "js", "ts", "tsx", "jsx", "sh", "rs", "go", "json", "yml", "yaml",
|
|
19
|
+
"toml",
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const JS_EXTS: &[&str] = &["ts", "tsx", "js", "jsx", "mjs", "cjs"];
|
|
23
|
+
|
|
24
|
+
fn is_test_rel(rel: &str) -> bool {
|
|
25
|
+
let low = rel.to_ascii_lowercase();
|
|
26
|
+
for seg in [
|
|
27
|
+
"tests/", "test/", "spec/", "__tests__/", "evals/", "corpus/", "fixtures/",
|
|
28
|
+
] {
|
|
29
|
+
if low.starts_with(seg) || low.contains(&format!("/{}", seg)) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
let file_name = low.rsplit('/').next().unwrap_or(&low);
|
|
34
|
+
file_name.starts_with("test_")
|
|
35
|
+
|| file_name.contains("_test.")
|
|
36
|
+
|| file_name.contains(".test.")
|
|
37
|
+
|| file_name.contains(".spec.")
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
fn scrub_c_like_line(line: &str, keep_strings: bool) -> String {
|
|
41
|
+
let bytes = line.as_bytes();
|
|
42
|
+
let mut out = String::with_capacity(line.len());
|
|
43
|
+
let mut quote: Option<u8> = None;
|
|
44
|
+
let mut i = 0;
|
|
45
|
+
while i < bytes.len() {
|
|
46
|
+
let b = bytes[i];
|
|
47
|
+
if let Some(q) = quote {
|
|
48
|
+
if b == b'\\' && i + 1 < bytes.len() {
|
|
49
|
+
if keep_strings {
|
|
50
|
+
out.push(b as char);
|
|
51
|
+
out.push(bytes[i + 1] as char);
|
|
52
|
+
} else {
|
|
53
|
+
out.push_str(" ");
|
|
54
|
+
}
|
|
55
|
+
i += 2;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if b == q {
|
|
59
|
+
out.push(b as char);
|
|
60
|
+
quote = None;
|
|
61
|
+
} else if keep_strings {
|
|
62
|
+
out.push(b as char);
|
|
63
|
+
} else {
|
|
64
|
+
out.push(' ');
|
|
65
|
+
}
|
|
66
|
+
i += 1;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if b == b'/' && i + 1 < bytes.len() && bytes[i + 1] == b'/' {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
if b == b'/' && i + 1 < bytes.len() && bytes[i + 1] == b'*' {
|
|
73
|
+
if let Some(end) = line[i + 2..].find("*/") {
|
|
74
|
+
for _ in 0..(end + 4) {
|
|
75
|
+
out.push(' ');
|
|
76
|
+
}
|
|
77
|
+
i += end + 4;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
if b == b'\'' || b == b'"' || b == b'`' {
|
|
83
|
+
quote = Some(b);
|
|
84
|
+
out.push(b as char);
|
|
85
|
+
i += 1;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
out.push(b as char);
|
|
89
|
+
i += 1;
|
|
90
|
+
}
|
|
91
|
+
out
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
fn extract_argparse_flags(txt: &str) -> BTreeSet<String> {
|
|
95
|
+
let mut flags = BTreeSet::new();
|
|
96
|
+
let mut rest = txt;
|
|
97
|
+
while let Some(idx) = rest.find(".add_argument(") {
|
|
98
|
+
let after = &rest[idx + ".add_argument(".len()..];
|
|
99
|
+
let mut depth = 1i32;
|
|
100
|
+
let mut end_idx = after.len();
|
|
101
|
+
for (ci, ch) in after.char_indices() {
|
|
102
|
+
if ch == '(' {
|
|
103
|
+
depth += 1;
|
|
104
|
+
} else if ch == ')' {
|
|
105
|
+
depth -= 1;
|
|
106
|
+
if depth == 0 {
|
|
107
|
+
end_idx = ci;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
let call_body = &after[..end_idx];
|
|
113
|
+
let bytes = call_body.as_bytes();
|
|
114
|
+
let mut k = 0;
|
|
115
|
+
while k < bytes.len() {
|
|
116
|
+
let q = bytes[k];
|
|
117
|
+
if q == b'\'' || q == b'"' {
|
|
118
|
+
let mut end_q = k + 1;
|
|
119
|
+
while end_q < bytes.len() && bytes[end_q] != q {
|
|
120
|
+
if bytes[end_q] == b'\\' {
|
|
121
|
+
end_q += 1;
|
|
122
|
+
}
|
|
123
|
+
end_q += 1;
|
|
124
|
+
}
|
|
125
|
+
if end_q < bytes.len() {
|
|
126
|
+
let lit = &call_body[k + 1..end_q];
|
|
127
|
+
if lit.starts_with("--")
|
|
128
|
+
&& lit.len() > 2
|
|
129
|
+
&& lit[2..]
|
|
130
|
+
.bytes()
|
|
131
|
+
.all(|c| c.is_ascii_alphanumeric() || c == b'-')
|
|
132
|
+
{
|
|
133
|
+
flags.insert(lit.to_string());
|
|
134
|
+
}
|
|
135
|
+
k = end_q + 1;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
k += 1;
|
|
140
|
+
}
|
|
141
|
+
rest = &after[end_idx..];
|
|
142
|
+
}
|
|
143
|
+
if !flags.is_empty() {
|
|
144
|
+
flags.insert("--help".to_string());
|
|
145
|
+
}
|
|
146
|
+
flags
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
fn discover_cli_subcommands(root: &Path) -> (BTreeSet<String>, BTreeSet<String>) {
|
|
150
|
+
let mut gate_subs = BTreeSet::new();
|
|
151
|
+
let mut net_subs = BTreeSet::new();
|
|
152
|
+
|
|
153
|
+
if let Ok(txt) = fs::read_to_string(root.join("native/dmb-gate/src/main.rs")) {
|
|
154
|
+
for line in txt.lines() {
|
|
155
|
+
let t = line.trim();
|
|
156
|
+
if let Some(rest) = t.strip_prefix('"') {
|
|
157
|
+
if let Some(end_q) = rest.find('"') {
|
|
158
|
+
let cand = &rest[..end_q];
|
|
159
|
+
let after = rest[end_q + 1..].trim_start();
|
|
160
|
+
if after.starts_with("=>")
|
|
161
|
+
&& !cand.is_empty()
|
|
162
|
+
&& cand
|
|
163
|
+
.bytes()
|
|
164
|
+
.all(|b| b.is_ascii_lowercase() || b.is_ascii_digit() || b == b'-')
|
|
165
|
+
{
|
|
166
|
+
gate_subs.insert(cand.to_string());
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if let Ok(txt) = fs::read_to_string(root.join("bin/deepmodebot.mjs")) {
|
|
174
|
+
if let Some(start) = txt.find("const map = {") {
|
|
175
|
+
let after = &txt[start + "const map = {".len()..];
|
|
176
|
+
if let Some(end) = after.find("};") {
|
|
177
|
+
for line in after[..end].lines() {
|
|
178
|
+
let t = line.trim();
|
|
179
|
+
if let Some(colon) = t.find(':') {
|
|
180
|
+
let key = t[..colon].trim();
|
|
181
|
+
if !key.is_empty()
|
|
182
|
+
&& key
|
|
183
|
+
.bytes()
|
|
184
|
+
.all(|b| b.is_ascii_lowercase() || b.is_ascii_digit() || b == b'-')
|
|
185
|
+
{
|
|
186
|
+
gate_subs.insert(key.to_string());
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if let Ok(txt) = fs::read_to_string(root.join("native/dmb-net/main.go")) {
|
|
195
|
+
for line in txt.lines() {
|
|
196
|
+
let t = line.trim();
|
|
197
|
+
if let Some(rest) = t.strip_prefix("case \"") {
|
|
198
|
+
if let Some(end_q) = rest.find("\":") {
|
|
199
|
+
let cand = &rest[..end_q];
|
|
200
|
+
if !cand.is_empty()
|
|
201
|
+
&& cand
|
|
202
|
+
.bytes()
|
|
203
|
+
.all(|b| b.is_ascii_lowercase() || b.is_ascii_digit() || b == b'-')
|
|
204
|
+
{
|
|
205
|
+
net_subs.insert(cand.to_string());
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
(gate_subs, net_subs)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
fn scan_md_line_flags(
|
|
216
|
+
rel: &str,
|
|
217
|
+
line_no: usize,
|
|
218
|
+
line: &str,
|
|
219
|
+
argparse_by_name: &BTreeMap<String, Vec<(String, BTreeSet<String>)>>,
|
|
220
|
+
out: &mut Vec<GapFinding>,
|
|
221
|
+
) {
|
|
222
|
+
let bytes = line.as_bytes();
|
|
223
|
+
let mut i = 0;
|
|
224
|
+
while i < bytes.len() {
|
|
225
|
+
if let Some(py_pos) = line[i..].find(".py") {
|
|
226
|
+
let dot_idx = i + py_pos;
|
|
227
|
+
let after_py = dot_idx + 3;
|
|
228
|
+
let valid_end =
|
|
229
|
+
after_py == bytes.len() || !(bytes[after_py].is_ascii_alphanumeric() || bytes[after_py] == b'_');
|
|
230
|
+
if valid_end {
|
|
231
|
+
let mut start = dot_idx;
|
|
232
|
+
while start > 0
|
|
233
|
+
&& (bytes[start - 1].is_ascii_lowercase()
|
|
234
|
+
|| bytes[start - 1].is_ascii_digit()
|
|
235
|
+
|| bytes[start - 1] == b'_')
|
|
236
|
+
{
|
|
237
|
+
start -= 1;
|
|
238
|
+
}
|
|
239
|
+
let valid_start = start == 0
|
|
240
|
+
|| matches!(
|
|
241
|
+
bytes[start - 1],
|
|
242
|
+
b' ' | b'\t' | b'"' | b'\'' | b'`' | b'/' | b'\\'
|
|
243
|
+
);
|
|
244
|
+
if valid_start && start < dot_idx {
|
|
245
|
+
let sname = &line[start..after_py];
|
|
246
|
+
if let Some(entries) = argparse_by_name.get(sname) {
|
|
247
|
+
if entries.len() == 1 {
|
|
248
|
+
let rest = &line[after_py..];
|
|
249
|
+
let mut tail_end = rest.len();
|
|
250
|
+
for (ti, ch) in rest.char_indices() {
|
|
251
|
+
if matches!(ch, '`' | '|' | ';' | ')') {
|
|
252
|
+
tail_end = ti;
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
if ch == '&' && rest[ti..].starts_with("&&") {
|
|
256
|
+
tail_end = ti;
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
let tail = &rest[..tail_end];
|
|
261
|
+
if !tail.contains("--<") && !tail.contains("--{") {
|
|
262
|
+
let (srel, valid_flags) = &entries[0];
|
|
263
|
+
let tb = tail.as_bytes();
|
|
264
|
+
let mut p = 0;
|
|
265
|
+
while p + 2 < tb.len() {
|
|
266
|
+
if tb[p] == b'-'
|
|
267
|
+
&& tb[p + 1] == b'-'
|
|
268
|
+
&& (p > 0 && tb[p - 1].is_ascii_whitespace())
|
|
269
|
+
&& tb[p + 2].is_ascii_lowercase()
|
|
270
|
+
{
|
|
271
|
+
let mut fe = p + 2;
|
|
272
|
+
while fe < tb.len()
|
|
273
|
+
&& (tb[fe].is_ascii_lowercase()
|
|
274
|
+
|| tb[fe].is_ascii_digit()
|
|
275
|
+
|| tb[fe] == b'-')
|
|
276
|
+
{
|
|
277
|
+
fe += 1;
|
|
278
|
+
}
|
|
279
|
+
let boundary_ok = fe == tb.len()
|
|
280
|
+
|| tb[fe].is_ascii_whitespace()
|
|
281
|
+
|| matches!(tb[fe], b'=' | b'`' | b'"' | b'\'');
|
|
282
|
+
if boundary_ok {
|
|
283
|
+
let flg = &tail[p..fe];
|
|
284
|
+
if !valid_flags.contains(flg) {
|
|
285
|
+
out.push(GapFinding {
|
|
286
|
+
severity: "P1",
|
|
287
|
+
rule: "doc-script-flag-drift",
|
|
288
|
+
file: rel.to_string(),
|
|
289
|
+
line: line_no,
|
|
290
|
+
message: format!(
|
|
291
|
+
"Doc passes `{}` to `{}`, which does not define that flag.",
|
|
292
|
+
flg, srel
|
|
293
|
+
),
|
|
294
|
+
fix: format!(
|
|
295
|
+
"Update `{}` or add `{}` to `{}`'s argparse definition.",
|
|
296
|
+
rel, flg, srel
|
|
297
|
+
),
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
p = fe;
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
p += 1;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
i = after_py;
|
|
312
|
+
} else {
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
fn scan_md_cli_subcommands(
|
|
319
|
+
rel: &str,
|
|
320
|
+
line_no: usize,
|
|
321
|
+
line: &str,
|
|
322
|
+
gate_subs: &BTreeSet<String>,
|
|
323
|
+
net_subs: &BTreeSet<String>,
|
|
324
|
+
out: &mut Vec<GapFinding>,
|
|
325
|
+
) {
|
|
326
|
+
for prefix in ["dmb-gate ", "deepmodebot gate "] {
|
|
327
|
+
let mut start = 0;
|
|
328
|
+
while let Some(pos) = line[start..].find(prefix) {
|
|
329
|
+
let idx = start + pos;
|
|
330
|
+
let prev_ok = idx == 0
|
|
331
|
+
|| !matches!(
|
|
332
|
+
line.as_bytes()[idx - 1],
|
|
333
|
+
b'/' | b'.' | b'-' | b'_' | b'a'..=b'z' | b'A'..=b'Z' | b'0'..=b'9'
|
|
334
|
+
);
|
|
335
|
+
let after = idx + prefix.len();
|
|
336
|
+
if prev_ok && !gate_subs.is_empty() {
|
|
337
|
+
let rest = line[after..].trim_start();
|
|
338
|
+
let tok: String = rest
|
|
339
|
+
.chars()
|
|
340
|
+
.take_while(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || *c == '-' || *c == '|')
|
|
341
|
+
.collect();
|
|
342
|
+
if !tok.is_empty() && rest.chars().next().map(|c| c.is_ascii_lowercase()).unwrap_or(false) {
|
|
343
|
+
for part in tok.split('|') {
|
|
344
|
+
if !part.is_empty() && part != "help" && !gate_subs.contains(part) {
|
|
345
|
+
out.push(GapFinding {
|
|
346
|
+
severity: "P1",
|
|
347
|
+
rule: "doc-cli-subcommand-drift",
|
|
348
|
+
file: rel.to_string(),
|
|
349
|
+
line: line_no,
|
|
350
|
+
message: format!("Doc references unknown dmb-gate subcommand `{}`.", part),
|
|
351
|
+
fix: "Update the documented gate subcommand or wire it into dmb-gate and bin/deepmodebot.mjs.".to_string(),
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
start = after;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
let mut start = 0;
|
|
362
|
+
while let Some(pos) = line[start..].find("dmb-net ") {
|
|
363
|
+
let idx = start + pos;
|
|
364
|
+
let prev_ok = idx == 0
|
|
365
|
+
|| !matches!(
|
|
366
|
+
line.as_bytes()[idx - 1],
|
|
367
|
+
b'/' | b'.' | b'-' | b'_' | b'a'..=b'z' | b'A'..=b'Z' | b'0'..=b'9'
|
|
368
|
+
);
|
|
369
|
+
let after = idx + "dmb-net ".len();
|
|
370
|
+
if prev_ok && !net_subs.is_empty() {
|
|
371
|
+
let rest = line[after..].trim_start();
|
|
372
|
+
let tok: String = rest
|
|
373
|
+
.chars()
|
|
374
|
+
.take_while(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || *c == '-' || *c == '|')
|
|
375
|
+
.collect();
|
|
376
|
+
if !tok.is_empty() && rest.chars().next().map(|c| c.is_ascii_lowercase()).unwrap_or(false) {
|
|
377
|
+
for part in tok.split('|') {
|
|
378
|
+
if !part.is_empty() && part != "help" && !net_subs.contains(part) {
|
|
379
|
+
out.push(GapFinding {
|
|
380
|
+
severity: "P1",
|
|
381
|
+
rule: "doc-cli-subcommand-drift",
|
|
382
|
+
file: rel.to_string(),
|
|
383
|
+
line: line_no,
|
|
384
|
+
message: format!("Doc references unknown dmb-net subcommand `{}`.", part),
|
|
385
|
+
fix: "Update the documented dmb-net subcommand or add it to native/dmb-net/main.go.".to_string(),
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
start = after;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
fn check_replaces_comment(
|
|
396
|
+
rel: &str,
|
|
397
|
+
line_no: usize,
|
|
398
|
+
line: &str,
|
|
399
|
+
live_paths: &BTreeSet<String>,
|
|
400
|
+
live_basenames: &BTreeSet<String>,
|
|
401
|
+
out: &mut Vec<GapFinding>,
|
|
402
|
+
) {
|
|
403
|
+
let comment = if let Some(idx) = line.find("//") {
|
|
404
|
+
&line[idx + 2..]
|
|
405
|
+
} else if let Some(idx) = line.find('#') {
|
|
406
|
+
&line[idx + 1..]
|
|
407
|
+
} else {
|
|
408
|
+
return;
|
|
409
|
+
};
|
|
410
|
+
let low = comment.to_ascii_lowercase();
|
|
411
|
+
let Some(rpos) = low.find("replaces ") else {
|
|
412
|
+
return;
|
|
413
|
+
};
|
|
414
|
+
let prev_ok = rpos == 0 || !low.as_bytes()[rpos - 1].is_ascii_alphanumeric();
|
|
415
|
+
if !prev_ok {
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
let after = comment[rpos + "replaces ".len()..].trim_start();
|
|
419
|
+
let cand: String = after
|
|
420
|
+
.chars()
|
|
421
|
+
.take_while(|c| c.is_ascii_alphanumeric() || matches!(c, '_' | '.' | '/' | '-'))
|
|
422
|
+
.collect();
|
|
423
|
+
let cand = cand.trim_end_matches('.').trim_start_matches("./");
|
|
424
|
+
let valid_ext = ["py", "rs", "go", "ts", "js", "mjs", "sh"]
|
|
425
|
+
.iter()
|
|
426
|
+
.any(|ext| cand.ends_with(&format!(".{}", ext)));
|
|
427
|
+
if !valid_ext {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
let base = cand.rsplit('/').next().unwrap_or(cand);
|
|
431
|
+
let still_live = live_paths.contains(cand)
|
|
432
|
+
|| (!cand.contains('/') && live_basenames.contains(base))
|
|
433
|
+
|| live_paths.iter().any(|p| p.ends_with(&format!("/{}", cand)));
|
|
434
|
+
if still_live {
|
|
435
|
+
out.push(GapFinding {
|
|
436
|
+
severity: "P1",
|
|
437
|
+
rule: "stale-replaces-claim",
|
|
438
|
+
file: rel.to_string(),
|
|
439
|
+
line: line_no,
|
|
440
|
+
message: format!(
|
|
441
|
+
"Comment claims to replace `{}`, which is still an active file in the repo.",
|
|
442
|
+
cand
|
|
443
|
+
),
|
|
444
|
+
fix: format!(
|
|
445
|
+
"Migrate callers and delete `{}`, or clarify how this module complements `{}`.",
|
|
446
|
+
cand, cand
|
|
447
|
+
),
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
fn is_js_teardown_prefix(prefix: &str) -> bool {
|
|
453
|
+
for kw in ["finished", "unlink", "rm", "rmdir", "close", "abort", "cancel", "dispose"] {
|
|
454
|
+
let mut start = 0;
|
|
455
|
+
while let Some(pos) = prefix[start..].find(kw) {
|
|
456
|
+
let idx = start + pos;
|
|
457
|
+
let prev_ok = idx == 0 || !(prefix.as_bytes()[idx - 1].is_ascii_alphanumeric() || prefix.as_bytes()[idx - 1] == b'_');
|
|
458
|
+
let after = idx + kw.len();
|
|
459
|
+
let next_ok = after == prefix.len() || !(prefix.as_bytes()[after].is_ascii_alphanumeric() || prefix.as_bytes()[after] == b'_');
|
|
460
|
+
if prev_ok && next_ok {
|
|
461
|
+
return true;
|
|
462
|
+
}
|
|
463
|
+
start = after;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
false
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
fn has_js_empty_catch(scrubbed: &str) -> bool {
|
|
470
|
+
let Some(pos) = scrubbed.find(".catch") else {
|
|
471
|
+
return false;
|
|
472
|
+
};
|
|
473
|
+
if is_js_teardown_prefix(&scrubbed[..pos]) {
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
let after = scrubbed[pos + 6..].trim_start();
|
|
477
|
+
let Some(inner) = after.strip_prefix('(') else {
|
|
478
|
+
return false;
|
|
479
|
+
};
|
|
480
|
+
let Some(brace_open) = inner.find('{') else {
|
|
481
|
+
return false;
|
|
482
|
+
};
|
|
483
|
+
let between = inner[..brace_open].trim();
|
|
484
|
+
let is_fn = between.contains("=>") || between.starts_with("function");
|
|
485
|
+
if !is_fn {
|
|
486
|
+
return false;
|
|
487
|
+
}
|
|
488
|
+
let after_open = inner[brace_open + 1..].trim_start();
|
|
489
|
+
let Some(after_close) = after_open.strip_prefix('}') else {
|
|
490
|
+
return false;
|
|
491
|
+
};
|
|
492
|
+
after_close.trim_start().starts_with(')')
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
fn has_js_stub_throw(with_str: &str) -> bool {
|
|
496
|
+
let low = with_str.to_ascii_lowercase();
|
|
497
|
+
let Some(pos) = low.find("throw new error") else {
|
|
498
|
+
return false;
|
|
499
|
+
};
|
|
500
|
+
let after = low[pos + "throw new error".len()..].trim_start();
|
|
501
|
+
let Some(inner) = after.strip_prefix('(') else {
|
|
502
|
+
return false;
|
|
503
|
+
};
|
|
504
|
+
let inner = inner.trim_start();
|
|
505
|
+
let Some(_q) = inner.bytes().next().filter(|b| *b == b'\'' || *b == b'"') else {
|
|
506
|
+
return false;
|
|
507
|
+
};
|
|
508
|
+
let msg = &inner[1..];
|
|
509
|
+
msg.starts_with("not implemented")
|
|
510
|
+
|| msg.starts_with("todo")
|
|
511
|
+
|| msg.starts_with("unimplemented")
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
fn indent_width(line: &str) -> usize {
|
|
515
|
+
line.bytes()
|
|
516
|
+
.take_while(|b| *b == b' ' || *b == b'\t')
|
|
517
|
+
.map(|b| if b == b'\t' { 4 } else { 1 })
|
|
518
|
+
.sum()
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
fn strip_py_comment(line: &str) -> &str {
|
|
522
|
+
let bytes = line.as_bytes();
|
|
523
|
+
let mut quote: Option<u8> = None;
|
|
524
|
+
let mut i = 0;
|
|
525
|
+
while i < bytes.len() {
|
|
526
|
+
let b = bytes[i];
|
|
527
|
+
if let Some(q) = quote {
|
|
528
|
+
if b == b'\\' && i + 1 < bytes.len() {
|
|
529
|
+
i += 2;
|
|
530
|
+
continue;
|
|
531
|
+
}
|
|
532
|
+
if b == q {
|
|
533
|
+
quote = None;
|
|
534
|
+
}
|
|
535
|
+
i += 1;
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
if b == b'\'' || b == b'"' {
|
|
539
|
+
quote = Some(b);
|
|
540
|
+
i += 1;
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
if b == b'#' {
|
|
544
|
+
return line[..i].trim_end();
|
|
545
|
+
}
|
|
546
|
+
i += 1;
|
|
547
|
+
}
|
|
548
|
+
line.trim_end()
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
#[derive(Clone, Copy)]
|
|
552
|
+
enum PyScope {
|
|
553
|
+
Class { is_abstract: bool },
|
|
554
|
+
Func,
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
fn is_py_abstract_class_header(rest: &str) -> bool {
|
|
558
|
+
let Some(open) = rest.find('(') else {
|
|
559
|
+
return false;
|
|
560
|
+
};
|
|
561
|
+
let Some(close) = rest[open + 1..].rfind(')') else {
|
|
562
|
+
return false;
|
|
563
|
+
};
|
|
564
|
+
let bases = &rest[open + 1..open + 1 + close];
|
|
565
|
+
for part in bases.split(',') {
|
|
566
|
+
let base_no_gen = part.split('[').next().unwrap_or("").trim();
|
|
567
|
+
let tail = base_no_gen.rsplit('.').next().unwrap_or("").trim();
|
|
568
|
+
if matches!(tail, "ABC" | "Protocol") {
|
|
569
|
+
return true;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
false
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
fn find_py_def_header_colon(lines: &[&str], start: usize) -> Option<(usize, String)> {
|
|
576
|
+
let mut sig_end = start;
|
|
577
|
+
let mut paren_depth: i32 = 0;
|
|
578
|
+
let mut saw_open_paren = false;
|
|
579
|
+
let mut in_quote: Option<char> = None;
|
|
580
|
+
while sig_end < lines.len() {
|
|
581
|
+
let sc = strip_py_comment(lines[sig_end]);
|
|
582
|
+
let mut escaped = false;
|
|
583
|
+
for (bidx, ch) in sc.char_indices() {
|
|
584
|
+
if let Some(q) = in_quote {
|
|
585
|
+
if escaped {
|
|
586
|
+
escaped = false;
|
|
587
|
+
} else if ch == '\\' {
|
|
588
|
+
escaped = true;
|
|
589
|
+
} else if ch == q {
|
|
590
|
+
in_quote = None;
|
|
591
|
+
}
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
match ch {
|
|
595
|
+
'\'' | '"' => in_quote = Some(ch),
|
|
596
|
+
'(' | '[' | '{' => {
|
|
597
|
+
if ch == '(' {
|
|
598
|
+
saw_open_paren = true;
|
|
599
|
+
}
|
|
600
|
+
paren_depth += 1;
|
|
601
|
+
}
|
|
602
|
+
')' | ']' | '}' => {
|
|
603
|
+
paren_depth -= 1;
|
|
604
|
+
}
|
|
605
|
+
':' if saw_open_paren && paren_depth <= 0 => {
|
|
606
|
+
let inline_tail = sc[bidx + 1..].trim().to_string();
|
|
607
|
+
return Some((sig_end, inline_tail));
|
|
608
|
+
}
|
|
609
|
+
_ => {}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
sig_end += 1;
|
|
613
|
+
}
|
|
614
|
+
None
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
fn split_py_inline_stmts(inline_tail: &str) -> Vec<String> {
|
|
618
|
+
let mut parts = Vec::new();
|
|
619
|
+
let mut cur = String::new();
|
|
620
|
+
let mut in_quote: Option<char> = None;
|
|
621
|
+
let mut escaped = false;
|
|
622
|
+
for ch in inline_tail.chars() {
|
|
623
|
+
if let Some(q) = in_quote {
|
|
624
|
+
cur.push(ch);
|
|
625
|
+
if escaped {
|
|
626
|
+
escaped = false;
|
|
627
|
+
} else if ch == '\\' {
|
|
628
|
+
escaped = true;
|
|
629
|
+
} else if ch == q {
|
|
630
|
+
in_quote = None;
|
|
631
|
+
}
|
|
632
|
+
continue;
|
|
633
|
+
}
|
|
634
|
+
match ch {
|
|
635
|
+
'\'' | '"' => {
|
|
636
|
+
in_quote = Some(ch);
|
|
637
|
+
cur.push(ch);
|
|
638
|
+
}
|
|
639
|
+
';' => {
|
|
640
|
+
let t = cur.trim();
|
|
641
|
+
if !t.is_empty() {
|
|
642
|
+
parts.push(t.to_string());
|
|
643
|
+
}
|
|
644
|
+
cur.clear();
|
|
645
|
+
}
|
|
646
|
+
_ => cur.push(ch),
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
let tail = cur.trim();
|
|
650
|
+
if !tail.is_empty() {
|
|
651
|
+
parts.push(tail.to_string());
|
|
652
|
+
}
|
|
653
|
+
if let Some(first) = parts.first() {
|
|
654
|
+
let is_str_doc = (first.starts_with('"') && first.ends_with('"') && first.len() >= 2)
|
|
655
|
+
|| (first.starts_with('\'') && first.ends_with('\'') && first.len() >= 2);
|
|
656
|
+
if is_str_doc && first != "..." {
|
|
657
|
+
parts.remove(0);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
parts
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
fn is_py_broad_except(clause: &str) -> bool {
|
|
664
|
+
let trimmed = clause.trim();
|
|
665
|
+
if trimmed == "except:" {
|
|
666
|
+
return true;
|
|
667
|
+
}
|
|
668
|
+
let Some(rest) = trimmed.strip_prefix("except") else {
|
|
669
|
+
return false;
|
|
670
|
+
};
|
|
671
|
+
if !rest.starts_with(char::is_whitespace) && !rest.starts_with('(') {
|
|
672
|
+
return false;
|
|
673
|
+
}
|
|
674
|
+
let Some(body) = rest.trim().strip_suffix(':') else {
|
|
675
|
+
return false;
|
|
676
|
+
};
|
|
677
|
+
let body = body.trim();
|
|
678
|
+
if body.is_empty() {
|
|
679
|
+
return true;
|
|
680
|
+
}
|
|
681
|
+
let expr = if let Some((before_as, after_as)) = body.rsplit_once(" as ") {
|
|
682
|
+
let ident = after_as.trim();
|
|
683
|
+
if !ident.is_empty() && ident.chars().all(|c| c.is_ascii_alphanumeric() || c == '_') {
|
|
684
|
+
before_as.trim()
|
|
685
|
+
} else {
|
|
686
|
+
body
|
|
687
|
+
}
|
|
688
|
+
} else {
|
|
689
|
+
body
|
|
690
|
+
};
|
|
691
|
+
let inner = expr
|
|
692
|
+
.strip_prefix('(')
|
|
693
|
+
.and_then(|s| s.strip_suffix(')'))
|
|
694
|
+
.unwrap_or(expr);
|
|
695
|
+
inner
|
|
696
|
+
.split(',')
|
|
697
|
+
.any(|item| matches!(item.trim(), "Exception" | "BaseException"))
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
fn scan_python_file_gaps(rel: &str, txt: &str, out: &mut Vec<GapFinding>) {
|
|
701
|
+
let lines: Vec<&str> = txt.lines().collect();
|
|
702
|
+
let n = lines.len();
|
|
703
|
+
|
|
704
|
+
let mut scope_stack: Vec<(usize, PyScope)> = Vec::new();
|
|
705
|
+
let mut pending_abstract_dec = false;
|
|
706
|
+
let mut i = 0;
|
|
707
|
+
|
|
708
|
+
while i < n {
|
|
709
|
+
let raw = lines[i];
|
|
710
|
+
let clean = strip_py_comment(raw);
|
|
711
|
+
let trimmed = clean.trim();
|
|
712
|
+
if trimmed.is_empty() {
|
|
713
|
+
i += 1;
|
|
714
|
+
continue;
|
|
715
|
+
}
|
|
716
|
+
let ind = indent_width(raw);
|
|
717
|
+
scope_stack.retain(|(si, _)| *si < ind);
|
|
718
|
+
|
|
719
|
+
if trimmed.starts_with('@') {
|
|
720
|
+
if trimmed.contains("abstract") || trimmed.ends_with("overload") {
|
|
721
|
+
pending_abstract_dec = true;
|
|
722
|
+
}
|
|
723
|
+
i += 1;
|
|
724
|
+
continue;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
if let Some(rest) = trimmed.strip_prefix("class ") {
|
|
728
|
+
pending_abstract_dec = false;
|
|
729
|
+
let is_abs = is_py_abstract_class_header(rest);
|
|
730
|
+
scope_stack.push((ind, PyScope::Class { is_abstract: is_abs }));
|
|
731
|
+
i += 1;
|
|
732
|
+
continue;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
if trimmed == "except:" || trimmed.starts_with("except:") {
|
|
736
|
+
let inline_after = trimmed.strip_prefix("except:").unwrap_or("").trim();
|
|
737
|
+
let bare_swallowed = if !inline_after.is_empty() {
|
|
738
|
+
let parts = split_py_inline_stmts(inline_after);
|
|
739
|
+
parts.len() == 1 && (parts[0] == "pass" || parts[0] == "...")
|
|
740
|
+
} else {
|
|
741
|
+
let mut j = i + 1;
|
|
742
|
+
let mut body_lines = Vec::new();
|
|
743
|
+
while j < n {
|
|
744
|
+
let b_clean = strip_py_comment(lines[j]);
|
|
745
|
+
let bt = b_clean.trim();
|
|
746
|
+
if bt.is_empty() {
|
|
747
|
+
j += 1;
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
if indent_width(lines[j]) <= ind {
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
body_lines.push(bt);
|
|
754
|
+
j += 1;
|
|
755
|
+
}
|
|
756
|
+
body_lines.len() == 1 && (body_lines[0] == "pass" || body_lines[0] == "...")
|
|
757
|
+
};
|
|
758
|
+
if bare_swallowed {
|
|
759
|
+
out.push(GapFinding {
|
|
760
|
+
severity: "P1",
|
|
761
|
+
rule: "swallowed-exception",
|
|
762
|
+
file: rel.to_string(),
|
|
763
|
+
line: i + 1,
|
|
764
|
+
message: "Bare `except: pass` silently swallows all errors including KeyboardInterrupt/SystemExit.".to_string(),
|
|
765
|
+
fix: "Catch a narrow exception type and handle, log, or re-raise it.".to_string(),
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
let def_rest = trimmed
|
|
771
|
+
.strip_prefix("def ")
|
|
772
|
+
.or_else(|| trimmed.strip_prefix("async def "));
|
|
773
|
+
if let Some(drest) = def_rest {
|
|
774
|
+
let parent_is_abstract = matches!(
|
|
775
|
+
scope_stack.last(),
|
|
776
|
+
Some((_, PyScope::Class { is_abstract: true }))
|
|
777
|
+
);
|
|
778
|
+
let is_abstract = pending_abstract_dec || parent_is_abstract;
|
|
779
|
+
pending_abstract_dec = false;
|
|
780
|
+
scope_stack.push((ind, PyScope::Func));
|
|
781
|
+
|
|
782
|
+
let fname: String = drest
|
|
783
|
+
.chars()
|
|
784
|
+
.take_while(|c| c.is_ascii_alphanumeric() || *c == '_')
|
|
785
|
+
.collect();
|
|
786
|
+
let def_line = i + 1;
|
|
787
|
+
|
|
788
|
+
let Some((sig_end, inline_tail)) = find_py_def_header_colon(&lines, i) else {
|
|
789
|
+
i += 1;
|
|
790
|
+
continue;
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
let mut stmts: Vec<(usize, usize, String)> = Vec::new();
|
|
794
|
+
if !inline_tail.is_empty() {
|
|
795
|
+
for part in split_py_inline_stmts(&inline_tail) {
|
|
796
|
+
stmts.push((sig_end + 1, ind + 4, part));
|
|
797
|
+
}
|
|
798
|
+
} else {
|
|
799
|
+
let mut j = sig_end + 1;
|
|
800
|
+
while j < n {
|
|
801
|
+
let bc = strip_py_comment(lines[j]);
|
|
802
|
+
let bt = bc.trim();
|
|
803
|
+
if bt.is_empty() {
|
|
804
|
+
j += 1;
|
|
805
|
+
continue;
|
|
806
|
+
}
|
|
807
|
+
let bind = indent_width(lines[j]);
|
|
808
|
+
if bind <= ind {
|
|
809
|
+
break;
|
|
810
|
+
}
|
|
811
|
+
if stmts.is_empty() && (bt.starts_with("\"\"\"") || bt.starts_with("'''")) {
|
|
812
|
+
let delim = &bt[..3];
|
|
813
|
+
if bt.len() >= 6 && bt[3..].contains(delim) {
|
|
814
|
+
j += 1;
|
|
815
|
+
continue;
|
|
816
|
+
}
|
|
817
|
+
j += 1;
|
|
818
|
+
while j < n && !lines[j].contains(delim) {
|
|
819
|
+
j += 1;
|
|
820
|
+
}
|
|
821
|
+
j += 1;
|
|
822
|
+
continue;
|
|
823
|
+
}
|
|
824
|
+
stmts.push((j + 1, bind, bt.to_string()));
|
|
825
|
+
j += 1;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
let is_exempt = (fname.starts_with("__") && fname.ends_with("__"))
|
|
830
|
+
|| matches!(fname.as_str(), "log_message" | "noop" | "_noop");
|
|
831
|
+
|
|
832
|
+
if !is_abstract && !is_exempt && stmts.len() == 1 {
|
|
833
|
+
let s0 = stmts[0].2.as_str();
|
|
834
|
+
if s0 == "pass" || s0 == "..." {
|
|
835
|
+
out.push(GapFinding {
|
|
836
|
+
severity: "P1",
|
|
837
|
+
rule: "hollow-stub-body",
|
|
838
|
+
file: rel.to_string(),
|
|
839
|
+
line: def_line,
|
|
840
|
+
message: format!("Function `{}` has a hollow no-op body (`pass`/`...`).", fname),
|
|
841
|
+
fix: "Implement real behavior, mark `@abstractmethod` on a Protocol/ABC, or delete dead scaffolding.".to_string(),
|
|
842
|
+
});
|
|
843
|
+
} else if s0 == "raise NotImplementedError" || s0.starts_with("raise NotImplementedError(") {
|
|
844
|
+
out.push(GapFinding {
|
|
845
|
+
severity: "P1",
|
|
846
|
+
rule: "hollow-stub-body",
|
|
847
|
+
file: rel.to_string(),
|
|
848
|
+
line: def_line,
|
|
849
|
+
message: format!(
|
|
850
|
+
"Function `{}` raises `NotImplementedError` outside an ABC/Protocol.",
|
|
851
|
+
fname
|
|
852
|
+
),
|
|
853
|
+
fix: "Implement the function or move the interface contract onto an explicit `ABC`/`Protocol`.".to_string(),
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
if !stmts.is_empty() && stmts[0].2 == "try:" {
|
|
859
|
+
let try_ind = stmts[0].1;
|
|
860
|
+
let top_clauses: Vec<(usize, &str)> = stmts
|
|
861
|
+
.iter()
|
|
862
|
+
.filter(|(_, bi, _)| *bi == try_ind)
|
|
863
|
+
.map(|(ln, _, txt_s)| (*ln, txt_s.as_str()))
|
|
864
|
+
.collect();
|
|
865
|
+
let only_try_except = top_clauses.len() >= 2
|
|
866
|
+
&& top_clauses[1..]
|
|
867
|
+
.iter()
|
|
868
|
+
.all(|(_, c)| c.starts_with("except ") || c.starts_with("except(") || *c == "except:");
|
|
869
|
+
if only_try_except {
|
|
870
|
+
let mut all_broad_pass = true;
|
|
871
|
+
for (cl_idx, (cl_line, cl_txt)) in top_clauses.iter().enumerate().skip(1) {
|
|
872
|
+
if !is_py_broad_except(cl_txt) {
|
|
873
|
+
all_broad_pass = false;
|
|
874
|
+
break;
|
|
875
|
+
}
|
|
876
|
+
let next_top_line = top_clauses
|
|
877
|
+
.get(cl_idx + 1)
|
|
878
|
+
.map(|(nl, _)| *nl)
|
|
879
|
+
.unwrap_or(usize::MAX);
|
|
880
|
+
let handler_body: Vec<&str> = stmts
|
|
881
|
+
.iter()
|
|
882
|
+
.filter(|(ln, bi, _)| *ln > *cl_line && *ln < next_top_line && *bi > try_ind)
|
|
883
|
+
.map(|(_, _, t)| t.as_str())
|
|
884
|
+
.collect();
|
|
885
|
+
if handler_body.len() != 1
|
|
886
|
+
|| (handler_body[0] != "pass" && handler_body[0] != "...")
|
|
887
|
+
{
|
|
888
|
+
all_broad_pass = false;
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
if all_broad_pass {
|
|
893
|
+
out.push(GapFinding {
|
|
894
|
+
severity: "P1",
|
|
895
|
+
rule: "swallowed-exception",
|
|
896
|
+
file: rel.to_string(),
|
|
897
|
+
line: top_clauses[1].0,
|
|
898
|
+
message: format!(
|
|
899
|
+
"Function `{}` wraps its entire body in broad `except Exception: pass`.",
|
|
900
|
+
fname
|
|
901
|
+
),
|
|
902
|
+
fix: "Catch narrow expected errors or surface/return structured failure state.".to_string(),
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
i += 1;
|
|
909
|
+
continue;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
pending_abstract_dec = false;
|
|
913
|
+
i += 1;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
fn check_cross_lang_parity(root: &Path, out: &mut Vec<GapFinding>) {
|
|
918
|
+
let perf_py = root.join("plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/perf_audit.py");
|
|
919
|
+
let perf_rs = root.join("native/dmb-gate/src/perf.rs");
|
|
920
|
+
if let (Ok(py_txt), Ok(rs_txt)) = (fs::read_to_string(&perf_py), fs::read_to_string(&perf_rs)) {
|
|
921
|
+
for rule in [
|
|
922
|
+
"db-n-plus-one-loop",
|
|
923
|
+
"async-await-in-loop",
|
|
924
|
+
"py-sync-in-async",
|
|
925
|
+
"http-missing-timeout",
|
|
926
|
+
"db-offset-pagination",
|
|
927
|
+
"db-pool-per-request",
|
|
928
|
+
] {
|
|
929
|
+
if py_txt.contains(rule) && !rs_txt.contains(rule) {
|
|
930
|
+
out.push(GapFinding {
|
|
931
|
+
severity: "P1",
|
|
932
|
+
rule: "cross-lang-gate-drift",
|
|
933
|
+
file: "native/dmb-gate/src/perf.rs".to_string(),
|
|
934
|
+
line: 1,
|
|
935
|
+
message: format!(
|
|
936
|
+
"Rule `{}` exists in perf_audit.py but is missing in native/dmb-gate/src/perf.rs.",
|
|
937
|
+
rule
|
|
938
|
+
),
|
|
939
|
+
fix: "Implement 1:1 rule parity across Python and Rust gates.".to_string(),
|
|
940
|
+
});
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
let ui_py = root.join("plugins/deepmodebot/skills/frontend-ui/scripts/ui_audit.py");
|
|
946
|
+
let ui_rs = root.join("native/dmb-gate/src/ui.rs");
|
|
947
|
+
if let (Ok(py_txt), Ok(rs_txt)) = (fs::read_to_string(&ui_py), fs::read_to_string(&ui_rs)) {
|
|
948
|
+
let pairs = [
|
|
949
|
+
("no-transition-all", "ui-transition-all"),
|
|
950
|
+
("no-layout-transition", "ui-layout-transition"),
|
|
951
|
+
("no-scale-zero-entry", "ui-scale-zero"),
|
|
952
|
+
("no-ease-in-ui", "ui-ease-in"),
|
|
953
|
+
("checkbox-not-circular", "ui-circular-checkbox"),
|
|
954
|
+
("icon-button-label", "ui-icon-button-unlabeled"),
|
|
955
|
+
("no-pure-black-surface", "ui-pure-black-surface"),
|
|
956
|
+
("no-100vw-overflow", "ui-100vw-overflow"),
|
|
957
|
+
("sticky-overflow-x-hidden", "ui-sticky-overflow-x-hidden"),
|
|
958
|
+
("no-zoom-disable", "ui-no-zoom-disable"),
|
|
959
|
+
("no-paste-block", "ui-no-paste-block"),
|
|
960
|
+
("no-fake-live-pulse", "ui-fake-live-pulse"),
|
|
961
|
+
];
|
|
962
|
+
for (py_r, rs_r) in pairs {
|
|
963
|
+
if py_txt.contains(py_r) && !rs_txt.contains(rs_r) {
|
|
964
|
+
out.push(GapFinding {
|
|
965
|
+
severity: "P1",
|
|
966
|
+
rule: "cross-lang-gate-drift",
|
|
967
|
+
file: "native/dmb-gate/src/ui.rs".to_string(),
|
|
968
|
+
line: 1,
|
|
969
|
+
message: format!(
|
|
970
|
+
"Blocking UI rule `{}` in ui_audit.py has no Rust counterpart in native/dmb-gate/src/ui.rs.",
|
|
971
|
+
py_r
|
|
972
|
+
),
|
|
973
|
+
fix: "Add matching rule coverage in native/dmb-gate/src/ui.rs.".to_string(),
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
let reward_py = root.join("plugins/deepmodebot/skills/deepmodebot/assets/reward-guard/reward_guard.py");
|
|
980
|
+
let reward_rs = root.join("native/dmb-gate/src/reward.rs");
|
|
981
|
+
if let (Ok(py_txt), Ok(rs_txt)) = (fs::read_to_string(&reward_py), fs::read_to_string(&reward_rs)) {
|
|
982
|
+
for rule in [
|
|
983
|
+
"reward-hack-threshold-zero",
|
|
984
|
+
"reward-hack-assertion-weakened",
|
|
985
|
+
"reward-hack-test-skip",
|
|
986
|
+
"reward-hack-primitive-standin",
|
|
987
|
+
"reward-hack-hardcoded-pass",
|
|
988
|
+
"reward-hack-contract-tampered",
|
|
989
|
+
] {
|
|
990
|
+
if py_txt.contains(rule) && !rs_txt.contains(rule) {
|
|
991
|
+
out.push(GapFinding {
|
|
992
|
+
severity: "P1",
|
|
993
|
+
rule: "cross-lang-gate-drift",
|
|
994
|
+
file: "native/dmb-gate/src/reward.rs".to_string(),
|
|
995
|
+
line: 1,
|
|
996
|
+
message: format!(
|
|
997
|
+
"Reward-guard rule `{}` exists in reward_guard.py but is missing in native/dmb-gate/src/reward.rs.",
|
|
998
|
+
rule
|
|
999
|
+
),
|
|
1000
|
+
fix: "Keep reward_guard.py and native/dmb-gate/src/reward.rs rule sets identical.".to_string(),
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
pub fn scan_repo_gaps(root: &Path) -> (usize, Vec<GapFinding>) {
|
|
1008
|
+
let has_plugins = root.join("plugins").is_dir();
|
|
1009
|
+
let files: Vec<PathBuf> = walk_files(root, None, crate::util::SKIP_DIRS);
|
|
1010
|
+
|
|
1011
|
+
let loaded = parallel_map(&files, |p| {
|
|
1012
|
+
let meta = fs::symlink_metadata(p).ok()?;
|
|
1013
|
+
if meta.file_type().is_symlink() || !meta.is_file() || meta.len() > 512_000 {
|
|
1014
|
+
return None;
|
|
1015
|
+
}
|
|
1016
|
+
let rel_p = p.strip_prefix(root).ok()?;
|
|
1017
|
+
let rel = rel_p.to_string_lossy().replace('\\', "/");
|
|
1018
|
+
let is_test = is_test_rel(&rel);
|
|
1019
|
+
let fname = p
|
|
1020
|
+
.file_name()
|
|
1021
|
+
.and_then(|s| s.to_str())
|
|
1022
|
+
.unwrap_or("")
|
|
1023
|
+
.to_string();
|
|
1024
|
+
let ext = p
|
|
1025
|
+
.extension()
|
|
1026
|
+
.and_then(|s| s.to_str())
|
|
1027
|
+
.map(|s| s.to_ascii_lowercase())
|
|
1028
|
+
.unwrap_or_default();
|
|
1029
|
+
let want_text = SCAN_EXTS.contains(&ext.as_str())
|
|
1030
|
+
&& (has_plugins || !matches!(ext.as_str(), "json" | "yml" | "yaml" | "toml"));
|
|
1031
|
+
let txt = if want_text {
|
|
1032
|
+
fs::read_to_string(p).ok()
|
|
1033
|
+
} else {
|
|
1034
|
+
None
|
|
1035
|
+
};
|
|
1036
|
+
Some((rel, fname, ext, is_test, txt))
|
|
1037
|
+
});
|
|
1038
|
+
|
|
1039
|
+
let mut all_texts: BTreeMap<String, String> = BTreeMap::new();
|
|
1040
|
+
let mut live_paths: BTreeSet<String> = BTreeSet::new();
|
|
1041
|
+
let mut live_basenames: BTreeSet<String> = BTreeSet::new();
|
|
1042
|
+
let mut argparse_by_name: BTreeMap<String, Vec<(String, BTreeSet<String>)>> = BTreeMap::new();
|
|
1043
|
+
let mut asset_scripts: Vec<String> = Vec::new();
|
|
1044
|
+
|
|
1045
|
+
for item in loaded.into_iter().flatten() {
|
|
1046
|
+
let (rel, fname, ext, is_test, txt_opt) = item;
|
|
1047
|
+
if !is_test {
|
|
1048
|
+
live_paths.insert(rel.clone());
|
|
1049
|
+
live_basenames.insert(fname.clone());
|
|
1050
|
+
}
|
|
1051
|
+
let Some(txt) = txt_opt else {
|
|
1052
|
+
continue;
|
|
1053
|
+
};
|
|
1054
|
+
if ext == "py" && !is_test {
|
|
1055
|
+
let parts: Vec<&str> = rel.split('/').collect();
|
|
1056
|
+
let is_skill_script = (parts.len() == 6
|
|
1057
|
+
&& parts[0] == "plugins"
|
|
1058
|
+
&& parts[2] == "skills"
|
|
1059
|
+
&& parts[4] == "scripts")
|
|
1060
|
+
|| (parts.len() == 7
|
|
1061
|
+
&& parts[0] == "plugins"
|
|
1062
|
+
&& parts[2] == "skills"
|
|
1063
|
+
&& parts[4] == "assets");
|
|
1064
|
+
if is_skill_script && fname != "__init__.py" {
|
|
1065
|
+
asset_scripts.push(rel.clone());
|
|
1066
|
+
}
|
|
1067
|
+
if txt.contains(".add_argument(")
|
|
1068
|
+
&& !txt.contains("parse_known_args")
|
|
1069
|
+
&& !txt.contains("REMAINDER")
|
|
1070
|
+
&& !txt.contains("parse_intermixed_args")
|
|
1071
|
+
{
|
|
1072
|
+
let flags = extract_argparse_flags(&txt);
|
|
1073
|
+
if !flags.is_empty() {
|
|
1074
|
+
argparse_by_name
|
|
1075
|
+
.entry(fname)
|
|
1076
|
+
.or_default()
|
|
1077
|
+
.push((rel.clone(), flags));
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
all_texts.insert(rel, txt);
|
|
1082
|
+
}
|
|
1083
|
+
let files_checked = all_texts.len();
|
|
1084
|
+
let (gate_subs, net_subs) = discover_cli_subcommands(root);
|
|
1085
|
+
let entries: Vec<(String, String)> = all_texts
|
|
1086
|
+
.iter()
|
|
1087
|
+
.map(|(k, v)| (k.clone(), v.clone()))
|
|
1088
|
+
.collect();
|
|
1089
|
+
|
|
1090
|
+
let per_file = parallel_map(&entries, |(rel, txt)| {
|
|
1091
|
+
let mut local = Vec::new();
|
|
1092
|
+
let ext = Path::new(rel)
|
|
1093
|
+
.extension()
|
|
1094
|
+
.and_then(|s| s.to_str())
|
|
1095
|
+
.map(|s| s.to_ascii_lowercase())
|
|
1096
|
+
.unwrap_or_default();
|
|
1097
|
+
let is_test = is_test_rel(rel);
|
|
1098
|
+
|
|
1099
|
+
if ext == "md" {
|
|
1100
|
+
let fname = Path::new(rel)
|
|
1101
|
+
.file_name()
|
|
1102
|
+
.and_then(|s| s.to_str())
|
|
1103
|
+
.unwrap_or("");
|
|
1104
|
+
if rel.starts_with("docs/evidence/")
|
|
1105
|
+
|| rel.starts_with("docs/research/")
|
|
1106
|
+
|| rel.starts_with("evals/")
|
|
1107
|
+
|| rel.starts_with("trending/")
|
|
1108
|
+
|| fname.to_ascii_uppercase().starts_with("CHANGELOG")
|
|
1109
|
+
{
|
|
1110
|
+
return local;
|
|
1111
|
+
}
|
|
1112
|
+
for (idx, line) in txt.lines().enumerate() {
|
|
1113
|
+
scan_md_line_flags(rel, idx + 1, line, &argparse_by_name, &mut local);
|
|
1114
|
+
scan_md_cli_subcommands(rel, idx + 1, line, &gate_subs, &net_subs, &mut local);
|
|
1115
|
+
}
|
|
1116
|
+
return local;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
if is_test {
|
|
1120
|
+
return local;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
if matches!(ext.as_str(), "py" | "rs" | "go") || JS_EXTS.contains(&ext.as_str()) {
|
|
1124
|
+
for (idx, line) in txt.lines().enumerate() {
|
|
1125
|
+
check_replaces_comment(rel, idx + 1, line, &live_paths, &live_basenames, &mut local);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
if ext == "py" {
|
|
1130
|
+
scan_python_file_gaps(rel, txt, &mut local);
|
|
1131
|
+
} else if ext == "rs" {
|
|
1132
|
+
for (idx, line) in txt.lines().enumerate() {
|
|
1133
|
+
if line.trim_start().starts_with("#[cfg(test)]") {
|
|
1134
|
+
break;
|
|
1135
|
+
}
|
|
1136
|
+
let scrubbed = scrub_c_like_line(line, false);
|
|
1137
|
+
if scrubbed.contains("todo!(") || scrubbed.contains("unimplemented!(") {
|
|
1138
|
+
local.push(GapFinding {
|
|
1139
|
+
severity: "P1",
|
|
1140
|
+
rule: "hollow-stub-body",
|
|
1141
|
+
file: rel.clone(),
|
|
1142
|
+
line: idx + 1,
|
|
1143
|
+
message: "Production Rust code leaves `todo!()` / `unimplemented!()` stub.".to_string(),
|
|
1144
|
+
fix: "Implement the code path before shipping.".to_string(),
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
} else if JS_EXTS.contains(&ext.as_str()) && !rel.starts_with("docs/assets/") {
|
|
1149
|
+
for (idx, line) in txt.lines().enumerate() {
|
|
1150
|
+
let scrubbed_no_str = scrub_c_like_line(line, false);
|
|
1151
|
+
let scrubbed_with_str = scrub_c_like_line(line, true);
|
|
1152
|
+
if has_js_empty_catch(&scrubbed_no_str) {
|
|
1153
|
+
local.push(GapFinding {
|
|
1154
|
+
severity: "P1",
|
|
1155
|
+
rule: "swallowed-exception",
|
|
1156
|
+
file: rel.clone(),
|
|
1157
|
+
line: idx + 1,
|
|
1158
|
+
message: "Empty `.catch(() => {})` silently drops rejected Promises.".to_string(),
|
|
1159
|
+
fix: "Log, propagate, or surface structured error state instead of swallowing rejections.".to_string(),
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
if scrubbed_no_str.contains("throw new Error")
|
|
1163
|
+
&& has_js_stub_throw(&scrubbed_with_str)
|
|
1164
|
+
{
|
|
1165
|
+
local.push(GapFinding {
|
|
1166
|
+
severity: "P1",
|
|
1167
|
+
rule: "hollow-stub-body",
|
|
1168
|
+
file: rel.clone(),
|
|
1169
|
+
line: idx + 1,
|
|
1170
|
+
message: "Production JS/TS code throws a `not implemented` / `TODO` placeholder error.".to_string(),
|
|
1171
|
+
fix: "Implement the real handler or remove the dead entrypoint.".to_string(),
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
local
|
|
1178
|
+
});
|
|
1179
|
+
|
|
1180
|
+
let mut findings: Vec<GapFinding> = per_file.into_iter().flatten().collect();
|
|
1181
|
+
check_cross_lang_parity(root, &mut findings);
|
|
1182
|
+
|
|
1183
|
+
for srel in &asset_scripts {
|
|
1184
|
+
let sname = Path::new(srel)
|
|
1185
|
+
.file_name()
|
|
1186
|
+
.and_then(|s| s.to_str())
|
|
1187
|
+
.unwrap_or("");
|
|
1188
|
+
let stem = Path::new(srel)
|
|
1189
|
+
.file_stem()
|
|
1190
|
+
.and_then(|s| s.to_str())
|
|
1191
|
+
.unwrap_or("");
|
|
1192
|
+
let sdir = Path::new(srel)
|
|
1193
|
+
.parent()
|
|
1194
|
+
.map(|p| p.to_string_lossy().replace('\\', "/"))
|
|
1195
|
+
.unwrap_or_default();
|
|
1196
|
+
let sdir_prefix = format!("{}/", sdir);
|
|
1197
|
+
let mut referenced = false;
|
|
1198
|
+
for (orel, otxt) in &all_texts {
|
|
1199
|
+
if orel == srel {
|
|
1200
|
+
continue;
|
|
1201
|
+
}
|
|
1202
|
+
if orel.starts_with(&sdir_prefix) && is_test_rel(orel) {
|
|
1203
|
+
continue;
|
|
1204
|
+
}
|
|
1205
|
+
if otxt.contains(sname) || (orel.starts_with(&sdir_prefix) && otxt.contains(stem)) {
|
|
1206
|
+
referenced = true;
|
|
1207
|
+
break;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
if !referenced {
|
|
1211
|
+
findings.push(GapFinding {
|
|
1212
|
+
severity: "P2",
|
|
1213
|
+
rule: "unwired-script-asset",
|
|
1214
|
+
file: srel.clone(),
|
|
1215
|
+
line: 1,
|
|
1216
|
+
message: format!(
|
|
1217
|
+
"Skill script `{}` is never referenced by any skill, command, CLI, or non-test module.",
|
|
1218
|
+
srel
|
|
1219
|
+
),
|
|
1220
|
+
fix: "Wire the script into its owning SKILL.md / reference workflow or remove dead code.".to_string(),
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
let sev_rank = |s: &str| match s {
|
|
1226
|
+
"P0" => 0usize,
|
|
1227
|
+
"P1" => 1,
|
|
1228
|
+
_ => 2,
|
|
1229
|
+
};
|
|
1230
|
+
findings.sort_by(|a, b| {
|
|
1231
|
+
sev_rank(a.severity)
|
|
1232
|
+
.cmp(&sev_rank(b.severity))
|
|
1233
|
+
.then_with(|| a.file.cmp(&b.file))
|
|
1234
|
+
.then_with(|| a.line.cmp(&b.line))
|
|
1235
|
+
.then_with(|| a.rule.cmp(b.rule))
|
|
1236
|
+
});
|
|
1237
|
+
|
|
1238
|
+
(files_checked, findings)
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
pub fn run(args: &[String]) -> ExitCode {
|
|
1242
|
+
let mut root = PathBuf::from(".");
|
|
1243
|
+
let mut advisory = false;
|
|
1244
|
+
let mut as_json = false;
|
|
1245
|
+
let mut i = 0;
|
|
1246
|
+
while i < args.len() {
|
|
1247
|
+
match args[i].as_str() {
|
|
1248
|
+
"scan" | "--fail-on-p1" => i += 1,
|
|
1249
|
+
"--advisory" => {
|
|
1250
|
+
advisory = true;
|
|
1251
|
+
i += 1;
|
|
1252
|
+
}
|
|
1253
|
+
"--json" => {
|
|
1254
|
+
as_json = true;
|
|
1255
|
+
i += 1;
|
|
1256
|
+
}
|
|
1257
|
+
"--root" if i + 1 < args.len() => {
|
|
1258
|
+
root = PathBuf::from(&args[i + 1]);
|
|
1259
|
+
i += 2;
|
|
1260
|
+
}
|
|
1261
|
+
_ => i += 1,
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
let root = fs::canonicalize(&root).unwrap_or(root);
|
|
1266
|
+
let (files_checked, findings) = scan_repo_gaps(&root);
|
|
1267
|
+
let p0 = findings.iter().filter(|f| f.severity == "P0").count();
|
|
1268
|
+
let p1 = findings.iter().filter(|f| f.severity == "P1").count();
|
|
1269
|
+
let p2 = findings.iter().filter(|f| f.severity == "P2").count();
|
|
1270
|
+
let ok = p0 == 0 && p1 == 0;
|
|
1271
|
+
|
|
1272
|
+
if as_json {
|
|
1273
|
+
let items: Vec<String> = findings
|
|
1274
|
+
.iter()
|
|
1275
|
+
.map(|f| {
|
|
1276
|
+
format!(
|
|
1277
|
+
"{{\"severity\":{},\"rule\":{},\"file\":{},\"line\":{},\"message\":{},\"fix\":{}}}",
|
|
1278
|
+
json_escape(f.severity),
|
|
1279
|
+
json_escape(f.rule),
|
|
1280
|
+
json_escape(&f.file),
|
|
1281
|
+
f.line,
|
|
1282
|
+
json_escape(&f.message),
|
|
1283
|
+
json_escape(&f.fix)
|
|
1284
|
+
)
|
|
1285
|
+
})
|
|
1286
|
+
.collect();
|
|
1287
|
+
println!(
|
|
1288
|
+
"{{\"ok\":{},\"engine\":\"rust-parallel\",\"files_checked\":{},\"counts\":{{\"P0\":{},\"P1\":{},\"P2\":{}}},\"findings\":[{}]}}",
|
|
1289
|
+
ok,
|
|
1290
|
+
files_checked,
|
|
1291
|
+
p0,
|
|
1292
|
+
p1,
|
|
1293
|
+
p2,
|
|
1294
|
+
items.join(",")
|
|
1295
|
+
);
|
|
1296
|
+
} else {
|
|
1297
|
+
println!(
|
|
1298
|
+
"dmb-gate gap [{}]: {} file(s) — P0:{} P1:{} P2:{}",
|
|
1299
|
+
if ok { "OK" } else { "GAPS_FOUND" },
|
|
1300
|
+
files_checked,
|
|
1301
|
+
p0,
|
|
1302
|
+
p1,
|
|
1303
|
+
p2
|
|
1304
|
+
);
|
|
1305
|
+
for f in &findings {
|
|
1306
|
+
println!(
|
|
1307
|
+
" {}:{} [{}:{}] {} -> {}",
|
|
1308
|
+
f.file, f.line, f.severity, f.rule, f.message, f.fix
|
|
1309
|
+
);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
if advisory || ok {
|
|
1314
|
+
ExitCode::SUCCESS
|
|
1315
|
+
} else {
|
|
1316
|
+
ExitCode::from(1)
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
#[cfg(test)]
|
|
1321
|
+
mod tests {
|
|
1322
|
+
use super::*;
|
|
1323
|
+
|
|
1324
|
+
#[test]
|
|
1325
|
+
fn python_oneliner_tuple_except_and_nested_concrete_parity() {
|
|
1326
|
+
let src = "\
|
|
1327
|
+
from typing import Protocol
|
|
1328
|
+
|
|
1329
|
+
def oneliner(): pass
|
|
1330
|
+
|
|
1331
|
+
def tuple_swallow():
|
|
1332
|
+
try:
|
|
1333
|
+
work()
|
|
1334
|
+
except (ValueError, Exception):
|
|
1335
|
+
pass
|
|
1336
|
+
|
|
1337
|
+
class SubProto(Protocol):
|
|
1338
|
+
def proto_method(self) -> int:
|
|
1339
|
+
...
|
|
1340
|
+
|
|
1341
|
+
class NestedConcrete:
|
|
1342
|
+
def concrete_stub(self):
|
|
1343
|
+
pass
|
|
1344
|
+
";
|
|
1345
|
+
let mut out = Vec::new();
|
|
1346
|
+
scan_python_file_gaps("src/tricky.py", src, &mut out);
|
|
1347
|
+
let hits: Vec<(&str, usize, &str)> = out
|
|
1348
|
+
.iter()
|
|
1349
|
+
.map(|f| (f.rule, f.line, f.message.as_str()))
|
|
1350
|
+
.collect();
|
|
1351
|
+
assert!(
|
|
1352
|
+
hits.iter()
|
|
1353
|
+
.any(|(r, ln, m)| *r == "hollow-stub-body" && *ln == 3 && m.contains("oneliner")),
|
|
1354
|
+
"expected oneliner stub finding, got {:?}",
|
|
1355
|
+
hits
|
|
1356
|
+
);
|
|
1357
|
+
assert!(
|
|
1358
|
+
hits.iter()
|
|
1359
|
+
.any(|(r, ln, _)| *r == "swallowed-exception" && *ln == 8),
|
|
1360
|
+
"expected tuple broad except finding at line 8, got {:?}",
|
|
1361
|
+
hits
|
|
1362
|
+
);
|
|
1363
|
+
assert!(
|
|
1364
|
+
!hits.iter().any(|(_, _, m)| m.contains("proto_method")),
|
|
1365
|
+
"Protocol method must remain exempt, got {:?}",
|
|
1366
|
+
hits
|
|
1367
|
+
);
|
|
1368
|
+
assert!(
|
|
1369
|
+
hits.iter().any(|(r, ln, m)| *r == "hollow-stub-body"
|
|
1370
|
+
&& *ln == 16
|
|
1371
|
+
&& m.contains("concrete_stub")),
|
|
1372
|
+
"nested concrete class stub inside Protocol must be flagged, got {:?}",
|
|
1373
|
+
hits
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
}
|