sneakoscope 4.8.6 → 5.1.2
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/README.md +51 -726
- package/bench/tasks/t01-off-by-one/repo/package.json +9 -0
- package/bench/tasks/t01-off-by-one/repo/src/pagination.js +5 -0
- package/bench/tasks/t01-off-by-one/repo/test.js +5 -0
- package/bench/tasks/t01-off-by-one/task.json +13 -0
- package/bench/tasks/t02-signature-cochange/repo/package.json +9 -0
- package/bench/tasks/t02-signature-cochange/repo/src/admin.js +5 -0
- package/bench/tasks/t02-signature-cochange/repo/src/audit.js +5 -0
- package/bench/tasks/t02-signature-cochange/repo/src/labels.js +3 -0
- package/bench/tasks/t02-signature-cochange/repo/src/profile.js +5 -0
- package/bench/tasks/t02-signature-cochange/repo/test.js +9 -0
- package/bench/tasks/t02-signature-cochange/task.json +12 -0
- package/bench/tasks/t03-type-puzzle/repo/package.json +9 -0
- package/bench/tasks/t03-type-puzzle/repo/src/config.js +4 -0
- package/bench/tasks/t03-type-puzzle/repo/test.js +6 -0
- package/bench/tasks/t03-type-puzzle/task.json +13 -0
- package/bench/tasks/t04-refactor-preserve/repo/package.json +9 -0
- package/bench/tasks/t04-refactor-preserve/repo/src/cart.js +8 -0
- package/bench/tasks/t04-refactor-preserve/repo/test.js +4 -0
- package/bench/tasks/t04-refactor-preserve/task.json +12 -0
- package/bench/tasks/t05-performance/repo/package.json +9 -0
- package/bench/tasks/t05-performance/repo/src/pairs.js +9 -0
- package/bench/tasks/t05-performance/repo/test.js +11 -0
- package/bench/tasks/t05-performance/task.json +12 -0
- package/bench/tasks/t06-mistake-rule/repo/package.json +9 -0
- package/bench/tasks/t06-mistake-rule/repo/src/loader.js +6 -0
- package/bench/tasks/t06-mistake-rule/repo/test.js +7 -0
- package/bench/tasks/t06-mistake-rule/task.json +12 -0
- package/config/bench-baseline.json +7 -0
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/bin/install.js +35 -0
- package/dist/bin/sks.js +1 -1
- package/dist/cli/cli-theme.js +51 -0
- package/dist/cli/command-registry.js +75 -42
- package/dist/cli/help-fast.js +18 -8
- package/dist/cli/insane-search-command.js +36 -8
- package/dist/cli/install-helpers.js +147 -47
- package/dist/cli/router.js +58 -2
- package/dist/commands/codex-lb.js +6 -4
- package/dist/commands/doctor.js +146 -8
- package/dist/commands/proof.js +6 -3
- package/dist/commands/zellij-monitor-pane.js +25 -0
- package/dist/commands/zellij-slot-pane.js +39 -2
- package/dist/commands/zellij-viewport-pane.js +56 -0
- package/dist/commands/zellij.js +55 -2
- package/dist/config/skills-manifest.json +493 -0
- package/dist/core/agents/agent-conflict-graph.js +5 -0
- package/dist/core/agents/agent-lease.js +5 -0
- package/dist/core/agents/agent-ledger-schemas.js +1 -0
- package/dist/core/agents/agent-lifecycle.js +86 -35
- package/dist/core/agents/agent-orchestrator.js +287 -72
- package/dist/core/agents/agent-output-validator.js +14 -3
- package/dist/core/agents/agent-patch-queue-store.js +108 -4
- package/dist/core/agents/agent-patch-queue.js +10 -3
- package/dist/core/agents/agent-patch-schema.js +13 -0
- package/dist/core/agents/agent-proof-evidence.js +6 -1
- package/dist/core/agents/agent-runner-fake.js +40 -0
- package/dist/core/agents/agent-scheduler.js +2 -3
- package/dist/core/agents/agent-worker-pipeline.js +36 -2
- package/dist/core/agents/codex-exec-worker-adapter.js +2 -0
- package/dist/core/agents/native-cli-session-swarm.js +30 -13
- package/dist/core/agents/native-cli-worker.js +2 -1
- package/dist/core/agents/native-worker-backend-router.js +58 -1
- package/dist/core/auto-review.js +25 -4
- package/dist/core/codex/agent-config-file-repair.js +15 -2
- package/dist/core/codex/codex-config-eperm-repair.js +8 -2
- package/dist/core/codex/codex-config-guard.js +289 -0
- package/dist/core/codex/codex-config-toml.js +122 -0
- package/dist/core/codex/codex-project-config-policy.js +59 -7
- package/dist/core/codex-app/sks-menubar.js +780 -122
- package/dist/core/codex-app.js +1 -0
- package/dist/core/codex-control/codex-fake-sdk-adapter.js +6 -4
- package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
- package/dist/core/codex-control/codex-sdk-env-policy.js +1 -1
- package/dist/core/codex-control/codex-task-runner.js +32 -14
- package/dist/core/codex-control/python-codex-sdk-adapter.js +4 -1
- package/dist/core/codex-control/schemas/agent-worker-result.schema.js +12 -3
- package/dist/core/codex-hooks/codex-hook-managed-install.js +5 -0
- package/dist/core/codex-hooks/codex-hook-state-writer.js +70 -11
- package/dist/core/codex-hooks/codex-hook-trust-doctor.js +2 -2
- package/dist/core/codex-lb/codex-lb-env.js +20 -1
- package/dist/core/codex-lb/codex-lb-setup.js +2 -5
- package/dist/core/codex-native/skill-registry-ledger.js +24 -5
- package/dist/core/commands/basic-cli.js +21 -2
- package/dist/core/commands/check-command.js +37 -5
- package/dist/core/commands/command-utils.js +22 -2
- package/dist/core/commands/computer-use-command.js +62 -7
- package/dist/core/commands/db-command.js +31 -5
- package/dist/core/commands/fast-mode-command.js +39 -11
- package/dist/core/commands/gate-result-contract.js +43 -0
- package/dist/core/commands/gates-command.js +6 -1
- package/dist/core/commands/gc-command.js +29 -2
- package/dist/core/commands/goal-command.js +9 -2
- package/dist/core/commands/gx-command.js +79 -7
- package/dist/core/commands/image-ux-review-command.js +188 -13
- package/dist/core/commands/mad-db-command.js +85 -176
- package/dist/core/commands/mad-sks-command.js +248 -34
- package/dist/core/commands/menubar-command.js +146 -0
- package/dist/core/commands/naruto-command.js +64 -10
- package/dist/core/commands/pipeline-command.js +21 -2
- package/dist/core/commands/plan-command.js +76 -0
- package/dist/core/commands/ppt-command.js +159 -24
- package/dist/core/commands/qa-loop-command.js +6 -2
- package/dist/core/commands/release-command.js +55 -2
- package/dist/core/commands/research-command.js +1 -1
- package/dist/core/commands/review-command.js +217 -0
- package/dist/core/commands/route-command.js +62 -0
- package/dist/core/commands/route-success-helpers.js +59 -0
- package/dist/core/commands/run-command.js +19 -7
- package/dist/core/commands/seo-command.js +49 -1
- package/dist/core/commands/status-command.js +21 -1
- package/dist/core/commands/team-legacy-observe-command.js +221 -3
- package/dist/core/commands/ui-command.js +161 -0
- package/dist/core/commands/uninstall-command.js +312 -0
- package/dist/core/db-safety.js +7 -3
- package/dist/core/doctor/codex-startup-config-repair.js +14 -3
- package/dist/core/doctor/confirm-repair.js +27 -0
- package/dist/core/doctor/context7-mcp-repair.js +35 -7
- package/dist/core/doctor/doctor-codex-startup-repair.js +10 -3
- package/dist/core/doctor/doctor-context7-repair.js +17 -4
- package/dist/core/doctor/doctor-dirty-planner.js +27 -9
- package/dist/core/doctor/doctor-native-capability-repair.js +12 -2
- package/dist/core/doctor/doctor-readiness-matrix.js +27 -2
- package/dist/core/doctor/doctor-repair-postcheck.js +4 -0
- package/dist/core/doctor/doctor-transaction.js +21 -5
- package/dist/core/doctor/doctor-zellij-repair.js +1 -0
- package/dist/core/doctor/imagegen-repair.js +161 -0
- package/dist/core/doctor/supabase-mcp-repair.js +23 -5
- package/dist/core/feature-fixture-runner.js +2 -2
- package/dist/core/feature-fixtures.js +65 -37
- package/dist/core/feature-registry.js +106 -3
- package/dist/core/fsx.js +91 -2
- package/dist/core/hooks-runtime/skill-reconcile-preflight.js +43 -0
- package/dist/core/hooks-runtime.js +86 -46
- package/dist/core/image-ux-review/imagegen-adapter.js +48 -11
- package/dist/core/image-ux-review.js +16 -0
- package/dist/core/imagegen/imagegen-capability.js +11 -5
- package/dist/core/imagegen/require-imagegen.js +57 -0
- package/dist/core/init/skills.js +271 -14
- package/dist/core/init.js +13 -10
- package/dist/core/mad-db/mad-db-coordinator.js +96 -20
- package/dist/core/mad-db/mad-db-policy.js +12 -10
- package/dist/core/mad-sks/executors/executor-base.js +8 -2
- package/dist/core/mad-sks/executors/index.js +4 -0
- package/dist/core/mad-sks/executors/sql-plane-executor.js +194 -0
- package/dist/core/mission.js +138 -5
- package/dist/core/naruto/naruto-active-pool.js +84 -30
- package/dist/core/naruto/naruto-backpressure.js +5 -1
- package/dist/core/naruto/naruto-real-worker-child.js +10 -0
- package/dist/core/naruto/naruto-real-worker-runtime.js +9 -7
- package/dist/core/naruto/naruto-role-policy.js +3 -0
- package/dist/core/naruto/naruto-task-hints.js +10 -0
- package/dist/core/naruto/naruto-work-graph.js +8 -2
- package/dist/core/naruto/naruto-work-item.js +6 -0
- package/dist/core/naruto/resource-pressure-monitor.js +33 -15
- package/dist/core/naruto/solution-tournament.js +101 -0
- package/dist/core/permission-gates.js +30 -0
- package/dist/core/pipeline-internals/runtime-core.js +72 -222
- package/dist/core/pipeline-internals/runtime-gates.js +140 -24
- package/dist/core/ppt-review/index.js +6 -1
- package/dist/core/ppt-review/slide-imagegen-review.js +75 -10
- package/dist/core/ppt.js +70 -2
- package/dist/core/proof/auto-finalize.js +70 -11
- package/dist/core/proof/proof-schema.js +2 -0
- package/dist/core/proof/route-adapter.js +5 -1
- package/dist/core/proof/route-finalizer.js +8 -5
- package/dist/core/proof/selftest-proof-fixtures.js +18 -5
- package/dist/core/proof/validation.js +2 -0
- package/dist/core/provider/model-router.js +53 -0
- package/dist/core/questions.js +1 -1
- package/dist/core/recallpulse.js +1 -1
- package/dist/core/release/gate-manifest.js +2 -2
- package/dist/core/release/release-gate-affected-selector.js +3 -10
- package/dist/core/release/release-gate-batch-runner.js +4 -2
- package/dist/core/release/release-gate-cache-v2.js +27 -14
- package/dist/core/release/release-gate-dag.js +6 -1
- package/dist/core/release/release-gate-hermetic-env.js +10 -0
- package/dist/core/release/release-gate-node.js +3 -0
- package/dist/core/release/release-gate-resource-governor.js +1 -0
- package/dist/core/retention.js +89 -4
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/diagnostic-allowlist.js +55 -0
- package/dist/core/routes.js +83 -33
- package/dist/core/safety/mutation-guard.js +5 -1
- package/dist/core/skill-forge.js +9 -4
- package/dist/core/stop-gate/gate-evaluator.js +102 -0
- package/dist/core/stop-gate/stop-gate-check.js +26 -4
- package/dist/core/stop-gate/stop-gate-resolver.js +19 -3
- package/dist/core/stop-gate/stop-gate-writer.js +20 -1
- package/dist/core/team-dag.js +12 -465
- package/dist/core/team-dashboard-renderer.js +13 -94
- package/dist/core/team-live.js +68 -804
- package/dist/core/triwiki/agents-md-projector.js +184 -0
- package/dist/core/triwiki-wrongness/wrongness-schema.js +3 -1
- package/dist/core/trust-kernel/trust-kernel-schema.js +1 -0
- package/dist/core/trust-kernel/trust-report.js +1 -1
- package/dist/core/trust-kernel/trust-status.js +2 -0
- package/dist/core/ui/dashboard-html.js +111 -0
- package/dist/core/update/update-migration-state.js +383 -42
- package/dist/core/update-check.js +201 -78
- package/dist/core/verification/diff-quality.js +100 -0
- package/dist/core/verification/impact-scan.js +164 -0
- package/dist/core/verification/machine-feedback.js +146 -0
- package/dist/core/verification/mistake-rule-compiler.js +195 -0
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-layout-builder.js +44 -16
- package/dist/core/zellij/zellij-monitor-renderer.js +53 -0
- package/dist/core/zellij/zellij-self-heal.js +27 -32
- package/dist/core/zellij/zellij-slot-pane-renderer.js +162 -153
- package/dist/core/zellij/zellij-slot-telemetry.js +2 -0
- package/dist/core/zellij/zellij-theme.js +67 -0
- package/dist/core/zellij/zellij-ui-mode.js +16 -0
- package/dist/core/zellij/zellij-viewport-binder.js +59 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +53 -5
- package/dist/scripts/agent-patch-swarm-gate-lib.js +2 -2
- package/dist/scripts/build-dist.js +8 -0
- package/dist/scripts/check-feature-quality.js +2 -2
- package/dist/scripts/cli-output-consistency-check.js +57 -0
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +106 -0
- package/dist/scripts/codex-lb-gpt55-fast-profile-check.js +105 -0
- package/dist/scripts/codex-lb-missing-env-regression.js +2 -3
- package/dist/scripts/codex-project-config-policy-merge-regression.js +3 -3
- package/dist/scripts/coding-bench-check.js +136 -0
- package/dist/scripts/concurrent-session-collision-check.js +67 -0
- package/dist/scripts/docs-truthfulness-check.js +1 -1
- package/dist/scripts/doctor-imagegen-repair-check.js +62 -0
- package/dist/scripts/ensure-bin-executable.js +11 -3
- package/dist/scripts/gate-policy-audit-check.js +130 -0
- package/dist/scripts/harness-benchmark-check.js +104 -0
- package/dist/scripts/hook-latency-budget-check.js +45 -0
- package/dist/scripts/legacy-update-e2e-check.js +228 -0
- package/dist/scripts/lib/codex-sdk-gate-lib.js +2 -2
- package/dist/scripts/lib/real-codex-parallel-gate.js +2 -2
- package/dist/scripts/loop-directive-check-lib.js +1 -1
- package/dist/scripts/mad-db-command-check.js +11 -8
- package/dist/scripts/mad-db-real-supabase-e2e.js +2 -2
- package/dist/scripts/mad-db-route-identity-check.js +8 -6
- package/dist/scripts/mad-db-safety-conflict-matrix-check.js +31 -8
- package/dist/scripts/mad-db-skill-policy-snapshot-check.js +4 -5
- package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +3 -2
- package/dist/scripts/mad-sks-zellij-launch-check.js +1 -1
- package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +7 -7
- package/dist/scripts/parallel-claim-enforcement-check.js +14 -5
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +5 -1
- package/dist/scripts/project-skill-dedupe-check.js +23 -5
- package/dist/scripts/proof-root-cause-policy-check.js +2 -0
- package/dist/scripts/release-affected-selector-check.js +2 -2
- package/dist/scripts/release-cache-glob-hashing-check.js +1 -0
- package/dist/scripts/release-dag-full-coverage-check.js +13 -4
- package/dist/scripts/release-gate-dag-runner-check.js +10 -2
- package/dist/scripts/release-gate-dag-runner.js +22 -0
- package/dist/scripts/release-gate-existence-audit.js +2 -1
- package/dist/scripts/release-gate-planner.js +2 -1
- package/dist/scripts/release-gate-script-parity-check.js +1 -1
- package/dist/scripts/release-metadata-1-19-check.js +2 -1
- package/dist/scripts/release-readiness-report.js +38 -7
- package/dist/scripts/release-stability-report-check.js +12 -8
- package/dist/scripts/search-visibility-gate-lib.js +2 -2
- package/dist/scripts/seo-geo-feature-fixture-quality-check.js +1 -1
- package/dist/scripts/skills-manifest-continuity-check.js +46 -0
- package/dist/scripts/sks-1-11-gate-lib.js +8 -6
- package/dist/scripts/sks-menubar-install-check.js +87 -21
- package/dist/scripts/sks-uninstall-regression-check.js +54 -0
- package/dist/scripts/uninstall-inventory-check.js +3 -0
- package/dist/scripts/ux-review-real-loop-fixture-check.js +9 -4
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +4 -0
- package/dist/scripts/zellij-layout-valid-check.js +18 -11
- package/dist/scripts/zellij-right-column-geometry-proof.js +2 -4
- package/dist/scripts/zellij-slot-pane-renderer-check.js +9 -9
- package/dist/scripts/zellij-slot-pane-stale-detection-check.js +3 -4
- package/dist/scripts/zellij-slot-pane-telemetry-renderer-check.js +3 -2
- package/dist/scripts/zellij-slot-telemetry-renderer-check.js +4 -2
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +8 -2
- package/dist/scripts/zellij-viewport-binder-check.js +9 -0
- package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
- package/docs/demo.tape +28 -0
- package/package.json +70 -3
- package/schemas/codex/completion-proof.schema.json +3 -2
- package/schemas/release/release-gate-node.schema.json +2 -1
- package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
- package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
- package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
- package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/agent-route-blackbox-lib.js +0 -132
- package/dist/scripts/blackbox-command-import-smoke.js +0 -143
- package/dist/scripts/blackbox-global-shim.js +0 -77
- package/dist/scripts/blackbox-matrix.js +0 -70
- package/dist/scripts/blackbox-npx-one-shot.js +0 -69
- package/dist/scripts/blackbox-pack-install.js +0 -174
- package/dist/scripts/brand-neutrality-zero-leakage-blackbox.js +0 -4
- package/dist/scripts/build-once-runner-blackbox.js +0 -34
- package/dist/scripts/codex-0140-integration-blackbox.js +0 -13
- package/dist/scripts/codex-agent-type-blackbox.js +0 -4
- package/dist/scripts/codex-app-harness-blackbox.js +0 -4
- package/dist/scripts/codex-app-skill-agent-blackbox.js +0 -4
- package/dist/scripts/codex-hook-approval-blackbox.js +0 -4
- package/dist/scripts/codex-init-deep-directory-local-blackbox.js +0 -4
- package/dist/scripts/codex-native-feature-broker-blackbox.js +0 -4
- package/dist/scripts/codex-native-pattern-analysis-blackbox.js +0 -4
- package/dist/scripts/codex-native-read-repair-split-blackbox.js +0 -55
- package/dist/scripts/codex-native-reference-cache-blackbox.js +0 -41
- package/dist/scripts/core-skill-integrity-blackbox.js +0 -33
- package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
- package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
- package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/doctor-context7-mcp-repair-blackbox.js +0 -16
- package/dist/scripts/doctor-dirty-repair-blackbox.js +0 -22
- package/dist/scripts/doctor-dirty-semantic-blackbox.js +0 -8
- package/dist/scripts/doctor-fix-production-blackbox.js +0 -26
- package/dist/scripts/doctor-native-capability-repair-blackbox.js +0 -39
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +0 -13
- package/dist/scripts/doctor-supabase-mcp-repair-blackbox.js +0 -14
- package/dist/scripts/doctor-transaction-engine-blackbox.js +0 -28
- package/dist/scripts/doctor-zellij-fix-blackbox.js +0 -4
- package/dist/scripts/doctor-zellij-no-homebrew-blackbox.js +0 -4
- package/dist/scripts/doctor-zellij-upgrade-blackbox.js +0 -4
- package/dist/scripts/gate-pack-runner-blackbox.js +0 -27
- package/dist/scripts/gate-pack-v2-blackbox.js +0 -18
- package/dist/scripts/geo-cli-blackbox-check.js +0 -18
- package/dist/scripts/loop-collision-blackbox.js +0 -3
- package/dist/scripts/loop-concurrency-oversubscription-blackbox.js +0 -3
- package/dist/scripts/loop-fixture-production-misuse-blackbox.js +0 -3
- package/dist/scripts/loop-kill-interrupt-real-blackbox.js +0 -3
- package/dist/scripts/loop-merge-strategy-blackbox.js +0 -3
- package/dist/scripts/loop-mesh-production-e2e-blackbox.js +0 -3
- package/dist/scripts/loop-side-effect-blackbox.js +0 -3
- package/dist/scripts/mad-db-operation-lifecycle-blackbox.js +0 -29
- package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
- package/dist/scripts/mad-zellij-headless-fallback-blackbox.js +0 -4
- package/dist/scripts/mad-zellij-self-heal-blackbox.js +0 -4
- package/dist/scripts/naruto-loop-mesh-blackbox.js +0 -3
- package/dist/scripts/naruto-real-parallelism-blackbox.js +0 -307
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
- package/dist/scripts/parallel-runtime-real-blackbox.js +0 -44
- package/dist/scripts/pipeline-codex-native-doctor-mad-routing-real-blackbox.js +0 -77
- package/dist/scripts/pipeline-codex-native-e2e-blackbox.js +0 -13
- package/dist/scripts/pipeline-codex-native-image-routing-real-blackbox.js +0 -50
- package/dist/scripts/pipeline-codex-native-loop-routing-real-blackbox.js +0 -74
- package/dist/scripts/pipeline-codex-native-qa-routing-real-blackbox.js +0 -51
- package/dist/scripts/pipeline-codex-native-research-routing-real-blackbox.js +0 -45
- package/dist/scripts/pipeline-execution-profile-routing-blackbox.js +0 -4
- package/dist/scripts/postinstall-global-doctor-blackbox.js +0 -12
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
- package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
- package/dist/scripts/project-skill-dedupe-blackbox.js +0 -36
- package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
- package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/release-full-parallelism-blackbox.js +0 -41
- package/dist/scripts/release-triwiki-first-runner-blackbox.js +0 -48
- package/dist/scripts/release-wiring-3110-blackbox.js +0 -27
- package/dist/scripts/release-wiring-3112-blackbox.js +0 -17
- package/dist/scripts/release-wiring-3113-blackbox.js +0 -17
- package/dist/scripts/research-backfill-route-blackbox.js +0 -5
- package/dist/scripts/research-final-reviewer-blackbox.js +0 -70
- package/dist/scripts/research-stage-cycle-runtime-blackbox.js +0 -40
- package/dist/scripts/research-synthesis-writer-blackbox.js +0 -24
- package/dist/scripts/route-blackbox-realism-check.js +0 -21
- package/dist/scripts/scheduler-resource-claim-blackbox.js +0 -24
- package/dist/scripts/seo-cli-blackbox-check.js +0 -18
- package/dist/scripts/sks-3110-all-feature-regression-blackbox.js +0 -116
- package/dist/scripts/sks-3112-all-feature-regression-blackbox.js +0 -29
- package/dist/scripts/sks-3113-all-feature-regression-blackbox.js +0 -17
- package/dist/scripts/sks-400-all-feature-regression-blackbox.js +0 -21
- package/dist/scripts/sks-400-extreme-parallel-blackbox.js +0 -8
- package/dist/scripts/sks-400-five-minute-blackbox.js +0 -9
- package/dist/scripts/sks-400-legacy-purge-blackbox.js +0 -8
- package/dist/scripts/sks-401-all-feature-regression-blackbox.js +0 -46
- package/dist/scripts/sks-401-five-minute-actual-blackbox.js +0 -23
- package/dist/scripts/sks-402-all-feature-regression-blackbox.js +0 -9
- package/dist/scripts/sks-402-five-minute-real-blackbox.js +0 -22
- package/dist/scripts/sksd-warm-cache-blackbox.js +0 -12
- package/dist/scripts/supabase-secret-preservation-blackbox.js +0 -29
- package/dist/scripts/team-backfill-route-blackbox.js +0 -5
- package/dist/scripts/team-parallel-write-blackbox.js +0 -55
- package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/triwiki-affected-graph-blackbox.js +0 -28
- package/dist/scripts/triwiki-proof-bank-blackbox.js +0 -30
- package/dist/scripts/triwiki-proof-bank-lock-blackbox.js +0 -7
- package/dist/scripts/update-preserves-supabase-keys-blackbox.js +0 -27
- package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
- package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -80
- package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -137
- package/dist/scripts/zellij-self-heal-typed-blackbox.js +0 -4
- package/dist/scripts/zellij-slot-telemetry-real-blackbox.js +0 -20
- package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -81
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const ACTIVE = new Set(['running', 'verifying', 'launching']);
|
|
2
|
+
const ATTENTION = new Set(['failed', 'blocked', 'timed_out']);
|
|
3
|
+
function scoreSlot(s, now) {
|
|
4
|
+
const ts = Date.parse(String(s.latest_ts || '')) || 0;
|
|
5
|
+
const age = Math.max(0, now - ts);
|
|
6
|
+
const st = String(s.status || '').toLowerCase();
|
|
7
|
+
if (ATTENTION.has(st) && age < 3 * 60_000)
|
|
8
|
+
return 4_000_000 - age / 1000;
|
|
9
|
+
if (st === 'running')
|
|
10
|
+
return 3_000_000 - age / 1000;
|
|
11
|
+
if (st === 'verifying')
|
|
12
|
+
return 2_000_000 - age / 1000;
|
|
13
|
+
if (st === 'queued' || st === 'launching')
|
|
14
|
+
return 1_000_000 - age / 1000;
|
|
15
|
+
return -1;
|
|
16
|
+
}
|
|
17
|
+
export function bindViewports(input) {
|
|
18
|
+
const count = Math.max(0, Math.floor(Number(input.viewportCount) || 0));
|
|
19
|
+
const now = Date.now();
|
|
20
|
+
const slots = Object.entries(input.snapshot?.slots || {})
|
|
21
|
+
.map(([key, s]) => ({ key, s, score: scoreSlot(s, now) }))
|
|
22
|
+
.filter((row) => row.score >= 0)
|
|
23
|
+
.sort((a, b) => b.score - a.score || a.key.localeCompare(b.key));
|
|
24
|
+
const taken = new Set();
|
|
25
|
+
const out = Array.from({ length: count }, () => ({ slotKey: null, reason: 'idle' }));
|
|
26
|
+
for (const pin of input.pins || []) {
|
|
27
|
+
const i = Math.floor(Number(pin.viewport) || 0) - 1;
|
|
28
|
+
if (i < 0 || i >= count)
|
|
29
|
+
continue;
|
|
30
|
+
if (!input.snapshot?.slots?.[pin.slot_key])
|
|
31
|
+
continue;
|
|
32
|
+
out[i] = { slotKey: pin.slot_key, reason: 'pinned' };
|
|
33
|
+
taken.add(pin.slot_key);
|
|
34
|
+
}
|
|
35
|
+
for (let i = 0; i < count; i += 1) {
|
|
36
|
+
if (out[i]?.slotKey)
|
|
37
|
+
continue;
|
|
38
|
+
const prev = input.previous[i];
|
|
39
|
+
if (!prev || taken.has(prev))
|
|
40
|
+
continue;
|
|
41
|
+
const st = String(input.snapshot?.slots?.[prev]?.status || '').toLowerCase();
|
|
42
|
+
if (ACTIVE.has(st)) {
|
|
43
|
+
out[i] = { slotKey: prev, reason: 'kept' };
|
|
44
|
+
taken.add(prev);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const rest = slots.filter((row) => !taken.has(row.key));
|
|
48
|
+
for (let i = 0; i < count; i += 1) {
|
|
49
|
+
if (out[i]?.slotKey)
|
|
50
|
+
continue;
|
|
51
|
+
const next = rest.shift();
|
|
52
|
+
if (!next)
|
|
53
|
+
break;
|
|
54
|
+
out[i] = { slotKey: next.key, reason: 'assigned' };
|
|
55
|
+
taken.add(next.key);
|
|
56
|
+
}
|
|
57
|
+
return out;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=zellij-viewport-binder.js.map
|
|
@@ -78,7 +78,7 @@ export function buildWorkerPaneArtifact(input) {
|
|
|
78
78
|
schema: ZELLIJ_WORKER_PANE_SCHEMA,
|
|
79
79
|
generated_at: now,
|
|
80
80
|
updated_at: now,
|
|
81
|
-
ok: blockers.length === 0 && (paneIdSource === 'zellij_worker_headless_overflow' || (isRealZellijWorkerPaneIdSource(paneIdSource) && Boolean(input.paneId))),
|
|
81
|
+
ok: blockers.length === 0 && (paneIdSource === 'zellij_worker_headless_overflow' || paneIdSource === 'headless_by_design_viewport_ui' || paneIdSource === 'preallocated_layout_pane' || (isRealZellijWorkerPaneIdSource(paneIdSource) && Boolean(input.paneId))),
|
|
82
82
|
status: input.status || 'launching',
|
|
83
83
|
mission_id: input.missionId,
|
|
84
84
|
session_name: input.sessionName,
|
|
@@ -129,6 +129,43 @@ export function buildWorkerPaneArtifact(input) {
|
|
|
129
129
|
blockers
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
+
export async function openHeadlessByDesignViewportWorker(input) {
|
|
133
|
+
const root = path.resolve(input.root);
|
|
134
|
+
const providerInput = { root, route: '$Agent' };
|
|
135
|
+
const serviceTier = input.serviceTier || process.env.SKS_SERVICE_TIER;
|
|
136
|
+
if (serviceTier != null)
|
|
137
|
+
providerInput.serviceTier = serviceTier;
|
|
138
|
+
const providerContext = input.providerContext || await resolveProviderContext(providerInput);
|
|
139
|
+
await ensureDir(path.join(root, input.workerArtifactDir));
|
|
140
|
+
const record = buildWorkerPaneArtifact({
|
|
141
|
+
...input,
|
|
142
|
+
paneId: null,
|
|
143
|
+
paneIdSource: 'headless_by_design_viewport_ui',
|
|
144
|
+
createSession: null,
|
|
145
|
+
launch: null,
|
|
146
|
+
paneReconciliation: null,
|
|
147
|
+
directionRequested: 'down',
|
|
148
|
+
directionApplied: 'not_applied',
|
|
149
|
+
columnCreationDirectionRequested: null,
|
|
150
|
+
columnCreationDirectionApplied: 'not_applied',
|
|
151
|
+
workerDirectionRequested: 'down',
|
|
152
|
+
workerDirectionApplied: 'not_applied',
|
|
153
|
+
status: 'running',
|
|
154
|
+
providerContext,
|
|
155
|
+
serviceTier: input.serviceTier || providerContext.service_tier,
|
|
156
|
+
paneKind: 'slot_status_renderer',
|
|
157
|
+
scalingPrimitive: 'native_cli_process_headless_with_slot_dashboard',
|
|
158
|
+
workerCommand: '<headless-by-design-viewport-ui>',
|
|
159
|
+
blockers: []
|
|
160
|
+
});
|
|
161
|
+
await writeWorkerPaneArtifact(root, record);
|
|
162
|
+
await appendWorkerPaneEvent(root, 'worker_headless_by_design_viewport_ui', input, {
|
|
163
|
+
slot_id: input.slotId,
|
|
164
|
+
generation_index: input.generationIndex,
|
|
165
|
+
reason: 'monitor_plus_viewports'
|
|
166
|
+
});
|
|
167
|
+
return record;
|
|
168
|
+
}
|
|
132
169
|
export async function openWorkerPane(input) {
|
|
133
170
|
const root = path.resolve(input.root);
|
|
134
171
|
const cwd = input.cwd || packageRoot();
|
|
@@ -146,6 +183,9 @@ export async function openWorkerPane(input) {
|
|
|
146
183
|
optional: false
|
|
147
184
|
});
|
|
148
185
|
const createSession = normalizeExistingZellijSession(input.sessionName, createSessionRaw);
|
|
186
|
+
const requestedCap = nonNegativeInt(input.visiblePaneCap, 0);
|
|
187
|
+
const envCap = nonNegativeInt(Number(process.env.SKS_ZELLIJ_VISIBLE_PANES || 0), 0);
|
|
188
|
+
const visiblePaneCap = Math.max(1, requestedCap || envCap || 1);
|
|
149
189
|
const rightColumn = input.rightColumnMode === 'spawn-on-first-worker'
|
|
150
190
|
? await prepareWorkerInRightColumn({
|
|
151
191
|
root,
|
|
@@ -154,13 +194,13 @@ export async function openWorkerPane(input) {
|
|
|
154
194
|
sessionName: input.sessionName,
|
|
155
195
|
cwd,
|
|
156
196
|
worker: { slotId: input.slotId, generationIndex: input.generationIndex },
|
|
157
|
-
visiblePaneCap
|
|
197
|
+
visiblePaneCap,
|
|
158
198
|
uiMode: input.uiMode || 'compact-slots',
|
|
159
199
|
dashboardSnapshot: {
|
|
160
200
|
...(input.dashboardSnapshot || {}),
|
|
161
201
|
mode: String(input.dashboardSnapshot?.mode || 'naruto'),
|
|
162
|
-
active_workers: Number(input.dashboardSnapshot?.active_workers ||
|
|
163
|
-
visible_panes: Number(input.dashboardSnapshot?.visible_panes ||
|
|
202
|
+
active_workers: Number(input.dashboardSnapshot?.active_workers || visiblePaneCap),
|
|
203
|
+
visible_panes: Number(input.dashboardSnapshot?.visible_panes || visiblePaneCap)
|
|
164
204
|
}
|
|
165
205
|
})
|
|
166
206
|
: null;
|
|
@@ -195,7 +235,7 @@ export async function openWorkerPane(input) {
|
|
|
195
235
|
await appendWorkerPaneEvent(root, 'worker_headless_overflow', input, {
|
|
196
236
|
slot_id: input.slotId,
|
|
197
237
|
generation_index: input.generationIndex,
|
|
198
|
-
reason: `visible_pane_cap:${
|
|
238
|
+
reason: `visible_pane_cap:${visiblePaneCap}`
|
|
199
239
|
});
|
|
200
240
|
return record;
|
|
201
241
|
}
|
|
@@ -876,4 +916,12 @@ function normalizeExistingZellijSession(sessionName, result) {
|
|
|
876
916
|
}
|
|
877
917
|
return result;
|
|
878
918
|
}
|
|
919
|
+
function nonNegativeInt(value, fallback) {
|
|
920
|
+
const n = Math.floor(Number(value));
|
|
921
|
+
return Number.isFinite(n) && n >= 0 ? n : fallback;
|
|
922
|
+
}
|
|
923
|
+
function slotIndexNumber(slotId) {
|
|
924
|
+
const match = /(\d+)$/.exec(String(slotId || ''));
|
|
925
|
+
return match ? Math.max(1, Number(match[1])) : 1;
|
|
926
|
+
}
|
|
879
927
|
//# sourceMappingURL=zellij-worker-pane-manager.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
4
|
import path from 'node:path';
|
|
5
|
+
import { tmpdir } from '../core/fsx.js';
|
|
6
6
|
import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
|
|
7
7
|
export function writeReport(name, report) {
|
|
8
8
|
const out = path.join(root, '.sneakoscope', 'reports', `${name}.json`);
|
|
@@ -14,7 +14,7 @@ export function readJson(file) {
|
|
|
14
14
|
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
15
15
|
}
|
|
16
16
|
export function makeTempPatchProject(prefix = 'sks-patch-swarm-') {
|
|
17
|
-
const dir =
|
|
17
|
+
const dir = tmpdir(prefix);
|
|
18
18
|
for (let index = 1; index <= 10; index += 1) {
|
|
19
19
|
fs.writeFileSync(path.join(dir, `file-${index}.txt`), `before-${index}\n`);
|
|
20
20
|
}
|
|
@@ -10,6 +10,7 @@ const distRoot = path.join(root, 'dist');
|
|
|
10
10
|
await fsp.mkdir(distRoot, { recursive: true });
|
|
11
11
|
await removeDistMjs(distRoot);
|
|
12
12
|
await copyRuntimeConfigFiles();
|
|
13
|
+
await writeSkillsManifest();
|
|
13
14
|
await removeDistNonRuntimeArtifacts(distRoot);
|
|
14
15
|
await import('./write-build-manifest.js');
|
|
15
16
|
async function removeDistMjs(dir) {
|
|
@@ -47,6 +48,13 @@ async function copyRuntimeConfigFiles() {
|
|
|
47
48
|
}
|
|
48
49
|
await copyDirIfPresent(path.join(srcRoot, 'vendor', 'openai-codex'), path.join(distRoot, 'vendor', 'openai-codex'));
|
|
49
50
|
}
|
|
51
|
+
async function writeSkillsManifest() {
|
|
52
|
+
const { generatePackagedSkillsManifest } = await import('../core/init/skills.js');
|
|
53
|
+
const manifest = await generatePackagedSkillsManifest();
|
|
54
|
+
const out = path.join(distRoot, 'config', 'skills-manifest.json');
|
|
55
|
+
await fsp.mkdir(path.dirname(out), { recursive: true });
|
|
56
|
+
await fsp.writeFile(out, `${JSON.stringify(manifest, null, 2)}\n`, 'utf8');
|
|
57
|
+
}
|
|
50
58
|
async function copyDirIfPresent(from, to) {
|
|
51
59
|
if (!fs.existsSync(from))
|
|
52
60
|
return;
|
|
@@ -40,8 +40,8 @@ function releaseQualityBlockers(counts = {}) {
|
|
|
40
40
|
const blockers = [];
|
|
41
41
|
if (Number(counts.runtime_verified || 0) < 22)
|
|
42
42
|
blockers.push(`runtime_verified_below_release_target:${counts.runtime_verified || 0}<22`);
|
|
43
|
-
if (Number(counts.
|
|
44
|
-
blockers.push(`
|
|
43
|
+
if (Number(counts.wiring_only || 0) > 30)
|
|
44
|
+
blockers.push(`wiring_only_above_release_target:${counts.wiring_only || 0}>30`);
|
|
45
45
|
if (Number(counts.integration_optional || 0) > 6)
|
|
46
46
|
blockers.push(`integration_optional_above_release_target:${counts.integration_optional || 0}>6`);
|
|
47
47
|
if (Number(counts.static_contract || 0) > 45)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import { spawnSync } from 'node:child_process';
|
|
4
|
+
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
5
|
+
import { PACKAGE_VERSION } from '../core/version.js';
|
|
6
|
+
const executed = [
|
|
7
|
+
['ui', '--once'],
|
|
8
|
+
['review'],
|
|
9
|
+
['fast-mode', 'status'],
|
|
10
|
+
['menubar', 'status'],
|
|
11
|
+
['uninstall', '--dry-run', '--yes'],
|
|
12
|
+
['naruto', 'help']
|
|
13
|
+
];
|
|
14
|
+
const staticFiles = [
|
|
15
|
+
'src/commands/doctor.ts',
|
|
16
|
+
'src/core/commands/basic-cli.ts',
|
|
17
|
+
'src/core/commands/naruto-command.ts',
|
|
18
|
+
'src/core/commands/review-command.ts',
|
|
19
|
+
'src/core/commands/ui-command.ts',
|
|
20
|
+
'src/core/commands/fast-mode-command.ts',
|
|
21
|
+
'src/core/commands/menubar-command.ts',
|
|
22
|
+
'src/core/commands/uninstall-command.ts'
|
|
23
|
+
];
|
|
24
|
+
const runs = executed.map((args) => run(args));
|
|
25
|
+
const staticMissing = staticFiles.filter((file) => !fs.readFileSync(file, 'utf8').includes('.banner('));
|
|
26
|
+
const badFirstLines = runs.filter((row) => !row.first_line.startsWith(`SKS ${PACKAGE_VERSION} ·`));
|
|
27
|
+
const missingVocabulary = runs.filter((row) => !/[✔▲✖]/.test(row.stdout));
|
|
28
|
+
const report = {
|
|
29
|
+
schema: 'sks.cli-output-consistency.v1',
|
|
30
|
+
ok: badFirstLines.length === 0 && missingVocabulary.length === 0 && staticMissing.length === 0,
|
|
31
|
+
executed: runs,
|
|
32
|
+
static_files_checked: staticFiles,
|
|
33
|
+
bad_first_lines: badFirstLines,
|
|
34
|
+
missing_status_vocabulary: missingVocabulary,
|
|
35
|
+
static_missing_banner: staticMissing
|
|
36
|
+
};
|
|
37
|
+
assertGate(report.ok, 'CLI output consistency check failed', report);
|
|
38
|
+
emitGate('cli:output-consistency', report);
|
|
39
|
+
function run(args) {
|
|
40
|
+
const result = spawnSync(process.execPath, ['./dist/bin/sks.js', ...args], {
|
|
41
|
+
cwd: root,
|
|
42
|
+
encoding: 'utf8',
|
|
43
|
+
env: { ...process.env, NO_COLOR: '1', SKS_UNINSTALL_SKIP_TMP_SWEEP: '1' },
|
|
44
|
+
timeout: 120000,
|
|
45
|
+
maxBuffer: 1024 * 1024
|
|
46
|
+
});
|
|
47
|
+
const stdout = String(result.stdout || '');
|
|
48
|
+
const stderr = String(result.stderr || '');
|
|
49
|
+
return {
|
|
50
|
+
args,
|
|
51
|
+
code: result.status,
|
|
52
|
+
first_line: stdout.split(/\r?\n/).find(Boolean) || '',
|
|
53
|
+
stdout: stdout.slice(0, 4000),
|
|
54
|
+
stderr: stderr.slice(0, 1000)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=cli-output-consistency-check.js.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { codexLbConfigPath, codexLbEnvPath, ensureGlobalCodexFastModeDuringInstall, releaseCodexLbAuthHold, repairCodexLbAuth } from '../cli/install-helpers.js';
|
|
6
|
+
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-codex-lb-fast-ui-'));
|
|
7
|
+
const home = path.join(tmp, 'home');
|
|
8
|
+
const codexHome = path.join(home, '.codex');
|
|
9
|
+
const configPath = codexLbConfigPath(home);
|
|
10
|
+
const envPath = codexLbEnvPath(home);
|
|
11
|
+
const authPath = path.join(codexHome, 'auth.json');
|
|
12
|
+
const oauthBackupPath = path.join(codexHome, 'auth.chatgpt-backup.json');
|
|
13
|
+
await fs.mkdir(codexHome, { recursive: true });
|
|
14
|
+
const oauthAuth = JSON.stringify({
|
|
15
|
+
auth_mode: 'chatgpt',
|
|
16
|
+
tokens: { id_token: 'oauth-id', access_token: 'oauth-access', refresh_token: 'oauth-refresh' },
|
|
17
|
+
account_id: 'acct-fast-ui-fixture'
|
|
18
|
+
}, null, 2);
|
|
19
|
+
await fs.writeFile(configPath, [
|
|
20
|
+
'model = "gpt-5.5"',
|
|
21
|
+
'model_reasoning_effort = "low"',
|
|
22
|
+
'model_provider = "codex-lb"',
|
|
23
|
+
'service_tier = "fast"',
|
|
24
|
+
'',
|
|
25
|
+
'[features]',
|
|
26
|
+
'fast_mode = true',
|
|
27
|
+
'fast_mode_ui = true',
|
|
28
|
+
'',
|
|
29
|
+
'[user.fast_mode]',
|
|
30
|
+
'visible = true',
|
|
31
|
+
'enabled = true',
|
|
32
|
+
'',
|
|
33
|
+
'[model_providers.codex-lb]',
|
|
34
|
+
'name = "openai"',
|
|
35
|
+
'base_url = "https://lb.example.test/backend-api/codex"',
|
|
36
|
+
'wire_api = "responses"',
|
|
37
|
+
'env_key = "CODEX_LB_API_KEY"',
|
|
38
|
+
'supports_websockets = true',
|
|
39
|
+
'requires_openai_auth = false',
|
|
40
|
+
''
|
|
41
|
+
].join('\n'));
|
|
42
|
+
await fs.writeFile(envPath, 'export CODEX_LB_BASE_URL="https://lb.example.test/backend-api/codex"\nexport CODEX_LB_API_KEY="sk-test-fast-ui"\n');
|
|
43
|
+
await fs.writeFile(authPath, `${oauthAuth}\n`);
|
|
44
|
+
const install = await ensureGlobalCodexFastModeDuringInstall({ home, configPath, forceFastMode: true });
|
|
45
|
+
const firstRepair = await repairCodexLbAuth({ home, configPath, envPath, forceCodexLbApiKeyAuth: true, forceFastMode: true, authMode: 'codex-lb' });
|
|
46
|
+
const firstConfig = await fs.readFile(configPath, 'utf8');
|
|
47
|
+
const firstAssert = assertConfig(firstConfig, 'first_use_codex_lb');
|
|
48
|
+
const release = await releaseCodexLbAuthHold({ home, configPath, authPath, backupPath: oauthBackupPath });
|
|
49
|
+
const releasedConfig = await fs.readFile(configPath, 'utf8');
|
|
50
|
+
const releaseAssert = {
|
|
51
|
+
label: 'use_oauth',
|
|
52
|
+
ok: !topLevelKey(releasedConfig, 'model_provider') && hasUserFastMode(releasedConfig),
|
|
53
|
+
blockers: [
|
|
54
|
+
...(topLevelKey(releasedConfig, 'model_provider') ? ['model_provider_still_selected_after_use_oauth'] : []),
|
|
55
|
+
...(hasUserFastMode(releasedConfig) ? [] : ['user_fast_mode_missing_after_use_oauth'])
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
const secondRepair = await repairCodexLbAuth({ home, configPath, envPath, forceCodexLbApiKeyAuth: true, forceFastMode: true, authMode: 'codex-lb' });
|
|
59
|
+
const secondConfig = await fs.readFile(configPath, 'utf8');
|
|
60
|
+
const secondAssert = assertConfig(secondConfig, 'second_use_codex_lb');
|
|
61
|
+
const report = {
|
|
62
|
+
schema: 'sks.codex-lb-fast-ui-preservation-check.v1',
|
|
63
|
+
ok: firstAssert.ok && releaseAssert.ok && secondAssert.ok,
|
|
64
|
+
install_status: install.status,
|
|
65
|
+
first_repair_status: firstRepair.status,
|
|
66
|
+
release_status: release.status,
|
|
67
|
+
second_repair_status: secondRepair.status,
|
|
68
|
+
assertions: [firstAssert, releaseAssert, secondAssert],
|
|
69
|
+
config_path: configPath,
|
|
70
|
+
blockers: [...firstAssert.blockers, ...releaseAssert.blockers, ...secondAssert.blockers]
|
|
71
|
+
};
|
|
72
|
+
console.log(JSON.stringify(report, null, 2));
|
|
73
|
+
if (!report.ok)
|
|
74
|
+
process.exitCode = 1;
|
|
75
|
+
function assertConfig(text, label) {
|
|
76
|
+
const blockers = [
|
|
77
|
+
...(hasUserFastMode(text) ? [] : ['user_fast_mode_visible_enabled_missing']),
|
|
78
|
+
...(tableKey(text, 'features', 'fast_mode') === 'true' ? [] : ['features_fast_mode_not_true']),
|
|
79
|
+
...(tableKey(text, 'features', 'fast_mode_ui') === 'true' ? [] : ['features_fast_mode_ui_not_true']),
|
|
80
|
+
...(hasTable(text, 'model_providers.codex-lb') ? [] : ['codex_lb_provider_table_missing']),
|
|
81
|
+
...(tableKey(text, 'model_providers.codex-lb', 'requires_openai_auth') === 'true' ? [] : ['requires_openai_auth_not_true']),
|
|
82
|
+
...(topLevelKey(text, 'model') ? ['top_level_model_forbidden'] : []),
|
|
83
|
+
...(topLevelKey(text, 'model_reasoning_effort') ? ['top_level_model_reasoning_effort_forbidden'] : [])
|
|
84
|
+
];
|
|
85
|
+
return { label, ok: blockers.length === 0, blockers };
|
|
86
|
+
}
|
|
87
|
+
function hasUserFastMode(text) {
|
|
88
|
+
return tableKey(text, 'user.fast_mode', 'visible') === 'true'
|
|
89
|
+
&& tableKey(text, 'user.fast_mode', 'enabled') === 'true';
|
|
90
|
+
}
|
|
91
|
+
function hasTable(text, table) {
|
|
92
|
+
return new RegExp(`(^|\\n)\\[${escapeRegExp(table)}\\](?=\\n|$)`).test(text);
|
|
93
|
+
}
|
|
94
|
+
function tableKey(text, table, key) {
|
|
95
|
+
const match = text.match(new RegExp(`(^|\\n)\\[${escapeRegExp(table)}\\]([\\s\\S]*?)(?=\\n\\[[^\\]]+\\]|\\s*$)`));
|
|
96
|
+
const block = match?.[2] || '';
|
|
97
|
+
return block.match(new RegExp(`(^|\\n)\\s*${escapeRegExp(key)}\\s*=\\s*([^\\n#]+)`))?.[2]?.trim().replace(/^"|"$/g, '') || '';
|
|
98
|
+
}
|
|
99
|
+
function topLevelKey(text, key) {
|
|
100
|
+
const top = text.split(/\n\s*\[/)[0] || '';
|
|
101
|
+
return new RegExp(`(^|\\n)\\s*${escapeRegExp(key)}\\s*=`).test(top);
|
|
102
|
+
}
|
|
103
|
+
function escapeRegExp(value) {
|
|
104
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=codex-lb-fast-ui-preservation-check.js.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { codexFastModeDesktopStatus, codexLbConfigPath, configureCodexLb, ensureGlobalCodexFastModeDuringInstall, releaseCodexLbAuthHold, repairCodexLbAuth } from '../cli/install-helpers.js';
|
|
6
|
+
import { repairCodexConfigStructure, splitCodexProjectConfigPolicy } from '../core/codex/codex-project-config-policy.js';
|
|
7
|
+
import { parseCodexConfigToml, validateCodexConfigRoundTrip } from '../core/codex/codex-config-toml.js';
|
|
8
|
+
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-codex-lb-gpt55-fast-'));
|
|
9
|
+
const home = path.join(tmp, 'home');
|
|
10
|
+
const root = path.join(tmp, 'project');
|
|
11
|
+
const codexHome = path.join(home, '.codex');
|
|
12
|
+
const configPath = codexLbConfigPath(home);
|
|
13
|
+
const envPath = path.join(codexHome, 'sks-codex-lb.env');
|
|
14
|
+
const authPath = path.join(codexHome, 'auth.json');
|
|
15
|
+
const oauthBackupPath = path.join(codexHome, 'auth.chatgpt-backup.json');
|
|
16
|
+
const projectConfig = path.join(root, '.codex', 'config.toml');
|
|
17
|
+
await fs.mkdir(path.dirname(projectConfig), { recursive: true });
|
|
18
|
+
await fs.mkdir(codexHome, { recursive: true });
|
|
19
|
+
await fs.writeFile(authPath, `${JSON.stringify({ auth_mode: 'chatgpt', tokens: { access_token: 'oauth-access' } }, null, 2)}\n`);
|
|
20
|
+
const setup = await configureCodexLb({
|
|
21
|
+
home,
|
|
22
|
+
configPath,
|
|
23
|
+
envPath,
|
|
24
|
+
host: 'https://lb.example.test/backend-api/codex',
|
|
25
|
+
apiKey: 'sk-codex-lb-fast-fixture',
|
|
26
|
+
writeEnvFile: true,
|
|
27
|
+
useDefaultProvider: true,
|
|
28
|
+
forceFastMode: true,
|
|
29
|
+
forceCodexLbApiKeyAuth: true,
|
|
30
|
+
authMode: 'codex-lb',
|
|
31
|
+
shellProfile: 'skip'
|
|
32
|
+
});
|
|
33
|
+
const fastOn = await ensureGlobalCodexFastModeDuringInstall({ home, configPath, forceFastMode: true });
|
|
34
|
+
const first = assertFastProfile(await fs.readFile(configPath, 'utf8'), 'setup_fast_on');
|
|
35
|
+
const release = await releaseCodexLbAuthHold({ home, configPath, authPath, backupPath: oauthBackupPath });
|
|
36
|
+
const afterOauth = assertFastProfile(await fs.readFile(configPath, 'utf8'), 'use_oauth_roundtrip');
|
|
37
|
+
const repair = await repairCodexLbAuth({ home, configPath, envPath, forceCodexLbApiKeyAuth: true, forceFastMode: true, authMode: 'codex-lb' });
|
|
38
|
+
await fs.writeFile(projectConfig, [
|
|
39
|
+
'default_profile = "sks-fast-high"',
|
|
40
|
+
'service_tier = "fast"',
|
|
41
|
+
'',
|
|
42
|
+
'[user.fast_mode]',
|
|
43
|
+
'visible = true',
|
|
44
|
+
'enabled = true',
|
|
45
|
+
'',
|
|
46
|
+
'[profiles.sks-fast-high]',
|
|
47
|
+
'model = "gpt-5.5"',
|
|
48
|
+
'service_tier = "fast"',
|
|
49
|
+
''
|
|
50
|
+
].join('\n'));
|
|
51
|
+
const split = await splitCodexProjectConfigPolicy(root, { apply: true, codexHome, configPath: projectConfig, writeReport: false });
|
|
52
|
+
const structure = await repairCodexConfigStructure(configPath, { apply: true });
|
|
53
|
+
const final = assertFastProfile(await fs.readFile(configPath, 'utf8'), 'after_rewriters');
|
|
54
|
+
const ok = setup.ok !== false
|
|
55
|
+
&& !['failed', 'skipped_unsafe_rewrite', 'unparseable_config_preserved'].includes(String(fastOn.status))
|
|
56
|
+
&& release.status !== 'failed'
|
|
57
|
+
&& repair.ok !== false
|
|
58
|
+
&& split.ok === true
|
|
59
|
+
&& structure.ok === true
|
|
60
|
+
&& first.ok
|
|
61
|
+
&& afterOauth.ok
|
|
62
|
+
&& final.ok;
|
|
63
|
+
const report = {
|
|
64
|
+
schema: 'sks.codex-lb-gpt55-fast-profile-check.v1',
|
|
65
|
+
ok,
|
|
66
|
+
setup_status: setup.status,
|
|
67
|
+
fast_on_status: fastOn.status,
|
|
68
|
+
release_status: release.status,
|
|
69
|
+
repair_status: repair.status,
|
|
70
|
+
split_status: split.status || null,
|
|
71
|
+
structure_status: structure.status,
|
|
72
|
+
assertions: [first, afterOauth, final],
|
|
73
|
+
blockers: [first, afterOauth, final].flatMap((item) => item.blockers)
|
|
74
|
+
};
|
|
75
|
+
console.log(JSON.stringify(report, null, 2));
|
|
76
|
+
if (!report.ok)
|
|
77
|
+
process.exitCode = 1;
|
|
78
|
+
function assertFastProfile(text, label) {
|
|
79
|
+
const validation = validateCodexConfigRoundTrip(text);
|
|
80
|
+
const parsed = validation.ok ? parseCodexConfigToml(text) : {};
|
|
81
|
+
const profile = parsed.profiles?.['sks-fast-high'] || {};
|
|
82
|
+
const provider = parsed.model_providers?.['codex-lb'] || {};
|
|
83
|
+
const desktop = codexFastModeDesktopStatus(text);
|
|
84
|
+
const blockers = [
|
|
85
|
+
...validation.blockers,
|
|
86
|
+
...(parsed.default_profile === 'sks-fast-high' ? [] : ['default_profile_not_sks_fast_high']),
|
|
87
|
+
...(parsed.user?.fast_mode?.default_profile === undefined ? [] : ['default_profile_inside_user_fast_mode']),
|
|
88
|
+
...(profile.model === 'gpt-5.5' ? [] : ['sks_fast_high_model_not_gpt55']),
|
|
89
|
+
...(profile.service_tier === 'fast' ? [] : ['sks_fast_high_service_tier_not_fast']),
|
|
90
|
+
...(provider.requires_openai_auth === true ? [] : ['codex_lb_requires_openai_auth_not_true']),
|
|
91
|
+
...(provider.wire_api === 'responses' ? [] : ['codex_lb_wire_api_not_responses']),
|
|
92
|
+
...(desktop.on ? [] : ['desktop_fast_status_off'])
|
|
93
|
+
];
|
|
94
|
+
return {
|
|
95
|
+
label,
|
|
96
|
+
ok: blockers.length === 0,
|
|
97
|
+
default_profile: parsed.default_profile || null,
|
|
98
|
+
profile_model: profile.model || null,
|
|
99
|
+
profile_service_tier: profile.service_tier || null,
|
|
100
|
+
provider_wire_api: provider.wire_api || null,
|
|
101
|
+
provider_requires_openai_auth: provider.requires_openai_auth ?? null,
|
|
102
|
+
blockers
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=codex-lb-gpt55-fast-profile-check.js.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
import fs from 'node:fs/promises';
|
|
4
|
-
import os from 'node:os';
|
|
5
4
|
import path from 'node:path';
|
|
6
|
-
import { runProcess } from '../core/fsx.js';
|
|
5
|
+
import { runProcess, tmpdir } from '../core/fsx.js';
|
|
7
6
|
const rawPattern = new RegExp(['Missing environment variable:', '\\s*`?CODEX_LB_API_KEY`?'].join(''), 'i');
|
|
8
|
-
const home =
|
|
7
|
+
const home = tmpdir('sks-codex-lb-missing-env-');
|
|
9
8
|
const entry = path.resolve('dist/bin/sks.js');
|
|
10
9
|
const scenarios = [
|
|
11
10
|
['status', ['codex-lb', 'status', '--json']],
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
// trailing table (the `invalid type: sequence, expected a string` corruption).
|
|
7
7
|
// 2. Splitting the global CODEX_HOME config against itself must be a no-op.
|
|
8
8
|
import fs from 'node:fs/promises';
|
|
9
|
-
import os from 'node:os';
|
|
10
9
|
import path from 'node:path';
|
|
11
10
|
import { pathToFileURL } from 'node:url';
|
|
11
|
+
import { tmpdir } from '../core/fsx.js';
|
|
12
12
|
import { ensureDistFresh, root as repoRoot } from './lib/ensure-dist-fresh.js';
|
|
13
13
|
const freshness = ensureDistFresh({ rebuild: true });
|
|
14
14
|
if (!freshness.ok)
|
|
@@ -17,7 +17,7 @@ const mod = await import(pathToFileURL(path.join(repoRoot, 'dist', 'core', 'code
|
|
|
17
17
|
const results = [];
|
|
18
18
|
// --- Case 1: trailing table in user config must not capture moved top-level keys ---
|
|
19
19
|
{
|
|
20
|
-
const fixture =
|
|
20
|
+
const fixture = tmpdir('sks-config-merge-');
|
|
21
21
|
const codexHome = path.join(fixture, 'home', '.codex');
|
|
22
22
|
await fs.mkdir(codexHome, { recursive: true });
|
|
23
23
|
// Pre-existing user config whose last block is an env table requiring string values.
|
|
@@ -56,7 +56,7 @@ const results = [];
|
|
|
56
56
|
}
|
|
57
57
|
// --- Case 2: splitting CODEX_HOME config against itself is a no-op ---
|
|
58
58
|
{
|
|
59
|
-
const fixture =
|
|
59
|
+
const fixture = tmpdir('sks-config-home-');
|
|
60
60
|
const codexHome = path.join(fixture, '.codex');
|
|
61
61
|
await fs.mkdir(codexHome, { recursive: true });
|
|
62
62
|
const homeConfig = path.join(codexHome, 'config.toml');
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { ensureDir, nowIso, readJson, runProcess, writeJsonAtomic } from '../core/fsx.js';
|
|
7
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
|
|
8
|
+
const tasksRoot = path.join(root, 'bench', 'tasks');
|
|
9
|
+
const reportPath = path.join(root, '.sneakoscope', 'reports', 'bench-report.json');
|
|
10
|
+
const baselinePath = path.join(root, 'config', 'bench-baseline.json');
|
|
11
|
+
const baseline = await readJson(baselinePath, { schema: 'sks.coding-bench-baseline.v1', pass_rate: 0, min_pass_rate: 0 });
|
|
12
|
+
const tasks = await loadTasks();
|
|
13
|
+
const backend = backendAvailable();
|
|
14
|
+
const perTask = [];
|
|
15
|
+
for (const task of tasks) {
|
|
16
|
+
if (!backend.ok) {
|
|
17
|
+
perTask.push({
|
|
18
|
+
id: task.id,
|
|
19
|
+
kind: task.kind,
|
|
20
|
+
ok: true,
|
|
21
|
+
status: 'skipped',
|
|
22
|
+
skipped_reason: backend.reason
|
|
23
|
+
});
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
perTask.push(await runTask(task));
|
|
27
|
+
}
|
|
28
|
+
const executed = perTask.filter((task) => task.status !== 'skipped');
|
|
29
|
+
const pass = executed.filter((task) => task.ok).length;
|
|
30
|
+
const fail = executed.filter((task) => !task.ok).length;
|
|
31
|
+
const skipped = perTask.length - executed.length;
|
|
32
|
+
const passRate = executed.length ? pass / executed.length : 0;
|
|
33
|
+
const baselineRate = Number(baseline.pass_rate ?? baseline.min_pass_rate ?? 0);
|
|
34
|
+
const ok = fail === 0 && passRate >= baselineRate;
|
|
35
|
+
const report = {
|
|
36
|
+
schema: 'sks.coding-bench-report.v1',
|
|
37
|
+
generated_at: nowIso(),
|
|
38
|
+
ok,
|
|
39
|
+
pass,
|
|
40
|
+
fail,
|
|
41
|
+
skipped,
|
|
42
|
+
total: perTask.length,
|
|
43
|
+
pass_rate: passRate,
|
|
44
|
+
baseline: {
|
|
45
|
+
path: path.relative(root, baselinePath),
|
|
46
|
+
pass_rate: baselineRate,
|
|
47
|
+
baseline_version: baseline.baseline_version || null
|
|
48
|
+
},
|
|
49
|
+
backend,
|
|
50
|
+
per_task: perTask
|
|
51
|
+
};
|
|
52
|
+
await ensureDir(path.dirname(reportPath));
|
|
53
|
+
await writeJsonAtomic(reportPath, report);
|
|
54
|
+
console.log(JSON.stringify(report, null, 2));
|
|
55
|
+
if (!ok)
|
|
56
|
+
process.exit(1);
|
|
57
|
+
async function loadTasks() {
|
|
58
|
+
const dirs = (await fs.readdir(tasksRoot, { withFileTypes: true }).catch(() => []))
|
|
59
|
+
.filter((entry) => entry.isDirectory())
|
|
60
|
+
.map((entry) => entry.name)
|
|
61
|
+
.sort();
|
|
62
|
+
const rows = [];
|
|
63
|
+
for (const dir of dirs) {
|
|
64
|
+
const taskPath = path.join(tasksRoot, dir, 'task.json');
|
|
65
|
+
const task = await readJson(taskPath, null);
|
|
66
|
+
if (task?.schema === 'sks.bench-task.v1')
|
|
67
|
+
rows.push({ ...task, dir, task_path: taskPath, repo_path: path.join(tasksRoot, dir, 'repo') });
|
|
68
|
+
}
|
|
69
|
+
return rows;
|
|
70
|
+
}
|
|
71
|
+
function backendAvailable() {
|
|
72
|
+
if (process.env.SKS_RUN_CODING_BENCH_REAL !== '1')
|
|
73
|
+
return { ok: false, reason: 'no_backend' };
|
|
74
|
+
if (process.env.OPENAI_API_KEY || process.env.SKS_CODEX_LB_READY === '1' || process.env.SKS_CODING_BENCH_ALLOW_NO_KEY === '1')
|
|
75
|
+
return { ok: true, reason: null };
|
|
76
|
+
return { ok: false, reason: 'no_backend' };
|
|
77
|
+
}
|
|
78
|
+
async function runTask(task) {
|
|
79
|
+
const scratch = await fs.mkdtemp(path.join(os.tmpdir(), `sks-coding-bench-${task.id}-`));
|
|
80
|
+
await fs.cp(task.repo_path, scratch, { recursive: true });
|
|
81
|
+
await initGit(scratch);
|
|
82
|
+
const sks = path.join(root, 'dist', 'bin', 'sks.js');
|
|
83
|
+
const run = await runProcess(process.execPath, [sks, 'naruto', 'run', task.prompt, '--json', '--no-open-zellij', '--apply-patches', '--tournament', task.kind === 'refactor' ? '3' : '0'], {
|
|
84
|
+
cwd: scratch,
|
|
85
|
+
timeoutMs: 10 * 60_000,
|
|
86
|
+
maxOutputBytes: 512 * 1024,
|
|
87
|
+
env: { ...process.env, SKS_CODING_BENCH_TASK_ID: task.id }
|
|
88
|
+
});
|
|
89
|
+
const grade = await gradeTask(task, scratch);
|
|
90
|
+
return {
|
|
91
|
+
id: task.id,
|
|
92
|
+
kind: task.kind,
|
|
93
|
+
ok: run.code === 0 && grade.ok,
|
|
94
|
+
status: run.code === 0 && grade.ok ? 'passed' : 'failed',
|
|
95
|
+
command_exit: run.code,
|
|
96
|
+
grade,
|
|
97
|
+
scratch
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
async function initGit(cwd) {
|
|
101
|
+
await runProcess('git', ['init'], { cwd, timeoutMs: 15_000, maxOutputBytes: 64 * 1024 }).catch(() => null);
|
|
102
|
+
await runProcess('git', ['config', 'user.email', 'bench@sneakoscope.local'], { cwd, timeoutMs: 15_000, maxOutputBytes: 64 * 1024 }).catch(() => null);
|
|
103
|
+
await runProcess('git', ['config', 'user.name', 'Sneakoscope Bench'], { cwd, timeoutMs: 15_000, maxOutputBytes: 64 * 1024 }).catch(() => null);
|
|
104
|
+
await runProcess('git', ['add', '.'], { cwd, timeoutMs: 15_000, maxOutputBytes: 64 * 1024 }).catch(() => null);
|
|
105
|
+
await runProcess('git', ['commit', '-m', 'bench baseline'], { cwd, timeoutMs: 15_000, maxOutputBytes: 64 * 1024 }).catch(() => null);
|
|
106
|
+
}
|
|
107
|
+
async function gradeTask(task, cwd) {
|
|
108
|
+
const success = task.success || {};
|
|
109
|
+
const test = success.command ? await runProcess('sh', ['-lc', String(success.command)], { cwd, timeoutMs: 120_000, maxOutputBytes: 256 * 1024 }) : { code: 0, stdout: '', stderr: '' };
|
|
110
|
+
const diff = await runProcess('git', ['diff', '--numstat', 'HEAD'], { cwd, timeoutMs: 15_000, maxOutputBytes: 128 * 1024 }).catch(() => ({ stdout: '' }));
|
|
111
|
+
const changed = await runProcess('git', ['diff', '--name-only', 'HEAD'], { cwd, timeoutMs: 15_000, maxOutputBytes: 128 * 1024 }).catch(() => ({ stdout: '' }));
|
|
112
|
+
const patch = await runProcess('git', ['diff', 'HEAD'], { cwd, timeoutMs: 15_000, maxOutputBytes: 512 * 1024 }).catch(() => ({ stdout: '' }));
|
|
113
|
+
const diffLines = String(diff.stdout || '').split(/\r?\n/).filter(Boolean).reduce((sum, line) => {
|
|
114
|
+
const parts = line.split(/\s+/).map((value) => Number(value));
|
|
115
|
+
const added = parts[0] ?? 0;
|
|
116
|
+
const removed = parts[1] ?? 0;
|
|
117
|
+
return sum + (Number.isFinite(added) ? added : 0) + (Number.isFinite(removed) ? removed : 0);
|
|
118
|
+
}, 0);
|
|
119
|
+
const changedFiles = String(changed.stdout || '').split(/\r?\n/).filter(Boolean);
|
|
120
|
+
const forbidden = (success.forbidden_patterns || []).filter((pattern) => new RegExp(pattern, 'm').test(String(patch.stdout || '')));
|
|
121
|
+
const missingNewTest = success.must_contain_new_test === true && !changedFiles.some((file) => /\.(test|spec)\.[cm]?[jt]s$|test\.[cm]?js$|__tests__\//.test(file));
|
|
122
|
+
const tooLarge = Number(success.max_diff_lines || Infinity) < diffLines;
|
|
123
|
+
const ok = (success.must_pass !== true || test.code === 0) && !missingNewTest && !tooLarge && forbidden.length === 0;
|
|
124
|
+
return {
|
|
125
|
+
ok,
|
|
126
|
+
test_exit: test.code,
|
|
127
|
+
diff_lines: diffLines,
|
|
128
|
+
changed_files: changedFiles,
|
|
129
|
+
forbidden_patterns: forbidden,
|
|
130
|
+
missing_new_test: missingNewTest,
|
|
131
|
+
max_diff_lines_exceeded: tooLarge,
|
|
132
|
+
stdout_tail: String(test.stdout || '').slice(-4000),
|
|
133
|
+
stderr_tail: String(test.stderr || '').slice(-4000)
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=coding-bench-check.js.map
|