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
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { pathToFileURL } from 'node:url';
|
|
5
|
-
import { writeResearchPlan } from '../core/research.js';
|
|
6
|
-
import { createCodexNativeRuntimeFixture, withFixtureEnv } from './codex-native-runtime-e2e-fixture.js';
|
|
7
|
-
export async function runCodexNativeResearchRoutingRealBlackbox() {
|
|
8
|
-
const mcp = await researchScenario({ mcpCandidates: true, codeModeWebSearch: true });
|
|
9
|
-
assertGate(mcp.selected_source_strategy === 'mcp-plugin-candidates', 'research should prefer MCP plugin candidates', mcp);
|
|
10
|
-
const web = await researchScenario({ mcpCandidates: false, codeModeWebSearch: true });
|
|
11
|
-
assertGate(web.selected_source_strategy === 'web-sources', 'research should fall back to web sources when MCP candidates are absent', web);
|
|
12
|
-
const local = await researchScenario({ mcpCandidates: false, codeModeWebSearch: false });
|
|
13
|
-
assertGate(local.selected_source_strategy === 'local-files', 'research should fall back to local files when MCP/web are absent', local);
|
|
14
|
-
assertGate(local.hook_derived_source_evidence_allowed === false, 'research must exclude hook-derived evidence unless explicitly approved', local);
|
|
15
|
-
emitGate('pipeline:codex-native-research-routing-real-blackbox');
|
|
16
|
-
}
|
|
17
|
-
async function researchScenario(input) {
|
|
18
|
-
const fixture = await createCodexNativeRuntimeFixture({
|
|
19
|
-
hook: 'approved',
|
|
20
|
-
agentType: 'supported',
|
|
21
|
-
appHandoff: true,
|
|
22
|
-
imagePathExposure: true,
|
|
23
|
-
mcpCandidates: input.mcpCandidates,
|
|
24
|
-
codeModeWebSearch: input.codeModeWebSearch
|
|
25
|
-
});
|
|
26
|
-
return withFixtureEnv(fixture, async () => {
|
|
27
|
-
const dir = path.join(fixture.root, '.sneakoscope', 'missions', fixture.missionId);
|
|
28
|
-
await writeResearchPlan(dir, 'research source routing fixture', { root: fixture.root, missionId: fixture.missionId });
|
|
29
|
-
const artifact = JSON.parse(await fs.readFile(path.join(dir, 'research', 'codex-native-invocation.json'), 'utf8'));
|
|
30
|
-
assertGate(Array.isArray(artifact.mcp_source?.required_artifacts), 'research source candidate artifact details missing', artifact);
|
|
31
|
-
return artifact;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
if (import.meta.url === pathToFileURL(process.argv[1] || '').href)
|
|
35
|
-
await runCodexNativeResearchRoutingRealBlackbox();
|
|
36
|
-
function assertGate(condition, message, detail = {}) {
|
|
37
|
-
if (condition)
|
|
38
|
-
return;
|
|
39
|
-
console.error(JSON.stringify({ ok: false, message, detail }, null, 2));
|
|
40
|
-
process.exit(1);
|
|
41
|
-
}
|
|
42
|
-
function emitGate(gate) {
|
|
43
|
-
console.log(JSON.stringify({ schema: 'sks.release-gate.v1', ok: true, gate }, null, 2));
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=pipeline-codex-native-research-routing-real-blackbox.js.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { assertGate, emitGate, readText, scriptContains } from './sks-1-18-gate-lib.js';
|
|
4
|
-
const install = readText('src/cli/install-helpers.ts');
|
|
5
|
-
const helper = readText('src/core/update/update-migration-state.ts');
|
|
6
|
-
assertGate(install.includes('runPostinstallGlobalDoctorAndMarkPending'), 'postinstall must run package-local global Doctor and mark pending migration');
|
|
7
|
-
assertGate(helper.includes("source: 'postinstall'"), 'postinstall migration marker must identify postinstall as source');
|
|
8
|
-
assertGate(helper.includes("root: globalSksRoot()"), 'postinstall Doctor must run against the global SKS root');
|
|
9
|
-
assertGate(helper.includes("args: ['doctor', '--fix', '--json']"), 'postinstall global Doctor must use package-local doctor --fix --json');
|
|
10
|
-
assertGate(scriptContains('postinstall:global-doctor-blackbox', 'postinstall-global-doctor-blackbox.js'), 'package script must expose postinstall global Doctor gate');
|
|
11
|
-
emitGate('postinstall:global-doctor-blackbox');
|
|
12
|
-
//# sourceMappingURL=postinstall-global-doctor-blackbox.js.map
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { spawnSync } from 'node:child_process';
|
|
7
|
-
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-ppt-e2e-'));
|
|
8
|
-
const deck = path.join(tmp, 'synthetic-two-slide.pptx');
|
|
9
|
-
fs.writeFileSync(deck, [
|
|
10
|
-
'ppt/slides/slide1.xml',
|
|
11
|
-
'<p:sld><p:cSld><p:spTree><a:t>SKS 1.14.1 Synthetic Slide 1</a:t></p:spTree></p:cSld></p:sld>',
|
|
12
|
-
'ppt/slides/slide2.xml',
|
|
13
|
-
'<p:sld><p:cSld><p:spTree><a:t>SKS 1.14.1 Synthetic Slide 2</a:t></p:spTree></p:cSld></p:sld>'
|
|
14
|
-
].join('\n'));
|
|
15
|
-
const repoRoot = process.cwd();
|
|
16
|
-
const run = spawnSync(process.execPath, [path.join(repoRoot, 'dist/bin/sks.js'), 'ppt', 'review', '--deck', deck, '--mock', '--imagegen', '--json'], {
|
|
17
|
-
cwd: tmp,
|
|
18
|
-
env: { ...process.env, SKS_TEST_FAKE_IMAGEGEN: '1', SKS_TEST_FAKE_EXTRACTOR: '1' },
|
|
19
|
-
encoding: 'utf8',
|
|
20
|
-
maxBuffer: 8 * 1024 * 1024
|
|
21
|
-
});
|
|
22
|
-
const parsed = parseJson(run.stdout);
|
|
23
|
-
const missionDir = parsed?.mission_id ? path.join(tmp, '.sneakoscope', 'missions', parsed.mission_id) : null;
|
|
24
|
-
const inventory = (missionDir ? readJson(path.join(missionDir, 'ppt-deck-inventory.json')) : null)
|
|
25
|
-
|| parsed?.artifacts?.deck_inventory
|
|
26
|
-
|| parsed?.artifacts?.deckInventory
|
|
27
|
-
|| null;
|
|
28
|
-
const exportLedger = (missionDir ? readJson(path.join(missionDir, 'ppt-slide-export-ledger.json')) : null)
|
|
29
|
-
|| parsed?.artifacts?.slide_export_ledger
|
|
30
|
-
|| parsed?.artifacts?.slideExportLedger
|
|
31
|
-
|| null;
|
|
32
|
-
const callouts = missionDir ? readJson(path.join(missionDir, 'ppt-slide-callout-ledger.json')) : null;
|
|
33
|
-
const slideIssues = missionDir ? readJson(path.join(missionDir, 'ppt-slide-issue-ledger.json')) : null;
|
|
34
|
-
const deckIssues = missionDir ? readJson(path.join(missionDir, 'ppt-deck-issue-ledger.json')) : null;
|
|
35
|
-
const proof = missionDir ? readJson(path.join(missionDir, 'completion-proof.json')) : null;
|
|
36
|
-
const trust = missionDir ? readJson(path.join(missionDir, 'trust-report.json')) : null;
|
|
37
|
-
const fakeNotReal = !JSON.stringify(callouts || {}).includes('"real_generated":true');
|
|
38
|
-
const proofStatusOk = proof?.schema === 'sks.completion-proof.v1' && ['verified', 'verified_partial'].includes(String(proof?.status || ''));
|
|
39
|
-
const trustStatusOk = trust?.schema === 'sks.trust-report.v1' && trust?.ok === true && !['blocked', 'failed', 'not_verified'].includes(String(trust?.status || ''));
|
|
40
|
-
const ok = Boolean(parsed?.mission_id)
|
|
41
|
-
&& inventory?.deck_present === true
|
|
42
|
-
&& inventory?.slide_count >= 1
|
|
43
|
-
&& exportLedger?.exported_slide_images_count >= 1
|
|
44
|
-
&& callouts?.generated_slide_callout_images_count >= exportLedger.exported_slide_images_count
|
|
45
|
-
&& Array.isArray(slideIssues?.issues)
|
|
46
|
-
&& slideIssues.issues.length > 0
|
|
47
|
-
&& deckIssues?.schema === 'sks.ppt-deck-issue-ledger.v1'
|
|
48
|
-
&& proofStatusOk
|
|
49
|
-
&& trustStatusOk
|
|
50
|
-
&& fakeNotReal;
|
|
51
|
-
const result = {
|
|
52
|
-
schema: 'sks.ppt-full-e2e-blackbox.v1',
|
|
53
|
-
ok,
|
|
54
|
-
process_status: run.status,
|
|
55
|
-
mission_id: parsed?.mission_id || null,
|
|
56
|
-
deck,
|
|
57
|
-
synthetic_deck: true,
|
|
58
|
-
manual_slide_images_used: false,
|
|
59
|
-
slide_count: inventory?.slide_count || 0,
|
|
60
|
-
exported_slide_images_count: exportLedger?.exported_slide_images_count || 0,
|
|
61
|
-
generated_slide_review_count: callouts?.generated_slide_callout_images_count || 0,
|
|
62
|
-
issue_extraction_count: slideIssues?.issues?.length || 0,
|
|
63
|
-
mock_fake_not_verified_real: fakeNotReal,
|
|
64
|
-
completion_proof_linked: proofStatusOk,
|
|
65
|
-
trust_report_linked: trustStatusOk,
|
|
66
|
-
wrongness_linked: true,
|
|
67
|
-
proof_status: proof?.status || null,
|
|
68
|
-
trust_ok: trust?.ok ?? null,
|
|
69
|
-
trust_status: trust?.status || null,
|
|
70
|
-
trust_blockers: trust?.blockers || [],
|
|
71
|
-
blockers: [
|
|
72
|
-
...(!proofStatusOk ? [`completion_proof_status_${proof?.status || 'missing'}`] : []),
|
|
73
|
-
...(!trustStatusOk ? [`trust_report_status_${trust?.status || 'missing'}`] : []),
|
|
74
|
-
...(!fakeNotReal ? ['mock_or_fake_marked_real'] : [])
|
|
75
|
-
],
|
|
76
|
-
artifacts: {
|
|
77
|
-
inventory,
|
|
78
|
-
exportLedger,
|
|
79
|
-
callouts,
|
|
80
|
-
slideIssues,
|
|
81
|
-
deckIssues,
|
|
82
|
-
proof_schema: proof?.schema || null,
|
|
83
|
-
proof_status: proof?.status || null,
|
|
84
|
-
trust_schema: trust?.schema || null,
|
|
85
|
-
trust_ok: trust?.ok ?? null,
|
|
86
|
-
trust_status: trust?.status || null
|
|
87
|
-
},
|
|
88
|
-
stdout_tail: run.stdout.slice(-2000),
|
|
89
|
-
stderr_tail: run.stderr.slice(-2000)
|
|
90
|
-
};
|
|
91
|
-
const out = path.join(repoRoot, '.sneakoscope', 'reports', 'ppt-full-e2e-blackbox.json');
|
|
92
|
-
fs.mkdirSync(path.dirname(out), { recursive: true });
|
|
93
|
-
fs.writeFileSync(out, `${JSON.stringify(result, null, 2)}\n`);
|
|
94
|
-
console.log(JSON.stringify(result, null, 2));
|
|
95
|
-
if (!ok)
|
|
96
|
-
process.exitCode = 1;
|
|
97
|
-
function parseJson(text) { try {
|
|
98
|
-
return JSON.parse(text);
|
|
99
|
-
}
|
|
100
|
-
catch {
|
|
101
|
-
return null;
|
|
102
|
-
} }
|
|
103
|
-
function readJson(file) { try {
|
|
104
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
105
|
-
}
|
|
106
|
-
catch {
|
|
107
|
-
return null;
|
|
108
|
-
} }
|
|
109
|
-
//# sourceMappingURL=ppt-full-e2e-blackbox-check.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { spawnSync } from 'node:child_process';
|
|
6
|
-
import { osTempPngFixtureArg } from './lib/valid-png-fixture.js';
|
|
7
|
-
const sourceImage = osTempPngFixtureArg('ppt-imagegen-blackbox-source.png');
|
|
8
|
-
const run = spawnSync(process.execPath, ['./dist/bin/sks.js', 'ppt', 'review', '--manual-slide-images', sourceImage, '--json'], {
|
|
9
|
-
cwd: process.cwd(),
|
|
10
|
-
env: { ...process.env, SKS_TEST_FAKE_IMAGEGEN: '1', SKS_TEST_FAKE_EXTRACTOR: '1' },
|
|
11
|
-
encoding: 'utf8',
|
|
12
|
-
maxBuffer: 4 * 1024 * 1024
|
|
13
|
-
});
|
|
14
|
-
const parsed = parseJson(run.stdout);
|
|
15
|
-
const missionDir = parsed?.mission_id ? path.join(process.cwd(), '.sneakoscope', 'missions', parsed.mission_id) : null;
|
|
16
|
-
const callouts = missionDir ? readJson(path.join(missionDir, 'ppt-slide-callout-ledger.json')) : null;
|
|
17
|
-
const slideIssues = missionDir ? readJson(path.join(missionDir, 'ppt-slide-issue-ledger.json')) : null;
|
|
18
|
-
const deckIssues = missionDir ? readJson(path.join(missionDir, 'ppt-deck-issue-ledger.json')) : null;
|
|
19
|
-
const proofEvidence = parsed?.proof_evidence || null;
|
|
20
|
-
const ok = Boolean(parsed?.mission_id)
|
|
21
|
-
&& callouts?.generated_slide_callout_images_count === 1
|
|
22
|
-
&& callouts?.generated_review_images?.[0]?.mock === true
|
|
23
|
-
&& Array.isArray(slideIssues?.issues)
|
|
24
|
-
&& slideIssues.issues.length > 0
|
|
25
|
-
&& deckIssues?.schema === 'sks.ppt-deck-issue-ledger.v1'
|
|
26
|
-
&& proofEvidence?.schema === 'sks.ppt-review-proof-evidence.v1';
|
|
27
|
-
console.log(JSON.stringify({ schema: 'sks.ppt-imagegen-blackbox-check.v1', ok, process_status: run.status, mission_id: parsed?.mission_id || null, gate_status: parsed?.status || null, source_image: sourceImage, generated_count: callouts?.generated_slide_callout_images_count || 0, issue_count: slideIssues?.issues?.length || 0, proof_status: proofEvidence?.status || null }, null, 2));
|
|
28
|
-
if (!ok)
|
|
29
|
-
process.exitCode = 1;
|
|
30
|
-
function parseJson(text) {
|
|
31
|
-
try {
|
|
32
|
-
return JSON.parse(text);
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function readJson(file) {
|
|
39
|
-
try {
|
|
40
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=ppt-imagegen-blackbox-check.js.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import fs from 'node:fs/promises';
|
|
4
|
-
import { assertGate, emitGate, makeTempRoot, writeManagedCoreSkill, writeUserSkill } from './sks-3-1-8-check-lib.js';
|
|
5
|
-
import { dedupeProjectSkills } from '../core/codex-native/project-skill-dedupe.js';
|
|
6
|
-
import { syncCodexSksSkills, withSkillSyncLock } from '../core/codex-app/codex-skill-sync.js';
|
|
7
|
-
import { buildSkillRegistryLedger } from '../core/codex-native/skill-registry-ledger.js';
|
|
8
|
-
const root = await makeTempRoot('sks-skill-dedupe-blackbox-');
|
|
9
|
-
process.env.CODEX_HOME = path.join(root, 'codex-home');
|
|
10
|
-
await writeManagedCoreSkill(root, '.agents/skills', 'loop');
|
|
11
|
-
await writeManagedCoreSkill(root, '.codex/skills', 'loop');
|
|
12
|
-
const scenarioA = await dedupeProjectSkills({ root, fix: true, yes: true });
|
|
13
|
-
await writeUserSkill(root, '.agents/skills', 'user-loop', 'loop');
|
|
14
|
-
await writeManagedCoreSkill(root, '.codex/skills', 'loop');
|
|
15
|
-
const scenarioB = await dedupeProjectSkills({ root, fix: true, yes: true });
|
|
16
|
-
await writeUserSkill(root, '.agents/skills', 'user-loop-a', 'Loop');
|
|
17
|
-
await writeUserSkill(root, '.codex/skills', 'user-loop-b', 'loop');
|
|
18
|
-
const scenarioC = await dedupeProjectSkills({ root, fix: true, yes: false });
|
|
19
|
-
const scenarioD = await dedupeProjectSkills({ root, fix: true, yes: true, quarantineUserDuplicates: true });
|
|
20
|
-
const staleRoot = await makeTempRoot('sks-skill-stale-lock-');
|
|
21
|
-
const lockPath = path.join(staleRoot, '.sneakoscope', 'locks', 'skill-sync.lock');
|
|
22
|
-
await fs.mkdir(lockPath, { recursive: true });
|
|
23
|
-
await fs.writeFile(path.join(lockPath, 'owner.json'), JSON.stringify({ schema: 'sks.skill-sync-lock.v1', pid: 999999, acquired_at: '1970-01-01T00:00:00.000Z', stale_after_ms: 1 }), 'utf8');
|
|
24
|
-
await withSkillSyncLock(staleRoot, async () => undefined);
|
|
25
|
-
const concurrentRoot = await makeTempRoot('sks-skill-concurrent-');
|
|
26
|
-
process.env.CODEX_HOME = path.join(concurrentRoot, 'codex-home');
|
|
27
|
-
const skillsRoot = path.join(process.env.CODEX_HOME, 'skills');
|
|
28
|
-
await Promise.all(Array.from({ length: 20 }, () => syncCodexSksSkills({ root: concurrentRoot, apply: true, skillsRoot })));
|
|
29
|
-
const concurrentLedger = await buildSkillRegistryLedger({ root: concurrentRoot });
|
|
30
|
-
assertGate(scenarioA.actions.some((action) => action.action === 'quarantined'), 'scenario A must quarantine SKS-managed duplicate', scenarioA);
|
|
31
|
-
assertGate(scenarioB.actions.some((action) => action.reason.includes('user-authored skill preserved')), 'scenario B must preserve user-authored skill', scenarioB);
|
|
32
|
-
assertGate(scenarioC.blockers.some((blocker) => blocker.includes('user_duplicate_requires_confirmation')), 'scenario C must not auto-delete user-authored duplicates', scenarioC);
|
|
33
|
-
assertGate(scenarioD.active_unique_by_canonical_name === true, 'scenario D must quarantine confirmed user-authored duplicate', scenarioD);
|
|
34
|
-
assertGate(concurrentLedger.active_unique_by_canonical_name === true, 'scenario F must keep exactly one active canonical name after concurrent sync', concurrentLedger);
|
|
35
|
-
emitGate('skill:dedupe-blackbox');
|
|
36
|
-
//# sourceMappingURL=project-skill-dedupe-blackbox.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { runPatchSwarmRouteBlackbox } from './agent-patch-swarm-gate-lib.js';
|
|
4
|
-
await runPatchSwarmRouteBlackbox({
|
|
5
|
-
gate: 'qa:patch-swarm-route-blackbox',
|
|
6
|
-
route: '$QA-LOOP',
|
|
7
|
-
routeCommand: 'sks qa-loop run',
|
|
8
|
-
reportName: 'qa-patch-swarm-route-blackbox'
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=qa-patch-swarm-route-blackbox.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs/promises';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { runReleaseGateBatch } from '../core/release/release-gate-batch-runner.js';
|
|
7
|
-
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
8
|
-
const reportRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-release-full-'));
|
|
9
|
-
const gates = Array.from({ length: 80 }, (_, i) => ({ id: `synthetic:${i + 1}`, command: `${process.execPath} -e \"setTimeout(()=>process.exit(0),1000)\"`, deps: [], resource: ['cpu-light', 'fs-read'], side_effect: 'hermetic', timeout_ms: 15000, cache: { enabled: false, inputs: [] }, isolation: { home: 'temp', codex_home: 'temp', report_dir: 'per-gate' }, preset: ['release'] }));
|
|
10
|
-
const started = Date.now();
|
|
11
|
-
const result = await runReleaseGateBatch(root, gates, { concurrency: 40, reportRoot });
|
|
12
|
-
const wallMs = Date.now() - started;
|
|
13
|
-
const completedDurations = result.results
|
|
14
|
-
.map((row) => Number(row.duration_ms || 0))
|
|
15
|
-
.filter((duration) => Number.isFinite(duration) && duration > 0);
|
|
16
|
-
const observedSequentialMs = completedDurations.reduce((total, duration) => total + duration, 0);
|
|
17
|
-
const slowestGateMs = Math.max(1, ...completedDurations);
|
|
18
|
-
const expectedWaves = Math.ceil(gates.length / 40);
|
|
19
|
-
const dynamicWallBudgetMs = Math.max(20_000, Math.ceil((slowestGateMs * expectedWaves) + 12_000));
|
|
20
|
-
const gain = Number((observedSequentialMs / Math.max(1, wallMs)).toFixed(2));
|
|
21
|
-
assertGate(result.ok === true, 'synthetic release gates failed', result);
|
|
22
|
-
assertGate(result.batch_size === 80 && result.completed === 80, 'synthetic gate count mismatch', result);
|
|
23
|
-
assertGate(completedDurations.length === 80, 'synthetic gate duration evidence missing', { durations: completedDurations.length, result });
|
|
24
|
-
assertGate(wallMs <= dynamicWallBudgetMs, 'release full parallelism wall time too slow', {
|
|
25
|
-
wallMs,
|
|
26
|
-
dynamicWallBudgetMs,
|
|
27
|
-
slowestGateMs,
|
|
28
|
-
expectedWaves,
|
|
29
|
-
result
|
|
30
|
-
});
|
|
31
|
-
assertGate(gain >= 8, 'release full parallelism gain below 8x', { gain, wallMs, observedSequentialMs });
|
|
32
|
-
emitGate('release:full-parallelism-blackbox', {
|
|
33
|
-
wall_ms: wallMs,
|
|
34
|
-
parallelism_gain: gain,
|
|
35
|
-
observed_sequential_ms: observedSequentialMs,
|
|
36
|
-
dynamic_wall_budget_ms: dynamicWallBudgetMs,
|
|
37
|
-
slowest_gate_ms: slowestGateMs,
|
|
38
|
-
max_running: 40,
|
|
39
|
-
slowest_gates: result.results.sort((a, b) => b.duration_ms - a.duration_ms).slice(0, 5)
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=release-full-parallelism-blackbox.js.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { assertGate, emitGate, makeTempRoot, writeText } from './sks-3-1-8-check-lib.js';
|
|
4
|
-
import { importDist } from './sks-1-18-gate-lib.js';
|
|
5
|
-
const tmp = await makeTempRoot('sks-triwiki-first-');
|
|
6
|
-
await writeText(path.join(tmp, 'package.json'), JSON.stringify({
|
|
7
|
-
version: '4.0.2',
|
|
8
|
-
scripts: {
|
|
9
|
-
'triwiki:proof-card': 'node -e "process.exit(0)"',
|
|
10
|
-
'release:version-truth': 'node -e "process.exit(0)"',
|
|
11
|
-
'scheduler:resource-budget': 'node -e "process.exit(0)"'
|
|
12
|
-
}
|
|
13
|
-
}, null, 2));
|
|
14
|
-
await writeText(path.join(tmp, 'package-lock.json'), JSON.stringify({ lockfileVersion: 3 }, null, 2));
|
|
15
|
-
await writeText(path.join(tmp, 'release-gates.v2.json'), JSON.stringify({
|
|
16
|
-
schema: 'sks.release-gates.v2',
|
|
17
|
-
gates: [
|
|
18
|
-
gate('triwiki:proof-card', ['src/core/triwiki/**']),
|
|
19
|
-
gate('release:version-truth', ['package.json']),
|
|
20
|
-
gate('scheduler:resource-budget', ['src/core/release/**'])
|
|
21
|
-
]
|
|
22
|
-
}, null, 2));
|
|
23
|
-
await fs.mkdir(path.join(tmp, 'src/core/triwiki'), { recursive: true });
|
|
24
|
-
await writeText(path.join(tmp, 'src/core/triwiki/triwiki-proof-card.ts'), 'export const x = 1;\n');
|
|
25
|
-
const dag = await importDist('core/release/release-gate-dag.js');
|
|
26
|
-
const result = await dag.runReleaseGateDag({ root: tmp, preset: 'confidence', changedFiles: ['src/core/triwiki/triwiki-proof-card.ts'], noCache: true });
|
|
27
|
-
assertGate(result.triwiki_selection_used === true, 'TriWiki selection must be marked used', result);
|
|
28
|
-
assertGate(result.selected_gate_ids.includes('triwiki:proof-card'), 'TriWiki graph must select the TriWiki gate', result.selected_gate_ids);
|
|
29
|
-
assertGate(!result.selected_gate_ids.includes('scheduler:resource-budget'), 'unaffected scheduler gate must be skipped by TriWiki selection', result);
|
|
30
|
-
const rootSurfaceResult = await dag.runReleaseGateDag({ root: tmp, preset: 'affected', changedFiles: ['package.json'], noCache: true });
|
|
31
|
-
assertGate(rootSurfaceResult.triwiki_selection_used === false, 'root release surface changes should use focused affected selector instead of expensive TriWiki graph', rootSurfaceResult);
|
|
32
|
-
assertGate(rootSurfaceResult.selected_gate_ids.includes('release:version-truth'), 'root release surface should keep release safety gate', rootSurfaceResult.selected_gate_ids);
|
|
33
|
-
assertGate(!rootSurfaceResult.selected_gate_ids.includes('scheduler:resource-budget'), 'root release surface affected selector should not full-sweep unrelated scheduler gate', rootSurfaceResult.selected_gate_ids);
|
|
34
|
-
emitGate('release:triwiki-first-runner-blackbox', { selected: result.selected_gate_ids, skipped: result.triwiki_skipped_gates, root_surface_selected: rootSurfaceResult.selected_gate_ids });
|
|
35
|
-
function gate(id, inputs) {
|
|
36
|
-
return {
|
|
37
|
-
id,
|
|
38
|
-
command: `npm run ${id} --silent`,
|
|
39
|
-
deps: [],
|
|
40
|
-
resource: ['cpu-light'],
|
|
41
|
-
side_effect: 'hermetic',
|
|
42
|
-
timeout_ms: 5000,
|
|
43
|
-
cache: { enabled: false, inputs },
|
|
44
|
-
isolation: { home: 'temp', codex_home: 'temp', report_dir: 'per-gate' },
|
|
45
|
-
preset: ['release']
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=release-triwiki-first-runner-blackbox.js.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { assertGate, emitGate, readText, root } from './sks-1-18-gate-lib.js';
|
|
4
|
-
import { REQUIRED_3110_RELEASE_IDS, buildReleaseGateScriptParityReport } from './release-gate-script-parity-check.js';
|
|
5
|
-
import { writeJsonAtomic } from '../core/fsx.js';
|
|
6
|
-
const required = REQUIRED_3110_RELEASE_IDS;
|
|
7
|
-
const parity = buildReleaseGateScriptParityReport();
|
|
8
|
-
const dag = readText('src/scripts/release-dag-full-coverage-check.ts');
|
|
9
|
-
const missingDag = required.filter((id) => !dag.includes(`'${id}'`));
|
|
10
|
-
const report = {
|
|
11
|
-
schema: 'sks.release-wiring-3110-blackbox.v1',
|
|
12
|
-
ok: parity.ok && missingDag.length === 0,
|
|
13
|
-
required_count: required.length,
|
|
14
|
-
missing_scripts: parity.missing_scripts,
|
|
15
|
-
missing_gates: parity.missing_gates,
|
|
16
|
-
missing_release_preset: parity.missing_release_preset,
|
|
17
|
-
missing_required_ids: missingDag,
|
|
18
|
-
wrong_commands: parity.wrong_commands,
|
|
19
|
-
missing_sources: parity.missing_source_targets,
|
|
20
|
-
missing_dist_targets: parity.missing_dist_targets,
|
|
21
|
-
generated_at: new Date().toISOString()
|
|
22
|
-
};
|
|
23
|
-
const out = path.join(root, '.sneakoscope', 'reports', 'release-wiring-3110-blackbox.json');
|
|
24
|
-
await writeJsonAtomic(out, report);
|
|
25
|
-
assertGate(report.ok, '3.1.10 release wiring blackbox failed', report);
|
|
26
|
-
emitGate('release:wiring-3110-blackbox', { required_count: required.length });
|
|
27
|
-
//# sourceMappingURL=release-wiring-3110-blackbox.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, readJson } from './sks-1-18-gate-lib.js';
|
|
3
|
-
import { REQUIRED_3112_REAL_CHECK_IDS, REQUIRED_3112_RELEASE_IDS } from './release-3112-required-gates.js';
|
|
4
|
-
const scripts = readJson('package.json').scripts || {};
|
|
5
|
-
const gates = readJson('release-gates.v2.json').gates || [];
|
|
6
|
-
const gateIds = new Set(gates.map((gate) => gate.id));
|
|
7
|
-
for (const id of REQUIRED_3112_RELEASE_IDS) {
|
|
8
|
-
assertGate(Boolean(scripts[id]), `3.1.12 release script missing: ${id}`);
|
|
9
|
-
assertGate(gateIds.has(id), `3.1.12 release gate missing: ${id}`);
|
|
10
|
-
}
|
|
11
|
-
for (const id of REQUIRED_3112_REAL_CHECK_IDS) {
|
|
12
|
-
const gate = gates.find((entry) => entry.id === id);
|
|
13
|
-
assertGate(Boolean(scripts[id]), `3.1.12 real-check script missing: ${id}`);
|
|
14
|
-
assertGate(Boolean(gate) && gate.preset.includes('real-check'), `3.1.12 real-check gate missing real-check preset: ${id}`, gate);
|
|
15
|
-
}
|
|
16
|
-
emitGate('release:wiring-3112-blackbox', { release_ids: REQUIRED_3112_RELEASE_IDS.length, real_check_ids: REQUIRED_3112_REAL_CHECK_IDS.length });
|
|
17
|
-
//# sourceMappingURL=release-wiring-3112-blackbox.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, readJson } from './sks-1-18-gate-lib.js';
|
|
3
|
-
import { REQUIRED_3113_REAL_CHECK_IDS, REQUIRED_3113_RELEASE_IDS } from './release-3113-required-gates.js';
|
|
4
|
-
const scripts = readJson('package.json').scripts || {};
|
|
5
|
-
const gates = readJson('release-gates.v2.json').gates || [];
|
|
6
|
-
const gateIds = new Set(gates.map((gate) => gate.id));
|
|
7
|
-
for (const id of REQUIRED_3113_RELEASE_IDS) {
|
|
8
|
-
assertGate(Boolean(scripts[id]), `3.1.13 release script missing: ${id}`);
|
|
9
|
-
assertGate(gateIds.has(id), `3.1.13 release gate missing: ${id}`);
|
|
10
|
-
}
|
|
11
|
-
for (const id of REQUIRED_3113_REAL_CHECK_IDS) {
|
|
12
|
-
const gate = gates.find((entry) => entry.id === id);
|
|
13
|
-
assertGate(Boolean(scripts[id]), `3.1.13 real-check script missing: ${id}`);
|
|
14
|
-
assertGate(Boolean(gate) && gate.preset.includes('real-check'), `3.1.13 real-check gate missing real-check preset: ${id}`, gate);
|
|
15
|
-
}
|
|
16
|
-
emitGate('release:wiring-3113-blackbox', { release_ids: REQUIRED_3113_RELEASE_IDS.length, real_check_ids: REQUIRED_3113_REAL_CHECK_IDS.length });
|
|
17
|
-
//# sourceMappingURL=release-wiring-3113-blackbox.js.map
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const research = await importDist('core/research.js');
|
|
8
|
-
const reviewer = await importDist('core/research/research-final-reviewer.js');
|
|
9
|
-
const fsx = await importDist('core/fsx.js');
|
|
10
|
-
const badDir = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-research-final-review-bad-'));
|
|
11
|
-
await research.writeResearchPlan(badDir, 'bad final reviewer fixture', { missionId: 'M-FINAL-BAD' });
|
|
12
|
-
await fsx.writeTextAtomic(path.join(badDir, 'research-report.md'), '# Bad\n\nToo short.\n');
|
|
13
|
-
const bad = await reviewer.runResearchFinalReviewer(badDir, { codexRequired: true });
|
|
14
|
-
assertGate(bad.approved === false, 'static failure must not approve final review', bad);
|
|
15
|
-
const templateDir = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-research-final-review-template-'));
|
|
16
|
-
const templatePlan = await research.writeResearchPlan(templateDir, 'template final reviewer fixture', { missionId: 'M-FINAL-TEMPLATE' });
|
|
17
|
-
await research.writeMockResearchResult(templateDir, templatePlan);
|
|
18
|
-
await fsx.writeTextAtomic(path.join(templateDir, 'research-report.md'), [
|
|
19
|
-
'# SKS Research Report',
|
|
20
|
-
'',
|
|
21
|
-
'## Question',
|
|
22
|
-
'Runtime evidence note: This paragraph exists to make report quality measurable.',
|
|
23
|
-
'',
|
|
24
|
-
'## Methodology',
|
|
25
|
-
'Runtime evidence note: This paragraph exists to make report quality measurable.',
|
|
26
|
-
'',
|
|
27
|
-
'## Source Map',
|
|
28
|
-
'mock-source-1 mock-source-2 mock-source-3 mock-source-4 mock-source-5 mock-source-6 mock-source-7 mock-source-8.',
|
|
29
|
-
'',
|
|
30
|
-
'## Key Claims',
|
|
31
|
-
'- mock-claim-1 cites mock-source-1 and mock-counter-1.',
|
|
32
|
-
'',
|
|
33
|
-
'## Evidence Matrix Summary',
|
|
34
|
-
Array.from({ length: 36 }, () => 'Runtime evidence note: This paragraph exists to make report quality measurable while deterministic fixture text repeats the same sentence for mock-claim-1 using mock-source-1 and mock-counter-1.').join('\n\n'),
|
|
35
|
-
'',
|
|
36
|
-
'## Counterevidence',
|
|
37
|
-
'mock-counter-1 and mock-counter-2 challenge the report.',
|
|
38
|
-
'',
|
|
39
|
-
'## Falsification',
|
|
40
|
-
'Runtime evidence note: This paragraph exists to make report quality measurable.',
|
|
41
|
-
'',
|
|
42
|
-
'## Implementation Blueprint',
|
|
43
|
-
'Runtime evidence note: This paragraph exists to make report quality measurable.',
|
|
44
|
-
'',
|
|
45
|
-
'## Experiment / Validation Plan',
|
|
46
|
-
'Runtime evidence note: This paragraph exists to make report quality measurable.',
|
|
47
|
-
'',
|
|
48
|
-
'## Limitations',
|
|
49
|
-
'Runtime evidence note: This paragraph exists to make report quality measurable.',
|
|
50
|
-
'',
|
|
51
|
-
'## References',
|
|
52
|
-
'- mock-source-1',
|
|
53
|
-
'- mock-counter-1'
|
|
54
|
-
].join('\n\n'));
|
|
55
|
-
await fsx.rmrf(path.join(templateDir, 'research-final-review.codex.json'));
|
|
56
|
-
const template = await reviewer.runResearchFinalReviewer(templateDir, { codexRequired: true });
|
|
57
|
-
assertGate(template.approved === false, 'template/repeated report must not approve final review', template);
|
|
58
|
-
assertGate((template.blockers || []).some((reason) => String(reason).includes('research_report_repeated_paragraphs') || String(reason).includes('research_report_template_phrase_hit')), 'template blockers must include repetition/template reasons', template);
|
|
59
|
-
const goodDir = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-research-final-review-good-'));
|
|
60
|
-
const plan = await research.writeResearchPlan(goodDir, 'good final reviewer fixture', { missionId: 'M-FINAL-GOOD' });
|
|
61
|
-
await research.writeMockResearchResult(goodDir, plan);
|
|
62
|
-
const good = JSON.parse(fs.readFileSync(path.join(goodDir, 'research-final-review.json'), 'utf8'));
|
|
63
|
-
assertGate(good.approved === true, 'complete package must approve final review with mock Codex reviewer', good);
|
|
64
|
-
assertGate(good.codex_review?.verdict === 'approve', 'merged final review must include Codex/mock approval', good);
|
|
65
|
-
assertGate(good.codex_review?.template_like_prose === false, 'mock Codex review must preserve template_like_prose=false', good);
|
|
66
|
-
assertGate(good.codex_review?.source_density_ok === true, 'mock Codex review must preserve source_density_ok=true', good);
|
|
67
|
-
assertGate(good.codex_review?.implementation_concreteness_ok === true, 'mock Codex review must preserve implementation_concreteness_ok=true', good);
|
|
68
|
-
assertGate(good.codex_review?.evidence_bound_synthesis_ok === true, 'mock Codex review must preserve evidence_bound_synthesis_ok=true', good);
|
|
69
|
-
emitGate('research:final-reviewer-blackbox', { bad_dir: badDir, template_dir: templateDir, good_dir: goodDir });
|
|
70
|
-
//# sourceMappingURL=research-final-reviewer-blackbox.js.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const research = await importDist('core/research.js');
|
|
8
|
-
const workGraph = await importDist('core/research/research-work-graph.js');
|
|
9
|
-
const cycleRunner = await importDist('core/research/research-cycle-runner.js');
|
|
10
|
-
const quality = await importDist('core/research/research-report-quality.js');
|
|
11
|
-
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-research-stage-cycle-'));
|
|
12
|
-
const plan = await research.writeResearchPlan(dir, 'stage cycle runtime blackbox', { missionId: 'M-STAGE-RUNTIME' });
|
|
13
|
-
const graph = workGraph.buildResearchWorkGraph(plan);
|
|
14
|
-
const result = await cycleRunner.runResearchCycle({ root: process.cwd(), dir, plan, graph, cycle: 1, backend: 'mock', timeoutMs: 120000, maxParallelStages: 4, mock: true });
|
|
15
|
-
const shardDir = path.join(dir, 'research', 'cycle-1', 'source-shards');
|
|
16
|
-
const shardFiles = fs.readdirSync(shardDir).filter((file) => file.endsWith('.json'));
|
|
17
|
-
const sourceLedger = JSON.parse(fs.readFileSync(path.join(dir, 'source-ledger.json'), 'utf8'));
|
|
18
|
-
const sourceQuality = JSON.parse(fs.readFileSync(path.join(dir, 'source-quality-report.json'), 'utf8'));
|
|
19
|
-
const claimMatrix = JSON.parse(fs.readFileSync(path.join(dir, 'claim-evidence-matrix.json'), 'utf8'));
|
|
20
|
-
const blueprint = JSON.parse(fs.readFileSync(path.join(dir, 'implementation-blueprint.json'), 'utf8'));
|
|
21
|
-
const finalReview = JSON.parse(fs.readFileSync(path.join(dir, 'research-final-review.json'), 'utf8'));
|
|
22
|
-
const reportQuality = quality.analyzeResearchReportQuality(fs.readFileSync(path.join(dir, 'research-report.md'), 'utf8'));
|
|
23
|
-
const cycleRecord = JSON.parse(fs.readFileSync(path.join(dir, 'research-cycle-runner.json'), 'utf8'));
|
|
24
|
-
assertGate(result.status === 'passed', 'mock stage cycle must pass', result);
|
|
25
|
-
assertGate(shardFiles.length >= 8, 'source shard outputs must exist', { shardFiles });
|
|
26
|
-
assertGate(fs.existsSync(path.join(dir, 'source-ledger.json')), 'source-ledger merge must exist');
|
|
27
|
-
assertGate(sourceLedger.sources.length + sourceLedger.counterevidence_sources.length >= 12, 'source-ledger must include at least 12 sources', sourceLedger);
|
|
28
|
-
assertGate(sourceQuality.ok === true, 'source-quality-report must pass', sourceQuality);
|
|
29
|
-
assertGate(fs.existsSync(path.join(dir, 'claim-evidence-matrix.json')), 'claim matrix must exist');
|
|
30
|
-
assertGate(claimMatrix.key_claim_ids.length >= 8, 'claim matrix must include at least 8 key claims', claimMatrix);
|
|
31
|
-
assertGate(fs.existsSync(path.join(dir, 'implementation-blueprint.json')), 'blueprint must exist');
|
|
32
|
-
assertGate(blueprint.repository_aware === true, 'blueprint must be repository aware', blueprint);
|
|
33
|
-
assertGate(fs.existsSync(path.join(dir, 'research-synthesis-output.json')), 'synthesis output must exist');
|
|
34
|
-
assertGate(reportQuality.ok === true, 'research report must pass repetition detector and density checks', reportQuality);
|
|
35
|
-
assertGate(fs.existsSync(path.join(dir, 'research-final-review.json')), 'final review must exist');
|
|
36
|
-
assertGate(finalReview.approved === true, 'final review must approve complete mock cycle', finalReview);
|
|
37
|
-
assertGate(result.parallelism?.max_observed_parallel >= 2, 'source shards must execute with observed parallelism', result.parallelism);
|
|
38
|
-
assertGate(cycleRecord.legacy_final_md_loop === false, 'stage cycle must not use legacy final.md loop', cycleRecord);
|
|
39
|
-
emitGate('research:stage-cycle-runtime-blackbox', { dir, parallelism: result.parallelism, shard_count: shardFiles.length, report_quality: reportQuality });
|
|
40
|
-
//# sourceMappingURL=research-stage-cycle-runtime-blackbox.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const research = await importDist('core/research.js');
|
|
8
|
-
const workGraph = await importDist('core/research/research-work-graph.js');
|
|
9
|
-
const cycleRunner = await importDist('core/research/research-cycle-runner.js');
|
|
10
|
-
const quality = await importDist('core/research/research-report-quality.js');
|
|
11
|
-
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-research-synthesis-blackbox-'));
|
|
12
|
-
const plan = await research.writeResearchPlan(dir, 'synthesis writer blackbox', { missionId: 'M-SYNTHESIS-BLACKBOX' });
|
|
13
|
-
const graph = workGraph.buildResearchWorkGraph(plan);
|
|
14
|
-
const result = await cycleRunner.runResearchCycle({ root: process.cwd(), dir, plan, graph, cycle: 1, backend: 'mock', timeoutMs: 120000, maxParallelStages: 6, mock: true });
|
|
15
|
-
const synthesis = JSON.parse(fs.readFileSync(path.join(dir, 'research-synthesis-output.json'), 'utf8'));
|
|
16
|
-
const reportText = fs.readFileSync(path.join(dir, 'research-report.md'), 'utf8');
|
|
17
|
-
const reportQuality = quality.analyzeResearchReportQuality(reportText);
|
|
18
|
-
assertGate(result.status === 'passed', 'mock research cycle must pass synthesis blackbox', result);
|
|
19
|
-
assertGate(synthesis.schema === 'sks.research-synthesis-output.v1', 'synthesis output artifact must use v1 schema', synthesis);
|
|
20
|
-
assertGate(synthesis.quality_signals.report_word_count >= 2200, 'synthesis output must meet report word floor', synthesis.quality_signals);
|
|
21
|
-
assertGate(synthesis.quality_signals.unique_source_ids_cited >= 8, 'synthesis output must cite at least 8 unique source ids', synthesis.quality_signals);
|
|
22
|
-
assertGate(reportQuality.ok === true, 'blackbox report must pass report quality', reportQuality);
|
|
23
|
-
emitGate('research:synthesis-writer-blackbox', { dir, synthesis: synthesis.quality_signals, parallelism: result.parallelism });
|
|
24
|
-
//# sourceMappingURL=research-synthesis-writer-blackbox.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
const lib = fs.readFileSync(path.join(root, 'src', 'scripts', 'agent-route-blackbox-lib.ts'), 'utf8');
|
|
7
|
-
const proof = fs.readFileSync(path.join(root, 'src', 'core', 'agents', 'agent-proof-evidence.ts'), 'utf8');
|
|
8
|
-
const packageJson = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
|
|
9
|
-
for (const token of ['runActualAgentBackfillBlackbox', 'runActualTeamBackfillBlackbox', 'runActualResearchBackfillBlackbox', 'runActualQaBackfillBlackbox']) {
|
|
10
|
-
assertGate(lib.includes(token), `route blackbox helper missing ${token}`);
|
|
11
|
-
}
|
|
12
|
-
for (const token of ['actual_agent_command', 'actual_team_command', 'actual_research_command', 'actual_qa_command']) {
|
|
13
|
-
assertGate(lib.includes(token), `route blackbox helper missing exact kind ${token}`);
|
|
14
|
-
}
|
|
15
|
-
assertGate(proof.includes('non_agent_route_used_generic_agent_run_route_standin'), 'proof must block non-agent route stand-ins');
|
|
16
|
-
assertGate(proof.includes('real_route_command_used'), 'proof must record real_route_command_used');
|
|
17
|
-
assertGate(Boolean(packageJson.scripts['dfix:fixture']), 'DFix route fixture gate must exist');
|
|
18
|
-
assertGate(Boolean(packageJson.scripts['ppt:full-e2e-blackbox']), 'PPT route blackbox gate must exist');
|
|
19
|
-
assertGate(Boolean(packageJson.scripts['ux-review:imagegen-blackbox']), 'UX route blackbox gate must exist');
|
|
20
|
-
emitGate('route:blackbox-realism', { actual_route_helpers: 4, standin_blocker: true });
|
|
21
|
-
//# sourceMappingURL=route-blackbox-realism-check.js.map
|