sneakoscope 2.0.14 → 2.0.16

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.
Files changed (491) hide show
  1. package/README.md +6 -3
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/crates/sks-core/src/main.rs +1 -1
  5. package/dist/.sks-build-stamp.json +4 -4
  6. package/dist/bin/sks.js +1 -1
  7. package/dist/cli/command-registry.js +2 -1
  8. package/dist/commands/mad-db.js +5 -0
  9. package/dist/commands/zellij-slot-pane.js +3 -1
  10. package/dist/core/agents/agent-orchestrator.js +66 -3
  11. package/dist/core/agents/agent-plan.js +3 -2
  12. package/dist/core/agents/agent-scheduler.js +204 -86
  13. package/dist/core/agents/agent-schema.js +1 -1
  14. package/dist/core/agents/native-cli-session-swarm.js +199 -15
  15. package/dist/core/agents/native-cli-worker.js +85 -0
  16. package/dist/core/agents/parallel-runtime-proof.js +217 -0
  17. package/dist/core/codex-control/codex-task-runner.js +32 -4
  18. package/dist/core/codex-control/model-call-concurrency.js +106 -0
  19. package/dist/core/commands/basic-cli.js +1 -1
  20. package/dist/core/commands/command-suggestions.js +1 -1
  21. package/dist/core/commands/mad-db-command.js +106 -0
  22. package/dist/core/commands/mad-sks-command.js +50 -13
  23. package/dist/core/commands/naruto-command.js +128 -5
  24. package/dist/core/commands/research-command.js +13 -1
  25. package/dist/core/commands/team-command.js +23 -175
  26. package/dist/core/db-safety.js +55 -1
  27. package/dist/core/fsx.js +1 -1
  28. package/dist/core/git/git-worktree-capability.js +18 -0
  29. package/dist/core/git/git-worktree-manager.js +80 -0
  30. package/dist/core/git/git-worktree-pool.js +4 -0
  31. package/dist/core/mad-db/mad-db-capability.js +116 -0
  32. package/dist/core/mad-db/mad-db-ledger.js +31 -0
  33. package/dist/core/mad-db/mad-db-policy-resolver.js +48 -0
  34. package/dist/core/naruto/naruto-concurrency-governor.js +14 -1
  35. package/dist/core/pipeline-internals/runtime-core.js +74 -8
  36. package/dist/core/pipeline-internals/runtime-gates.js +44 -0
  37. package/dist/core/proof/route-proof-gate.js +5 -3
  38. package/dist/core/proof/route-proof-policy.js +9 -1
  39. package/dist/core/release/release-gate-affected-selector.js +113 -0
  40. package/dist/core/release/release-gate-batch-runner.js +67 -0
  41. package/dist/core/release/release-gate-dag.js +22 -3
  42. package/dist/core/release/release-gate-resource-governor.js +23 -11
  43. package/dist/core/research/implementation-blueprint-densifier.js +1 -1
  44. package/dist/core/research/implementation-blueprint-markdown.js +1 -1
  45. package/dist/core/research/implementation-blueprint.js +68 -7
  46. package/dist/core/research/research-final-reviewer.js +27 -1
  47. package/dist/core/research/research-handoff.js +69 -5
  48. package/dist/core/research/research-realistic-report.js +162 -0
  49. package/dist/core/research/research-repetition-detector.js +75 -0
  50. package/dist/core/research/research-report-quality.js +27 -5
  51. package/dist/core/research/research-stage-runner.js +40 -13
  52. package/dist/core/research/research-synthesis-prompt.js +52 -0
  53. package/dist/core/research/research-synthesis-writer.js +208 -0
  54. package/dist/core/research.js +60 -48
  55. package/dist/core/routes.js +23 -19
  56. package/dist/core/update/update-notice.js +120 -0
  57. package/dist/core/version.js +1 -1
  58. package/dist/core/zellij/zellij-dashboard-renderer.js +2 -0
  59. package/dist/core/zellij/zellij-slot-column-anchor.js +35 -1
  60. package/dist/core/zellij/zellij-slot-pane-renderer.js +57 -0
  61. package/dist/core/zellij/zellij-slot-telemetry.js +237 -0
  62. package/dist/scripts/release-gate-dag-runner.js +5 -0
  63. package/dist/scripts/release-speed-summary.js +27 -0
  64. package/package.json +76 -5
  65. package/schemas/agents/parallel-runtime-proof.schema.json +48 -0
  66. package/schemas/mad-db/mad-db-capability.schema.json +31 -0
  67. package/schemas/mad-db/mad-db-ledger.schema.json +14 -0
  68. package/schemas/research/implementation-blueprint.schema.json +6 -1
  69. package/schemas/research/research-final-review.schema.json +10 -0
  70. package/schemas/research/research-synthesis-output.schema.json +62 -0
  71. package/schemas/update/update-notice.schema.json +19 -0
  72. package/schemas/zellij/zellij-slot-telemetry.schema.json +89 -0
  73. package/dist/scripts/agent-ast-aware-work-graph-check.js +0 -25
  74. package/dist/scripts/agent-backfill-replenishment-check.js +0 -13
  75. package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
  76. package/dist/scripts/agent-background-terminals-check.js +0 -16
  77. package/dist/scripts/agent-cleanup-command-ux-check.js +0 -12
  78. package/dist/scripts/agent-cleanup-executor-check.js +0 -53
  79. package/dist/scripts/agent-cleanup-executor-v2-check.js +0 -39
  80. package/dist/scripts/agent-cli-options-to-task-graph-check.js +0 -5
  81. package/dist/scripts/agent-codex-app-cockpit-check.js +0 -91
  82. package/dist/scripts/agent-codex-child-overlap-check.js +0 -21
  83. package/dist/scripts/agent-dynamic-cockpit-check.js +0 -10
  84. package/dist/scripts/agent-dynamic-pool-check.js +0 -13
  85. package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
  86. package/dist/scripts/agent-fast-mode-default-check.js +0 -62
  87. package/dist/scripts/agent-fast-mode-worker-propagation-check.js +0 -7
  88. package/dist/scripts/agent-follow-up-work-schema-check.js +0 -80
  89. package/dist/scripts/agent-goal-mode-propagation-check.js +0 -9
  90. package/dist/scripts/agent-intelligent-work-graph-check.js +0 -25
  91. package/dist/scripts/agent-janitor-check.js +0 -76
  92. package/dist/scripts/agent-main-no-scout-check.js +0 -11
  93. package/dist/scripts/agent-model-authored-patch-envelope-check.js +0 -15
  94. package/dist/scripts/agent-multi-project-isolation-check.js +0 -86
  95. package/dist/scripts/agent-native-cli-session-proof-check.js +0 -7
  96. package/dist/scripts/agent-native-cli-session-swarm-10-check.js +0 -7
  97. package/dist/scripts/agent-native-cli-session-swarm-20-check.js +0 -7
  98. package/dist/scripts/agent-native-cli-session-swarm-check.js +0 -7
  99. package/dist/scripts/agent-no-subagent-scaling-check.js +0 -7
  100. package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
  101. package/dist/scripts/agent-parallel-write-kernel-check.js +0 -103
  102. package/dist/scripts/agent-patch-conflict-rebase-check.js +0 -198
  103. package/dist/scripts/agent-patch-envelope-extraction-check.js +0 -17
  104. package/dist/scripts/agent-patch-proof-check.js +0 -41
  105. package/dist/scripts/agent-patch-proof-runtime-check.js +0 -63
  106. package/dist/scripts/agent-patch-queue-runtime-check.js +0 -36
  107. package/dist/scripts/agent-patch-rollback-check.js +0 -38
  108. package/dist/scripts/agent-patch-rollback-dag-check.js +0 -14
  109. package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
  110. package/dist/scripts/agent-patch-swarm-runtime-check.js +0 -10
  111. package/dist/scripts/agent-patch-swarm-runtime-truth-check.js +0 -76
  112. package/dist/scripts/agent-patch-transaction-journal-check.js +0 -57
  113. package/dist/scripts/agent-patch-verification-dag-check.js +0 -14
  114. package/dist/scripts/agent-proof-contract-reconciled-check.js +0 -5
  115. package/dist/scripts/agent-real-codex-dynamic-smoke-check.js +0 -166
  116. package/dist/scripts/agent-real-codex-dynamic-smoke-v2-check.js +0 -14
  117. package/dist/scripts/agent-real-codex-in-zellij-worker-pane-check.js +0 -229
  118. package/dist/scripts/agent-real-codex-parallel-workers-10-check.js +0 -5
  119. package/dist/scripts/agent-real-codex-parallel-workers-20-check.js +0 -5
  120. package/dist/scripts/agent-real-codex-parallel-workers-5-check.js +0 -5
  121. package/dist/scripts/agent-real-codex-parallel-workers-check.js +0 -5
  122. package/dist/scripts/agent-role-config-repair-check.js +0 -33
  123. package/dist/scripts/agent-rollback-command-check.js +0 -86
  124. package/dist/scripts/agent-route-truth-backfill-check.js +0 -5
  125. package/dist/scripts/agent-scheduler-proof-check.js +0 -13
  126. package/dist/scripts/agent-scheduler-proof-hardening-check.js +0 -22
  127. package/dist/scripts/agent-session-generation-check.js +0 -21
  128. package/dist/scripts/agent-slot-pane-binding-proof-check.js +0 -64
  129. package/dist/scripts/agent-source-intelligence-propagation-check.js +0 -9
  130. package/dist/scripts/agent-strategy-to-lease-wiring-check.js +0 -32
  131. package/dist/scripts/agent-strategy-to-patch-strict-check.js +0 -54
  132. package/dist/scripts/agent-task-graph-expansion-check.js +0 -14
  133. package/dist/scripts/agent-terminal-generations-check.js +0 -23
  134. package/dist/scripts/agent-visual-consistency-check.js +0 -9
  135. package/dist/scripts/agent-wiki-context-proof-check.js +0 -62
  136. package/dist/scripts/agent-worker-backend-router-check.js +0 -63
  137. package/dist/scripts/agent-worker-scout-limited-check.js +0 -17
  138. package/dist/scripts/agent-zellij-dynamic-backfill-panes-check.js +0 -34
  139. package/dist/scripts/agent-zellij-runtime-check.js +0 -84
  140. package/dist/scripts/all-feature-deep-completion-check.js +0 -31
  141. package/dist/scripts/appshots-capability-check.js +0 -18
  142. package/dist/scripts/appshots-evidence-check.js +0 -48
  143. package/dist/scripts/appshots-operator-policy-check.js +0 -25
  144. package/dist/scripts/appshots-privacy-safety-check.js +0 -48
  145. package/dist/scripts/appshots-source-intelligence-check.js +0 -53
  146. package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -87
  147. package/dist/scripts/appshots-triwiki-voxel-check.js +0 -46
  148. package/dist/scripts/architecture-guard-check.js +0 -55
  149. package/dist/scripts/changelog-check.js +0 -47
  150. package/dist/scripts/codex-0-133-official-compat-report.js +0 -53
  151. package/dist/scripts/codex-0-134-official-compat-report.js +0 -110
  152. package/dist/scripts/codex-0-134-runner-truth-check.js +0 -66
  153. package/dist/scripts/codex-0-135-compat-check.js +0 -57
  154. package/dist/scripts/codex-0-136-compat-check.js +0 -30
  155. package/dist/scripts/codex-0-137-compat-check.js +0 -27
  156. package/dist/scripts/codex-app-fast-ui-preservation-check.js +0 -32
  157. package/dist/scripts/codex-app-provider-badge-check.js +0 -37
  158. package/dist/scripts/codex-app-ui-clobber-guard-check.js +0 -22
  159. package/dist/scripts/codex-app-ui-preservation-check.js +0 -96
  160. package/dist/scripts/codex-control-all-pipelines-check.js +0 -36
  161. package/dist/scripts/codex-control-capability-check.js +0 -10
  162. package/dist/scripts/codex-control-empty-result-retry-check.js +0 -43
  163. package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -10
  164. package/dist/scripts/codex-control-keepalive-no-cot-leak-check.js +0 -14
  165. package/dist/scripts/codex-control-no-legacy-fallback-check.js +0 -31
  166. package/dist/scripts/codex-control-side-effect-scope-check.js +0 -26
  167. package/dist/scripts/codex-control-stream-idle-watchdog-check.js +0 -18
  168. package/dist/scripts/codex-control-structured-output-check.js +0 -11
  169. package/dist/scripts/codex-control-thread-registry-check.js +0 -11
  170. package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
  171. package/dist/scripts/codex-environment-scoped-approvals-check.js +0 -10
  172. package/dist/scripts/codex-exec-output-schema-actual-syntax-check.js +0 -33
  173. package/dist/scripts/codex-fast-mode-profile-propagation-check.js +0 -12
  174. package/dist/scripts/codex-history-search-check.js +0 -19
  175. package/dist/scripts/codex-hook-semantic-check.js +0 -15
  176. package/dist/scripts/codex-hook-strict-subset-check.js +0 -61
  177. package/dist/scripts/codex-lb-config-toml-safety-check.js +0 -85
  178. package/dist/scripts/codex-lb-persistence-truth-check.js +0 -96
  179. package/dist/scripts/codex-lb-setup-fixture-check.js +0 -91
  180. package/dist/scripts/codex-lb-setup-truthfulness-check.js +0 -84
  181. package/dist/scripts/codex-legacy-profile-consumers-removed-check.js +0 -24
  182. package/dist/scripts/codex-managed-proxy-env-check.js +0 -17
  183. package/dist/scripts/codex-output-schema-fixture-check.js +0 -25
  184. package/dist/scripts/codex-permission-profiles-check.js +0 -36
  185. package/dist/scripts/codex-plugin-list-json-check.js +0 -8
  186. package/dist/scripts/codex-profile-primary-check.js +0 -13
  187. package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -51
  188. package/dist/scripts/codex-resume-cwd-truth-check.js +0 -17
  189. package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -32
  190. package/dist/scripts/codex-sdk-backend-router-check.js +0 -65
  191. package/dist/scripts/codex-sdk-capability-check.js +0 -11
  192. package/dist/scripts/codex-sdk-core-skill-pipeline-check.js +0 -9
  193. package/dist/scripts/codex-sdk-dfix-pipeline-check.js +0 -9
  194. package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -9
  195. package/dist/scripts/codex-sdk-no-legacy-fallback-check.js +0 -33
  196. package/dist/scripts/codex-sdk-qa-pipeline-check.js +0 -8
  197. package/dist/scripts/codex-sdk-real-smoke-check.js +0 -39
  198. package/dist/scripts/codex-sdk-release-review-pipeline-check.js +0 -13
  199. package/dist/scripts/codex-sdk-research-pipeline-check.js +0 -47
  200. package/dist/scripts/codex-sdk-sandbox-policy-check.js +0 -21
  201. package/dist/scripts/codex-sdk-structured-output-check.js +0 -10
  202. package/dist/scripts/codex-sdk-team-naruto-agent-pipeline-check.js +0 -12
  203. package/dist/scripts/codex-sdk-thread-registry-check.js +0 -11
  204. package/dist/scripts/codex-sdk-ux-ppt-review-pipeline-check.js +0 -9
  205. package/dist/scripts/codex-sdk-zellij-pane-binding-check.js +0 -13
  206. package/dist/scripts/codex-thread-runtime-choice-check.js +0 -10
  207. package/dist/scripts/codex-web-adapter-check.js +0 -12
  208. package/dist/scripts/computer-use-live-evidence-check.js +0 -55
  209. package/dist/scripts/computer-use-live-optional-check.js +0 -32
  210. package/dist/scripts/computer-use-policy-check.js +0 -69
  211. package/dist/scripts/computer-use-visual-route-fixture-check.js +0 -37
  212. package/dist/scripts/core-skill-card-schema-check.js +0 -61
  213. package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -54
  214. package/dist/scripts/core-skill-heldout-validation-check.js +0 -49
  215. package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -75
  216. package/dist/scripts/core-skill-patch-check.js +0 -79
  217. package/dist/scripts/core-skill-promotion-side-effect-ledger-check.js +0 -64
  218. package/dist/scripts/core-skill-rollout-scoring-check.js +0 -72
  219. package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -49
  220. package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
  221. package/dist/scripts/dfix-fast-kernel-check.js +0 -26
  222. package/dist/scripts/dfix-fixture-check.js +0 -6
  223. package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
  224. package/dist/scripts/dfix-patch-handoff-check.js +0 -13
  225. package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
  226. package/dist/scripts/dfix-performance-check.js +0 -15
  227. package/dist/scripts/dfix-verification-check.js +0 -9
  228. package/dist/scripts/dfix-verification-recommendation-check.js +0 -15
  229. package/dist/scripts/docs-truthfulness-check.js +0 -61
  230. package/dist/scripts/doctor-codex-doctor-parity-check.js +0 -17
  231. package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -64
  232. package/dist/scripts/doctor-fix-recovers-corrupted-config-check.js +0 -122
  233. package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -39
  234. package/dist/scripts/evidence-fixture-check.js +0 -26
  235. package/dist/scripts/evidence-flagship-coverage-check.js +0 -55
  236. package/dist/scripts/fake-real-proof-policy-v2-check.js +0 -27
  237. package/dist/scripts/fake-vs-real-proof-policy-check.js +0 -14
  238. package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -42
  239. package/dist/scripts/flagship-proof-graph-v2-check.js +0 -48
  240. package/dist/scripts/flagship-proof-graph-v3-check.js +0 -67
  241. package/dist/scripts/flagship-proof-graph-v4-check.js +0 -61
  242. package/dist/scripts/git-precommit-fixture-check.js +0 -41
  243. package/dist/scripts/git-worktree-cache-performance-check.js +0 -25
  244. package/dist/scripts/git-worktree-capability-check.js +0 -27
  245. package/dist/scripts/git-worktree-checkpoint-check.js +0 -20
  246. package/dist/scripts/git-worktree-cleanup-check.js +0 -27
  247. package/dist/scripts/git-worktree-cross-rebase-check.js +0 -39
  248. package/dist/scripts/git-worktree-diff-envelope-check.js +0 -17
  249. package/dist/scripts/git-worktree-diff-export-check.js +0 -43
  250. package/dist/scripts/git-worktree-dirty-lock-check.js +0 -17
  251. package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -14
  252. package/dist/scripts/git-worktree-integration-primary-check.js +0 -24
  253. package/dist/scripts/git-worktree-integration-primary-runtime-check.js +0 -20
  254. package/dist/scripts/git-worktree-manager-check.js +0 -37
  255. package/dist/scripts/git-worktree-manifest-append-check.js +0 -18
  256. package/dist/scripts/git-worktree-merge-queue-check.js +0 -31
  257. package/dist/scripts/git-worktree-pool-performance-check.js +0 -20
  258. package/dist/scripts/git-worktree-untracked-diff-check.js +0 -18
  259. package/dist/scripts/goal-mode-official-default-check.js +0 -12
  260. package/dist/scripts/gpt-final-arbiter-check.js +0 -63
  261. package/dist/scripts/gpt-final-arbiter-performance-check.js +0 -36
  262. package/dist/scripts/gpt-image-2-request-validator-check.js +0 -35
  263. package/dist/scripts/hooks-0.134-context-parity-check.js +0 -20
  264. package/dist/scripts/hooks-actual-parity-check.js +0 -17
  265. package/dist/scripts/hooks-actual-parity-v2-check.js +0 -21
  266. package/dist/scripts/hooks-latest-schema-check.js +0 -20
  267. package/dist/scripts/hooks-managed-install-fixture-check.js +0 -21
  268. package/dist/scripts/hooks-official-hash-oracle-check.js +0 -35
  269. package/dist/scripts/hooks-official-hash-parity-check.js +0 -17
  270. package/dist/scripts/hooks-subagent-events-check.js +0 -17
  271. package/dist/scripts/hooks-trust-state-check.js +0 -14
  272. package/dist/scripts/image-fidelity-fixture-check.js +0 -24
  273. package/dist/scripts/imagegen-capability-check.js +0 -30
  274. package/dist/scripts/imagegen-real-smoke-check.js +0 -155
  275. package/dist/scripts/install-update-preserves-config-check.js +0 -87
  276. package/dist/scripts/json-schema-recursive-check.js +0 -78
  277. package/dist/scripts/legacy-multiagent-removal-check.js +0 -85
  278. package/dist/scripts/legacy-upgrade-matrix-check.js +0 -300
  279. package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -21
  280. package/dist/scripts/local-collab-gpt-final-availability-check.js +0 -58
  281. package/dist/scripts/local-collab-no-local-only-final-check.js +0 -27
  282. package/dist/scripts/local-collab-policy-check.js +0 -17
  283. package/dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js +0 -63
  284. package/dist/scripts/local-llm-all-pipelines-check.js +0 -11
  285. package/dist/scripts/local-llm-cache-performance-check.js +0 -10
  286. package/dist/scripts/local-llm-capability-check.js +0 -14
  287. package/dist/scripts/local-llm-smoke-check.js +0 -23
  288. package/dist/scripts/local-llm-structured-output-check.js +0 -11
  289. package/dist/scripts/local-llm-throughput-check.js +0 -10
  290. package/dist/scripts/local-llm-tool-call-repair-check.js +0 -10
  291. package/dist/scripts/local-llm-warmup-check.js +0 -11
  292. package/dist/scripts/loop-blocker-check.js +0 -15
  293. package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -35
  294. package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
  295. package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +0 -92
  296. package/dist/scripts/mad-sks-audit-proof-check.js +0 -34
  297. package/dist/scripts/mad-sks-db-executor-check.js +0 -5
  298. package/dist/scripts/mad-sks-executor-proof-graph-check.js +0 -5
  299. package/dist/scripts/mad-sks-fast-mode-propagation-check.js +0 -24
  300. package/dist/scripts/mad-sks-file-write-executor-check.js +0 -5
  301. package/dist/scripts/mad-sks-immutable-harness-check.js +0 -36
  302. package/dist/scripts/mad-sks-no-harness-modification-check.js +0 -25
  303. package/dist/scripts/mad-sks-package-executor-check.js +0 -5
  304. package/dist/scripts/mad-sks-permission-model-check.js +0 -22
  305. package/dist/scripts/mad-sks-rollback-apply-check.js +0 -5
  306. package/dist/scripts/mad-sks-service-executor-check.js +0 -5
  307. package/dist/scripts/mad-sks-shell-executor-check.js +0 -5
  308. package/dist/scripts/mad-sks-write-guard-check.js +0 -28
  309. package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +0 -37
  310. package/dist/scripts/mad-sks-zellij-launch-check.js +0 -102
  311. package/dist/scripts/mcp-0-134-modernization-check.js +0 -55
  312. package/dist/scripts/mcp-readonly-concurrency-check.js +0 -17
  313. package/dist/scripts/mcp-readonly-runtime-scheduler-check.js +0 -20
  314. package/dist/scripts/mcp-tool-naming-parity-check.js +0 -16
  315. package/dist/scripts/memory-summary-rebuild-check.js +0 -22
  316. package/dist/scripts/mutation-callsite-coverage-check.js +0 -180
  317. package/dist/scripts/naruto-active-pool-check.js +0 -39
  318. package/dist/scripts/naruto-actual-worker-control-plane-check.js +0 -56
  319. package/dist/scripts/naruto-allocation-policy-check.js +0 -33
  320. package/dist/scripts/naruto-allocation-runtime-wiring-check.js +0 -92
  321. package/dist/scripts/naruto-concurrency-governor-check.js +0 -53
  322. package/dist/scripts/naruto-extreme-parallelism-check.js +0 -22
  323. package/dist/scripts/naruto-extreme-parallelism-real-check.js +0 -43
  324. package/dist/scripts/naruto-gpt-final-pack-check.js +0 -34
  325. package/dist/scripts/naruto-orchestrator-runtime-source-check.js +0 -70
  326. package/dist/scripts/naruto-parallel-patch-apply-check.js +0 -41
  327. package/dist/scripts/naruto-readonly-routing-check.js +0 -116
  328. package/dist/scripts/naruto-real-active-pool-check.js +0 -39
  329. package/dist/scripts/naruto-real-active-pool-runtime-check.js +0 -55
  330. package/dist/scripts/naruto-rebalance-policy-check.js +0 -41
  331. package/dist/scripts/naruto-role-distribution-check.js +0 -23
  332. package/dist/scripts/naruto-shadow-clone-swarm-check.js +0 -153
  333. package/dist/scripts/naruto-verification-pool-check.js +0 -36
  334. package/dist/scripts/naruto-work-graph-check.js +0 -24
  335. package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
  336. package/dist/scripts/naruto-worktree-coding-check.js +0 -44
  337. package/dist/scripts/naruto-worktree-gpt-final-check.js +0 -45
  338. package/dist/scripts/naruto-worktree-zellij-ui-check.js +0 -28
  339. package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +0 -48
  340. package/dist/scripts/naruto-zellij-massive-ui-check.js +0 -23
  341. package/dist/scripts/non-recursive-pipeline-check.js +0 -68
  342. package/dist/scripts/npm-publish-performance-check.js +0 -65
  343. package/dist/scripts/official-docs-compat-report.js +0 -304
  344. package/dist/scripts/packlist-performance-check.js +0 -83
  345. package/dist/scripts/parallel-verification-engine-check.js +0 -85
  346. package/dist/scripts/postinstall-safe-side-effects-check.js +0 -65
  347. package/dist/scripts/ppt-full-e2e-artifact-graph-check.js +0 -40
  348. package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
  349. package/dist/scripts/ppt-image-voxel-relations-check.js +0 -9
  350. package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
  351. package/dist/scripts/ppt-imagegen-review-fixture-check.js +0 -6
  352. package/dist/scripts/ppt-issue-extraction-fixture-check.js +0 -7
  353. package/dist/scripts/ppt-no-mock-as-real-check.js +0 -8
  354. package/dist/scripts/ppt-no-text-fallback-check.js +0 -7
  355. package/dist/scripts/ppt-proof-trust-fixture-check.js +0 -10
  356. package/dist/scripts/ppt-real-export-adapter-check.js +0 -13
  357. package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -42
  358. package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -16
  359. package/dist/scripts/ppt-reexport-rereview-check.js +0 -19
  360. package/dist/scripts/ppt-slide-export-fixture-check.js +0 -7
  361. package/dist/scripts/prepublish-fast-check.js +0 -128
  362. package/dist/scripts/priority-full-closure-check.js +0 -12
  363. package/dist/scripts/product-design-auto-install-check.js +0 -119
  364. package/dist/scripts/product-design-plugin-routing-check.js +0 -101
  365. package/dist/scripts/prompt-placeholder-guard-check.js +0 -33
  366. package/dist/scripts/provider-badge-context-check.js +0 -26
  367. package/dist/scripts/provider-context-config-toml-check.js +0 -63
  368. package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -47
  369. package/dist/scripts/python-codex-sdk-capability-check.js +0 -75
  370. package/dist/scripts/python-codex-sdk-sandbox-policy-check.js +0 -10
  371. package/dist/scripts/python-codex-sdk-stream-bridge-check.js +0 -12
  372. package/dist/scripts/python-tools-smoke-check.js +0 -71
  373. package/dist/scripts/qa-actual-route-backfill-check.js +0 -5
  374. package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
  375. package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
  376. package/dist/scripts/readme-architecture-imagegen-official-check.js +0 -448
  377. package/dist/scripts/release-cache-glob-hashing-check.js +0 -42
  378. package/dist/scripts/release-dag-full-coverage-check.js +0 -66
  379. package/dist/scripts/release-dist-freshness-check.js +0 -8
  380. package/dist/scripts/release-dynamic-performance-check.js +0 -103
  381. package/dist/scripts/release-gate-budget-check.js +0 -36
  382. package/dist/scripts/release-gate-dag-runner-check.js +0 -17
  383. package/dist/scripts/release-metadata-1-11-check.js +0 -37
  384. package/dist/scripts/release-metadata-1-12-check.js +0 -48
  385. package/dist/scripts/release-metadata-1-13-check.js +0 -53
  386. package/dist/scripts/release-metadata-1-14-check.js +0 -63
  387. package/dist/scripts/release-metadata-1-16-check.js +0 -81
  388. package/dist/scripts/release-metadata-1-17-check.js +0 -51
  389. package/dist/scripts/release-metadata-1-19-check.js +0 -371
  390. package/dist/scripts/release-metadata-check.js +0 -7
  391. package/dist/scripts/release-native-agent-fixture-check.js +0 -41
  392. package/dist/scripts/release-parallel-check.js +0 -374
  393. package/dist/scripts/release-parallel-full-coverage-check.js +0 -13
  394. package/dist/scripts/release-parallel-speed-budget-check.js +0 -84
  395. package/dist/scripts/release-provenance-check.js +0 -150
  396. package/dist/scripts/release-real-check.js +0 -330
  397. package/dist/scripts/release-registry-check.js +0 -344
  398. package/dist/scripts/release-runtime-truth-matrix-check.js +0 -47
  399. package/dist/scripts/release-stability-report-check.js +0 -99
  400. package/dist/scripts/release-version-truth-check.js +0 -134
  401. package/dist/scripts/research-actual-route-backfill-check.js +0 -5
  402. package/dist/scripts/research-backfill-route-blackbox.js +0 -5
  403. package/dist/scripts/research-blueprint-densifier-check.js +0 -21
  404. package/dist/scripts/research-claim-builder-check.js +0 -19
  405. package/dist/scripts/research-complete-package-fixture-check.js +0 -23
  406. package/dist/scripts/research-final-reviewer-blackbox.js +0 -22
  407. package/dist/scripts/research-parallel-source-shards-check.js +0 -22
  408. package/dist/scripts/research-quality-gate-check.js +0 -111
  409. package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +0 -14
  410. package/dist/scripts/research-short-report-rejection-check.js +0 -46
  411. package/dist/scripts/research-source-ledger-merge-check.js +0 -26
  412. package/dist/scripts/research-stage-cycle-runtime-blackbox.js +0 -24
  413. package/dist/scripts/responses-retry-policy-centralized-check.js +0 -19
  414. package/dist/scripts/retention-cleanup-safety-check.js +0 -155
  415. package/dist/scripts/route-blackbox-realism-check.js +0 -21
  416. package/dist/scripts/route-proof-artifact-structure-check.js +0 -145
  417. package/dist/scripts/runtime-dist-parity-check.js +0 -78
  418. package/dist/scripts/runtime-no-mjs-scripts-check.js +0 -45
  419. package/dist/scripts/runtime-no-src-mjs-check.js +0 -32
  420. package/dist/scripts/runtime-no-tmux-check.js +0 -113
  421. package/dist/scripts/runtime-ts-python-boundary-check.js +0 -59
  422. package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -74
  423. package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -55
  424. package/dist/scripts/safety-check.js +0 -23
  425. package/dist/scripts/shared-memory-fixture-check.js +0 -27
  426. package/dist/scripts/side-effect-runtime-report-check.js +0 -19
  427. package/dist/scripts/side-effect-zero-gate-check.js +0 -226
  428. package/dist/scripts/sks-1-11-fixture-check.js +0 -130
  429. package/dist/scripts/source-intelligence-all-modes-check.js +0 -32
  430. package/dist/scripts/source-intelligence-policy-check.js +0 -13
  431. package/dist/scripts/strategy-adhd-orchestrating-gate-check.js +0 -22
  432. package/dist/scripts/strategy-file-ownership-plan-check.js +0 -18
  433. package/dist/scripts/strategy-parallel-modification-plan-check.js +0 -19
  434. package/dist/scripts/strategy-verification-rollback-dag-check.js +0 -19
  435. package/dist/scripts/team-actual-route-backfill-check.js +0 -5
  436. package/dist/scripts/team-backfill-route-blackbox.js +0 -5
  437. package/dist/scripts/team-parallel-write-blackbox.js +0 -55
  438. package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
  439. package/dist/scripts/terminal-keyboard-enhancement-safety-check.js +0 -12
  440. package/dist/scripts/terminal-tui-output-stability-check.js +0 -35
  441. package/dist/scripts/test-no-orphan-dist-imports-check.js +0 -73
  442. package/dist/scripts/trust-fixture-check.js +0 -33
  443. package/dist/scripts/typescript-migration-report.js +0 -78
  444. package/dist/scripts/ultra-router-auto-router-check.js +0 -33
  445. package/dist/scripts/ultra-router-classification-check.js +0 -28
  446. package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
  447. package/dist/scripts/ux-ppt-structured-extraction-check.js +0 -21
  448. package/dist/scripts/ux-review-extract-real-callouts-fixture-check.js +0 -8
  449. package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -15
  450. package/dist/scripts/ux-review-generate-callouts-fixture-check.js +0 -9
  451. package/dist/scripts/ux-review-image-voxel-relations-check.js +0 -31
  452. package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
  453. package/dist/scripts/ux-review-no-fake-callouts-check.js +0 -8
  454. package/dist/scripts/ux-review-no-text-fallback-check.js +0 -25
  455. package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -20
  456. package/dist/scripts/ux-review-patch-handoff-fixture-check.js +0 -8
  457. package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -31
  458. package/dist/scripts/ux-review-real-loop-fixture-check.js +0 -24
  459. package/dist/scripts/ux-review-recapture-recheck-fixture-check.js +0 -8
  460. package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -11
  461. package/dist/scripts/worker-pane-communication-contract-check.js +0 -54
  462. package/dist/scripts/wrongness-fixture-check.js +0 -65
  463. package/dist/scripts/xai-mcp-capability-check.js +0 -14
  464. package/dist/scripts/zellij-capability-check.js +0 -15
  465. package/dist/scripts/zellij-dashboard-pane-check.js +0 -70
  466. package/dist/scripts/zellij-developer-controls-check.js +0 -20
  467. package/dist/scripts/zellij-doctor-readiness-check.js +0 -63
  468. package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -21
  469. package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
  470. package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -356
  471. package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
  472. package/dist/scripts/zellij-lane-renderer-check.js +0 -65
  473. package/dist/scripts/zellij-launch-command-truth-check.js +0 -75
  474. package/dist/scripts/zellij-layout-valid-check.js +0 -90
  475. package/dist/scripts/zellij-pane-proof-check.js +0 -59
  476. package/dist/scripts/zellij-real-session-cleanup-check.js +0 -21
  477. package/dist/scripts/zellij-real-session-heartbeat-check.js +0 -49
  478. package/dist/scripts/zellij-real-session-launch-check.js +0 -57
  479. package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -22
  480. package/dist/scripts/zellij-right-column-manager-check.js +0 -27
  481. package/dist/scripts/zellij-screen-proof-check.js +0 -45
  482. package/dist/scripts/zellij-slot-column-anchor-check.js +0 -66
  483. package/dist/scripts/zellij-slot-only-ui-check.js +0 -26
  484. package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -106
  485. package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -59
  486. package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -40
  487. package/dist/scripts/zellij-ui-design-check.js +0 -105
  488. package/dist/scripts/zellij-worker-pane-manager-check.js +0 -109
  489. package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
  490. package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
  491. package/dist/scripts/zellij-worker-pane-spawn-order-check.js +0 -35
