sneakoscope 2.0.13 → 2.0.15
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 +6 -3
- 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/.sks-build-stamp.json +4 -4
- package/dist/bin/sks.js +1 -1
- package/dist/cli/command-registry.js +1 -0
- package/dist/commands/mad-db.js +5 -0
- package/dist/commands/zellij-slot-pane.js +3 -1
- package/dist/core/agents/agent-orchestrator.js +11 -4
- package/dist/core/agents/agent-output-validator.js +1 -1
- package/dist/core/agents/agent-plan.js +3 -2
- package/dist/core/agents/native-cli-session-swarm.js +118 -0
- package/dist/core/agents/native-cli-worker.js +85 -0
- package/dist/core/codex-control/codex-fake-sdk-adapter.js +3 -3
- package/dist/core/codex-control/gpt-final-review-schema.js +61 -14
- package/dist/core/commands/basic-cli.js +1 -1
- package/dist/core/commands/command-suggestions.js +1 -1
- package/dist/core/commands/mad-db-command.js +106 -0
- package/dist/core/commands/mad-sks-command.js +50 -13
- package/dist/core/commands/naruto-command.js +82 -1
- package/dist/core/commands/research-command.js +83 -17
- package/dist/core/commands/team-command.js +25 -1
- package/dist/core/db-safety.js +26 -0
- package/dist/core/fsx.js +1 -1
- package/dist/core/mad-db/mad-db-capability.js +84 -0
- package/dist/core/mad-db/mad-db-ledger.js +17 -0
- package/dist/core/mad-db/mad-db-policy-resolver.js +46 -0
- package/dist/core/naruto/naruto-real-worker-child.js +11 -3
- package/dist/core/naruto/naruto-real-worker-runtime.js +4 -0
- package/dist/core/pipeline/final-gpt-patch-stage.js +20 -3
- package/dist/core/pipeline-internals/runtime-core.js +74 -8
- package/dist/core/pipeline-internals/runtime-gates.js +44 -0
- package/dist/core/proof/route-proof-gate.js +5 -3
- package/dist/core/proof/route-proof-policy.js +9 -1
- package/dist/core/release/release-gate-affected-selector.js +113 -0
- package/dist/core/release/release-gate-batch-runner.js +67 -0
- package/dist/core/release/release-gate-dag.js +22 -3
- package/dist/core/release/release-gate-resource-governor.js +23 -11
- package/dist/core/research/implementation-blueprint-densifier.js +124 -0
- package/dist/core/research/implementation-blueprint-markdown.js +1 -1
- package/dist/core/research/implementation-blueprint.js +68 -7
- package/dist/core/research/research-claim-builder.js +114 -0
- package/dist/core/research/research-cycle-runner.js +115 -11
- package/dist/core/research/research-final-reviewer.js +181 -1
- package/dist/core/research/research-handoff.js +69 -5
- package/dist/core/research/research-realistic-report.js +162 -0
- package/dist/core/research/research-repetition-detector.js +75 -0
- package/dist/core/research/research-report-quality.js +27 -5
- package/dist/core/research/research-source-ledger-merge.js +186 -0
- package/dist/core/research/research-source-shards.js +176 -0
- package/dist/core/research/research-stage-runner.js +537 -11
- package/dist/core/research/research-synthesis-prompt.js +52 -0
- package/dist/core/research/research-synthesis-writer.js +208 -0
- package/dist/core/research/research-work-graph.js +114 -23
- package/dist/core/research.js +72 -48
- package/dist/core/routes.js +23 -19
- package/dist/core/update/update-notice.js +120 -0
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-dashboard-renderer.js +2 -0
- package/dist/core/zellij/zellij-slot-column-anchor.js +35 -1
- package/dist/core/zellij/zellij-slot-pane-renderer.js +57 -0
- package/dist/core/zellij/zellij-slot-telemetry.js +182 -0
- package/dist/scripts/release-gate-dag-runner.js +5 -0
- package/dist/scripts/release-speed-summary.js +25 -0
- package/package.json +67 -5
- package/schemas/codex/agent-result.schema.json +1 -1
- package/schemas/mad-db/mad-db-capability.schema.json +31 -0
- package/schemas/mad-db/mad-db-ledger.schema.json +14 -0
- package/schemas/research/implementation-blueprint.schema.json +6 -1
- package/schemas/research/research-final-review.schema.json +10 -0
- package/schemas/research/research-source-shard.schema.json +46 -0
- package/schemas/research/research-synthesis-output.schema.json +62 -0
- package/schemas/update/update-notice.schema.json +19 -0
- package/schemas/zellij/zellij-slot-telemetry.schema.json +89 -0
- package/dist/build-manifest.json +0 -1184
- package/dist/scripts/agent-ast-aware-work-graph-check.js +0 -25
- package/dist/scripts/agent-backfill-replenishment-check.js +0 -13
- package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
- package/dist/scripts/agent-background-terminals-check.js +0 -16
- package/dist/scripts/agent-cleanup-command-ux-check.js +0 -12
- package/dist/scripts/agent-cleanup-executor-check.js +0 -53
- package/dist/scripts/agent-cleanup-executor-v2-check.js +0 -39
- package/dist/scripts/agent-cli-options-to-task-graph-check.js +0 -5
- package/dist/scripts/agent-codex-app-cockpit-check.js +0 -91
- package/dist/scripts/agent-codex-child-overlap-check.js +0 -21
- package/dist/scripts/agent-dynamic-cockpit-check.js +0 -10
- package/dist/scripts/agent-dynamic-pool-check.js +0 -13
- package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
- package/dist/scripts/agent-fast-mode-default-check.js +0 -62
- package/dist/scripts/agent-fast-mode-worker-propagation-check.js +0 -7
- package/dist/scripts/agent-follow-up-work-schema-check.js +0 -80
- package/dist/scripts/agent-goal-mode-propagation-check.js +0 -9
- package/dist/scripts/agent-intelligent-work-graph-check.js +0 -25
- package/dist/scripts/agent-janitor-check.js +0 -76
- package/dist/scripts/agent-main-no-scout-check.js +0 -11
- package/dist/scripts/agent-model-authored-patch-envelope-check.js +0 -15
- package/dist/scripts/agent-multi-project-isolation-check.js +0 -86
- package/dist/scripts/agent-native-cli-session-proof-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-10-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-20-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-check.js +0 -7
- package/dist/scripts/agent-no-subagent-scaling-check.js +0 -7
- package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
- package/dist/scripts/agent-parallel-write-kernel-check.js +0 -103
- package/dist/scripts/agent-patch-conflict-rebase-check.js +0 -198
- package/dist/scripts/agent-patch-envelope-extraction-check.js +0 -17
- package/dist/scripts/agent-patch-proof-check.js +0 -41
- package/dist/scripts/agent-patch-proof-runtime-check.js +0 -63
- package/dist/scripts/agent-patch-queue-runtime-check.js +0 -36
- package/dist/scripts/agent-patch-rollback-check.js +0 -38
- package/dist/scripts/agent-patch-rollback-dag-check.js +0 -14
- package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/agent-patch-swarm-runtime-check.js +0 -10
- package/dist/scripts/agent-patch-swarm-runtime-truth-check.js +0 -76
- package/dist/scripts/agent-patch-transaction-journal-check.js +0 -57
- package/dist/scripts/agent-patch-verification-dag-check.js +0 -14
- package/dist/scripts/agent-proof-contract-reconciled-check.js +0 -5
- package/dist/scripts/agent-real-codex-dynamic-smoke-check.js +0 -166
- package/dist/scripts/agent-real-codex-dynamic-smoke-v2-check.js +0 -14
- package/dist/scripts/agent-real-codex-in-zellij-worker-pane-check.js +0 -229
- package/dist/scripts/agent-real-codex-parallel-workers-10-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-20-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-5-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-check.js +0 -5
- package/dist/scripts/agent-role-config-repair-check.js +0 -33
- package/dist/scripts/agent-rollback-command-check.js +0 -86
- package/dist/scripts/agent-route-truth-backfill-check.js +0 -5
- package/dist/scripts/agent-scheduler-proof-check.js +0 -13
- package/dist/scripts/agent-scheduler-proof-hardening-check.js +0 -22
- package/dist/scripts/agent-session-generation-check.js +0 -21
- package/dist/scripts/agent-slot-pane-binding-proof-check.js +0 -64
- package/dist/scripts/agent-source-intelligence-propagation-check.js +0 -9
- package/dist/scripts/agent-strategy-to-lease-wiring-check.js +0 -32
- package/dist/scripts/agent-strategy-to-patch-strict-check.js +0 -54
- package/dist/scripts/agent-task-graph-expansion-check.js +0 -14
- package/dist/scripts/agent-terminal-generations-check.js +0 -23
- package/dist/scripts/agent-visual-consistency-check.js +0 -9
- package/dist/scripts/agent-wiki-context-proof-check.js +0 -62
- package/dist/scripts/agent-worker-backend-router-check.js +0 -63
- package/dist/scripts/agent-worker-scout-limited-check.js +0 -17
- package/dist/scripts/agent-zellij-dynamic-backfill-panes-check.js +0 -34
- package/dist/scripts/agent-zellij-runtime-check.js +0 -84
- package/dist/scripts/all-feature-deep-completion-check.js +0 -31
- package/dist/scripts/appshots-capability-check.js +0 -18
- package/dist/scripts/appshots-evidence-check.js +0 -48
- package/dist/scripts/appshots-operator-policy-check.js +0 -25
- package/dist/scripts/appshots-privacy-safety-check.js +0 -48
- package/dist/scripts/appshots-source-intelligence-check.js +0 -53
- package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -87
- package/dist/scripts/appshots-triwiki-voxel-check.js +0 -46
- package/dist/scripts/architecture-guard-check.js +0 -55
- package/dist/scripts/changelog-check.js +0 -47
- package/dist/scripts/codex-0-133-official-compat-report.js +0 -53
- package/dist/scripts/codex-0-134-official-compat-report.js +0 -110
- package/dist/scripts/codex-0-134-runner-truth-check.js +0 -66
- package/dist/scripts/codex-0-135-compat-check.js +0 -57
- package/dist/scripts/codex-0-136-compat-check.js +0 -30
- package/dist/scripts/codex-0-137-compat-check.js +0 -27
- package/dist/scripts/codex-app-fast-ui-preservation-check.js +0 -32
- package/dist/scripts/codex-app-provider-badge-check.js +0 -37
- package/dist/scripts/codex-app-ui-clobber-guard-check.js +0 -22
- package/dist/scripts/codex-app-ui-preservation-check.js +0 -96
- package/dist/scripts/codex-control-all-pipelines-check.js +0 -36
- package/dist/scripts/codex-control-capability-check.js +0 -10
- package/dist/scripts/codex-control-empty-result-retry-check.js +0 -43
- package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -10
- package/dist/scripts/codex-control-keepalive-no-cot-leak-check.js +0 -14
- package/dist/scripts/codex-control-no-legacy-fallback-check.js +0 -31
- package/dist/scripts/codex-control-side-effect-scope-check.js +0 -26
- package/dist/scripts/codex-control-stream-idle-watchdog-check.js +0 -18
- package/dist/scripts/codex-control-structured-output-check.js +0 -11
- package/dist/scripts/codex-control-thread-registry-check.js +0 -11
- package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
- package/dist/scripts/codex-environment-scoped-approvals-check.js +0 -10
- package/dist/scripts/codex-exec-output-schema-actual-syntax-check.js +0 -33
- package/dist/scripts/codex-fast-mode-profile-propagation-check.js +0 -12
- package/dist/scripts/codex-history-search-check.js +0 -19
- package/dist/scripts/codex-hook-semantic-check.js +0 -15
- package/dist/scripts/codex-hook-strict-subset-check.js +0 -61
- package/dist/scripts/codex-lb-config-toml-safety-check.js +0 -85
- package/dist/scripts/codex-lb-persistence-truth-check.js +0 -96
- package/dist/scripts/codex-lb-setup-fixture-check.js +0 -91
- package/dist/scripts/codex-lb-setup-truthfulness-check.js +0 -84
- package/dist/scripts/codex-legacy-profile-consumers-removed-check.js +0 -24
- package/dist/scripts/codex-managed-proxy-env-check.js +0 -17
- package/dist/scripts/codex-output-schema-fixture-check.js +0 -25
- package/dist/scripts/codex-permission-profiles-check.js +0 -36
- package/dist/scripts/codex-plugin-list-json-check.js +0 -8
- package/dist/scripts/codex-profile-primary-check.js +0 -13
- package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -51
- package/dist/scripts/codex-resume-cwd-truth-check.js +0 -17
- package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -32
- package/dist/scripts/codex-sdk-backend-router-check.js +0 -65
- package/dist/scripts/codex-sdk-capability-check.js +0 -11
- package/dist/scripts/codex-sdk-core-skill-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-dfix-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -9
- package/dist/scripts/codex-sdk-no-legacy-fallback-check.js +0 -33
- package/dist/scripts/codex-sdk-qa-pipeline-check.js +0 -8
- package/dist/scripts/codex-sdk-real-smoke-check.js +0 -39
- package/dist/scripts/codex-sdk-release-review-pipeline-check.js +0 -13
- package/dist/scripts/codex-sdk-research-pipeline-check.js +0 -15
- package/dist/scripts/codex-sdk-sandbox-policy-check.js +0 -21
- package/dist/scripts/codex-sdk-structured-output-check.js +0 -10
- package/dist/scripts/codex-sdk-team-naruto-agent-pipeline-check.js +0 -12
- package/dist/scripts/codex-sdk-thread-registry-check.js +0 -11
- package/dist/scripts/codex-sdk-ux-ppt-review-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-zellij-pane-binding-check.js +0 -13
- package/dist/scripts/codex-thread-runtime-choice-check.js +0 -10
- package/dist/scripts/codex-web-adapter-check.js +0 -12
- package/dist/scripts/computer-use-live-evidence-check.js +0 -55
- package/dist/scripts/computer-use-live-optional-check.js +0 -32
- package/dist/scripts/computer-use-policy-check.js +0 -69
- package/dist/scripts/computer-use-visual-route-fixture-check.js +0 -37
- package/dist/scripts/core-skill-card-schema-check.js +0 -61
- package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -54
- package/dist/scripts/core-skill-heldout-validation-check.js +0 -49
- package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -75
- package/dist/scripts/core-skill-patch-check.js +0 -79
- package/dist/scripts/core-skill-promotion-side-effect-ledger-check.js +0 -64
- package/dist/scripts/core-skill-rollout-scoring-check.js +0 -72
- package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -49
- package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
- package/dist/scripts/dfix-fast-kernel-check.js +0 -26
- package/dist/scripts/dfix-fixture-check.js +0 -6
- package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
- package/dist/scripts/dfix-patch-handoff-check.js +0 -13
- package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/dfix-performance-check.js +0 -15
- package/dist/scripts/dfix-verification-check.js +0 -9
- package/dist/scripts/dfix-verification-recommendation-check.js +0 -15
- package/dist/scripts/docs-truthfulness-check.js +0 -61
- package/dist/scripts/doctor-codex-doctor-parity-check.js +0 -17
- package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -64
- package/dist/scripts/doctor-fix-recovers-corrupted-config-check.js +0 -122
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -39
- package/dist/scripts/evidence-fixture-check.js +0 -26
- package/dist/scripts/evidence-flagship-coverage-check.js +0 -55
- package/dist/scripts/fake-real-proof-policy-v2-check.js +0 -27
- package/dist/scripts/fake-vs-real-proof-policy-check.js +0 -14
- package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -42
- package/dist/scripts/flagship-proof-graph-v2-check.js +0 -48
- package/dist/scripts/flagship-proof-graph-v3-check.js +0 -67
- package/dist/scripts/flagship-proof-graph-v4-check.js +0 -61
- package/dist/scripts/git-precommit-fixture-check.js +0 -41
- package/dist/scripts/git-worktree-cache-performance-check.js +0 -25
- package/dist/scripts/git-worktree-capability-check.js +0 -27
- package/dist/scripts/git-worktree-checkpoint-check.js +0 -20
- package/dist/scripts/git-worktree-cleanup-check.js +0 -27
- package/dist/scripts/git-worktree-cross-rebase-check.js +0 -39
- package/dist/scripts/git-worktree-diff-envelope-check.js +0 -17
- package/dist/scripts/git-worktree-diff-export-check.js +0 -43
- package/dist/scripts/git-worktree-dirty-lock-check.js +0 -17
- package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -14
- package/dist/scripts/git-worktree-integration-primary-check.js +0 -24
- package/dist/scripts/git-worktree-integration-primary-runtime-check.js +0 -20
- package/dist/scripts/git-worktree-manager-check.js +0 -37
- package/dist/scripts/git-worktree-manifest-append-check.js +0 -18
- package/dist/scripts/git-worktree-merge-queue-check.js +0 -31
- package/dist/scripts/git-worktree-pool-performance-check.js +0 -20
- package/dist/scripts/git-worktree-untracked-diff-check.js +0 -18
- package/dist/scripts/goal-mode-official-default-check.js +0 -12
- package/dist/scripts/gpt-final-arbiter-check.js +0 -63
- package/dist/scripts/gpt-final-arbiter-performance-check.js +0 -36
- package/dist/scripts/gpt-image-2-request-validator-check.js +0 -35
- package/dist/scripts/hooks-0.134-context-parity-check.js +0 -20
- package/dist/scripts/hooks-actual-parity-check.js +0 -17
- package/dist/scripts/hooks-actual-parity-v2-check.js +0 -21
- package/dist/scripts/hooks-latest-schema-check.js +0 -20
- package/dist/scripts/hooks-managed-install-fixture-check.js +0 -21
- package/dist/scripts/hooks-official-hash-oracle-check.js +0 -35
- package/dist/scripts/hooks-official-hash-parity-check.js +0 -17
- package/dist/scripts/hooks-subagent-events-check.js +0 -17
- package/dist/scripts/hooks-trust-state-check.js +0 -14
- package/dist/scripts/image-fidelity-fixture-check.js +0 -24
- package/dist/scripts/imagegen-capability-check.js +0 -30
- package/dist/scripts/imagegen-real-smoke-check.js +0 -155
- package/dist/scripts/install-update-preserves-config-check.js +0 -87
- package/dist/scripts/json-schema-recursive-check.js +0 -78
- package/dist/scripts/legacy-multiagent-removal-check.js +0 -85
- package/dist/scripts/legacy-upgrade-matrix-check.js +0 -300
- package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -21
- package/dist/scripts/local-collab-gpt-final-availability-check.js +0 -58
- package/dist/scripts/local-collab-no-local-only-final-check.js +0 -27
- package/dist/scripts/local-collab-policy-check.js +0 -17
- package/dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js +0 -63
- package/dist/scripts/local-llm-all-pipelines-check.js +0 -11
- package/dist/scripts/local-llm-cache-performance-check.js +0 -10
- package/dist/scripts/local-llm-capability-check.js +0 -14
- package/dist/scripts/local-llm-smoke-check.js +0 -23
- package/dist/scripts/local-llm-structured-output-check.js +0 -11
- package/dist/scripts/local-llm-throughput-check.js +0 -10
- package/dist/scripts/local-llm-tool-call-repair-check.js +0 -10
- package/dist/scripts/local-llm-warmup-check.js +0 -11
- package/dist/scripts/loop-blocker-check.js +0 -15
- package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -35
- package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +0 -92
- package/dist/scripts/mad-sks-audit-proof-check.js +0 -34
- package/dist/scripts/mad-sks-db-executor-check.js +0 -5
- package/dist/scripts/mad-sks-executor-proof-graph-check.js +0 -5
- package/dist/scripts/mad-sks-fast-mode-propagation-check.js +0 -24
- package/dist/scripts/mad-sks-file-write-executor-check.js +0 -5
- package/dist/scripts/mad-sks-immutable-harness-check.js +0 -36
- package/dist/scripts/mad-sks-no-harness-modification-check.js +0 -25
- package/dist/scripts/mad-sks-package-executor-check.js +0 -5
- package/dist/scripts/mad-sks-permission-model-check.js +0 -22
- package/dist/scripts/mad-sks-rollback-apply-check.js +0 -5
- package/dist/scripts/mad-sks-service-executor-check.js +0 -5
- package/dist/scripts/mad-sks-shell-executor-check.js +0 -5
- package/dist/scripts/mad-sks-write-guard-check.js +0 -28
- package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +0 -37
- package/dist/scripts/mad-sks-zellij-launch-check.js +0 -102
- package/dist/scripts/mcp-0-134-modernization-check.js +0 -55
- package/dist/scripts/mcp-readonly-concurrency-check.js +0 -17
- package/dist/scripts/mcp-readonly-runtime-scheduler-check.js +0 -20
- package/dist/scripts/mcp-tool-naming-parity-check.js +0 -16
- package/dist/scripts/memory-summary-rebuild-check.js +0 -22
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -180
- package/dist/scripts/naruto-active-pool-check.js +0 -39
- package/dist/scripts/naruto-actual-worker-control-plane-check.js +0 -56
- package/dist/scripts/naruto-allocation-policy-check.js +0 -33
- package/dist/scripts/naruto-allocation-runtime-wiring-check.js +0 -92
- package/dist/scripts/naruto-concurrency-governor-check.js +0 -53
- package/dist/scripts/naruto-extreme-parallelism-check.js +0 -22
- package/dist/scripts/naruto-extreme-parallelism-real-check.js +0 -43
- package/dist/scripts/naruto-gpt-final-pack-check.js +0 -34
- package/dist/scripts/naruto-orchestrator-runtime-source-check.js +0 -70
- package/dist/scripts/naruto-parallel-patch-apply-check.js +0 -41
- package/dist/scripts/naruto-readonly-routing-check.js +0 -116
- package/dist/scripts/naruto-real-active-pool-check.js +0 -39
- package/dist/scripts/naruto-real-active-pool-runtime-check.js +0 -55
- package/dist/scripts/naruto-rebalance-policy-check.js +0 -41
- package/dist/scripts/naruto-role-distribution-check.js +0 -23
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +0 -153
- package/dist/scripts/naruto-verification-pool-check.js +0 -36
- package/dist/scripts/naruto-work-graph-check.js +0 -24
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
- package/dist/scripts/naruto-worktree-coding-check.js +0 -44
- package/dist/scripts/naruto-worktree-gpt-final-check.js +0 -45
- package/dist/scripts/naruto-worktree-zellij-ui-check.js +0 -28
- package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +0 -48
- package/dist/scripts/naruto-zellij-massive-ui-check.js +0 -23
- package/dist/scripts/non-recursive-pipeline-check.js +0 -68
- package/dist/scripts/npm-publish-performance-check.js +0 -65
- package/dist/scripts/official-docs-compat-report.js +0 -304
- package/dist/scripts/packlist-performance-check.js +0 -83
- package/dist/scripts/parallel-verification-engine-check.js +0 -85
- package/dist/scripts/postinstall-safe-side-effects-check.js +0 -65
- package/dist/scripts/ppt-full-e2e-artifact-graph-check.js +0 -40
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
- package/dist/scripts/ppt-image-voxel-relations-check.js +0 -9
- package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
- package/dist/scripts/ppt-imagegen-review-fixture-check.js +0 -6
- package/dist/scripts/ppt-issue-extraction-fixture-check.js +0 -7
- package/dist/scripts/ppt-no-mock-as-real-check.js +0 -8
- package/dist/scripts/ppt-no-text-fallback-check.js +0 -7
- package/dist/scripts/ppt-proof-trust-fixture-check.js +0 -10
- package/dist/scripts/ppt-real-export-adapter-check.js +0 -13
- package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -42
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -16
- package/dist/scripts/ppt-reexport-rereview-check.js +0 -19
- package/dist/scripts/ppt-slide-export-fixture-check.js +0 -7
- package/dist/scripts/prepublish-fast-check.js +0 -128
- package/dist/scripts/priority-full-closure-check.js +0 -12
- package/dist/scripts/product-design-auto-install-check.js +0 -119
- package/dist/scripts/product-design-plugin-routing-check.js +0 -101
- package/dist/scripts/prompt-placeholder-guard-check.js +0 -33
- package/dist/scripts/provider-badge-context-check.js +0 -26
- package/dist/scripts/provider-context-config-toml-check.js +0 -63
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -47
- package/dist/scripts/python-codex-sdk-capability-check.js +0 -75
- package/dist/scripts/python-codex-sdk-sandbox-policy-check.js +0 -10
- package/dist/scripts/python-codex-sdk-stream-bridge-check.js +0 -12
- package/dist/scripts/python-tools-smoke-check.js +0 -71
- package/dist/scripts/qa-actual-route-backfill-check.js +0 -5
- package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
- package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/readme-architecture-imagegen-official-check.js +0 -448
- package/dist/scripts/release-cache-glob-hashing-check.js +0 -42
- package/dist/scripts/release-dag-full-coverage-check.js +0 -53
- package/dist/scripts/release-dist-freshness-check.js +0 -8
- package/dist/scripts/release-dynamic-performance-check.js +0 -103
- package/dist/scripts/release-gate-budget-check.js +0 -36
- package/dist/scripts/release-gate-dag-runner-check.js +0 -17
- package/dist/scripts/release-metadata-1-11-check.js +0 -37
- package/dist/scripts/release-metadata-1-12-check.js +0 -48
- package/dist/scripts/release-metadata-1-13-check.js +0 -53
- package/dist/scripts/release-metadata-1-14-check.js +0 -63
- package/dist/scripts/release-metadata-1-16-check.js +0 -81
- package/dist/scripts/release-metadata-1-17-check.js +0 -51
- package/dist/scripts/release-metadata-1-19-check.js +0 -371
- package/dist/scripts/release-metadata-check.js +0 -7
- package/dist/scripts/release-native-agent-fixture-check.js +0 -41
- package/dist/scripts/release-parallel-check.js +0 -374
- package/dist/scripts/release-parallel-full-coverage-check.js +0 -13
- package/dist/scripts/release-parallel-speed-budget-check.js +0 -79
- package/dist/scripts/release-provenance-check.js +0 -150
- package/dist/scripts/release-readiness-report.js +0 -1146
- package/dist/scripts/release-real-check.js +0 -330
- package/dist/scripts/release-registry-check.js +0 -344
- package/dist/scripts/release-runtime-truth-matrix-check.js +0 -47
- package/dist/scripts/release-stability-report-check.js +0 -99
- package/dist/scripts/release-version-truth-check.js +0 -134
- package/dist/scripts/research-actual-route-backfill-check.js +0 -5
- package/dist/scripts/research-backfill-route-blackbox.js +0 -5
- package/dist/scripts/research-quality-gate-check.js +0 -86
- package/dist/scripts/responses-retry-policy-centralized-check.js +0 -19
- package/dist/scripts/retention-cleanup-safety-check.js +0 -155
- package/dist/scripts/route-blackbox-realism-check.js +0 -21
- package/dist/scripts/route-proof-artifact-structure-check.js +0 -145
- package/dist/scripts/runtime-dist-parity-check.js +0 -78
- package/dist/scripts/runtime-no-mjs-scripts-check.js +0 -45
- package/dist/scripts/runtime-no-src-mjs-check.js +0 -32
- package/dist/scripts/runtime-no-tmux-check.js +0 -113
- package/dist/scripts/runtime-ts-python-boundary-check.js +0 -59
- package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -74
- package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -55
- package/dist/scripts/safety-check.js +0 -23
- package/dist/scripts/shared-memory-fixture-check.js +0 -27
- package/dist/scripts/side-effect-runtime-report-check.js +0 -19
- package/dist/scripts/side-effect-zero-gate-check.js +0 -226
- package/dist/scripts/sks-1-11-fixture-check.js +0 -130
- package/dist/scripts/source-intelligence-all-modes-check.js +0 -32
- package/dist/scripts/source-intelligence-policy-check.js +0 -13
- package/dist/scripts/strategy-adhd-orchestrating-gate-check.js +0 -22
- package/dist/scripts/strategy-file-ownership-plan-check.js +0 -18
- package/dist/scripts/strategy-parallel-modification-plan-check.js +0 -19
- package/dist/scripts/strategy-verification-rollback-dag-check.js +0 -19
- package/dist/scripts/team-actual-route-backfill-check.js +0 -5
- 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/terminal-keyboard-enhancement-safety-check.js +0 -12
- package/dist/scripts/terminal-tui-output-stability-check.js +0 -35
- package/dist/scripts/test-no-orphan-dist-imports-check.js +0 -73
- package/dist/scripts/trust-fixture-check.js +0 -33
- package/dist/scripts/typescript-migration-report.js +0 -78
- package/dist/scripts/ultra-router-auto-router-check.js +0 -33
- package/dist/scripts/ultra-router-classification-check.js +0 -28
- package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/ux-ppt-structured-extraction-check.js +0 -21
- package/dist/scripts/ux-review-extract-real-callouts-fixture-check.js +0 -8
- package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -15
- package/dist/scripts/ux-review-generate-callouts-fixture-check.js +0 -9
- package/dist/scripts/ux-review-image-voxel-relations-check.js +0 -31
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
- package/dist/scripts/ux-review-no-fake-callouts-check.js +0 -8
- package/dist/scripts/ux-review-no-text-fallback-check.js +0 -25
- package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -20
- package/dist/scripts/ux-review-patch-handoff-fixture-check.js +0 -8
- package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -31
- package/dist/scripts/ux-review-real-loop-fixture-check.js +0 -24
- package/dist/scripts/ux-review-recapture-recheck-fixture-check.js +0 -8
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -11
- package/dist/scripts/worker-pane-communication-contract-check.js +0 -54
- package/dist/scripts/wrongness-fixture-check.js +0 -65
- package/dist/scripts/xai-mcp-capability-check.js +0 -14
- package/dist/scripts/zellij-capability-check.js +0 -15
- package/dist/scripts/zellij-dashboard-pane-check.js +0 -70
- package/dist/scripts/zellij-developer-controls-check.js +0 -20
- package/dist/scripts/zellij-doctor-readiness-check.js +0 -63
- package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -21
- package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
- package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -356
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
- package/dist/scripts/zellij-lane-renderer-check.js +0 -65
- package/dist/scripts/zellij-launch-command-truth-check.js +0 -75
- package/dist/scripts/zellij-layout-valid-check.js +0 -90
- package/dist/scripts/zellij-pane-proof-check.js +0 -59
- package/dist/scripts/zellij-real-session-cleanup-check.js +0 -21
- package/dist/scripts/zellij-real-session-heartbeat-check.js +0 -49
- package/dist/scripts/zellij-real-session-launch-check.js +0 -57
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -22
- package/dist/scripts/zellij-right-column-manager-check.js +0 -27
- package/dist/scripts/zellij-screen-proof-check.js +0 -45
- package/dist/scripts/zellij-slot-column-anchor-check.js +0 -66
- package/dist/scripts/zellij-slot-only-ui-check.js +0 -26
- package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -106
- package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -59
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -40
- package/dist/scripts/zellij-ui-design-check.js +0 -105
- package/dist/scripts/zellij-worker-pane-manager-check.js +0 -109
- package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
- package/dist/scripts/zellij-worker-pane-spawn-order-check.js +0 -35
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.input.schema.json +0 -61
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.output.schema.json +0 -103
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.input.schema.json +0 -52
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.output.schema.json +0 -24
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-tool-use.command.input.schema.json +0 -67
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-tool-use.command.output.schema.json +0 -84
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-compact.command.input.schema.json +0 -52
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-compact.command.output.schema.json +0 -24
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-tool-use.command.input.schema.json +0 -65
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-tool-use.command.output.schema.json +0 -105
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/session-start.command.input.schema.json +0 -59
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/session-start.command.output.schema.json +0 -63
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/snapshot-metadata.json +0 -31
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/stop.command.input.schema.json +0 -63
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/stop.command.output.schema.json +0 -45
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/user-prompt-submit.command.input.schema.json +0 -59
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/user-prompt-submit.command.output.schema.json +0 -81
|
@@ -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 { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const patchApply = await importDist('core/naruto/naruto-parallel-patch-apply.js');
|
|
8
|
-
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-naruto-patch-'));
|
|
9
|
-
const envelopes = Array.from({ length: 10 }, (_, index) => {
|
|
10
|
-
const file = `file-${index}.txt`;
|
|
11
|
-
return envelope(index + 1, file, `after-${index}`);
|
|
12
|
-
});
|
|
13
|
-
const result = await patchApply.applyNarutoPatchEnvelopes(root, envelopes, { dryRun: false });
|
|
14
|
-
assertGate(result.ok === true, 'non-overlapping patch fixture must apply', result);
|
|
15
|
-
assertGate(result.batch_count === 1 && result.parallel_apply_count === 1, 'non-overlapping patch fixture must group into a parallel batch', result);
|
|
16
|
-
assertGate(result.results.every((row) => row.changed_files.length === 1 && Object.keys(row.before_hashes).length === 1 && Object.keys(row.after_hashes).length === 1), 'patch results must include before/after hashes and changed files', result);
|
|
17
|
-
const rollback = await patchApply.rollbackNarutoPatchResult(root, result.results[0]);
|
|
18
|
-
assertGate(rollback.ok === true && rollback.restored.length === 1, 'rollback must restore before content for a patch result', rollback);
|
|
19
|
-
const conflict = await patchApply.applyNarutoPatchEnvelopes(root, [envelope(99, 'same.txt', 'a'), envelope(100, 'same.txt', 'b')], { dryRun: true });
|
|
20
|
-
assertGate(conflict.conflicts.length >= 1, 'overlapping patch fixture must serialize or mark conflict', conflict);
|
|
21
|
-
emitGate('naruto:parallel-patch-apply', {
|
|
22
|
-
batch_count: result.batch_count,
|
|
23
|
-
parallel_apply_count: result.parallel_apply_count,
|
|
24
|
-
conflict_count: conflict.conflicts.length,
|
|
25
|
-
rollback_restored: rollback.restored.length
|
|
26
|
-
});
|
|
27
|
-
function envelope(index, file, content) {
|
|
28
|
-
return {
|
|
29
|
-
schema: 'sks.agent-patch-envelope.v1',
|
|
30
|
-
source: 'fixture',
|
|
31
|
-
agent_id: `naruto-${index}`,
|
|
32
|
-
session_id: `session-${index}`,
|
|
33
|
-
slot_id: `slot-${index}`,
|
|
34
|
-
generation_index: 1,
|
|
35
|
-
task_slice_id: `NW-${index}`,
|
|
36
|
-
lease_id: `lease-${index}`,
|
|
37
|
-
allowed_paths: [file],
|
|
38
|
-
operations: [{ op: 'write', path: file, content }]
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=naruto-parallel-patch-apply-check.js.map
|
|
@@ -1,116 +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 { assertGate, emitGate, exists, importDist, root } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const worker = await importDist('core/agents/agent-worker-pipeline.js');
|
|
8
|
-
const cli = path.join(root, 'dist', 'bin', 'sks.js');
|
|
9
|
-
assertGate(exists('dist/bin/sks.js'), 'dist/bin/sks.js missing (build first)');
|
|
10
|
-
const readOnlyWorker = worker.validateAgentWorkerResult({
|
|
11
|
-
mission_id: 'M-readonly-routing',
|
|
12
|
-
agent_id: 'readonly-agent',
|
|
13
|
-
session_id: 'readonly-session',
|
|
14
|
-
persona_id: 'verifier',
|
|
15
|
-
task_slice_id: 'readonly-slice',
|
|
16
|
-
status: 'done',
|
|
17
|
-
backend: 'codex-sdk',
|
|
18
|
-
summary: 'Read-only worker inspected files without proposing a patch.',
|
|
19
|
-
findings: ['read-only inspection completed'],
|
|
20
|
-
proposed_changes: [],
|
|
21
|
-
changed_files: ['src/core/agents/agent-proof-evidence.ts'],
|
|
22
|
-
lease_compliance: { ok: true, violations: [] },
|
|
23
|
-
artifacts: [],
|
|
24
|
-
blockers: [],
|
|
25
|
-
confidence: 'fixture',
|
|
26
|
-
handoff_notes: '',
|
|
27
|
-
unverified: [],
|
|
28
|
-
writes: [],
|
|
29
|
-
no_patch_reason: {
|
|
30
|
-
ok: true,
|
|
31
|
-
reason: 'read_only_or_no_write_paths',
|
|
32
|
-
read_only_or_noop_evidence: true
|
|
33
|
-
},
|
|
34
|
-
verification: { status: 'passed', checks: ['readonly-no-patch-routing'] }
|
|
35
|
-
});
|
|
36
|
-
assertGate(readOnlyWorker.status === 'done' && !readOnlyWorker.blockers.includes('no_patch_generated'), 'read-only/no-write worker changed_files must not require patch envelopes', readOnlyWorker);
|
|
37
|
-
const writeWorker = worker.validateAgentWorkerResult({
|
|
38
|
-
...readOnlyWorker,
|
|
39
|
-
agent_id: 'write-agent',
|
|
40
|
-
session_id: 'write-session',
|
|
41
|
-
task_slice_id: 'write-slice',
|
|
42
|
-
changed_files: ['src/core/agents/agent-proof-evidence.ts'],
|
|
43
|
-
no_patch_reason: undefined
|
|
44
|
-
});
|
|
45
|
-
assertGate(writeWorker.status === 'blocked' && writeWorker.blockers.includes('no_patch_generated'), 'write-capable changed_files without patch envelope must still block', writeWorker);
|
|
46
|
-
const readonlyRun = spawnSync(process.execPath, [
|
|
47
|
-
cli,
|
|
48
|
-
'naruto',
|
|
49
|
-
'run',
|
|
50
|
-
'readonly routing must inspect `src/core/agents/agent-proof-evidence.ts` and `package.json` without writes',
|
|
51
|
-
'--clones',
|
|
52
|
-
'4',
|
|
53
|
-
'--work-items',
|
|
54
|
-
'4',
|
|
55
|
-
'--backend',
|
|
56
|
-
'fake',
|
|
57
|
-
'--readonly',
|
|
58
|
-
'--json'
|
|
59
|
-
], { cwd: root, encoding: 'utf8', timeout: 120000, maxBuffer: 6 * 1024 * 1024 });
|
|
60
|
-
const readonlyJson = parseJson(readonlyRun.stdout);
|
|
61
|
-
assertGate(readonlyRun.status === 0 && readonlyJson?.ok === true, 'readonly Naruto fake blackbox must exit ok', { status: readonlyRun.status, stdout: tail(readonlyRun.stdout), stderr: tail(readonlyRun.stderr) });
|
|
62
|
-
assertGate(readonlyJson.proof === 'passed', 'readonly Naruto proof must pass', { proof: readonlyJson.proof, blockers: readonlyJson.run?.proof?.blockers });
|
|
63
|
-
assertGate(readonlyJson.work_graph?.write_allowed_count === 0, 'readonly Naruto work graph must have zero write-allowed items', readonlyJson.work_graph);
|
|
64
|
-
assertGate(Number(readonlyJson.role_distribution?.implementation_like_workers || 0) === 0, 'readonly Naruto role distribution must have zero implementation-like workers', readonlyJson.role_distribution);
|
|
65
|
-
assertGate((readonlyJson.role_distribution?.entries || []).every((entry) => entry.write_allowed === false), 'readonly Naruto role distribution must deny writes for every role', readonlyJson.role_distribution);
|
|
66
|
-
const readonlyRoot = path.join(root, '.sneakoscope', 'missions', readonlyJson.mission_id, 'agents');
|
|
67
|
-
const readonlyProof = readJson(path.join(readonlyRoot, 'agent-proof-evidence.json'));
|
|
68
|
-
const readonlyStrategy = readJson(path.join(readonlyRoot, 'user-request-strategy.json'));
|
|
69
|
-
const readonlyPolicy = readJson(path.join(readonlyRoot, 'agent-parallel-write-policy.json'));
|
|
70
|
-
assertGate(readonlyPolicy.write_mode === 'off' && readonlyPolicy.readonly === true, 'readonly run must force native write policy off', readonlyPolicy);
|
|
71
|
-
assertGate(readonlyStrategy.gate?.write_task_count === 0, 'readonly strategy must not infer write targets from file mentions', readonlyStrategy.gate);
|
|
72
|
-
assertGate(readonlyProof.changed_files_lease_checked === false, 'readonly no-write proof must skip changed_files write-lease checks', readonlyProof);
|
|
73
|
-
assertGate(!(readonlyProof.blockers || []).some((blocker) => /no_patch_generated|lease_changed_file_violation/.test(String(blocker))), 'readonly proof must not contain patch/lease write blockers', readonlyProof.blockers || []);
|
|
74
|
-
const writeRun = spawnSync(process.execPath, [
|
|
75
|
-
cli,
|
|
76
|
-
'naruto',
|
|
77
|
-
'run',
|
|
78
|
-
'write-capable routing must patch `README.md` through leased envelopes',
|
|
79
|
-
'--clones',
|
|
80
|
-
'3',
|
|
81
|
-
'--work-items',
|
|
82
|
-
'3',
|
|
83
|
-
'--backend',
|
|
84
|
-
'fake',
|
|
85
|
-
'--parallel-write',
|
|
86
|
-
'--json'
|
|
87
|
-
], { cwd: root, encoding: 'utf8', timeout: 120000, maxBuffer: 6 * 1024 * 1024 });
|
|
88
|
-
const writeJson = parseJson(writeRun.stdout);
|
|
89
|
-
assertGate(writeRun.status === 0 && writeJson?.ok === true, 'write-capable Naruto fake blackbox must exit ok', { status: writeRun.status, stdout: tail(writeRun.stdout), stderr: tail(writeRun.stderr) });
|
|
90
|
-
const writeRoot = path.join(root, '.sneakoscope', 'missions', writeJson.mission_id, 'agents');
|
|
91
|
-
const writeStrategy = readJson(path.join(writeRoot, 'user-request-strategy.json'));
|
|
92
|
-
const writePolicy = readJson(path.join(writeRoot, 'agent-parallel-write-policy.json'));
|
|
93
|
-
assertGate(writePolicy.write_mode === 'parallel' && writePolicy.readonly === false, 'write-capable Naruto run must carry parallel write policy', writePolicy);
|
|
94
|
-
assertGate(writeStrategy.gate?.write_task_count >= 1, 'write-capable strategy must retain explicit write target inference', writeStrategy.gate);
|
|
95
|
-
emitGate('naruto:readonly-routing', {
|
|
96
|
-
readonly_mission_id: readonlyJson.mission_id,
|
|
97
|
-
write_mission_id: writeJson.mission_id,
|
|
98
|
-
readonly_write_tasks: readonlyStrategy.gate?.write_task_count,
|
|
99
|
-
write_write_tasks: writeStrategy.gate?.write_task_count
|
|
100
|
-
});
|
|
101
|
-
function readJson(file) {
|
|
102
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
103
|
-
}
|
|
104
|
-
function parseJson(text) {
|
|
105
|
-
try {
|
|
106
|
-
return JSON.parse(text);
|
|
107
|
-
}
|
|
108
|
-
catch {
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function tail(value, limit = 2000) {
|
|
113
|
-
const text = String(value || '');
|
|
114
|
-
return text.length <= limit ? text : text.slice(-limit);
|
|
115
|
-
}
|
|
116
|
-
//# sourceMappingURL=naruto-readonly-routing-check.js.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
4
|
-
import { buildNarutoWorkGraph } from '../core/naruto/naruto-work-graph.js';
|
|
5
|
-
import { decideNarutoConcurrency } from '../core/naruto/naruto-concurrency-governor.js';
|
|
6
|
-
import { runNarutoRealActivePool } from '../core/naruto/naruto-active-pool.js';
|
|
7
|
-
const graph = buildNarutoWorkGraph({ requestedClones: 12, totalWorkItems: 24, writeCapable: true, maxActiveWorkers: 6 });
|
|
8
|
-
const governor = decideNarutoConcurrency({
|
|
9
|
-
requestedClones: 12,
|
|
10
|
-
totalWorkItems: graph.total_work_items,
|
|
11
|
-
pendingWorkQueueSize: graph.total_work_items,
|
|
12
|
-
backend: 'codex-sdk',
|
|
13
|
-
hardware: { cpuCoreCount: 8, freeMemoryBytes: 32 * 1024 * 1024 * 1024, totalMemoryBytes: 64 * 1024 * 1024 * 1024, fileDescriptorLimit: 4096, processCount: 100, terminalRows: 40, remoteApiRateLimitBudget: 8 }
|
|
14
|
-
});
|
|
15
|
-
const target = { ...governor, safe_active_workers: Math.min(6, governor.safe_active_workers), safe_zellij_visible_panes: 3 };
|
|
16
|
-
let spawned = 0;
|
|
17
|
-
let collected = 0;
|
|
18
|
-
let dashboardEvents = 0;
|
|
19
|
-
const report = await runNarutoRealActivePool({
|
|
20
|
-
graph,
|
|
21
|
-
governor: target,
|
|
22
|
-
spawnWorker: async (item, placement) => {
|
|
23
|
-
spawned += 1;
|
|
24
|
-
return { id: item.id, item, placement, started_at: Date.now() };
|
|
25
|
-
},
|
|
26
|
-
collectWorker: async (handle) => {
|
|
27
|
-
collected += 1;
|
|
28
|
-
return { id: handle.id, ok: true, item: handle.item, placement: handle.placement, completed_at: Date.now() };
|
|
29
|
-
},
|
|
30
|
-
enqueueVerification: async () => undefined,
|
|
31
|
-
updateDashboard: async () => {
|
|
32
|
-
dashboardEvents += 1;
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
const processEvidence = report.worker_lifecycle.every((row) => row.pid == null || row.worker_artifact_dir != null);
|
|
36
|
-
const ok = report.ok && spawned === graph.total_work_items && collected === graph.total_work_items && report.max_observed_active_workers >= target.safe_active_workers && dashboardEvents > graph.total_work_items && report.active_cap === target.safe_active_workers && processEvidence;
|
|
37
|
-
assertGate(ok, 'Naruto real active pool must run spawn/collect lifecycle and refill to cap', { report, spawned, collected, dashboardEvents, target });
|
|
38
|
-
emitGate('naruto:real-active-pool', { spawned, collected, active_cap: report.active_cap, max_observed_active_workers: report.max_observed_active_workers, refill_latency_ms_p95: report.refill_latency_ms_p95, active_pool_utilization: report.active_pool_utilization });
|
|
39
|
-
//# sourceMappingURL=naruto-real-active-pool-check.js.map
|
|
@@ -1,55 +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 } from './sks-1-18-gate-lib.js';
|
|
7
|
-
import { buildNarutoWorkGraph } from '../core/naruto/naruto-work-graph.js';
|
|
8
|
-
import { decideNarutoConcurrency } from '../core/naruto/naruto-concurrency-governor.js';
|
|
9
|
-
import { runNarutoRealActivePool } from '../core/naruto/naruto-active-pool.js';
|
|
10
|
-
import { collectActualNarutoWorker, spawnActualNarutoWorker } from '../core/naruto/naruto-real-worker-runtime.js';
|
|
11
|
-
process.env.SKS_CODEX_SDK_FAKE = '1';
|
|
12
|
-
const graph = buildNarutoWorkGraph({ requestedClones: 12, totalWorkItems: 24, writeCapable: false, maxActiveWorkers: 6 });
|
|
13
|
-
const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-naruto-real-runtime-'));
|
|
14
|
-
const missionId = `M-naruto-real-runtime-${process.pid}`;
|
|
15
|
-
const governor = decideNarutoConcurrency({
|
|
16
|
-
requestedClones: 12,
|
|
17
|
-
totalWorkItems: graph.total_work_items,
|
|
18
|
-
pendingWorkQueueSize: graph.total_work_items,
|
|
19
|
-
backend: 'codex-sdk',
|
|
20
|
-
hardware: { cores: 8, freeMemoryBytes: 32 * 1024 * 1024 * 1024, totalMemoryBytes: 64 * 1024 * 1024 * 1024, fileDescriptorLimit: 4096, processCount: 100, terminalRows: 40, remoteApiRateLimitBudget: 8 }
|
|
21
|
-
});
|
|
22
|
-
let spawned = 0;
|
|
23
|
-
let collected = 0;
|
|
24
|
-
const target = { ...governor, safe_active_workers: Math.min(6, governor.safe_active_workers), safe_zellij_visible_panes: 3 };
|
|
25
|
-
const report = await runNarutoRealActivePool({
|
|
26
|
-
graph,
|
|
27
|
-
governor: target,
|
|
28
|
-
spawnWorker: async (item, placement) => {
|
|
29
|
-
spawned += 1;
|
|
30
|
-
return spawnActualNarutoWorker({
|
|
31
|
-
root: tempRoot,
|
|
32
|
-
missionId,
|
|
33
|
-
item,
|
|
34
|
-
placement,
|
|
35
|
-
backend: 'fake',
|
|
36
|
-
visiblePaneCap: target.safe_zellij_visible_panes,
|
|
37
|
-
zellijSessionName: `sks-${missionId}`
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
collectWorker: async (handle) => {
|
|
41
|
-
collected += 1;
|
|
42
|
-
return collectActualNarutoWorker(handle);
|
|
43
|
-
},
|
|
44
|
-
enqueueVerification: async () => undefined,
|
|
45
|
-
updateDashboard: async () => undefined
|
|
46
|
-
});
|
|
47
|
-
const processEvidence = report.worker_lifecycle.every((row) => row.pid && row.worker_artifact_dir);
|
|
48
|
-
const artifactEvidence = report.worker_lifecycle.every((row) => row.worker_artifact_dir
|
|
49
|
-
&& fs.existsSync(path.join(row.worker_artifact_dir, 'worker-heartbeat.jsonl'))
|
|
50
|
-
&& fs.existsSync(path.join(row.worker_artifact_dir, 'worker-result.json'))
|
|
51
|
-
&& fs.existsSync(path.join(row.worker_artifact_dir, 'codex-control', 'codex-control-proof.json')));
|
|
52
|
-
const ok = report.ok && spawned === graph.total_work_items && collected === graph.total_work_items && report.max_observed_active_workers >= target.safe_active_workers && report.active_pool_utilization >= 0.8 && processEvidence && artifactEvidence;
|
|
53
|
-
assertGate(ok, 'Naruto real active pool runtime must include actual child process, heartbeat, and result evidence', { report, spawned, collected, processEvidence, artifactEvidence, tempRoot });
|
|
54
|
-
emitGate('naruto:real-active-pool-runtime', report);
|
|
55
|
-
//# sourceMappingURL=naruto-real-active-pool-runtime-check.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
3
|
-
import { rebalanceNarutoReadyWork } from '../core/naruto/naruto-rebalance-policy.js';
|
|
4
|
-
const item = (id, dependencies = []) => ({
|
|
5
|
-
id,
|
|
6
|
-
kind: 'verification',
|
|
7
|
-
title: id,
|
|
8
|
-
target_paths: ['src/core/naruto/runtime.ts'],
|
|
9
|
-
readonly_paths: ['src/core/naruto/runtime.ts'],
|
|
10
|
-
write_paths: [],
|
|
11
|
-
required_role: 'verifier',
|
|
12
|
-
write_allowed: false,
|
|
13
|
-
verification_required: true,
|
|
14
|
-
dependencies,
|
|
15
|
-
can_run_in_parallel_with: [],
|
|
16
|
-
conflicts_with: [],
|
|
17
|
-
estimated_cost: { tokens: 1, latency_ms: 1, cpu_weight: 1, memory_mb: 1, gpu_weight: 0 },
|
|
18
|
-
lease_requirements: [],
|
|
19
|
-
acceptance: { requires_patch_envelope: false, requires_verification: true, requires_gpt_final: false }
|
|
20
|
-
});
|
|
21
|
-
const decisions = rebalanceNarutoReadyWork({
|
|
22
|
-
tasks: [item('A'), item('B', ['A'])],
|
|
23
|
-
workers: [{ id: 'idle-1', role: 'verifier', lane: 'src/core', alive: true, state: 'idle' }],
|
|
24
|
-
completedTaskIds: []
|
|
25
|
-
});
|
|
26
|
-
const inactiveOwner = rebalanceNarutoReadyWork({
|
|
27
|
-
tasks: [{ ...item('C'), owner: 'missing-worker' }],
|
|
28
|
-
workers: [{ id: 'idle-2', role: 'verifier', lane: 'src/core', alive: true, state: 'idle' }],
|
|
29
|
-
completedTaskIds: []
|
|
30
|
-
});
|
|
31
|
-
const writeConflict = rebalanceNarutoReadyWork({
|
|
32
|
-
tasks: [{ ...item('D'), write_paths: ['src/core/naruto/runtime.ts'], write_allowed: true }],
|
|
33
|
-
workers: [{ id: 'idle-3', role: 'verifier', lane: 'src/core', alive: true, state: 'idle' }],
|
|
34
|
-
completedTaskIds: [],
|
|
35
|
-
activeWritePaths: ['src/core/naruto/runtime.ts']
|
|
36
|
-
});
|
|
37
|
-
assertGate(decisions.length === 1 && decisions[0]?.task_id === 'A'
|
|
38
|
-
&& inactiveOwner.length === 1 && inactiveOwner[0]?.worker_id === 'idle-2'
|
|
39
|
-
&& writeConflict.length === 0, 'Naruto rebalance must assign dependency-ready work, reassign inactive owners, and skip active write conflicts', { decisions, inactiveOwner, writeConflict });
|
|
40
|
-
emitGate('naruto:rebalance-policy', { decisions, inactiveOwner, writeConflict });
|
|
41
|
-
//# sourceMappingURL=naruto-rebalance-policy-check.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
4
|
-
const workGraph = await importDist('core/naruto/naruto-work-graph.js');
|
|
5
|
-
const roles = await importDist('core/naruto/naruto-role-policy.js');
|
|
6
|
-
const roster = await importDist('core/agents/agent-roster.js');
|
|
7
|
-
const graph = workGraph.buildNarutoWorkGraph({ requestedClones: 30, totalWorkItems: 30, writeCapable: true });
|
|
8
|
-
const distribution = roles.buildNarutoRoleDistribution(graph.work_items);
|
|
9
|
-
const cloneRoster = roster.buildNarutoCloneRoster({ clones: 30, prompt: 'implement, modify, test, verify, document, and resolve conflicts' });
|
|
10
|
-
const writeCapableRoster = cloneRoster.roster.filter((row) => row.write_allowed === true);
|
|
11
|
-
assertGate(distribution.ok === true, 'write-capable Naruto role distribution must pass', distribution);
|
|
12
|
-
assertGate(distribution.verifier_only === false, 'default Naruto must not be verifier-only', distribution);
|
|
13
|
-
assertGate(distribution.implementation_like_ratio >= 0.4, 'default Naruto must keep at least 40% implementation/modification/test roles', distribution);
|
|
14
|
-
assertGate(writeCapableRoster.length >= Math.floor(cloneRoster.roster.length * 0.4), 'Naruto roster must include write-capable clone roles by default', { writeCapableRoster: writeCapableRoster.length, total: cloneRoster.roster.length });
|
|
15
|
-
const readonlyGraph = workGraph.buildNarutoWorkGraph({ requestedClones: 8, readonly: true, writeCapable: false });
|
|
16
|
-
const readonlyDistribution = roles.buildNarutoRoleDistribution(readonlyGraph.work_items, { readonly: true });
|
|
17
|
-
assertGate(readonlyDistribution.ok === true, 'readonly Naruto route may use read-only verifier/research roles', readonlyDistribution);
|
|
18
|
-
emitGate('naruto:role-distribution', {
|
|
19
|
-
implementation_like_ratio: distribution.implementation_like_ratio,
|
|
20
|
-
entries: distribution.entries,
|
|
21
|
-
write_capable_roster_count: writeCapableRoster.length
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=naruto-role-distribution-check.js.map
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
// $Naruto Shadow Clone Swarm gate.
|
|
4
|
-
// Proves the high-scale mode lifts the standard 20-agent ceiling to 100 clones WITHOUT
|
|
5
|
-
// changing it for any other route, and that an end-to-end `sks naruto run` actually
|
|
6
|
-
// schedules >20 concurrent clone sessions to completion with proof.
|
|
7
|
-
import { spawnSync } from 'node:child_process';
|
|
8
|
-
import fs from 'node:fs';
|
|
9
|
-
import os from 'node:os';
|
|
10
|
-
import path from 'node:path';
|
|
11
|
-
import { assertGate, emitGate, importDist, root, exists } from './sks-1-18-gate-lib.js';
|
|
12
|
-
const schema = await importDist('core/agents/agent-schema.js');
|
|
13
|
-
const roster = await importDist('core/agents/agent-roster.js');
|
|
14
|
-
const scheduler = await importDist('core/agents/agent-scheduler.js');
|
|
15
|
-
const effortPolicy = await importDist('core/agents/agent-effort-policy.js');
|
|
16
|
-
// 1) Naruto ceiling exists and is 100; standard ceiling untouched at 20.
|
|
17
|
-
assertGate(schema.MAX_NARUTO_AGENT_COUNT === 100, 'MAX_NARUTO_AGENT_COUNT must be 100', { value: schema.MAX_NARUTO_AGENT_COUNT });
|
|
18
|
-
assertGate(schema.MAX_AGENT_COUNT === 20, 'MAX_AGENT_COUNT must remain 20 (standard ceiling)', { value: schema.MAX_AGENT_COUNT });
|
|
19
|
-
// 2) Cap is lifted ONLY when the naruto max is passed; default callers still clamp to 20.
|
|
20
|
-
const narutoSlots = scheduler.normalizeTargetActiveSlots(100, schema.MAX_NARUTO_AGENT_COUNT);
|
|
21
|
-
const defaultSlots = scheduler.normalizeTargetActiveSlots(100);
|
|
22
|
-
assertGate(narutoSlots === 100, 'normalizeTargetActiveSlots(100, naruto-max) must be 100', { narutoSlots });
|
|
23
|
-
assertGate(defaultSlots === 20, 'normalizeTargetActiveSlots(100) default must stay clamped to 20', { defaultSlots });
|
|
24
|
-
// 3) A 100-clone roster builds 100 unique clones (no unique-persona ceiling).
|
|
25
|
-
const fullRoster = roster.buildNarutoCloneRoster({ clones: 100, maxAgentCount: schema.MAX_NARUTO_AGENT_COUNT });
|
|
26
|
-
const uniqueIds = new Set(fullRoster.roster.map((row) => row.id)).size;
|
|
27
|
-
assertGate(fullRoster.agent_count === 100, 'clone roster must have 100 clones', { agent_count: fullRoster.agent_count });
|
|
28
|
-
assertGate(uniqueIds === 100, 'clone roster ids must be unique', { uniqueIds });
|
|
29
|
-
assertGate(fullRoster.max_agents === 100, 'clone roster max_agents must be 100', { max_agents: fullRoster.max_agents });
|
|
30
|
-
// 4) Over-cap is clamped, not crashed.
|
|
31
|
-
const overCap = roster.buildNarutoCloneRoster({ clones: 500, maxAgentCount: schema.MAX_NARUTO_AGENT_COUNT });
|
|
32
|
-
assertGate(overCap.agent_count === 100, 'clones above the ceiling clamp to 100', { agent_count: overCap.agent_count });
|
|
33
|
-
// 4b) Dynamic per-clone effort policy (like team mode), capped + always fast.
|
|
34
|
-
// A neutral/no-tool prompt yields a low/medium MIX: read-only personas -> low, writers -> medium.
|
|
35
|
-
const effortRoster = roster.buildNarutoCloneRoster({ clones: 24, prompt: 'review and summarize the current findings', maxAgentCount: schema.MAX_NARUTO_AGENT_COUNT });
|
|
36
|
-
const efforts = new Set(effortRoster.roster.map((row) => row.reasoning_effort));
|
|
37
|
-
const tiers = new Set(effortRoster.roster.map((row) => row.service_tier));
|
|
38
|
-
const fastFlags = new Set(effortRoster.roster.map((row) => row.fast_mode));
|
|
39
|
-
assertGate([...efforts].every((e) => e === 'low' || e === 'medium'), 'naruto clone efforts must be only low/medium (never high/xhigh)', { efforts: [...efforts] });
|
|
40
|
-
assertGate(efforts.has('low') && efforts.has('medium'), 'naruto effort must be dynamic: a no-tool prompt must yield both low and medium clones', { efforts: [...efforts] });
|
|
41
|
-
assertGate([...tiers].length === 1 && tiers.has('fast'), 'every naruto clone must be fast service tier', { tiers: [...tiers] });
|
|
42
|
-
assertGate([...fastFlags].length === 1 && fastFlags.has(true), 'every naruto clone must have fast_mode=true', { fastFlags: [...fastFlags] });
|
|
43
|
-
// 4c) Unit rule: no tool use -> low; any tool use -> medium; always fast.
|
|
44
|
-
const simple = effortPolicy.decideNarutoCloneEffort({ readonly: true, prompt: 'explain the architecture overview' });
|
|
45
|
-
const toolWrite = effortPolicy.decideNarutoCloneEffort({ readonly: false, prompt: 'add a feature' });
|
|
46
|
-
const toolReadCmd = effortPolicy.decideNarutoCloneEffort({ readonly: true, prompt: 'run the build and apply the migration' });
|
|
47
|
-
assertGate(simple.reasoning_effort === 'low' && simple.service_tier === 'fast', 'no-tool read-only work must be low + fast', { simple });
|
|
48
|
-
assertGate(toolWrite.reasoning_effort === 'medium' && toolWrite.service_tier === 'fast', 'writing clone (tool use) must be medium + fast', { toolWrite });
|
|
49
|
-
assertGate(toolReadCmd.reasoning_effort === 'medium' && toolReadCmd.service_tier === 'fast', 'read-only work with tool/command signals must be medium + fast', { toolReadCmd });
|
|
50
|
-
// 5) System-safe concurrency: never spawn the whole count at once; throttle to host capacity.
|
|
51
|
-
const fakeSafe = roster.systemSafeNarutoConcurrency({ backend: 'fake' });
|
|
52
|
-
const heavySafe = roster.systemSafeNarutoConcurrency({ backend: 'codex-sdk' });
|
|
53
|
-
const lowFreeButCapable = roster.systemSafeNarutoConcurrency({
|
|
54
|
-
backend: 'codex-sdk',
|
|
55
|
-
cores: 10,
|
|
56
|
-
freeBytes: 512 * 1024 * 1024,
|
|
57
|
-
totalBytes: 16 * 1024 * 1024 * 1024
|
|
58
|
-
});
|
|
59
|
-
assertGate(fakeSafe.cap >= 1 && fakeSafe.cap <= schema.MAX_NARUTO_AGENT_COUNT, 'fake-backend concurrency cap must be in [1, 100]', { fakeSafe });
|
|
60
|
-
// codex-sdk workers are network-bound (each mostly idle awaiting the Codex API),
|
|
61
|
-
// so concurrency is bounded by MEMORY + the 100-clone ceiling, NOT by CPU cores: a
|
|
62
|
-
// capable host may run up to MAX_NARUTO_AGENT_COUNT in parallel.
|
|
63
|
-
assertGate(heavySafe.cap >= 1 && heavySafe.cap <= schema.MAX_NARUTO_AGENT_COUNT, 'heavy-backend concurrency cap must be in [1, 100]', { heavySafe });
|
|
64
|
-
assertGate(heavySafe.cap <= fakeSafe.cap, 'heavy backend must throttle no looser than the light backend', { heavySafe, fakeSafe });
|
|
65
|
-
assertGate(heavySafe.cores >= 1, 'must detect at least one core', { cores: heavySafe.cores });
|
|
66
|
-
assertGate(lowFreeButCapable.cap >= 4, 'capable hosts must not collapse Naruto codex-sdk concurrency to 1 just because free memory is low', { lowFreeButCapable });
|
|
67
|
-
// A big-memory host is NOT throttled by core count: simulate 64 GB and assert the
|
|
68
|
-
// heavy backend scales well past the old 16-core-derived ceiling toward 100.
|
|
69
|
-
const bigMemoryHost = roster.systemSafeNarutoConcurrency({ backend: 'codex-sdk', cores: 4, freeBytes: 48 * 1024 * 1024 * 1024, totalBytes: 64 * 1024 * 1024 * 1024 });
|
|
70
|
-
assertGate(bigMemoryHost.cap >= 64, 'a 64 GB host must allow >= 64 parallel codex-sdk workers regardless of core count (network-bound, memory-budgeted)', { bigMemoryHost });
|
|
71
|
-
// 6) End-to-end run: 24 clones (> standard 20 -> ceiling lifted) all complete, while
|
|
72
|
-
// release verification keeps live slots bounded so the gate stays hermetic under DAG load.
|
|
73
|
-
const proofClones = 24;
|
|
74
|
-
const proofConcurrency = 6;
|
|
75
|
-
const cli = path.join(root, 'dist', 'bin', 'sks.js');
|
|
76
|
-
const isolatedWorktreeRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-naruto-shadow-wt-'));
|
|
77
|
-
const childEnv = { ...process.env, SKS_WORKTREE_ROOT: isolatedWorktreeRoot };
|
|
78
|
-
assertGate(exists('dist/bin/sks.js'), 'dist/bin/sks.js missing (build first)');
|
|
79
|
-
const helpRun = spawnSync(process.execPath, [cli, 'naruto', '--help', '--json'], { cwd: root, env: childEnv, encoding: 'utf8', timeout: 30000, maxBuffer: 1024 * 1024 });
|
|
80
|
-
const helpParsed = parseJson(helpRun.stdout);
|
|
81
|
-
assertGate(helpRun.status === 0 && helpParsed?.action === 'help', 'sks naruto --help must emit help instead of launching a run', { status: helpRun.status, stdout: tail(helpRun.stdout), stderr: tail(helpRun.stderr) });
|
|
82
|
-
const run = spawnSync(process.execPath, [
|
|
83
|
-
cli, 'naruto', 'run', 'shadow clone swarm gate proof',
|
|
84
|
-
'--clones', String(proofClones),
|
|
85
|
-
'--backend', 'fake',
|
|
86
|
-
'--work-items', String(proofClones),
|
|
87
|
-
'--concurrency', String(proofConcurrency),
|
|
88
|
-
'--json'
|
|
89
|
-
], { cwd: root, env: childEnv, encoding: 'utf8', timeout: 300000, maxBuffer: 8 * 1024 * 1024 });
|
|
90
|
-
assertGate(run.status === 0, 'sks naruto run must exit 0', { status: run.status, stderr: tail(run.stderr) });
|
|
91
|
-
const parsed = parseJson(run.stdout);
|
|
92
|
-
assertGate(parsed !== null, 'sks naruto run must emit JSON', { stdout: tail(run.stdout) });
|
|
93
|
-
assertGate(parsed.ok === true, 'naruto run must be ok', { ok: parsed.ok });
|
|
94
|
-
assertGate(parsed.mode === 'NARUTO' && parsed.jutsu === 'kage_bunshin_no_jutsu', 'naruto run must report NARUTO mode', { mode: parsed.mode, jutsu: parsed.jutsu });
|
|
95
|
-
assertGate(parsed.clones === proofClones, 'clone fan-out must use the requested count (> standard 20 ceiling)', { clones: parsed.clones });
|
|
96
|
-
assertGate(parsed.max_clones === 100, 'naruto run must advertise the 100 ceiling', { max_clones: parsed.max_clones });
|
|
97
|
-
assertGate(parsed.proof === 'passed', 'naruto run proof must pass', { proof: parsed.proof });
|
|
98
|
-
// Throttle invariant: active concurrency never exceeds the requested count nor the host cap.
|
|
99
|
-
assertGate(parsed.target_active_slots >= 1 && parsed.target_active_slots <= proofClones, 'active slots must be in [1, clones]', { target_active_slots: parsed.target_active_slots });
|
|
100
|
-
assertGate(parsed.target_active_slots <= fakeSafe.cap, 'active slots must be throttled to the system-safe cap', { target_active_slots: parsed.target_active_slots, cap: fakeSafe.cap });
|
|
101
|
-
assertGate(parsed.target_active_slots === proofConcurrency, 'release proof must keep Naruto live slots bounded while fan-out stays >20', { target_active_slots: parsed.target_active_slots, proofConcurrency });
|
|
102
|
-
// Task 9.1: fan-out (clones) and live concurrency (target_active_slots) are reported
|
|
103
|
-
// distinctly, and concurrency_capped truthfully reflects "N clones, running M at a time".
|
|
104
|
-
assertGate(typeof parsed.concurrency_capped === 'boolean', 'naruto run must report concurrency_capped', { concurrency_capped: parsed.concurrency_capped });
|
|
105
|
-
assertGate(parsed.concurrency_capped === (parsed.clones > parsed.target_active_slots), 'concurrency_capped must reflect clones > live slots', { clones: parsed.clones, target_active_slots: parsed.target_active_slots, concurrency_capped: parsed.concurrency_capped });
|
|
106
|
-
assertGate(parsed.system && Number(parsed.system.safe_concurrency) >= 1, 'naruto run must report system safe_concurrency (host-derived cap)', { system: parsed.system });
|
|
107
|
-
assertGate(parsed.work_graph?.write_allowed_count > 0 && parsed.work_graph?.mixed_work_kinds?.length > 1, 'naruto run must report a mixed work graph with write-capable items', { work_graph: parsed.work_graph });
|
|
108
|
-
assertGate(Number(parsed.work_graph?.parallel_write_wave_count || 0) > 0, 'naruto run must expose at least one parallel write-capable wave with non-overlapping leases', { work_graph: parsed.work_graph });
|
|
109
|
-
assertGate(parsed.role_distribution?.verifier_only === false, 'naruto run proof/status must distinguish active worker roles beyond verifier-only', { role_distribution: parsed.role_distribution });
|
|
110
|
-
assertGate(Number(parsed.role_distribution?.implementation_like_ratio || 0) >= 0.4, 'naruto run must include implementation-like role distribution', { role_distribution: parsed.role_distribution });
|
|
111
|
-
const commandGraphPath = path.join(root, '.sneakoscope', 'missions', parsed.mission_id, 'agents', 'naruto-work-graph.json');
|
|
112
|
-
const commandGraph = JSON.parse(fs.readFileSync(commandGraphPath, 'utf8'));
|
|
113
|
-
const writePaths = commandGraph.work_items.filter((row) => row.write_allowed).flatMap((row) => row.write_paths);
|
|
114
|
-
assertGate(new Set(writePaths).size > 1, 'naruto command default patch-envelope leases must be per work item, not one shared write path', { sample: writePaths.slice(0, 8), unique: new Set(writePaths).size });
|
|
115
|
-
assertGate(commandGraph.active_waves.some((wave) => wave.write_paths.length > 1), 'naruto command graph must contain a parallel write wave when route-local patch envelopes do not overlap', { waves: commandGraph.active_waves.slice(0, 3) });
|
|
116
|
-
const state = parsed.run?.scheduler?.state || parsed.run?.scheduler || {};
|
|
117
|
-
assertGate(Number(state.completed_count) === Number(parsed.work_graph?.total_work_items || 0) && Number(state.completed_count) >= proofClones, 'all clone work items must complete despite throttling', { completed_count: state.completed_count, total_work_items: parsed.work_graph?.total_work_items, proofClones });
|
|
118
|
-
const explicitConcurrency = spawnSync(process.execPath, [cli, 'naruto', 'run', 'explicit concurrency', '--clones', '6', '--backend', 'fake', '--work-items', '6', '--concurrency', '6', '--json'], { cwd: root, env: childEnv, encoding: 'utf8', timeout: 120000, maxBuffer: 4 * 1024 * 1024 });
|
|
119
|
-
const explicitParsed = parseJson(explicitConcurrency.stdout);
|
|
120
|
-
assertGate(explicitConcurrency.status === 0 && explicitParsed?.target_active_slots === 6, 'explicit --concurrency must let Naruto use the requested parallel slot count', { status: explicitConcurrency.status, target_active_slots: explicitParsed?.target_active_slots });
|
|
121
|
-
// 7) A small request is NOT throttled below what was asked (cap only ever reduces, never inflates).
|
|
122
|
-
const small = spawnSync(process.execPath, [cli, 'naruto', 'run', 'tiny', '--clones', '2', '--backend', 'fake', '--work-items', '2', '--json'], { cwd: root, env: childEnv, encoding: 'utf8', timeout: 120000, maxBuffer: 4 * 1024 * 1024 });
|
|
123
|
-
const smallParsed = parseJson(small.stdout);
|
|
124
|
-
assertGate(small.status === 0 && smallParsed?.target_active_slots === 2, 'a 2-clone run must run 2 concurrently (no over-throttle)', { status: small.status, target_active_slots: smallParsed?.target_active_slots });
|
|
125
|
-
emitGate('naruto:shadow-clone-swarm', {
|
|
126
|
-
max_naruto_agent_count: schema.MAX_NARUTO_AGENT_COUNT,
|
|
127
|
-
standard_ceiling: schema.MAX_AGENT_COUNT,
|
|
128
|
-
default_clamp: defaultSlots,
|
|
129
|
-
naruto_slots_at_100: narutoSlots,
|
|
130
|
-
proof_clones: proofClones,
|
|
131
|
-
proof_concurrency: proofConcurrency,
|
|
132
|
-
target_active_slots: parsed.target_active_slots,
|
|
133
|
-
fake_safe_cap: fakeSafe.cap,
|
|
134
|
-
heavy_safe_cap: heavySafe.cap,
|
|
135
|
-
low_free_capable_cap: lowFreeButCapable.cap,
|
|
136
|
-
cores: heavySafe.cores,
|
|
137
|
-
completed_count: state.completed_count,
|
|
138
|
-
mission_id: parsed.mission_id,
|
|
139
|
-
isolated_worktree_root: isolatedWorktreeRoot
|
|
140
|
-
});
|
|
141
|
-
function parseJson(text) {
|
|
142
|
-
try {
|
|
143
|
-
return JSON.parse(text);
|
|
144
|
-
}
|
|
145
|
-
catch {
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
function tail(value, limit = 2000) {
|
|
150
|
-
const text = String(value || '');
|
|
151
|
-
return text.length <= limit ? text : text.slice(-limit);
|
|
152
|
-
}
|
|
153
|
-
//# sourceMappingURL=naruto-shadow-clone-swarm-check.js.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
|
|
4
|
-
const workGraph = await importDist('core/naruto/naruto-work-graph.js');
|
|
5
|
-
const governorMod = await importDist('core/naruto/naruto-concurrency-governor.js');
|
|
6
|
-
const verificationDag = await importDist('core/naruto/naruto-verification-dag.js');
|
|
7
|
-
const verificationPool = await importDist('core/naruto/naruto-verification-pool.js');
|
|
8
|
-
const graph = workGraph.buildNarutoWorkGraph({ requestedClones: 8, totalWorkItems: 12, writeCapable: true });
|
|
9
|
-
const governor = governorMod.decideNarutoConcurrency({
|
|
10
|
-
requestedClones: 8,
|
|
11
|
-
totalWorkItems: 12,
|
|
12
|
-
backend: 'fake',
|
|
13
|
-
hardware: {
|
|
14
|
-
cores: 4,
|
|
15
|
-
loadAverage: [0, 0, 0],
|
|
16
|
-
remoteApiRateLimitBudget: 8,
|
|
17
|
-
fileDescriptorLimit: 4096,
|
|
18
|
-
processCount: 1,
|
|
19
|
-
zellijPaneCount: 0,
|
|
20
|
-
diskIoPressure: 0,
|
|
21
|
-
freeMemoryBytes: 8 * 1024 * 1024 * 1024,
|
|
22
|
-
totalMemoryBytes: 16 * 1024 * 1024 * 1024
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const dag = verificationDag.buildNarutoVerificationDag(graph, { cwd: root, command: 'node -e "process.exit(0)"' });
|
|
26
|
-
const report = await verificationPool.runNarutoVerificationPool(dag, { ...governor, verification_parallel: 4 }, { cwd: root });
|
|
27
|
-
assertGate(report.ok === true, 'verification pool must pass all fixture shards', report);
|
|
28
|
-
assertGate(report.safe_concurrency === 4, 'verification pool must use its own safe concurrency', report);
|
|
29
|
-
assertGate(report.task_count > 1, 'verification pool must run multiple shards', report);
|
|
30
|
-
assertGate(report.cpu_heavy_cap_respected && report.io_heavy_cap_respected && report.api_rate_cap_respected, 'verification pool must respect resource caps', report);
|
|
31
|
-
emitGate('naruto:verification-pool', {
|
|
32
|
-
task_count: report.task_count,
|
|
33
|
-
safe_concurrency: report.safe_concurrency,
|
|
34
|
-
passed: report.passed
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=naruto-verification-pool-check.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
4
|
-
const workGraph = await importDist('core/naruto/naruto-work-graph.js');
|
|
5
|
-
const graph = workGraph.buildNarutoWorkGraph({
|
|
6
|
-
requestedClones: 24,
|
|
7
|
-
totalWorkItems: 30,
|
|
8
|
-
writeCapable: true,
|
|
9
|
-
targetPaths: Array.from({ length: 30 }, (_, index) => `src/fixture-${index}.ts`),
|
|
10
|
-
maxActiveWorkers: 8
|
|
11
|
-
});
|
|
12
|
-
const validation = workGraph.validateNarutoWorkGraph(graph);
|
|
13
|
-
assertGate(graph.ok === true && validation.ok === true, 'Naruto work graph must validate', { graph_blockers: graph.blockers, validation });
|
|
14
|
-
assertGate(graph.total_work_items >= graph.requested_clones * 2, 'write-capable work graph must create at least 2x requested clone count', { total: graph.total_work_items, requested: graph.requested_clones });
|
|
15
|
-
assertGate(graph.mixed_work_kinds.length > 4, 'work graph must contain mixed work kinds, not only verification', { kinds: graph.mixed_work_kinds });
|
|
16
|
-
assertGate(graph.write_allowed_count > 0, 'write-capable Naruto graph must include write_allowed work items', { write_allowed_count: graph.write_allowed_count });
|
|
17
|
-
assertGate(graph.active_waves.every((wave) => wave.conflict_count === 0), 'active waves must not overlap write leases', { waves: graph.active_waves });
|
|
18
|
-
emitGate('naruto:work-graph', {
|
|
19
|
-
total_work_items: graph.total_work_items,
|
|
20
|
-
mixed_work_kinds: graph.mixed_work_kinds,
|
|
21
|
-
write_allowed_count: graph.write_allowed_count,
|
|
22
|
-
wave_count: graph.active_waves.length
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=naruto-work-graph-check.js.map
|
|
@@ -1,29 +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
|
-
import { makeGitFixture, run } from './lib/git-worktree-fixture.js';
|
|
8
|
-
const managerMod = await importDist('core/git/git-worktree-manager.js');
|
|
9
|
-
const diffMod = await importDist('core/git/git-worktree-diff.js');
|
|
10
|
-
const mergeMod = await importDist('core/git/git-worktree-merge-queue.js');
|
|
11
|
-
const repo = makeGitFixture('naruto-worktree-blackbox');
|
|
12
|
-
process.env.SKS_WORKTREE_ROOT = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-naruto-blackbox-'));
|
|
13
|
-
const allocations = [];
|
|
14
|
-
for (const file of ['a.txt', 'b.txt']) {
|
|
15
|
-
const allocation = await managerMod.allocateWorkerWorktree({ repoRoot: repo, missionId: 'M-naruto-blackbox', workerId: file.replace('.txt', ''), slotId: file.replace('.txt', '') });
|
|
16
|
-
fs.writeFileSync(path.join(allocation.worktree_path, file), `${file}\nworker-change\n`);
|
|
17
|
-
allocations.push(allocation);
|
|
18
|
-
}
|
|
19
|
-
assertGate(run('git', ['status', '--porcelain=v1'], repo).trim() === '', 'main worktree must remain unchanged before integration');
|
|
20
|
-
const diffs = [];
|
|
21
|
-
for (const allocation of allocations) {
|
|
22
|
-
diffs.push(await diffMod.exportGitWorktreeDiff({ mainRepoRoot: repo, worktreePath: allocation.worktree_path, missionId: 'M-naruto-blackbox', workerId: allocation.worker_id }));
|
|
23
|
-
}
|
|
24
|
-
const integration = await managerMod.allocateWorkerWorktree({ repoRoot: repo, missionId: 'M-naruto-blackbox', workerId: 'integration', slotId: 'integration' });
|
|
25
|
-
const report = await mergeMod.applyGitWorktreeMergeQueue({ integrationWorktreePath: integration.worktree_path, diffs });
|
|
26
|
-
assertGate(report.ok === true && report.applied_count === 2, 'integration worktree merge report must apply worker diffs', report);
|
|
27
|
-
assertGate(run('git', ['status', '--porcelain=v1'], repo).trim() === '', 'main worktree must remain unchanged after integration queue');
|
|
28
|
-
emitGate('naruto:worktree-coding:blackbox', { allocations: allocations.length, applied_count: report.applied_count });
|
|
29
|
-
//# sourceMappingURL=naruto-worktree-coding-blackbox.js.map
|
|
@@ -1,44 +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
|
-
import { makeGitFixture, makeNonGitFixture } from './lib/git-worktree-fixture.js';
|
|
8
|
-
const capabilityMod = await importDist('core/git/git-worktree-capability.js');
|
|
9
|
-
const workGraphMod = await importDist('core/naruto/naruto-work-graph.js');
|
|
10
|
-
const activePoolMod = await importDist('core/naruto/naruto-active-pool.js');
|
|
11
|
-
const governorMod = await importDist('core/naruto/naruto-concurrency-governor.js');
|
|
12
|
-
const repo = makeGitFixture('naruto-worktree-coding');
|
|
13
|
-
process.env.SKS_WORKTREE_ROOT = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-naruto-wt-'));
|
|
14
|
-
const capability = await capabilityMod.evaluateGitWorktreeCapability({ root: repo, missionId: 'M-naruto-wt', requireGitWorktree: process.argv.includes('--require-real') });
|
|
15
|
-
const policy = {
|
|
16
|
-
mode: capability.mode,
|
|
17
|
-
required: capability.mode === 'git-worktree',
|
|
18
|
-
main_repo_root: capability.detection.root,
|
|
19
|
-
worktree_root: capability.root_resolution?.root || null,
|
|
20
|
-
fallback_reason: capability.mode === 'git-worktree' ? null : capability.blockers.join(';')
|
|
21
|
-
};
|
|
22
|
-
const graph = workGraphMod.buildNarutoWorkGraph({
|
|
23
|
-
requestedClones: 8,
|
|
24
|
-
totalWorkItems: 12,
|
|
25
|
-
writeCapable: true,
|
|
26
|
-
targetPaths: Array.from({ length: 12 }, (_, index) => `src/wt-${index}.ts`),
|
|
27
|
-
maxActiveWorkers: 4,
|
|
28
|
-
worktreePolicy: policy
|
|
29
|
-
});
|
|
30
|
-
const governor = governorMod.decideNarutoConcurrency({ requestedClones: 8, totalWorkItems: 12, pendingWorkQueueSize: 12, backend: 'fake' });
|
|
31
|
-
const pool = await activePoolMod.runNarutoActivePool({ graph, governor: { ...governor, safe_active_workers: 4 } });
|
|
32
|
-
assertGate(capability.ok === true && capability.mode === 'git-worktree', 'Git Naruto coding fixture must use git-worktree mode', capability);
|
|
33
|
-
assertGate(graph.worktree_policy.mode === 'git-worktree', 'Naruto work graph must carry git-worktree policy', graph.worktree_policy);
|
|
34
|
-
assertGate(graph.work_items.filter((item) => item.write_allowed).every((item) => item.worktree?.allocation_required === true), 'write-capable work items must require worktree allocation', graph.work_items);
|
|
35
|
-
assertGate(pool.worktree_allocation_required_count > 0, 'active pool must plan worktree allocations for write work', pool);
|
|
36
|
-
const nonGit = makeNonGitFixture('naruto-worktree-non-git');
|
|
37
|
-
const nonGitCapability = await capabilityMod.evaluateGitWorktreeCapability({ root: nonGit, missionId: 'M-naruto-non-git' });
|
|
38
|
-
assertGate(nonGitCapability.mode === 'patch-envelope-only' && nonGitCapability.worktree_probe_attempted === false, 'non-Git Naruto must degrade without worktree probe', nonGitCapability);
|
|
39
|
-
emitGate('naruto:worktree-coding', {
|
|
40
|
-
worktree_mode: graph.worktree_policy.mode,
|
|
41
|
-
allocation_required_count: pool.worktree_allocation_required_count,
|
|
42
|
-
non_git_mode: nonGitCapability.mode
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=naruto-worktree-coding-check.js.map
|