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.
Files changed (504) 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 +1 -0
  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 +11 -4
  11. package/dist/core/agents/agent-output-validator.js +1 -1
  12. package/dist/core/agents/agent-plan.js +3 -2
  13. package/dist/core/agents/native-cli-session-swarm.js +118 -0
  14. package/dist/core/agents/native-cli-worker.js +85 -0
  15. package/dist/core/codex-control/codex-fake-sdk-adapter.js +3 -3
  16. package/dist/core/codex-control/gpt-final-review-schema.js +61 -14
  17. package/dist/core/commands/basic-cli.js +1 -1
  18. package/dist/core/commands/command-suggestions.js +1 -1
  19. package/dist/core/commands/mad-db-command.js +106 -0
  20. package/dist/core/commands/mad-sks-command.js +50 -13
  21. package/dist/core/commands/naruto-command.js +82 -1
  22. package/dist/core/commands/research-command.js +83 -17
  23. package/dist/core/commands/team-command.js +25 -1
  24. package/dist/core/db-safety.js +26 -0
  25. package/dist/core/fsx.js +1 -1
  26. package/dist/core/mad-db/mad-db-capability.js +84 -0
  27. package/dist/core/mad-db/mad-db-ledger.js +17 -0
  28. package/dist/core/mad-db/mad-db-policy-resolver.js +46 -0
  29. package/dist/core/naruto/naruto-real-worker-child.js +11 -3
  30. package/dist/core/naruto/naruto-real-worker-runtime.js +4 -0
  31. package/dist/core/pipeline/final-gpt-patch-stage.js +20 -3
  32. package/dist/core/pipeline-internals/runtime-core.js +74 -8
  33. package/dist/core/pipeline-internals/runtime-gates.js +44 -0
  34. package/dist/core/proof/route-proof-gate.js +5 -3
  35. package/dist/core/proof/route-proof-policy.js +9 -1
  36. package/dist/core/release/release-gate-affected-selector.js +113 -0
  37. package/dist/core/release/release-gate-batch-runner.js +67 -0
  38. package/dist/core/release/release-gate-dag.js +22 -3
  39. package/dist/core/release/release-gate-resource-governor.js +23 -11
  40. package/dist/core/research/implementation-blueprint-densifier.js +124 -0
  41. package/dist/core/research/implementation-blueprint-markdown.js +1 -1
  42. package/dist/core/research/implementation-blueprint.js +68 -7
  43. package/dist/core/research/research-claim-builder.js +114 -0
  44. package/dist/core/research/research-cycle-runner.js +115 -11
  45. package/dist/core/research/research-final-reviewer.js +181 -1
  46. package/dist/core/research/research-handoff.js +69 -5
  47. package/dist/core/research/research-realistic-report.js +162 -0
  48. package/dist/core/research/research-repetition-detector.js +75 -0
  49. package/dist/core/research/research-report-quality.js +27 -5
  50. package/dist/core/research/research-source-ledger-merge.js +186 -0
  51. package/dist/core/research/research-source-shards.js +176 -0
  52. package/dist/core/research/research-stage-runner.js +537 -11
  53. package/dist/core/research/research-synthesis-prompt.js +52 -0
  54. package/dist/core/research/research-synthesis-writer.js +208 -0
  55. package/dist/core/research/research-work-graph.js +114 -23
  56. package/dist/core/research.js +72 -48
  57. package/dist/core/routes.js +23 -19
  58. package/dist/core/update/update-notice.js +120 -0
  59. package/dist/core/version.js +1 -1
  60. package/dist/core/zellij/zellij-dashboard-renderer.js +2 -0
  61. package/dist/core/zellij/zellij-slot-column-anchor.js +35 -1
  62. package/dist/core/zellij/zellij-slot-pane-renderer.js +57 -0
  63. package/dist/core/zellij/zellij-slot-telemetry.js +182 -0
  64. package/dist/scripts/release-gate-dag-runner.js +5 -0
  65. package/dist/scripts/release-speed-summary.js +25 -0
  66. package/package.json +67 -5
  67. package/schemas/codex/agent-result.schema.json +1 -1
  68. package/schemas/mad-db/mad-db-capability.schema.json +31 -0
  69. package/schemas/mad-db/mad-db-ledger.schema.json +14 -0
  70. package/schemas/research/implementation-blueprint.schema.json +6 -1
  71. package/schemas/research/research-final-review.schema.json +10 -0
  72. package/schemas/research/research-source-shard.schema.json +46 -0
  73. package/schemas/research/research-synthesis-output.schema.json +62 -0
  74. package/schemas/update/update-notice.schema.json +19 -0
  75. package/schemas/zellij/zellij-slot-telemetry.schema.json +89 -0
  76. package/dist/build-manifest.json +0 -1184
  77. package/dist/scripts/agent-ast-aware-work-graph-check.js +0 -25
  78. package/dist/scripts/agent-backfill-replenishment-check.js +0 -13
  79. package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
  80. package/dist/scripts/agent-background-terminals-check.js +0 -16
  81. package/dist/scripts/agent-cleanup-command-ux-check.js +0 -12
  82. package/dist/scripts/agent-cleanup-executor-check.js +0 -53
  83. package/dist/scripts/agent-cleanup-executor-v2-check.js +0 -39
  84. package/dist/scripts/agent-cli-options-to-task-graph-check.js +0 -5
  85. package/dist/scripts/agent-codex-app-cockpit-check.js +0 -91
  86. package/dist/scripts/agent-codex-child-overlap-check.js +0 -21
  87. package/dist/scripts/agent-dynamic-cockpit-check.js +0 -10
  88. package/dist/scripts/agent-dynamic-pool-check.js +0 -13
  89. package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
  90. package/dist/scripts/agent-fast-mode-default-check.js +0 -62
  91. package/dist/scripts/agent-fast-mode-worker-propagation-check.js +0 -7
  92. package/dist/scripts/agent-follow-up-work-schema-check.js +0 -80
  93. package/dist/scripts/agent-goal-mode-propagation-check.js +0 -9
  94. package/dist/scripts/agent-intelligent-work-graph-check.js +0 -25
  95. package/dist/scripts/agent-janitor-check.js +0 -76
  96. package/dist/scripts/agent-main-no-scout-check.js +0 -11
  97. package/dist/scripts/agent-model-authored-patch-envelope-check.js +0 -15
  98. package/dist/scripts/agent-multi-project-isolation-check.js +0 -86
  99. package/dist/scripts/agent-native-cli-session-proof-check.js +0 -7
  100. package/dist/scripts/agent-native-cli-session-swarm-10-check.js +0 -7
  101. package/dist/scripts/agent-native-cli-session-swarm-20-check.js +0 -7
  102. package/dist/scripts/agent-native-cli-session-swarm-check.js +0 -7
  103. package/dist/scripts/agent-no-subagent-scaling-check.js +0 -7
  104. package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
  105. package/dist/scripts/agent-parallel-write-kernel-check.js +0 -103
  106. package/dist/scripts/agent-patch-conflict-rebase-check.js +0 -198
  107. package/dist/scripts/agent-patch-envelope-extraction-check.js +0 -17
  108. package/dist/scripts/agent-patch-proof-check.js +0 -41
  109. package/dist/scripts/agent-patch-proof-runtime-check.js +0 -63
  110. package/dist/scripts/agent-patch-queue-runtime-check.js +0 -36
  111. package/dist/scripts/agent-patch-rollback-check.js +0 -38
  112. package/dist/scripts/agent-patch-rollback-dag-check.js +0 -14
  113. package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
  114. package/dist/scripts/agent-patch-swarm-runtime-check.js +0 -10
  115. package/dist/scripts/agent-patch-swarm-runtime-truth-check.js +0 -76
  116. package/dist/scripts/agent-patch-transaction-journal-check.js +0 -57
  117. package/dist/scripts/agent-patch-verification-dag-check.js +0 -14
  118. package/dist/scripts/agent-proof-contract-reconciled-check.js +0 -5
  119. package/dist/scripts/agent-real-codex-dynamic-smoke-check.js +0 -166
  120. package/dist/scripts/agent-real-codex-dynamic-smoke-v2-check.js +0 -14
  121. package/dist/scripts/agent-real-codex-in-zellij-worker-pane-check.js +0 -229
  122. package/dist/scripts/agent-real-codex-parallel-workers-10-check.js +0 -5
  123. package/dist/scripts/agent-real-codex-parallel-workers-20-check.js +0 -5
  124. package/dist/scripts/agent-real-codex-parallel-workers-5-check.js +0 -5
  125. package/dist/scripts/agent-real-codex-parallel-workers-check.js +0 -5
  126. package/dist/scripts/agent-role-config-repair-check.js +0 -33
  127. package/dist/scripts/agent-rollback-command-check.js +0 -86
  128. package/dist/scripts/agent-route-truth-backfill-check.js +0 -5
  129. package/dist/scripts/agent-scheduler-proof-check.js +0 -13
  130. package/dist/scripts/agent-scheduler-proof-hardening-check.js +0 -22
  131. package/dist/scripts/agent-session-generation-check.js +0 -21
  132. package/dist/scripts/agent-slot-pane-binding-proof-check.js +0 -64
  133. package/dist/scripts/agent-source-intelligence-propagation-check.js +0 -9
  134. package/dist/scripts/agent-strategy-to-lease-wiring-check.js +0 -32
  135. package/dist/scripts/agent-strategy-to-patch-strict-check.js +0 -54
  136. package/dist/scripts/agent-task-graph-expansion-check.js +0 -14
  137. package/dist/scripts/agent-terminal-generations-check.js +0 -23
  138. package/dist/scripts/agent-visual-consistency-check.js +0 -9
  139. package/dist/scripts/agent-wiki-context-proof-check.js +0 -62
  140. package/dist/scripts/agent-worker-backend-router-check.js +0 -63
  141. package/dist/scripts/agent-worker-scout-limited-check.js +0 -17
  142. package/dist/scripts/agent-zellij-dynamic-backfill-panes-check.js +0 -34
  143. package/dist/scripts/agent-zellij-runtime-check.js +0 -84
  144. package/dist/scripts/all-feature-deep-completion-check.js +0 -31
  145. package/dist/scripts/appshots-capability-check.js +0 -18
  146. package/dist/scripts/appshots-evidence-check.js +0 -48
  147. package/dist/scripts/appshots-operator-policy-check.js +0 -25
  148. package/dist/scripts/appshots-privacy-safety-check.js +0 -48
  149. package/dist/scripts/appshots-source-intelligence-check.js +0 -53
  150. package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -87
  151. package/dist/scripts/appshots-triwiki-voxel-check.js +0 -46
  152. package/dist/scripts/architecture-guard-check.js +0 -55
  153. package/dist/scripts/changelog-check.js +0 -47
  154. package/dist/scripts/codex-0-133-official-compat-report.js +0 -53
  155. package/dist/scripts/codex-0-134-official-compat-report.js +0 -110
  156. package/dist/scripts/codex-0-134-runner-truth-check.js +0 -66
  157. package/dist/scripts/codex-0-135-compat-check.js +0 -57
  158. package/dist/scripts/codex-0-136-compat-check.js +0 -30
  159. package/dist/scripts/codex-0-137-compat-check.js +0 -27
  160. package/dist/scripts/codex-app-fast-ui-preservation-check.js +0 -32
  161. package/dist/scripts/codex-app-provider-badge-check.js +0 -37
  162. package/dist/scripts/codex-app-ui-clobber-guard-check.js +0 -22
  163. package/dist/scripts/codex-app-ui-preservation-check.js +0 -96
  164. package/dist/scripts/codex-control-all-pipelines-check.js +0 -36
  165. package/dist/scripts/codex-control-capability-check.js +0 -10
  166. package/dist/scripts/codex-control-empty-result-retry-check.js +0 -43
  167. package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -10
  168. package/dist/scripts/codex-control-keepalive-no-cot-leak-check.js +0 -14
  169. package/dist/scripts/codex-control-no-legacy-fallback-check.js +0 -31
  170. package/dist/scripts/codex-control-side-effect-scope-check.js +0 -26
  171. package/dist/scripts/codex-control-stream-idle-watchdog-check.js +0 -18
  172. package/dist/scripts/codex-control-structured-output-check.js +0 -11
  173. package/dist/scripts/codex-control-thread-registry-check.js +0 -11
  174. package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
  175. package/dist/scripts/codex-environment-scoped-approvals-check.js +0 -10
  176. package/dist/scripts/codex-exec-output-schema-actual-syntax-check.js +0 -33
  177. package/dist/scripts/codex-fast-mode-profile-propagation-check.js +0 -12
  178. package/dist/scripts/codex-history-search-check.js +0 -19
  179. package/dist/scripts/codex-hook-semantic-check.js +0 -15
  180. package/dist/scripts/codex-hook-strict-subset-check.js +0 -61
  181. package/dist/scripts/codex-lb-config-toml-safety-check.js +0 -85
  182. package/dist/scripts/codex-lb-persistence-truth-check.js +0 -96
  183. package/dist/scripts/codex-lb-setup-fixture-check.js +0 -91
  184. package/dist/scripts/codex-lb-setup-truthfulness-check.js +0 -84
  185. package/dist/scripts/codex-legacy-profile-consumers-removed-check.js +0 -24
  186. package/dist/scripts/codex-managed-proxy-env-check.js +0 -17
  187. package/dist/scripts/codex-output-schema-fixture-check.js +0 -25
  188. package/dist/scripts/codex-permission-profiles-check.js +0 -36
  189. package/dist/scripts/codex-plugin-list-json-check.js +0 -8
  190. package/dist/scripts/codex-profile-primary-check.js +0 -13
  191. package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -51
  192. package/dist/scripts/codex-resume-cwd-truth-check.js +0 -17
  193. package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -32
  194. package/dist/scripts/codex-sdk-backend-router-check.js +0 -65
  195. package/dist/scripts/codex-sdk-capability-check.js +0 -11
  196. package/dist/scripts/codex-sdk-core-skill-pipeline-check.js +0 -9
  197. package/dist/scripts/codex-sdk-dfix-pipeline-check.js +0 -9
  198. package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -9
  199. package/dist/scripts/codex-sdk-no-legacy-fallback-check.js +0 -33
  200. package/dist/scripts/codex-sdk-qa-pipeline-check.js +0 -8
  201. package/dist/scripts/codex-sdk-real-smoke-check.js +0 -39
  202. package/dist/scripts/codex-sdk-release-review-pipeline-check.js +0 -13
  203. package/dist/scripts/codex-sdk-research-pipeline-check.js +0 -15
  204. package/dist/scripts/codex-sdk-sandbox-policy-check.js +0 -21
  205. package/dist/scripts/codex-sdk-structured-output-check.js +0 -10
  206. package/dist/scripts/codex-sdk-team-naruto-agent-pipeline-check.js +0 -12
  207. package/dist/scripts/codex-sdk-thread-registry-check.js +0 -11
  208. package/dist/scripts/codex-sdk-ux-ppt-review-pipeline-check.js +0 -9
  209. package/dist/scripts/codex-sdk-zellij-pane-binding-check.js +0 -13
  210. package/dist/scripts/codex-thread-runtime-choice-check.js +0 -10
  211. package/dist/scripts/codex-web-adapter-check.js +0 -12
  212. package/dist/scripts/computer-use-live-evidence-check.js +0 -55
  213. package/dist/scripts/computer-use-live-optional-check.js +0 -32
  214. package/dist/scripts/computer-use-policy-check.js +0 -69
  215. package/dist/scripts/computer-use-visual-route-fixture-check.js +0 -37
  216. package/dist/scripts/core-skill-card-schema-check.js +0 -61
  217. package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -54
  218. package/dist/scripts/core-skill-heldout-validation-check.js +0 -49
  219. package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -75
  220. package/dist/scripts/core-skill-patch-check.js +0 -79
  221. package/dist/scripts/core-skill-promotion-side-effect-ledger-check.js +0 -64
  222. package/dist/scripts/core-skill-rollout-scoring-check.js +0 -72
  223. package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -49
  224. package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
  225. package/dist/scripts/dfix-fast-kernel-check.js +0 -26
  226. package/dist/scripts/dfix-fixture-check.js +0 -6
  227. package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
  228. package/dist/scripts/dfix-patch-handoff-check.js +0 -13
  229. package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
  230. package/dist/scripts/dfix-performance-check.js +0 -15
  231. package/dist/scripts/dfix-verification-check.js +0 -9
  232. package/dist/scripts/dfix-verification-recommendation-check.js +0 -15
  233. package/dist/scripts/docs-truthfulness-check.js +0 -61
  234. package/dist/scripts/doctor-codex-doctor-parity-check.js +0 -17
  235. package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -64
  236. package/dist/scripts/doctor-fix-recovers-corrupted-config-check.js +0 -122
  237. package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -39
  238. package/dist/scripts/evidence-fixture-check.js +0 -26
  239. package/dist/scripts/evidence-flagship-coverage-check.js +0 -55
  240. package/dist/scripts/fake-real-proof-policy-v2-check.js +0 -27
  241. package/dist/scripts/fake-vs-real-proof-policy-check.js +0 -14
  242. package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -42
  243. package/dist/scripts/flagship-proof-graph-v2-check.js +0 -48
  244. package/dist/scripts/flagship-proof-graph-v3-check.js +0 -67
  245. package/dist/scripts/flagship-proof-graph-v4-check.js +0 -61
  246. package/dist/scripts/git-precommit-fixture-check.js +0 -41
  247. package/dist/scripts/git-worktree-cache-performance-check.js +0 -25
  248. package/dist/scripts/git-worktree-capability-check.js +0 -27
  249. package/dist/scripts/git-worktree-checkpoint-check.js +0 -20
  250. package/dist/scripts/git-worktree-cleanup-check.js +0 -27
  251. package/dist/scripts/git-worktree-cross-rebase-check.js +0 -39
  252. package/dist/scripts/git-worktree-diff-envelope-check.js +0 -17
  253. package/dist/scripts/git-worktree-diff-export-check.js +0 -43
  254. package/dist/scripts/git-worktree-dirty-lock-check.js +0 -17
  255. package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -14
  256. package/dist/scripts/git-worktree-integration-primary-check.js +0 -24
  257. package/dist/scripts/git-worktree-integration-primary-runtime-check.js +0 -20
  258. package/dist/scripts/git-worktree-manager-check.js +0 -37
  259. package/dist/scripts/git-worktree-manifest-append-check.js +0 -18
  260. package/dist/scripts/git-worktree-merge-queue-check.js +0 -31
  261. package/dist/scripts/git-worktree-pool-performance-check.js +0 -20
  262. package/dist/scripts/git-worktree-untracked-diff-check.js +0 -18
  263. package/dist/scripts/goal-mode-official-default-check.js +0 -12
  264. package/dist/scripts/gpt-final-arbiter-check.js +0 -63
  265. package/dist/scripts/gpt-final-arbiter-performance-check.js +0 -36
  266. package/dist/scripts/gpt-image-2-request-validator-check.js +0 -35
  267. package/dist/scripts/hooks-0.134-context-parity-check.js +0 -20
  268. package/dist/scripts/hooks-actual-parity-check.js +0 -17
  269. package/dist/scripts/hooks-actual-parity-v2-check.js +0 -21
  270. package/dist/scripts/hooks-latest-schema-check.js +0 -20
  271. package/dist/scripts/hooks-managed-install-fixture-check.js +0 -21
  272. package/dist/scripts/hooks-official-hash-oracle-check.js +0 -35
  273. package/dist/scripts/hooks-official-hash-parity-check.js +0 -17
  274. package/dist/scripts/hooks-subagent-events-check.js +0 -17
  275. package/dist/scripts/hooks-trust-state-check.js +0 -14
  276. package/dist/scripts/image-fidelity-fixture-check.js +0 -24
  277. package/dist/scripts/imagegen-capability-check.js +0 -30
  278. package/dist/scripts/imagegen-real-smoke-check.js +0 -155
  279. package/dist/scripts/install-update-preserves-config-check.js +0 -87
  280. package/dist/scripts/json-schema-recursive-check.js +0 -78
  281. package/dist/scripts/legacy-multiagent-removal-check.js +0 -85
  282. package/dist/scripts/legacy-upgrade-matrix-check.js +0 -300
  283. package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -21
  284. package/dist/scripts/local-collab-gpt-final-availability-check.js +0 -58
  285. package/dist/scripts/local-collab-no-local-only-final-check.js +0 -27
  286. package/dist/scripts/local-collab-policy-check.js +0 -17
  287. package/dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js +0 -63
  288. package/dist/scripts/local-llm-all-pipelines-check.js +0 -11
  289. package/dist/scripts/local-llm-cache-performance-check.js +0 -10
  290. package/dist/scripts/local-llm-capability-check.js +0 -14
  291. package/dist/scripts/local-llm-smoke-check.js +0 -23
  292. package/dist/scripts/local-llm-structured-output-check.js +0 -11
  293. package/dist/scripts/local-llm-throughput-check.js +0 -10
  294. package/dist/scripts/local-llm-tool-call-repair-check.js +0 -10
  295. package/dist/scripts/local-llm-warmup-check.js +0 -11
  296. package/dist/scripts/loop-blocker-check.js +0 -15
  297. package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -35
  298. package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
  299. package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +0 -92
  300. package/dist/scripts/mad-sks-audit-proof-check.js +0 -34
  301. package/dist/scripts/mad-sks-db-executor-check.js +0 -5
  302. package/dist/scripts/mad-sks-executor-proof-graph-check.js +0 -5
  303. package/dist/scripts/mad-sks-fast-mode-propagation-check.js +0 -24
  304. package/dist/scripts/mad-sks-file-write-executor-check.js +0 -5
  305. package/dist/scripts/mad-sks-immutable-harness-check.js +0 -36
  306. package/dist/scripts/mad-sks-no-harness-modification-check.js +0 -25
  307. package/dist/scripts/mad-sks-package-executor-check.js +0 -5
  308. package/dist/scripts/mad-sks-permission-model-check.js +0 -22
  309. package/dist/scripts/mad-sks-rollback-apply-check.js +0 -5
  310. package/dist/scripts/mad-sks-service-executor-check.js +0 -5
  311. package/dist/scripts/mad-sks-shell-executor-check.js +0 -5
  312. package/dist/scripts/mad-sks-write-guard-check.js +0 -28
  313. package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +0 -37
  314. package/dist/scripts/mad-sks-zellij-launch-check.js +0 -102
  315. package/dist/scripts/mcp-0-134-modernization-check.js +0 -55
  316. package/dist/scripts/mcp-readonly-concurrency-check.js +0 -17
  317. package/dist/scripts/mcp-readonly-runtime-scheduler-check.js +0 -20
  318. package/dist/scripts/mcp-tool-naming-parity-check.js +0 -16
  319. package/dist/scripts/memory-summary-rebuild-check.js +0 -22
  320. package/dist/scripts/mutation-callsite-coverage-check.js +0 -180
  321. package/dist/scripts/naruto-active-pool-check.js +0 -39
  322. package/dist/scripts/naruto-actual-worker-control-plane-check.js +0 -56
  323. package/dist/scripts/naruto-allocation-policy-check.js +0 -33
  324. package/dist/scripts/naruto-allocation-runtime-wiring-check.js +0 -92
  325. package/dist/scripts/naruto-concurrency-governor-check.js +0 -53
  326. package/dist/scripts/naruto-extreme-parallelism-check.js +0 -22
  327. package/dist/scripts/naruto-extreme-parallelism-real-check.js +0 -43
  328. package/dist/scripts/naruto-gpt-final-pack-check.js +0 -34
  329. package/dist/scripts/naruto-orchestrator-runtime-source-check.js +0 -70
  330. package/dist/scripts/naruto-parallel-patch-apply-check.js +0 -41
  331. package/dist/scripts/naruto-readonly-routing-check.js +0 -116
  332. package/dist/scripts/naruto-real-active-pool-check.js +0 -39
  333. package/dist/scripts/naruto-real-active-pool-runtime-check.js +0 -55
  334. package/dist/scripts/naruto-rebalance-policy-check.js +0 -41
  335. package/dist/scripts/naruto-role-distribution-check.js +0 -23
  336. package/dist/scripts/naruto-shadow-clone-swarm-check.js +0 -153
  337. package/dist/scripts/naruto-verification-pool-check.js +0 -36
  338. package/dist/scripts/naruto-work-graph-check.js +0 -24
  339. package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
  340. package/dist/scripts/naruto-worktree-coding-check.js +0 -44
  341. package/dist/scripts/naruto-worktree-gpt-final-check.js +0 -45
  342. package/dist/scripts/naruto-worktree-zellij-ui-check.js +0 -28
  343. package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +0 -48
  344. package/dist/scripts/naruto-zellij-massive-ui-check.js +0 -23
  345. package/dist/scripts/non-recursive-pipeline-check.js +0 -68
  346. package/dist/scripts/npm-publish-performance-check.js +0 -65
  347. package/dist/scripts/official-docs-compat-report.js +0 -304
  348. package/dist/scripts/packlist-performance-check.js +0 -83
  349. package/dist/scripts/parallel-verification-engine-check.js +0 -85
  350. package/dist/scripts/postinstall-safe-side-effects-check.js +0 -65
  351. package/dist/scripts/ppt-full-e2e-artifact-graph-check.js +0 -40
  352. package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
  353. package/dist/scripts/ppt-image-voxel-relations-check.js +0 -9
  354. package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
  355. package/dist/scripts/ppt-imagegen-review-fixture-check.js +0 -6
  356. package/dist/scripts/ppt-issue-extraction-fixture-check.js +0 -7
  357. package/dist/scripts/ppt-no-mock-as-real-check.js +0 -8
  358. package/dist/scripts/ppt-no-text-fallback-check.js +0 -7
  359. package/dist/scripts/ppt-proof-trust-fixture-check.js +0 -10
  360. package/dist/scripts/ppt-real-export-adapter-check.js +0 -13
  361. package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -42
  362. package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -16
  363. package/dist/scripts/ppt-reexport-rereview-check.js +0 -19
  364. package/dist/scripts/ppt-slide-export-fixture-check.js +0 -7
  365. package/dist/scripts/prepublish-fast-check.js +0 -128
  366. package/dist/scripts/priority-full-closure-check.js +0 -12
  367. package/dist/scripts/product-design-auto-install-check.js +0 -119
  368. package/dist/scripts/product-design-plugin-routing-check.js +0 -101
  369. package/dist/scripts/prompt-placeholder-guard-check.js +0 -33
  370. package/dist/scripts/provider-badge-context-check.js +0 -26
  371. package/dist/scripts/provider-context-config-toml-check.js +0 -63
  372. package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -47
  373. package/dist/scripts/python-codex-sdk-capability-check.js +0 -75
  374. package/dist/scripts/python-codex-sdk-sandbox-policy-check.js +0 -10
  375. package/dist/scripts/python-codex-sdk-stream-bridge-check.js +0 -12
  376. package/dist/scripts/python-tools-smoke-check.js +0 -71
  377. package/dist/scripts/qa-actual-route-backfill-check.js +0 -5
  378. package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
  379. package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
  380. package/dist/scripts/readme-architecture-imagegen-official-check.js +0 -448
  381. package/dist/scripts/release-cache-glob-hashing-check.js +0 -42
  382. package/dist/scripts/release-dag-full-coverage-check.js +0 -53
  383. package/dist/scripts/release-dist-freshness-check.js +0 -8
  384. package/dist/scripts/release-dynamic-performance-check.js +0 -103
  385. package/dist/scripts/release-gate-budget-check.js +0 -36
  386. package/dist/scripts/release-gate-dag-runner-check.js +0 -17
  387. package/dist/scripts/release-metadata-1-11-check.js +0 -37
  388. package/dist/scripts/release-metadata-1-12-check.js +0 -48
  389. package/dist/scripts/release-metadata-1-13-check.js +0 -53
  390. package/dist/scripts/release-metadata-1-14-check.js +0 -63
  391. package/dist/scripts/release-metadata-1-16-check.js +0 -81
  392. package/dist/scripts/release-metadata-1-17-check.js +0 -51
  393. package/dist/scripts/release-metadata-1-19-check.js +0 -371
  394. package/dist/scripts/release-metadata-check.js +0 -7
  395. package/dist/scripts/release-native-agent-fixture-check.js +0 -41
  396. package/dist/scripts/release-parallel-check.js +0 -374
  397. package/dist/scripts/release-parallel-full-coverage-check.js +0 -13
  398. package/dist/scripts/release-parallel-speed-budget-check.js +0 -79
  399. package/dist/scripts/release-provenance-check.js +0 -150
  400. package/dist/scripts/release-readiness-report.js +0 -1146
  401. package/dist/scripts/release-real-check.js +0 -330
  402. package/dist/scripts/release-registry-check.js +0 -344
  403. package/dist/scripts/release-runtime-truth-matrix-check.js +0 -47
  404. package/dist/scripts/release-stability-report-check.js +0 -99
  405. package/dist/scripts/release-version-truth-check.js +0 -134
  406. package/dist/scripts/research-actual-route-backfill-check.js +0 -5
  407. package/dist/scripts/research-backfill-route-blackbox.js +0 -5
  408. package/dist/scripts/research-quality-gate-check.js +0 -86
  409. package/dist/scripts/responses-retry-policy-centralized-check.js +0 -19
  410. package/dist/scripts/retention-cleanup-safety-check.js +0 -155
  411. package/dist/scripts/route-blackbox-realism-check.js +0 -21
  412. package/dist/scripts/route-proof-artifact-structure-check.js +0 -145
  413. package/dist/scripts/runtime-dist-parity-check.js +0 -78
  414. package/dist/scripts/runtime-no-mjs-scripts-check.js +0 -45
  415. package/dist/scripts/runtime-no-src-mjs-check.js +0 -32
  416. package/dist/scripts/runtime-no-tmux-check.js +0 -113
  417. package/dist/scripts/runtime-ts-python-boundary-check.js +0 -59
  418. package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -74
  419. package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -55
  420. package/dist/scripts/safety-check.js +0 -23
  421. package/dist/scripts/shared-memory-fixture-check.js +0 -27
  422. package/dist/scripts/side-effect-runtime-report-check.js +0 -19
  423. package/dist/scripts/side-effect-zero-gate-check.js +0 -226
  424. package/dist/scripts/sks-1-11-fixture-check.js +0 -130
  425. package/dist/scripts/source-intelligence-all-modes-check.js +0 -32
  426. package/dist/scripts/source-intelligence-policy-check.js +0 -13
  427. package/dist/scripts/strategy-adhd-orchestrating-gate-check.js +0 -22
  428. package/dist/scripts/strategy-file-ownership-plan-check.js +0 -18
  429. package/dist/scripts/strategy-parallel-modification-plan-check.js +0 -19
  430. package/dist/scripts/strategy-verification-rollback-dag-check.js +0 -19
  431. package/dist/scripts/team-actual-route-backfill-check.js +0 -5
  432. package/dist/scripts/team-backfill-route-blackbox.js +0 -5
  433. package/dist/scripts/team-parallel-write-blackbox.js +0 -55
  434. package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
  435. package/dist/scripts/terminal-keyboard-enhancement-safety-check.js +0 -12
  436. package/dist/scripts/terminal-tui-output-stability-check.js +0 -35
  437. package/dist/scripts/test-no-orphan-dist-imports-check.js +0 -73
  438. package/dist/scripts/trust-fixture-check.js +0 -33
  439. package/dist/scripts/typescript-migration-report.js +0 -78
  440. package/dist/scripts/ultra-router-auto-router-check.js +0 -33
  441. package/dist/scripts/ultra-router-classification-check.js +0 -28
  442. package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
  443. package/dist/scripts/ux-ppt-structured-extraction-check.js +0 -21
  444. package/dist/scripts/ux-review-extract-real-callouts-fixture-check.js +0 -8
  445. package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -15
  446. package/dist/scripts/ux-review-generate-callouts-fixture-check.js +0 -9
  447. package/dist/scripts/ux-review-image-voxel-relations-check.js +0 -31
  448. package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
  449. package/dist/scripts/ux-review-no-fake-callouts-check.js +0 -8
  450. package/dist/scripts/ux-review-no-text-fallback-check.js +0 -25
  451. package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -20
  452. package/dist/scripts/ux-review-patch-handoff-fixture-check.js +0 -8
  453. package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -31
  454. package/dist/scripts/ux-review-real-loop-fixture-check.js +0 -24
  455. package/dist/scripts/ux-review-recapture-recheck-fixture-check.js +0 -8
  456. package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -11
  457. package/dist/scripts/worker-pane-communication-contract-check.js +0 -54
  458. package/dist/scripts/wrongness-fixture-check.js +0 -65
  459. package/dist/scripts/xai-mcp-capability-check.js +0 -14
  460. package/dist/scripts/zellij-capability-check.js +0 -15
  461. package/dist/scripts/zellij-dashboard-pane-check.js +0 -70
  462. package/dist/scripts/zellij-developer-controls-check.js +0 -20
  463. package/dist/scripts/zellij-doctor-readiness-check.js +0 -63
  464. package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -21
  465. package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
  466. package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -356
  467. package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
  468. package/dist/scripts/zellij-lane-renderer-check.js +0 -65
  469. package/dist/scripts/zellij-launch-command-truth-check.js +0 -75
  470. package/dist/scripts/zellij-layout-valid-check.js +0 -90
  471. package/dist/scripts/zellij-pane-proof-check.js +0 -59
  472. package/dist/scripts/zellij-real-session-cleanup-check.js +0 -21
  473. package/dist/scripts/zellij-real-session-heartbeat-check.js +0 -49
  474. package/dist/scripts/zellij-real-session-launch-check.js +0 -57
  475. package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -22
  476. package/dist/scripts/zellij-right-column-manager-check.js +0 -27
  477. package/dist/scripts/zellij-screen-proof-check.js +0 -45
  478. package/dist/scripts/zellij-slot-column-anchor-check.js +0 -66
  479. package/dist/scripts/zellij-slot-only-ui-check.js +0 -26
  480. package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -106
  481. package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -59
  482. package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -40
  483. package/dist/scripts/zellij-ui-design-check.js +0 -105
  484. package/dist/scripts/zellij-worker-pane-manager-check.js +0 -109
  485. package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
  486. package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
  487. package/dist/scripts/zellij-worker-pane-spawn-order-check.js +0 -35
  488. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.input.schema.json +0 -61
  489. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.output.schema.json +0 -103
  490. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.input.schema.json +0 -52
  491. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.output.schema.json +0 -24
  492. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-tool-use.command.input.schema.json +0 -67
  493. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-tool-use.command.output.schema.json +0 -84
  494. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-compact.command.input.schema.json +0 -52
  495. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-compact.command.output.schema.json +0 -24
  496. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-tool-use.command.input.schema.json +0 -65
  497. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-tool-use.command.output.schema.json +0 -105
  498. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/session-start.command.input.schema.json +0 -59
  499. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/session-start.command.output.schema.json +0 -63
  500. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/snapshot-metadata.json +0 -31
  501. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/stop.command.input.schema.json +0 -63
  502. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/stop.command.output.schema.json +0 -45
  503. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/user-prompt-submit.command.input.schema.json +0 -59
  504. package/dist/vendor/openai-codex/rust-v0.131.0/hooks/user-prompt-submit.command.output.schema.json +0 -81
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import assert from 'node:assert/strict';
4
- import fs from 'node:fs/promises';
5
- import { spawnSync } from 'node:child_process';
6
- import path from 'node:path';
7
- const root = process.cwd();
8
- const wiki = spawnSync(process.execPath, [path.join(root, 'dist/bin/sks.js'), 'wiki', 'rebuild-summary', '--json'], {
9
- cwd: root,
10
- encoding: 'utf8',
11
- env: { ...process.env, SKS_SKIP_NPM_FRESHNESS_CHECK: '1', CI: 'true' },
12
- timeout: 60_000
13
- });
14
- assert.equal(wiki.status, 0, wiki.stderr || wiki.stdout);
15
- const summary = JSON.parse(wiki.stdout);
16
- assert.equal(summary.schema, 'sks.memory-summary.v2');
17
- assert.equal(summary.summaries.triwiki.schema_version, 2);
18
- assert.equal(summary.summaries.wrongness.schema_version, 2);
19
- await fs.rm(path.join(root, '.sneakoscope/wiki/memory-summary.json'), { force: true });
20
- await fs.rm(path.join(root, '.sneakoscope/wiki/memory-summary.md'), { force: true });
21
- console.log(JSON.stringify({ schema: 'sks.memory-summary-rebuild-check.v1', ok: true, summary: summary.summaries }, null, 2));
22
- //# sourceMappingURL=memory-summary-rebuild-check.js.map
@@ -1,180 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- // Repo-wide risky mutation callsite gate. Every raw mutation must be either a
4
- // guarded call or an external allowlist entry with a concrete function/symbol and
5
- // reason. The allowlist is intentionally data, not code, so unused/stale entries
6
- // fail the release gate.
7
- import fs from 'node:fs';
8
- import path from 'node:path';
9
- import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
10
- const allowlistPath = path.join(root, 'safety-mutation-allowlist.json');
11
- const allowlist = readAllowlist();
12
- const allowlistHits = new Set();
13
- const scanFiles = listScanFiles();
14
- const covered = [];
15
- const allowlisted = [];
16
- const uncovered = [];
17
- const GUARD_CALL = /\bguarded(WriteFile|Rm|Rename|Chmod|Xattr|Chflags|GlobalCodexConfigWrite|ProcessKill|PackageInstall|SkillSnapshotPromotion|Apply)\(/;
18
- const RISKY = [
19
- { kind: 'write_file', token: 'fs.writeFile', re: /\bfs\.writeFile\(/ },
20
- { kind: 'write_file', token: 'fs.promises.writeFile', re: /\bfs\.promises\.writeFile\(/ },
21
- { kind: 'write_file', token: 'fsp.writeFile', re: /\bfsp\.writeFile\(/ },
22
- { kind: 'write_file', token: 'writeFileSync', re: /\b(?:fs\.)?writeFileSync\(/ },
23
- { kind: 'rm', token: 'fs.rm', re: /\bfs\.rm\(/ },
24
- { kind: 'rm', token: 'fsp.rm', re: /\bfsp\.rm\(/ },
25
- { kind: 'rm', token: 'rmSync', re: /\b(?:fs\.)?rmSync\(/ },
26
- { kind: 'unlink', token: 'unlink', re: /\b(?:fs\.|fsp\.)?unlink\(/ },
27
- { kind: 'unlink', token: 'unlinkSync', re: /\b(?:fs\.)?unlinkSync\(/ },
28
- { kind: 'rename', token: 'rename', re: /\b(?:fs\.|fsp\.)?rename\(/ },
29
- { kind: 'rename', token: 'renameSync', re: /\b(?:fs\.)?renameSync\(/ },
30
- { kind: 'chmod', token: 'chmod', re: /\b(?:fs\.|fsp\.)?chmod\(/ },
31
- { kind: 'chmod', token: 'chmodSync', re: /\b(?:fs\.)?chmodSync\(/ },
32
- { kind: 'process_kill', token: 'process.kill', re: /\bprocess\.kill\(/ },
33
- { kind: 'package_install', token: 'runProcess(npm/brew)', re: /runProcess\(\s*(?:npmBin|['"](?:npm|brew)['"])/ },
34
- { kind: 'package_install', token: 'spawn(npm install)', re: /\bspawn(?:Sync)?\(\s*['"]npm['"][\s\S]{0,80}(?:install|i)\b/ },
35
- { kind: 'xattr', token: 'xattr', re: /runProcess\(\s*['"]xattr['"]/ },
36
- { kind: 'chflags', token: 'chflags', re: /runProcess\(\s*['"]chflags['"]/ },
37
- { kind: 'codex_home_write', token: 'codex config write', re: /(?:~\/\.codex|CODEX_HOME|auth\.json|config\.toml)/ }
38
- ];
39
- for (const rel of scanFiles) {
40
- const text = fs.readFileSync(path.join(root, rel), 'utf8');
41
- const lines = text.split('\n');
42
- let currentSymbol = 'module';
43
- for (let i = 0; i < lines.length; i += 1) {
44
- const line = lines[i];
45
- currentSymbol = symbolFromLine(line) || currentSymbol;
46
- if (isIgnoredLine(line))
47
- continue;
48
- if (GUARD_CALL.test(line)) {
49
- covered.push({ file: rel, line: i + 1, symbol: currentSymbol, kind: 'guarded_call', snippet: snippet(line) });
50
- }
51
- for (const risky of RISKY) {
52
- if (!risky.re.test(line))
53
- continue;
54
- if (risky.kind === 'package_install' && !packageMutationOnLine(line))
55
- continue;
56
- if (risky.kind === 'codex_home_write' && !codexHomeMutationOnLine(line))
57
- continue;
58
- if (risky.kind === 'process_kill' && processKillIsLivenessProbe(line))
59
- continue;
60
- const entry = { file: rel, line: i + 1, symbol: currentSymbol, kind: risky.kind, token: risky.token, snippet: snippet(line) };
61
- const allow = findAllow(entry);
62
- if (allow) {
63
- allowlistHits.add(allow.id);
64
- allowlisted.push({ ...entry, reason: allow.reason });
65
- }
66
- else {
67
- uncovered.push(entry);
68
- }
69
- }
70
- }
71
- }
72
- const unused_allowlist = allowlist.filter((entry) => !allowlistHits.has(entry.id)).map(({ id, file, symbol, token, reason }) => ({ id, file, symbol, token, reason }));
73
- const blanket_allowlist = allowlist.filter((entry) => !entry.symbol || entry.symbol === '*' || !entry.token || entry.token === '*');
74
- const ok = uncovered.length === 0 && unused_allowlist.length === 0 && blanket_allowlist.length === 0;
75
- const report = {
76
- schema: 'sks.mutation-callsite-coverage.v2',
77
- ok,
78
- repo_wide: true,
79
- allowlist_path: 'safety-mutation-allowlist.json',
80
- scanned_file_count: scanFiles.length,
81
- covered,
82
- allowlisted,
83
- uncovered,
84
- unused_allowlist,
85
- blanket_allowlist
86
- };
87
- const reportDir = path.join(root, '.sneakoscope', 'reports');
88
- fs.mkdirSync(reportDir, { recursive: true });
89
- fs.writeFileSync(path.join(reportDir, 'mutation-callsite-coverage.json'), `${JSON.stringify(report, null, 2)}\n`);
90
- assertGate(ok, 'repo-wide risky mutation call sites must be guarded or allowlisted-with-reason', {
91
- scanned_file_count: scanFiles.length,
92
- uncovered,
93
- unused_allowlist,
94
- blanket_allowlist
95
- });
96
- emitGate('safety:mutation-callsite-coverage', {
97
- scanned_file_count: scanFiles.length,
98
- covered: covered.length,
99
- allowlisted: allowlisted.length,
100
- uncovered: uncovered.length
101
- });
102
- function readAllowlist() {
103
- const raw = JSON.parse(fs.readFileSync(allowlistPath, 'utf8'));
104
- assertGate(raw.schema === 'sks.safety-mutation-allowlist.v1', 'mutation allowlist schema mismatch', raw);
105
- assertGate(Array.isArray(raw.entries), 'mutation allowlist entries must be an array', raw);
106
- return raw.entries.map((entry, index) => {
107
- for (const key of ['file', 'symbol', 'token', 'reason']) {
108
- assertGate(typeof entry[key] === 'string' && entry[key].trim().length > 0, `allowlist entry missing ${key}`, { index, entry });
109
- }
110
- assertGate(entry.reason.length >= 12, 'allowlist reason must be concrete', { index, entry });
111
- return { ...entry, id: `${entry.file}:${entry.symbol}:${entry.token}:${index}` };
112
- });
113
- }
114
- function listScanFiles() {
115
- const files = [];
116
- walk(path.join(root, 'src'), (file) => {
117
- const relative = rel(file);
118
- if (relative.startsWith('src/scripts/'))
119
- return;
120
- if (file.endsWith('.ts'))
121
- files.push(relative);
122
- });
123
- walk(path.join(root, 'src', 'scripts'), (file) => {
124
- if (!file.endsWith('.ts'))
125
- return;
126
- const base = path.basename(file);
127
- if (/(install|publish|release|doctor|codex|zellij|migration)/i.test(base))
128
- files.push(rel(file));
129
- });
130
- return files.sort();
131
- }
132
- function walk(dir, visit) {
133
- let entries = [];
134
- try {
135
- entries = fs.readdirSync(dir, { withFileTypes: true });
136
- }
137
- catch {
138
- return;
139
- }
140
- for (const entry of entries) {
141
- const file = path.join(dir, entry.name);
142
- if (entry.isDirectory()) {
143
- if (!['node_modules', 'dist', 'target'].includes(entry.name))
144
- walk(file, visit);
145
- }
146
- else if (entry.isFile()) {
147
- visit(file);
148
- }
149
- }
150
- }
151
- function findAllow(entry) {
152
- return allowlist.find((allow) => entry.file === allow.file && entry.symbol === allow.symbol && entry.token === allow.token);
153
- }
154
- function symbolFromLine(line) {
155
- const match = line.match(/(?:export\s+)?(?:async\s+)?function\s+([A-Za-z0-9_$]+)/)
156
- || line.match(/(?:const|let|var)\s+([A-Za-z0-9_$]+)\s*=\s*(?:async\s*)?\(/)
157
- || line.match(/class\s+([A-Za-z0-9_$]+)/);
158
- return match?.[1] || null;
159
- }
160
- function isIgnoredLine(line) {
161
- const trimmed = line.trim();
162
- return !trimmed || trimmed.startsWith('//') || trimmed.startsWith('*') || trimmed.startsWith('/*');
163
- }
164
- function packageMutationOnLine(line) {
165
- return /\b(?:install|i|add|uninstall|remove|publish)\b/.test(line);
166
- }
167
- function processKillIsLivenessProbe(line) {
168
- return /\bprocess\.kill\([^,\n]+,\s*0\s*\)/.test(line);
169
- }
170
- function codexHomeMutationOnLine(line) {
171
- return /\b(?:writeTextAtomic|writeJsonAtomic|writeFileSync|fs\.writeFile|fs\.promises\.writeFile|fsp\.writeFile|fs\.rm|fsp\.rm|fs\.rename|fsp\.rename|fs\.chmod|fsp\.chmod|copyFile|open)\b/.test(line)
172
- && /(?:~\/\.codex|CODEX_HOME|codexHome|codexLbHome|auth\.json|config\.toml)/.test(line);
173
- }
174
- function snippet(line) {
175
- return line.trim().slice(0, 160);
176
- }
177
- function rel(file) {
178
- return path.relative(root, file).split(path.sep).join('/');
179
- }
180
- //# sourceMappingURL=mutation-callsite-coverage-check.js.map
@@ -1,39 +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 governorMod = await importDist('core/naruto/naruto-concurrency-governor.js');
6
- const activePool = await importDist('core/naruto/naruto-active-pool.js');
7
- const graph = workGraph.buildNarutoWorkGraph({ requestedClones: 20, totalWorkItems: 20, writeCapable: true, maxActiveWorkers: 5 });
8
- const governor = governorMod.decideNarutoConcurrency({
9
- requestedClones: 20,
10
- totalWorkItems: 20,
11
- pendingWorkQueueSize: 20,
12
- backend: 'fake',
13
- hardware: { remoteApiRateLimitBudget: 5, fileDescriptorLimit: 4096, freeMemoryBytes: 8 * 1024 * 1024 * 1024, totalMemoryBytes: 16 * 1024 * 1024 * 1024 }
14
- });
15
- const report = activePool.simulateNarutoActivePool({ graph, governor: { ...governor, safe_active_workers: 5 } });
16
- assertGate(report.ok === true, 'active pool must drain cleanly', report);
17
- assertGate(report.max_observed_active_workers <= 5, 'active pool must never exceed safe cap', report);
18
- assertGate(report.max_observed_write_lease_conflicts === 0, 'active pool must never run overlapping write leases concurrently', report);
19
- assertGate(report.completed_count >= graph.total_work_items, 'active pool must complete all base work items', report);
20
- assertGate(report.refill_events >= 5, 'active pool must refill slots as work drains', report);
21
- assertGate(report.duplicate_execution_count === 0, 'active pool must not duplicate work without retry', report);
22
- const sameLeaseGraph = workGraph.buildNarutoWorkGraph({
23
- requestedClones: 10,
24
- totalWorkItems: 10,
25
- writeCapable: true,
26
- targetPaths: ['src/shared-fixture.ts'],
27
- maxActiveWorkers: 5
28
- });
29
- const sameLeaseReport = activePool.simulateNarutoActivePool({ graph: sameLeaseGraph, governor: { ...governor, safe_active_workers: 5 } });
30
- assertGate(sameLeaseReport.ok === true, 'same-file work graph must drain without overlapping write leases', sameLeaseReport);
31
- assertGate(sameLeaseReport.max_observed_write_lease_conflicts === 0, 'same-file write items must be serialized or interleaved with read-only work only', sameLeaseReport);
32
- emitGate('naruto:active-pool', {
33
- safe_active_workers: report.safe_active_workers,
34
- completed_count: report.completed_count,
35
- refill_events: report.refill_events,
36
- max_observed_active_workers: report.max_observed_active_workers,
37
- same_lease_max_write_conflicts: sameLeaseReport.max_observed_write_lease_conflicts
38
- });
39
- //# sourceMappingURL=naruto-active-pool-check.js.map
@@ -1,56 +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 { collectActualNarutoWorker, spawnActualNarutoWorker } from '../core/naruto/naruto-real-worker-runtime.js';
9
- import { narutoCommand } from '../core/commands/naruto-command.js';
10
- process.env.SKS_CODEX_SDK_FAKE = '1';
11
- const root = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-naruto-actual-worker-'));
12
- const graph = buildNarutoWorkGraph({ requestedClones: 1, totalWorkItems: 1, readonly: true, writeCapable: false });
13
- const item = graph.work_items[0];
14
- const handle = await spawnActualNarutoWorker({
15
- root,
16
- missionId: `M-naruto-actual-worker-${process.pid}`,
17
- item,
18
- placement: { placement: 'headless', visible_index: null, reason: 'check' },
19
- backend: 'fake',
20
- visiblePaneCap: 0
21
- });
22
- const collected = await collectActualNarutoWorker(handle);
23
- const result = JSON.parse(fs.readFileSync(path.join(handle.worker_artifact_dir, 'worker-result.json'), 'utf8'));
24
- const fullRoute = await narutoCommand([
25
- 'run',
26
- 'Naruto actual worker full command control plane check',
27
- '--json',
28
- '--backend',
29
- 'fake',
30
- '--backend-explicit',
31
- '--clones',
32
- '2',
33
- '--work-items',
34
- '2',
35
- '--readonly',
36
- '--no-open-zellij',
37
- '--smoke'
38
- ]);
39
- const missionRoot = path.join(process.cwd(), '.sneakoscope', 'missions', fullRoute.mission_id || '', 'agents', 'naruto-real-workers');
40
- const fullWorkerResults = fs.existsSync(missionRoot)
41
- ? fs.readdirSync(missionRoot).map((name) => {
42
- const file = path.join(missionRoot, name, 'worker-result.json');
43
- return fs.existsSync(file) ? JSON.parse(fs.readFileSync(file, 'utf8')) : null;
44
- }).filter(Boolean)
45
- : [];
46
- const ok = collected.ok === true
47
- && result.ok === true
48
- && result.control_plane_result?.worker_result_path
49
- && result.control_plane_result?.structured_output_valid === true
50
- && fullRoute.active_pool?.real_runtime?.runtime_source_of_truth === 'pre_run_smoke_only'
51
- && fullRoute.runtime_source_of_truth === 'agent-orchestrator-scheduler'
52
- && fullWorkerResults.length >= 1
53
- && fullWorkerResults.every((row) => row.control_plane_result?.structured_output_valid === true);
54
- assertGate(ok, 'Naruto actual worker must call Codex Control Plane directly and through the explicit full-route smoke path', { collected, result, fullRoute, fullWorkerResults });
55
- emitGate('naruto:actual-worker-control-plane', { collected, result, full_route_mission_id: fullRoute.mission_id, full_worker_result_count: fullWorkerResults.length });
56
- //# sourceMappingURL=naruto-actual-worker-control-plane-check.js.map
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env node
2
- import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
3
- import { allocateNarutoTasksToWorkers, chooseNarutoTaskOwner } from '../core/naruto/naruto-allocation-policy.js';
4
- const base = {
5
- kind: 'implementation',
6
- title: 'impl',
7
- target_paths: ['src/core/naruto/runtime.ts'],
8
- readonly_paths: [],
9
- write_paths: ['src/core/naruto/runtime.ts'],
10
- required_role: 'implementer',
11
- write_allowed: true,
12
- verification_required: true,
13
- dependencies: [],
14
- can_run_in_parallel_with: [],
15
- conflicts_with: [],
16
- estimated_cost: { tokens: 1, latency_ms: 1, cpu_weight: 1, memory_mb: 1, gpu_weight: 0 },
17
- lease_requirements: [{ path: 'src/core/naruto/runtime.ts', kind: 'write' }],
18
- acceptance: { requires_patch_envelope: true, requires_verification: true, requires_gpt_final: true }
19
- };
20
- const workers = [
21
- { id: 'w1', role: 'implementer', lane: 'src/core' },
22
- { id: 'w2', role: 'verifier', lane: 'src/scripts' }
23
- ];
24
- const decision = chooseNarutoTaskOwner({ ...base, id: 'T1' }, workers);
25
- const blocked = chooseNarutoTaskOwner({ ...base, id: 'T2', dependencies: ['T0'] }, workers);
26
- const assignments = allocateNarutoTasksToWorkers([{ ...base, id: 'T1' }, { ...base, id: 'T2', required_role: 'verifier' }], workers);
27
- const ok = decision.owner === 'w1'
28
- && decision.score >= 24
29
- && blocked.score === Number.NEGATIVE_INFINITY
30
- && assignments.length === 2;
31
- assertGate(ok, 'Naruto allocation policy must score role/lane overlap and block incomplete dependencies with -Infinity', { decision, blocked, assignments });
32
- emitGate('naruto:allocation-policy', { decision, blocked, assignments });
33
- //# sourceMappingURL=naruto-allocation-policy-check.js.map
@@ -1,92 +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 { runNativeAgentOrchestrator } from '../core/agents/agent-orchestrator.js';
8
- import { buildNarutoCloneRoster } from '../core/agents/agent-roster.js';
9
- import { buildNarutoWorkGraph } from '../core/naruto/naruto-work-graph.js';
10
- const root = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-naruto-runtime-wiring-'));
11
- const roster = buildNarutoCloneRoster({ clones: 3, readonly: true, prompt: 'runtime wiring check' });
12
- const graph = buildNarutoWorkGraph({
13
- requestedClones: 3,
14
- totalWorkItems: 3,
15
- readonly: true,
16
- writeCapable: false,
17
- allocationAssignments: [
18
- assignment('NW-000001', 'naruto_clone_001', 42),
19
- assignment('NW-000002', 'naruto_clone_002', 41),
20
- assignment('NW-000003', 'naruto_clone_999', 1)
21
- ]
22
- });
23
- const result = await runNativeAgentOrchestrator({
24
- root,
25
- route: '$Naruto',
26
- routeCommand: 'sks naruto run',
27
- routeBlackboxKind: 'allocation_runtime_wiring_gate',
28
- prompt: 'Naruto allocation runtime wiring check',
29
- roster,
30
- agents: 3,
31
- concurrency: 2,
32
- targetActiveSlots: 2,
33
- desiredWorkItemCount: 3,
34
- minimumWorkItems: 3,
35
- backend: 'fake',
36
- backendExplicit: true,
37
- mock: true,
38
- readonly: true,
39
- nativeCliSwarm: false,
40
- narutoMode: true,
41
- narutoWorkGraph: graph,
42
- narutoAllocationPolicy: { schema: 'sks.naruto-allocation-policy.v1', ok: true, assignments: graph.work_items.map((item) => ({ task_id: item.id, owner: item.owner })) },
43
- narutoRebalancePolicy: { schema: 'sks.naruto-rebalance-policy.v1', ok: true, decisions: [] }
44
- });
45
- const ledgerRoot = path.join(root, result.ledger_root || '.');
46
- const wiring = JSON.parse(fs.readFileSync(path.join(ledgerRoot, 'naruto-runtime-wiring.json'), 'utf8'));
47
- const queue = JSON.parse(fs.readFileSync(path.join(ledgerRoot, 'agent-work-queue.json'), 'utf8'));
48
- const owners = queue.items.map((item) => item.slice?.owner_agent_id);
49
- const runtimeProofs = (result.results || []).map((row) => row.naruto_runtime).filter(Boolean);
50
- const schedulerOk = result.scheduler?.state?.completed_count === 3
51
- && result.scheduler?.state?.failed_count === 0
52
- && result.scheduler?.state?.blocked_count === 0
53
- && result.scheduler?.state?.pending_queue_drained === true
54
- && Array.isArray(result.scheduler?.state?.blockers)
55
- && result.scheduler.state.blockers.length === 0;
56
- const ok = schedulerOk
57
- && wiring.ok === true
58
- && wiring.scheduler_slice_count === 3
59
- && owners.includes('naruto_clone_001')
60
- && owners.includes('naruto_clone_002')
61
- && wiring.slice_owners.some((row) => row.original_owner === 'naruto_clone_999' && row.rebalanced === true)
62
- && runtimeProofs.length === 3
63
- && runtimeProofs.every((row) => row.source_of_truth === 'agent-orchestrator-scheduler');
64
- assertGate(ok, 'Naruto allocation must be wired into scheduler slices, queue ownership, and worker runtime proof', {
65
- result_ok: result.ok,
66
- result_proof_blockers: result.proof?.blockers || [],
67
- scheduler: result.scheduler?.state || null,
68
- wiring,
69
- owners,
70
- runtimeProofs
71
- });
72
- emitGate('naruto:allocation-runtime-wiring', {
73
- wiring,
74
- owners,
75
- scheduler_ok: schedulerOk,
76
- runtime_proof_count: runtimeProofs.length
77
- });
78
- function assignment(taskId, owner, score) {
79
- return {
80
- task_id: taskId,
81
- owner,
82
- allocation_reason: `fixture owner ${owner}`,
83
- allocation_score: score,
84
- hints: {
85
- role: 'verifier',
86
- paths: ['src/core/naruto/runtime.ts'],
87
- domains: ['src/core/naruto'],
88
- writePaths: []
89
- }
90
- };
91
- }
92
- //# sourceMappingURL=naruto-allocation-runtime-wiring-check.js.map
@@ -1,53 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
4
- const governorMod = await importDist('core/naruto/naruto-concurrency-governor.js');
5
- const normal = governorMod.decideNarutoConcurrency({
6
- requestedClones: 200,
7
- totalWorkItems: 340,
8
- pendingWorkQueueSize: 340,
9
- backend: 'codex-sdk',
10
- zellijVisiblePaneCap: 12,
11
- hardware: {
12
- cores: 32,
13
- loadAverage: [0, 0, 0],
14
- freeMemoryBytes: 48 * 1024 * 1024 * 1024,
15
- totalMemoryBytes: 64 * 1024 * 1024 * 1024,
16
- fileDescriptorLimit: 4096,
17
- localLlmMaxParallelRequests: 4,
18
- remoteApiRateLimitBudget: 32,
19
- terminalRows: 40,
20
- terminalColumns: 140
21
- }
22
- });
23
- const pressure = governorMod.decideNarutoConcurrency({
24
- requestedClones: 200,
25
- totalWorkItems: 340,
26
- pendingWorkQueueSize: 340,
27
- backend: 'codex-sdk',
28
- zellijVisiblePaneCap: 12,
29
- hardware: {
30
- cores: 8,
31
- loadAverage: [16, 16, 16],
32
- freeMemoryBytes: 256 * 1024 * 1024,
33
- totalMemoryBytes: 4 * 1024 * 1024 * 1024,
34
- fileDescriptorLimit: 128,
35
- localLlmMaxParallelRequests: 4,
36
- remoteApiRateLimitBudget: 32,
37
- zellijPaneCount: 12,
38
- diskIoPressure: 0.9
39
- }
40
- });
41
- assertGate(normal.safe_active_workers >= 32 && normal.safe_active_workers <= 100, 'requested_clones=200 fixture must cap active workers safely while allowing aggressive process-pool fanout', { normal });
42
- assertGate(normal.safe_zellij_visible_panes === 12 && normal.headless_workers === normal.safe_active_workers - 12, 'zellij visible panes must stay within UI cap', { normal });
43
- assertGate(normal.local_llm_parallel <= 4, 'local LLM active requests must respect max_parallel_requests=4', { normal });
44
- assertGate(pressure.safe_active_workers < normal.safe_active_workers, 'memory/load pressure fixture must decrease active workers', { normal: normal.safe_active_workers, pressure: pressure.safe_active_workers });
45
- assertGate(pressure.backpressure === 'saturated' || pressure.backpressure === 'throttled', 'pressure fixture must report backpressure', { pressure });
46
- emitGate('naruto:concurrency-governor', {
47
- requested_clones: normal.requested_clones,
48
- total_work_items: normal.total_work_items,
49
- safe_active_workers: normal.safe_active_workers,
50
- safe_zellij_visible_panes: normal.safe_zellij_visible_panes,
51
- pressure_safe_active_workers: pressure.safe_active_workers
52
- });
53
- //# sourceMappingURL=naruto-concurrency-governor-check.js.map
@@ -1,22 +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
- const graph = buildNarutoWorkGraph({ requestedClones: 100, writeCapable: true, maxActiveWorkers: 32 });
7
- const governor = decideNarutoConcurrency({
8
- requestedClones: 100,
9
- totalWorkItems: graph.total_work_items,
10
- pendingWorkQueueSize: graph.total_work_items,
11
- backend: 'codex-sdk',
12
- hardware: { cores: 16, loadAverage: [1, 1, 1], freeMemoryBytes: 64 * 1024 * 1024 * 1024, totalMemoryBytes: 128 * 1024 * 1024 * 1024, fileDescriptorLimit: 8192, processCount: 100, terminalRows: 48, remoteApiRateLimitBudget: 32, localLlmMaxParallelRequests: 8 }
13
- });
14
- const report = {
15
- schema: 'sks.naruto-extreme-parallelism-check.v1',
16
- ok: graph.total_work_items >= 200 && governor.safe_active_workers >= 16 && governor.safe_zellij_visible_panes <= governor.safe_active_workers && governor.safe_zellij_visible_panes <= 8 && graph.mixed_work_kinds.length >= 6,
17
- graph: { total_work_items: graph.total_work_items, mixed_work_kinds: graph.mixed_work_kinds, write_allowed_count: graph.write_allowed_count },
18
- governor
19
- };
20
- assertGate(report.ok, 'Naruto extreme parallelism must fan out >=2x clones and keep a high safe active pool', report);
21
- emitGate('naruto:extreme-parallelism', report);
22
- //# sourceMappingURL=naruto-extreme-parallelism-check.js.map
@@ -1,43 +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: 100, totalWorkItems: 48, writeCapable: true, maxActiveWorkers: 12 });
13
- const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-naruto-extreme-real-'));
14
- const missionId = `M-naruto-extreme-real-${process.pid}`;
15
- const governor = decideNarutoConcurrency({
16
- requestedClones: 100,
17
- totalWorkItems: graph.total_work_items,
18
- pendingWorkQueueSize: graph.total_work_items,
19
- backend: 'fake',
20
- hardware: { cores: 16, loadAverage: [1, 1, 1], freeMemoryBytes: 64 * 1024 * 1024 * 1024, totalMemoryBytes: 128 * 1024 * 1024 * 1024, fileDescriptorLimit: 8192, processCount: 100, terminalRows: 48, remoteApiRateLimitBudget: 32, localLlmMaxParallelRequests: 8 }
21
- });
22
- const target = { ...governor, safe_active_workers: Math.min(12, governor.safe_active_workers), safe_zellij_visible_panes: Math.min(4, governor.safe_zellij_visible_panes) };
23
- const report = await runNarutoRealActivePool({
24
- graph,
25
- governor: target,
26
- spawnWorker: async (item, placement) => spawnActualNarutoWorker({
27
- root: tempRoot,
28
- missionId,
29
- item,
30
- placement,
31
- backend: 'fake',
32
- visiblePaneCap: target.safe_zellij_visible_panes,
33
- zellijSessionName: `sks-${missionId}`
34
- }),
35
- collectWorker: async (handle) => collectActualNarutoWorker(handle),
36
- enqueueVerification: async () => undefined,
37
- updateDashboard: async () => undefined
38
- });
39
- const actualArtifacts = report.worker_lifecycle.every((row) => row.pid && row.worker_artifact_dir && fs.existsSync(path.join(row.worker_artifact_dir, 'worker-result.json')));
40
- const ok = report.ok && report.max_observed_active_workers >= Math.ceil(target.safe_active_workers * 0.8) && report.active_pool_utilization >= 0.8 && report.headless_workers > 0 && report.visible_workers <= graph.total_work_items && actualArtifacts;
41
- assertGate(ok, 'Naruto extreme parallelism must use actual child process active-pool lifecycle near cap with headless overflow', { report, target, actualArtifacts, tempRoot });
42
- emitGate('naruto:extreme-parallelism-real', report);
43
- //# sourceMappingURL=naruto-extreme-parallelism-real-check.js.map
@@ -1,34 +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 packMod = await importDist('core/naruto/naruto-gpt-final-pack.js');
7
- const graph = workGraph.buildNarutoWorkGraph({ requestedClones: 100, totalWorkItems: 120, writeCapable: true });
8
- const roleDistribution = roles.buildNarutoRoleDistribution(graph.work_items);
9
- const patchEnvelopes = Array.from({ length: 120 }, (_, index) => ({ id: index, token: 'sk-testsecret1234567890', file: `f-${index}.ts` }));
10
- const logs = Array.from({ length: 40 }, (_, index) => `log ${index} api_key=secret-${index}`);
11
- const pack = packMod.buildNarutoGptFinalPack({
12
- missionId: 'M-naruto-pack',
13
- graph,
14
- roleDistribution,
15
- changedFiles: ['src/a.ts', 'src/a.ts', 'src/b.ts'],
16
- patchEnvelopes,
17
- verificationResults: [{ ok: true }],
18
- failedShards: [{ id: 'failed-1' }],
19
- conflictMap: [{ path: 'src/a.ts' }],
20
- rollbackPlan: { token: 'sk-abc12345678901234567' },
21
- logs
22
- });
23
- const serialized = JSON.stringify(pack);
24
- assertGate(pack.bounded === true && pack.secrets_redacted === true, 'GPT final pack must be bounded and redacted', pack);
25
- assertGate(pack.patch_envelopes.length === 100, '100 worker results must compress to bounded patch envelope count', { count: pack.patch_envelopes.length });
26
- assertGate(pack.representative_logs.length === 12, 'representative logs must be bounded', { count: pack.representative_logs.length });
27
- assertGate(!serialized.includes('secret-') && !serialized.includes('sk-testsecret'), 'secrets must be redacted from final pack', pack);
28
- assertGate(pack.role_distribution.ok === true && pack.work_graph_summary.write_allowed_count > 0, 'final pack must include role distribution and write work summary', pack);
29
- emitGate('naruto:gpt-final-pack', {
30
- patch_envelopes: pack.patch_envelopes.length,
31
- representative_logs: pack.representative_logs.length,
32
- changed_files: pack.changed_files
33
- });
34
- //# sourceMappingURL=naruto-gpt-final-pack-check.js.map
@@ -1,70 +0,0 @@
1
- #!/usr/bin/env node
2
- import fs from 'node:fs';
3
- import path from 'node:path';
4
- import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
5
- import { narutoCommand } from '../core/commands/naruto-command.js';
6
- const summary = await narutoCommand([
7
- 'run',
8
- 'Naruto orchestrator runtime source artifact check',
9
- '--json',
10
- '--backend',
11
- 'fake',
12
- '--clones',
13
- '2',
14
- '--work-items',
15
- '2',
16
- '--readonly',
17
- '--no-open-zellij'
18
- ]);
19
- const ledgerRoot = path.join(process.cwd(), '.sneakoscope', 'missions', summary.mission_id || '', 'agents');
20
- const realPool = readJson(path.join(ledgerRoot, 'naruto-real-active-pool.json'));
21
- const wiring = readJson(path.join(ledgerRoot, 'naruto-runtime-wiring.json'));
22
- const artifactText = collectText(ledgerRoot);
23
- const ok = summary.runtime_source_of_truth === 'agent-orchestrator-scheduler'
24
- && summary.pre_run_real_active_pool_source === 'skipped'
25
- && realPool?.status === 'skipped'
26
- && realPool?.runtime_source_of_truth === 'agent-orchestrator-scheduler'
27
- && realPool?.reason === 'pre_run_smoke_disabled_for_production'
28
- && wiring?.source_of_truth === 'naruto-work-graph'
29
- && artifactText.includes('agent-orchestrator-scheduler')
30
- && artifactText.includes('pre_run_smoke_never_owns_production_runtime');
31
- assertGate(ok, 'Naruto production runtime source of truth must be proven by command artifacts, not source-string checks', {
32
- summary,
33
- realPool,
34
- wiring
35
- });
36
- emitGate('naruto:orchestrator-runtime-source', {
37
- mission_id: summary.mission_id,
38
- runtime_source_of_truth: summary.runtime_source_of_truth,
39
- pre_run_real_active_pool_source: summary.pre_run_real_active_pool_source,
40
- real_pool_status: realPool?.status || null,
41
- wiring_ok: wiring?.ok === true
42
- });
43
- function readJson(file) {
44
- try {
45
- return JSON.parse(fs.readFileSync(file, 'utf8'));
46
- }
47
- catch {
48
- return null;
49
- }
50
- }
51
- function collectText(root) {
52
- const chunks = [];
53
- const stack = [root];
54
- while (stack.length) {
55
- const current = stack.pop();
56
- if (!current || !fs.existsSync(current))
57
- continue;
58
- const stat = fs.statSync(current);
59
- if (stat.isDirectory()) {
60
- for (const child of fs.readdirSync(current))
61
- stack.push(path.join(current, child));
62
- continue;
63
- }
64
- if (!/\.(json|jsonl)$/.test(current))
65
- continue;
66
- chunks.push(fs.readFileSync(current, 'utf8'));
67
- }
68
- return chunks.join('\n');
69
- }
70
- //# sourceMappingURL=naruto-orchestrator-runtime-source-check.js.map