@@ -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
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
4
- const workGraphMod = await importDist('core/naruto/naruto-work-graph.js');
5
- const rolesMod = await importDist('core/naruto/naruto-role-policy.js');
6
- const packMod = await importDist('core/naruto/naruto-gpt-final-pack.js');
7
- const policy = {
8
- mode: 'git-worktree',
9
- required: true,
10
- main_repo_root: '/repo',
11
- worktree_root: '/cache/sks/worktrees/repo/M-final',
12
- fallback_reason: null
13
- };
14
- const graph = workGraphMod.buildNarutoWorkGraph({ requestedClones: 6, totalWorkItems: 8, writeCapable: true, worktreePolicy: policy });
15
- const roleDistribution = rolesMod.buildNarutoRoleDistribution(graph.work_items);
16
- const worktreeDiff = {
17
- schema: 'sks.git-worktree-diff.v1',
18
- ok: true,
19
- mission_id: 'M-final',
20
- worker_id: 'worker-1',
21
- main_repo_root: '/repo',
22
- worktree_path: '/cache/wt/worker-1',
23
- branch: 'sks/M/worker-1',
24
- changed_files: ['src/a.ts'],
25
- diff: 'diff --git a/src/a.ts b/src/a.ts\n',
26
- diff_bytes: 37
27
- };
28
- const pack = packMod.buildNarutoGptFinalPack({
29
- missionId: 'M-final',
30
- graph,
31
- roleDistribution,
32
- changedFiles: ['src/a.ts'],
33
- worktreePolicy: policy,
34
- worktreeDiffs: [worktreeDiff],
35
- localLlmMetrics: { participated: true, final_status: 'draft_until_gpt_final' }
36
- });
37
- assertGate(pack.worktree_policy.mode === 'git-worktree', 'GPT final pack must include worktree policy', pack.worktree_policy);
38
- assertGate(pack.worktree_diffs.length === 1, 'GPT final pack must include bounded worktree diffs', pack);
39
- assertGate(pack.local_llm_metrics.final_status === 'draft_until_gpt_final', 'local LLM output must remain draft until GPT final', pack.local_llm_metrics);
40
- assertGate(pack.bounded === true && pack.secrets_redacted === true, 'GPT final pack must stay bounded/redacted', pack);
41
- emitGate('naruto:worktree-gpt-final', {
42
- worktree_mode: pack.worktree_policy.mode,
43
- worktree_diffs: pack.worktree_diffs.length
44
- });
45
- //# sourceMappingURL=naruto-worktree-gpt-final-check.js.map
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
4
- const dashboardMod = await importDist('core/zellij/zellij-naruto-dashboard.js');
5
- const plan = dashboardMod.planNarutoZellijDashboard({
6
- targetActiveWorkers: 10,
7
- visiblePaneCap: 6,
8
- roles: ['implementer', 'verifier'],
9
- backend: 'codex-sdk',
10
- worktreePolicy: {
11
- mode: 'git-worktree',
12
- required: true,
13
- main_repo_root: '/repo',
14
- worktree_root: '/cache/sks/worktrees/repo/M',
15
- fallback_reason: null
16
- }
17
- });
18
- assertGate(plan.ok === true, 'Naruto worktree Zellij dashboard must pass', plan);
19
- assertGate(plan.worktree_mode === 'git-worktree', 'dashboard must carry worktree mode', plan);
20
- assertGate(plan.worktree_labels.length === plan.visible_worker_panes, 'visible panes must have worktree labels', plan);
21
- assertGate(plan.pane_titles.every((title) => title.includes('WT:') && title.includes('branch:')), 'pane titles must include worktree id and branch', plan.pane_titles);
22
- assertGate(plan.headless_workers === 4, 'dashboard must still expose headless worker count', plan);
23
- emitGate('naruto:worktree-zellij-ui', {
24
- visible_worker_panes: plan.visible_worker_panes,
25
- headless_workers: plan.headless_workers,
26
- sample_title: plan.pane_titles[0]
27
- });
28
- //# sourceMappingURL=naruto-worktree-zellij-ui-check.js.map
@@ -1,48 +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, root } from './sks-1-18-gate-lib.js';
7
- const requireReal = process.argv.includes('--require-real') || process.env.SKS_REQUIRE_ZELLIJ === '1';
8
- const naruto = fs.readFileSync(path.join(root, 'src/core/commands/naruto-command.ts'), 'utf8');
9
- const worker = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-worker-pane-manager.ts'), 'utf8');
10
- const swarm = fs.readFileSync(path.join(root, 'src/core/agents/native-cli-session-swarm.ts'), 'utf8');
11
- const realGeometryProof = requireReal ? runRealGeometryProof() : null;
12
- const report = {
13
- schema: 'sks.naruto-zellij-dynamic-right-column-check.v1',
14
- ok: true,
15
- require_real: requireReal,
16
- initial_main_only: /slotCount:\s*0/.test(naruto),
17
- passes_session_name: naruto.includes('zellijSessionName: liveZellij?.session_name'),
18
- passes_worker_placement: naruto.includes("workerPlacement: parsed.json || parsed.noOpenZellij ? 'process' : 'zellij-pane'"),
19
- passes_visible_cap: naruto.includes('zellijVisiblePaneCap: zellijVisiblePanes'),
20
- worker_uses_right_column: worker.includes("rightColumnMode: 'spawn-on-first-worker'") || swarm.includes("rightColumnMode: 'spawn-on-first-worker'"),
21
- real_geometry_proof: realGeometryProof
22
- };
23
- report.ok = report.initial_main_only
24
- && report.passes_session_name
25
- && report.passes_worker_placement
26
- && report.passes_visible_cap
27
- && report.worker_uses_right_column
28
- && (!requireReal || realGeometryProof?.ok === true);
29
- assertGate(report.ok, 'Naruto must use dynamic right-column worker panes in interactive mode', report);
30
- emitGate('naruto:zellij-dynamic-right-column', report);
31
- function runRealGeometryProof() {
32
- const res = spawnSync('npm', ['run', 'zellij:right-column-real-geometry', '--silent', '--', '--require-real'], {
33
- cwd: root,
34
- env: { ...process.env, SKS_REQUIRE_ZELLIJ: '1' },
35
- encoding: 'utf8',
36
- maxBuffer: 20 * 1024 * 1024
37
- });
38
- return {
39
- ok: res.status === 0,
40
- exit_code: res.status,
41
- stdout_tail: tail(res.stdout),
42
- stderr_tail: tail(res.stderr)
43
- };
44
- }
45
- function tail(text) {
46
- return String(text || '').split('\n').slice(-30).join('\n');
47
- }
48
- //# sourceMappingURL=naruto-zellij-dynamic-right-column-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 dashboardMod = await importDist('core/zellij/zellij-naruto-dashboard.js');
5
- const plan = dashboardMod.planNarutoZellijDashboard({
6
- targetActiveWorkers: 32,
7
- visiblePaneCap: 12,
8
- completed: 8,
9
- failed: 1,
10
- backpressure: 'normal',
11
- roles: ['implementer', 'modifier', 'test_writer', 'verifier'],
12
- backend: 'codex-sdk'
13
- });
14
- assertGate(plan.ok === true, 'Naruto Zellij dashboard plan must pass', plan);
15
- assertGate(plan.visible_worker_panes === 12, 'targetActiveWorkers=32 and visiblePaneCap=12 must create 12 visible panes', plan);
16
- assertGate(plan.headless_workers === 20, 'remaining active workers must be listed as headless', plan);
17
- assertGate(plan.pane_titles.every((title) => /slot-\d+\/gen-1 · .+ · codex-sdk · active/.test(title)), 'pane titles must include slot/gen/role/backend/status', plan);
18
- emitGate('naruto:zellij-massive-ui', {
19
- visible_worker_panes: plan.visible_worker_panes,
20
- headless_workers: plan.headless_workers,
21
- dashboard: plan.dashboard
22
- });
23
- //# sourceMappingURL=naruto-zellij-massive-ui-check.js.map
@@ -1,68 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import fs from 'node:fs';
4
- import path from 'node:path';
5
- import { fileURLToPath } from 'node:url';
6
- import { nonRecursivePipelineMarkdown, scanNonRecursivePipelinePolicy } from '../core/agents/agent-recursion-guard.js';
7
- const scriptDir = path.dirname(fileURLToPath(import.meta.url));
8
- const defaultRoot = path.resolve(scriptDir, '..');
9
- const args = process.argv.slice(2);
10
- const root = path.resolve(readFlag('--root') || defaultRoot);
11
- const json = args.includes('--json');
12
- const noWrite = args.includes('--no-write');
13
- const outputDir = path.join(root, '.sneakoscope', 'reports');
14
- const report = scanNonRecursivePipelinePolicy(collectScanRecords(root));
15
- if (!noWrite) {
16
- fs.mkdirSync(outputDir, { recursive: true });
17
- fs.writeFileSync(path.join(outputDir, 'non-recursive-pipeline-report.json'), `${JSON.stringify(report, null, 2)}\n`);
18
- fs.writeFileSync(path.join(outputDir, 'non-recursive-pipeline-report.md'), nonRecursivePipelineMarkdown(report));
19
- }
20
- if (json)
21
- console.log(JSON.stringify(report, null, 2));
22
- else
23
- console.log(`non-recursive-pipeline: ${report.ok ? 'pass' : 'blocked'} (${report.violations.length} violation(s), ${report.scanned_records.length} record(s), ${report.elapsed_ms}ms)`);
24
- if (!report.ok || !report.performance_ok || !report.secret_redaction_ok)
25
- process.exitCode = 1;
26
- function readFlag(name) {
27
- const idx = args.indexOf(name);
28
- return idx >= 0 ? args[idx + 1] : null;
29
- }
30
- function collectScanRecords(scanRoot) {
31
- const candidates = [
32
- ['src/core/agents/agent-worker-pipeline.ts', 'source'],
33
- ['src/core/agents/agent-recursion-guard.ts', 'source'],
34
- ['src/core/agents/agent-runner-process.ts', 'source'],
35
- ['src/core/agents/agent-runner-codex-exec.ts', 'source'],
36
- ['docs/agent-non-recursive-pipeline.md', 'docs'],
37
- ['docs/native-agent-kernel.md', 'docs']
38
- ];
39
- const records = [];
40
- for (const [rel, channel] of candidates) {
41
- const full = path.join(scanRoot, rel);
42
- if (!fs.existsSync(full) || !fs.statSync(full).isFile())
43
- continue;
44
- records.push({ path: rel, channel, text: fs.readFileSync(full, 'utf8') });
45
- }
46
- records.push({
47
- path: '.sneakoscope/reports/agent-worker.stdout.fixture.txt',
48
- channel: 'stdout',
49
- text: 'agent worker completed local slice; no nested route requested'
50
- });
51
- records.push({
52
- path: '.sneakoscope/reports/agent-worker.stderr.fixture.txt',
53
- channel: 'stderr',
54
- text: 'agent worker stderr clean; no recursive SKS command emitted'
55
- });
56
- records.push({
57
- path: '.sneakoscope/reports/agent-result.fixture.json',
58
- channel: 'agent_result',
59
- text: JSON.stringify({
60
- schema: 'sks.agent-result.v1',
61
- status: 'done',
62
- recursion_guard: { ok: true, violations: [] },
63
- blockers: []
64
- })
65
- });
66
- return records;
67
- }
68
- //# sourceMappingURL=non-recursive-pipeline-check.js.map
@@ -1,65 +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, root } from './sks-1-18-gate-lib.js';
7
- const MAX_FILES = Number(process.env.SKS_MAX_PACK_FILES || 1200);
8
- const MAX_PACKED = Number(process.env.SKS_MAX_PACK_BYTES || 1536 * 1024);
9
- const BUDGET_MS = Number(process.env.SKS_PACK_BUDGET_MS || 30000);
10
- function runNpmPack() {
11
- const npmCli = process.env.npm_execpath; // set when invoked via `npm run`
12
- const argv = ['pack', '--dry-run', '--json', '--ignore-scripts'];
13
- const res = npmCli
14
- ? spawnSync(process.execPath, [npmCli, ...argv], { cwd: root, encoding: 'utf8', maxBuffer: 32 * 1024 * 1024 })
15
- : spawnSync('npm', argv, { cwd: root, encoding: 'utf8', maxBuffer: 32 * 1024 * 1024 });
16
- return res;
17
- }
18
- function writeReport(report) {
19
- const out = path.join(root, '.sneakoscope', 'reports', 'npm-publish-performance.json');
20
- fs.mkdirSync(path.dirname(out), { recursive: true });
21
- fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
22
- }
23
- const t0 = Date.now();
24
- const res = runNpmPack();
25
- const packMs = Date.now() - t0;
26
- let info;
27
- if (res.status === 0) {
28
- try {
29
- const parsed = JSON.parse(res.stdout);
30
- info = Array.isArray(parsed) ? parsed[0] : parsed;
31
- }
32
- catch {
33
- info = undefined;
34
- }
35
- }
36
- if (!info) {
37
- // Real-check gate: never fail when npm is unreachable / pack unavailable.
38
- const report = { ok: true, integration_optional: true, reason: 'npm_pack_unavailable' };
39
- writeReport(report);
40
- emitGate('publish:dry-run-performance', { integration_optional: true });
41
- process.exit(0);
42
- }
43
- const report = {
44
- schema: 'sks.npm-publish-performance.v1',
45
- ok: info.entryCount <= MAX_FILES && info.size <= MAX_PACKED,
46
- pack_ms: packMs,
47
- slowest_phase: 'pack',
48
- file_count: info.entryCount,
49
- packed_bytes: info.size,
50
- unpacked_bytes: info.unpackedSize,
51
- over_budget: packMs > BUDGET_MS,
52
- warnings: packMs > BUDGET_MS ? ['pack_slower_than_budget'] : [],
53
- blockers: [
54
- ...(info.entryCount > MAX_FILES ? ['pack_file_count_over_limit'] : []),
55
- ...(info.size > MAX_PACKED ? ['pack_size_over_limit'] : [])
56
- ]
57
- };
58
- writeReport(report);
59
- if (report.blockers.length) {
60
- assertGate(false, 'npm_publish_performance_blockers', { blockers: report.blockers, report });
61
- }
62
- // A slow pack is a WARNING only, not a blocker.
63
- console.log(JSON.stringify(report, null, 2));
64
- process.exit(0);
65
- //# sourceMappingURL=npm-publish-performance-check.js.map