sneakoscope 2.0.13 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/.sks-build-stamp.json +4 -4
- package/dist/bin/sks.js +1 -1
- package/dist/cli/command-registry.js +1 -0
- package/dist/commands/mad-db.js +5 -0
- package/dist/commands/zellij-slot-pane.js +3 -1
- package/dist/core/agents/agent-orchestrator.js +11 -4
- package/dist/core/agents/agent-output-validator.js +1 -1
- package/dist/core/agents/agent-plan.js +3 -2
- package/dist/core/agents/native-cli-session-swarm.js +118 -0
- package/dist/core/agents/native-cli-worker.js +85 -0
- package/dist/core/codex-control/codex-fake-sdk-adapter.js +3 -3
- package/dist/core/codex-control/gpt-final-review-schema.js +61 -14
- package/dist/core/commands/basic-cli.js +1 -1
- package/dist/core/commands/command-suggestions.js +1 -1
- package/dist/core/commands/mad-db-command.js +106 -0
- package/dist/core/commands/mad-sks-command.js +50 -13
- package/dist/core/commands/naruto-command.js +82 -1
- package/dist/core/commands/research-command.js +83 -17
- package/dist/core/commands/team-command.js +25 -1
- package/dist/core/db-safety.js +26 -0
- package/dist/core/fsx.js +1 -1
- package/dist/core/mad-db/mad-db-capability.js +84 -0
- package/dist/core/mad-db/mad-db-ledger.js +17 -0
- package/dist/core/mad-db/mad-db-policy-resolver.js +46 -0
- package/dist/core/naruto/naruto-real-worker-child.js +11 -3
- package/dist/core/naruto/naruto-real-worker-runtime.js +4 -0
- package/dist/core/pipeline/final-gpt-patch-stage.js +20 -3
- package/dist/core/pipeline-internals/runtime-core.js +74 -8
- package/dist/core/pipeline-internals/runtime-gates.js +44 -0
- package/dist/core/proof/route-proof-gate.js +5 -3
- package/dist/core/proof/route-proof-policy.js +9 -1
- package/dist/core/release/release-gate-affected-selector.js +113 -0
- package/dist/core/release/release-gate-batch-runner.js +67 -0
- package/dist/core/release/release-gate-dag.js +22 -3
- package/dist/core/release/release-gate-resource-governor.js +23 -11
- package/dist/core/research/implementation-blueprint-densifier.js +124 -0
- package/dist/core/research/implementation-blueprint-markdown.js +1 -1
- package/dist/core/research/implementation-blueprint.js +68 -7
- package/dist/core/research/research-claim-builder.js +114 -0
- package/dist/core/research/research-cycle-runner.js +115 -11
- package/dist/core/research/research-final-reviewer.js +181 -1
- package/dist/core/research/research-handoff.js +69 -5
- package/dist/core/research/research-realistic-report.js +162 -0
- package/dist/core/research/research-repetition-detector.js +75 -0
- package/dist/core/research/research-report-quality.js +27 -5
- package/dist/core/research/research-source-ledger-merge.js +186 -0
- package/dist/core/research/research-source-shards.js +176 -0
- package/dist/core/research/research-stage-runner.js +537 -11
- package/dist/core/research/research-synthesis-prompt.js +52 -0
- package/dist/core/research/research-synthesis-writer.js +208 -0
- package/dist/core/research/research-work-graph.js +114 -23
- package/dist/core/research.js +72 -48
- package/dist/core/routes.js +23 -19
- package/dist/core/update/update-notice.js +120 -0
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-dashboard-renderer.js +2 -0
- package/dist/core/zellij/zellij-slot-column-anchor.js +35 -1
- package/dist/core/zellij/zellij-slot-pane-renderer.js +57 -0
- package/dist/core/zellij/zellij-slot-telemetry.js +182 -0
- package/dist/scripts/release-gate-dag-runner.js +5 -0
- package/dist/scripts/release-speed-summary.js +25 -0
- package/package.json +67 -5
- package/schemas/codex/agent-result.schema.json +1 -1
- package/schemas/mad-db/mad-db-capability.schema.json +31 -0
- package/schemas/mad-db/mad-db-ledger.schema.json +14 -0
- package/schemas/research/implementation-blueprint.schema.json +6 -1
- package/schemas/research/research-final-review.schema.json +10 -0
- package/schemas/research/research-source-shard.schema.json +46 -0
- package/schemas/research/research-synthesis-output.schema.json +62 -0
- package/schemas/update/update-notice.schema.json +19 -0
- package/schemas/zellij/zellij-slot-telemetry.schema.json +89 -0
- package/dist/build-manifest.json +0 -1184
- package/dist/scripts/agent-ast-aware-work-graph-check.js +0 -25
- package/dist/scripts/agent-backfill-replenishment-check.js +0 -13
- package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
- package/dist/scripts/agent-background-terminals-check.js +0 -16
- package/dist/scripts/agent-cleanup-command-ux-check.js +0 -12
- package/dist/scripts/agent-cleanup-executor-check.js +0 -53
- package/dist/scripts/agent-cleanup-executor-v2-check.js +0 -39
- package/dist/scripts/agent-cli-options-to-task-graph-check.js +0 -5
- package/dist/scripts/agent-codex-app-cockpit-check.js +0 -91
- package/dist/scripts/agent-codex-child-overlap-check.js +0 -21
- package/dist/scripts/agent-dynamic-cockpit-check.js +0 -10
- package/dist/scripts/agent-dynamic-pool-check.js +0 -13
- package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
- package/dist/scripts/agent-fast-mode-default-check.js +0 -62
- package/dist/scripts/agent-fast-mode-worker-propagation-check.js +0 -7
- package/dist/scripts/agent-follow-up-work-schema-check.js +0 -80
- package/dist/scripts/agent-goal-mode-propagation-check.js +0 -9
- package/dist/scripts/agent-intelligent-work-graph-check.js +0 -25
- package/dist/scripts/agent-janitor-check.js +0 -76
- package/dist/scripts/agent-main-no-scout-check.js +0 -11
- package/dist/scripts/agent-model-authored-patch-envelope-check.js +0 -15
- package/dist/scripts/agent-multi-project-isolation-check.js +0 -86
- package/dist/scripts/agent-native-cli-session-proof-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-10-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-20-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-check.js +0 -7
- package/dist/scripts/agent-no-subagent-scaling-check.js +0 -7
- package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
- package/dist/scripts/agent-parallel-write-kernel-check.js +0 -103
- package/dist/scripts/agent-patch-conflict-rebase-check.js +0 -198
- package/dist/scripts/agent-patch-envelope-extraction-check.js +0 -17
- package/dist/scripts/agent-patch-proof-check.js +0 -41
- package/dist/scripts/agent-patch-proof-runtime-check.js +0 -63
- package/dist/scripts/agent-patch-queue-runtime-check.js +0 -36
- package/dist/scripts/agent-patch-rollback-check.js +0 -38
- package/dist/scripts/agent-patch-rollback-dag-check.js +0 -14
- package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/agent-patch-swarm-runtime-check.js +0 -10
- package/dist/scripts/agent-patch-swarm-runtime-truth-check.js +0 -76
- package/dist/scripts/agent-patch-transaction-journal-check.js +0 -57
- package/dist/scripts/agent-patch-verification-dag-check.js +0 -14
- package/dist/scripts/agent-proof-contract-reconciled-check.js +0 -5
- package/dist/scripts/agent-real-codex-dynamic-smoke-check.js +0 -166
- package/dist/scripts/agent-real-codex-dynamic-smoke-v2-check.js +0 -14
- package/dist/scripts/agent-real-codex-in-zellij-worker-pane-check.js +0 -229
- package/dist/scripts/agent-real-codex-parallel-workers-10-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-20-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-5-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-check.js +0 -5
- package/dist/scripts/agent-role-config-repair-check.js +0 -33
- package/dist/scripts/agent-rollback-command-check.js +0 -86
- package/dist/scripts/agent-route-truth-backfill-check.js +0 -5
- package/dist/scripts/agent-scheduler-proof-check.js +0 -13
- package/dist/scripts/agent-scheduler-proof-hardening-check.js +0 -22
- package/dist/scripts/agent-session-generation-check.js +0 -21
- package/dist/scripts/agent-slot-pane-binding-proof-check.js +0 -64
- package/dist/scripts/agent-source-intelligence-propagation-check.js +0 -9
- package/dist/scripts/agent-strategy-to-lease-wiring-check.js +0 -32
- package/dist/scripts/agent-strategy-to-patch-strict-check.js +0 -54
- package/dist/scripts/agent-task-graph-expansion-check.js +0 -14
- package/dist/scripts/agent-terminal-generations-check.js +0 -23
- package/dist/scripts/agent-visual-consistency-check.js +0 -9
- package/dist/scripts/agent-wiki-context-proof-check.js +0 -62
- package/dist/scripts/agent-worker-backend-router-check.js +0 -63
- package/dist/scripts/agent-worker-scout-limited-check.js +0 -17
- package/dist/scripts/agent-zellij-dynamic-backfill-panes-check.js +0 -34
- package/dist/scripts/agent-zellij-runtime-check.js +0 -84
- package/dist/scripts/all-feature-deep-completion-check.js +0 -31
- package/dist/scripts/appshots-capability-check.js +0 -18
- package/dist/scripts/appshots-evidence-check.js +0 -48
- package/dist/scripts/appshots-operator-policy-check.js +0 -25
- package/dist/scripts/appshots-privacy-safety-check.js +0 -48
- package/dist/scripts/appshots-source-intelligence-check.js +0 -53
- package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -87
- package/dist/scripts/appshots-triwiki-voxel-check.js +0 -46
- package/dist/scripts/architecture-guard-check.js +0 -55
- package/dist/scripts/changelog-check.js +0 -47
- package/dist/scripts/codex-0-133-official-compat-report.js +0 -53
- package/dist/scripts/codex-0-134-official-compat-report.js +0 -110
- package/dist/scripts/codex-0-134-runner-truth-check.js +0 -66
- package/dist/scripts/codex-0-135-compat-check.js +0 -57
- package/dist/scripts/codex-0-136-compat-check.js +0 -30
- package/dist/scripts/codex-0-137-compat-check.js +0 -27
- package/dist/scripts/codex-app-fast-ui-preservation-check.js +0 -32
- package/dist/scripts/codex-app-provider-badge-check.js +0 -37
- package/dist/scripts/codex-app-ui-clobber-guard-check.js +0 -22
- package/dist/scripts/codex-app-ui-preservation-check.js +0 -96
- package/dist/scripts/codex-control-all-pipelines-check.js +0 -36
- package/dist/scripts/codex-control-capability-check.js +0 -10
- package/dist/scripts/codex-control-empty-result-retry-check.js +0 -43
- package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -10
- package/dist/scripts/codex-control-keepalive-no-cot-leak-check.js +0 -14
- package/dist/scripts/codex-control-no-legacy-fallback-check.js +0 -31
- package/dist/scripts/codex-control-side-effect-scope-check.js +0 -26
- package/dist/scripts/codex-control-stream-idle-watchdog-check.js +0 -18
- package/dist/scripts/codex-control-structured-output-check.js +0 -11
- package/dist/scripts/codex-control-thread-registry-check.js +0 -11
- package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
- package/dist/scripts/codex-environment-scoped-approvals-check.js +0 -10
- package/dist/scripts/codex-exec-output-schema-actual-syntax-check.js +0 -33
- package/dist/scripts/codex-fast-mode-profile-propagation-check.js +0 -12
- package/dist/scripts/codex-history-search-check.js +0 -19
- package/dist/scripts/codex-hook-semantic-check.js +0 -15
- package/dist/scripts/codex-hook-strict-subset-check.js +0 -61
- package/dist/scripts/codex-lb-config-toml-safety-check.js +0 -85
- package/dist/scripts/codex-lb-persistence-truth-check.js +0 -96
- package/dist/scripts/codex-lb-setup-fixture-check.js +0 -91
- package/dist/scripts/codex-lb-setup-truthfulness-check.js +0 -84
- package/dist/scripts/codex-legacy-profile-consumers-removed-check.js +0 -24
- package/dist/scripts/codex-managed-proxy-env-check.js +0 -17
- package/dist/scripts/codex-output-schema-fixture-check.js +0 -25
- package/dist/scripts/codex-permission-profiles-check.js +0 -36
- package/dist/scripts/codex-plugin-list-json-check.js +0 -8
- package/dist/scripts/codex-profile-primary-check.js +0 -13
- package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -51
- package/dist/scripts/codex-resume-cwd-truth-check.js +0 -17
- package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -32
- package/dist/scripts/codex-sdk-backend-router-check.js +0 -65
- package/dist/scripts/codex-sdk-capability-check.js +0 -11
- package/dist/scripts/codex-sdk-core-skill-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-dfix-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -9
- package/dist/scripts/codex-sdk-no-legacy-fallback-check.js +0 -33
- package/dist/scripts/codex-sdk-qa-pipeline-check.js +0 -8
- package/dist/scripts/codex-sdk-real-smoke-check.js +0 -39
- package/dist/scripts/codex-sdk-release-review-pipeline-check.js +0 -13
- package/dist/scripts/codex-sdk-research-pipeline-check.js +0 -15
- package/dist/scripts/codex-sdk-sandbox-policy-check.js +0 -21
- package/dist/scripts/codex-sdk-structured-output-check.js +0 -10
- package/dist/scripts/codex-sdk-team-naruto-agent-pipeline-check.js +0 -12
- package/dist/scripts/codex-sdk-thread-registry-check.js +0 -11
- package/dist/scripts/codex-sdk-ux-ppt-review-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-zellij-pane-binding-check.js +0 -13
- package/dist/scripts/codex-thread-runtime-choice-check.js +0 -10
- package/dist/scripts/codex-web-adapter-check.js +0 -12
- package/dist/scripts/computer-use-live-evidence-check.js +0 -55
- package/dist/scripts/computer-use-live-optional-check.js +0 -32
- package/dist/scripts/computer-use-policy-check.js +0 -69
- package/dist/scripts/computer-use-visual-route-fixture-check.js +0 -37
- package/dist/scripts/core-skill-card-schema-check.js +0 -61
- package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -54
- package/dist/scripts/core-skill-heldout-validation-check.js +0 -49
- package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -75
- package/dist/scripts/core-skill-patch-check.js +0 -79
- package/dist/scripts/core-skill-promotion-side-effect-ledger-check.js +0 -64
- package/dist/scripts/core-skill-rollout-scoring-check.js +0 -72
- package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -49
- package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
- package/dist/scripts/dfix-fast-kernel-check.js +0 -26
- package/dist/scripts/dfix-fixture-check.js +0 -6
- package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
- package/dist/scripts/dfix-patch-handoff-check.js +0 -13
- package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/dfix-performance-check.js +0 -15
- package/dist/scripts/dfix-verification-check.js +0 -9
- package/dist/scripts/dfix-verification-recommendation-check.js +0 -15
- package/dist/scripts/docs-truthfulness-check.js +0 -61
- package/dist/scripts/doctor-codex-doctor-parity-check.js +0 -17
- package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -64
- package/dist/scripts/doctor-fix-recovers-corrupted-config-check.js +0 -122
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -39
- package/dist/scripts/evidence-fixture-check.js +0 -26
- package/dist/scripts/evidence-flagship-coverage-check.js +0 -55
- package/dist/scripts/fake-real-proof-policy-v2-check.js +0 -27
- package/dist/scripts/fake-vs-real-proof-policy-check.js +0 -14
- package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -42
- package/dist/scripts/flagship-proof-graph-v2-check.js +0 -48
- package/dist/scripts/flagship-proof-graph-v3-check.js +0 -67
- package/dist/scripts/flagship-proof-graph-v4-check.js +0 -61
- package/dist/scripts/git-precommit-fixture-check.js +0 -41
- package/dist/scripts/git-worktree-cache-performance-check.js +0 -25
- package/dist/scripts/git-worktree-capability-check.js +0 -27
- package/dist/scripts/git-worktree-checkpoint-check.js +0 -20
- package/dist/scripts/git-worktree-cleanup-check.js +0 -27
- package/dist/scripts/git-worktree-cross-rebase-check.js +0 -39
- package/dist/scripts/git-worktree-diff-envelope-check.js +0 -17
- package/dist/scripts/git-worktree-diff-export-check.js +0 -43
- package/dist/scripts/git-worktree-dirty-lock-check.js +0 -17
- package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -14
- package/dist/scripts/git-worktree-integration-primary-check.js +0 -24
- package/dist/scripts/git-worktree-integration-primary-runtime-check.js +0 -20
- package/dist/scripts/git-worktree-manager-check.js +0 -37
- package/dist/scripts/git-worktree-manifest-append-check.js +0 -18
- package/dist/scripts/git-worktree-merge-queue-check.js +0 -31
- package/dist/scripts/git-worktree-pool-performance-check.js +0 -20
- package/dist/scripts/git-worktree-untracked-diff-check.js +0 -18
- package/dist/scripts/goal-mode-official-default-check.js +0 -12
- package/dist/scripts/gpt-final-arbiter-check.js +0 -63
- package/dist/scripts/gpt-final-arbiter-performance-check.js +0 -36
- package/dist/scripts/gpt-image-2-request-validator-check.js +0 -35
- package/dist/scripts/hooks-0.134-context-parity-check.js +0 -20
- package/dist/scripts/hooks-actual-parity-check.js +0 -17
- package/dist/scripts/hooks-actual-parity-v2-check.js +0 -21
- package/dist/scripts/hooks-latest-schema-check.js +0 -20
- package/dist/scripts/hooks-managed-install-fixture-check.js +0 -21
- package/dist/scripts/hooks-official-hash-oracle-check.js +0 -35
- package/dist/scripts/hooks-official-hash-parity-check.js +0 -17
- package/dist/scripts/hooks-subagent-events-check.js +0 -17
- package/dist/scripts/hooks-trust-state-check.js +0 -14
- package/dist/scripts/image-fidelity-fixture-check.js +0 -24
- package/dist/scripts/imagegen-capability-check.js +0 -30
- package/dist/scripts/imagegen-real-smoke-check.js +0 -155
- package/dist/scripts/install-update-preserves-config-check.js +0 -87
- package/dist/scripts/json-schema-recursive-check.js +0 -78
- package/dist/scripts/legacy-multiagent-removal-check.js +0 -85
- package/dist/scripts/legacy-upgrade-matrix-check.js +0 -300
- package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -21
- package/dist/scripts/local-collab-gpt-final-availability-check.js +0 -58
- package/dist/scripts/local-collab-no-local-only-final-check.js +0 -27
- package/dist/scripts/local-collab-policy-check.js +0 -17
- package/dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js +0 -63
- package/dist/scripts/local-llm-all-pipelines-check.js +0 -11
- package/dist/scripts/local-llm-cache-performance-check.js +0 -10
- package/dist/scripts/local-llm-capability-check.js +0 -14
- package/dist/scripts/local-llm-smoke-check.js +0 -23
- package/dist/scripts/local-llm-structured-output-check.js +0 -11
- package/dist/scripts/local-llm-throughput-check.js +0 -10
- package/dist/scripts/local-llm-tool-call-repair-check.js +0 -10
- package/dist/scripts/local-llm-warmup-check.js +0 -11
- package/dist/scripts/loop-blocker-check.js +0 -15
- package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -35
- package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +0 -92
- package/dist/scripts/mad-sks-audit-proof-check.js +0 -34
- package/dist/scripts/mad-sks-db-executor-check.js +0 -5
- package/dist/scripts/mad-sks-executor-proof-graph-check.js +0 -5
- package/dist/scripts/mad-sks-fast-mode-propagation-check.js +0 -24
- package/dist/scripts/mad-sks-file-write-executor-check.js +0 -5
- package/dist/scripts/mad-sks-immutable-harness-check.js +0 -36
- package/dist/scripts/mad-sks-no-harness-modification-check.js +0 -25
- package/dist/scripts/mad-sks-package-executor-check.js +0 -5
- package/dist/scripts/mad-sks-permission-model-check.js +0 -22
- package/dist/scripts/mad-sks-rollback-apply-check.js +0 -5
- package/dist/scripts/mad-sks-service-executor-check.js +0 -5
- package/dist/scripts/mad-sks-shell-executor-check.js +0 -5
- package/dist/scripts/mad-sks-write-guard-check.js +0 -28
- package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +0 -37
- package/dist/scripts/mad-sks-zellij-launch-check.js +0 -102
- package/dist/scripts/mcp-0-134-modernization-check.js +0 -55
- package/dist/scripts/mcp-readonly-concurrency-check.js +0 -17
- package/dist/scripts/mcp-readonly-runtime-scheduler-check.js +0 -20
- package/dist/scripts/mcp-tool-naming-parity-check.js +0 -16
- package/dist/scripts/memory-summary-rebuild-check.js +0 -22
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -180
- package/dist/scripts/naruto-active-pool-check.js +0 -39
- package/dist/scripts/naruto-actual-worker-control-plane-check.js +0 -56
- package/dist/scripts/naruto-allocation-policy-check.js +0 -33
- package/dist/scripts/naruto-allocation-runtime-wiring-check.js +0 -92
- package/dist/scripts/naruto-concurrency-governor-check.js +0 -53
- package/dist/scripts/naruto-extreme-parallelism-check.js +0 -22
- package/dist/scripts/naruto-extreme-parallelism-real-check.js +0 -43
- package/dist/scripts/naruto-gpt-final-pack-check.js +0 -34
- package/dist/scripts/naruto-orchestrator-runtime-source-check.js +0 -70
- package/dist/scripts/naruto-parallel-patch-apply-check.js +0 -41
- package/dist/scripts/naruto-readonly-routing-check.js +0 -116
- package/dist/scripts/naruto-real-active-pool-check.js +0 -39
- package/dist/scripts/naruto-real-active-pool-runtime-check.js +0 -55
- package/dist/scripts/naruto-rebalance-policy-check.js +0 -41
- package/dist/scripts/naruto-role-distribution-check.js +0 -23
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +0 -153
- package/dist/scripts/naruto-verification-pool-check.js +0 -36
- package/dist/scripts/naruto-work-graph-check.js +0 -24
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
- package/dist/scripts/naruto-worktree-coding-check.js +0 -44
- package/dist/scripts/naruto-worktree-gpt-final-check.js +0 -45
- package/dist/scripts/naruto-worktree-zellij-ui-check.js +0 -28
- package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +0 -48
- package/dist/scripts/naruto-zellij-massive-ui-check.js +0 -23
- package/dist/scripts/non-recursive-pipeline-check.js +0 -68
- package/dist/scripts/npm-publish-performance-check.js +0 -65
- package/dist/scripts/official-docs-compat-report.js +0 -304
- package/dist/scripts/packlist-performance-check.js +0 -83
- package/dist/scripts/parallel-verification-engine-check.js +0 -85
- package/dist/scripts/postinstall-safe-side-effects-check.js +0 -65
- package/dist/scripts/ppt-full-e2e-artifact-graph-check.js +0 -40
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
- package/dist/scripts/ppt-image-voxel-relations-check.js +0 -9
- package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
- package/dist/scripts/ppt-imagegen-review-fixture-check.js +0 -6
- package/dist/scripts/ppt-issue-extraction-fixture-check.js +0 -7
- package/dist/scripts/ppt-no-mock-as-real-check.js +0 -8
- package/dist/scripts/ppt-no-text-fallback-check.js +0 -7
- package/dist/scripts/ppt-proof-trust-fixture-check.js +0 -10
- package/dist/scripts/ppt-real-export-adapter-check.js +0 -13
- package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -42
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -16
- package/dist/scripts/ppt-reexport-rereview-check.js +0 -19
- package/dist/scripts/ppt-slide-export-fixture-check.js +0 -7
- package/dist/scripts/prepublish-fast-check.js +0 -128
- package/dist/scripts/priority-full-closure-check.js +0 -12
- package/dist/scripts/product-design-auto-install-check.js +0 -119
- package/dist/scripts/product-design-plugin-routing-check.js +0 -101
- package/dist/scripts/prompt-placeholder-guard-check.js +0 -33
- package/dist/scripts/provider-badge-context-check.js +0 -26
- package/dist/scripts/provider-context-config-toml-check.js +0 -63
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -47
- package/dist/scripts/python-codex-sdk-capability-check.js +0 -75
- package/dist/scripts/python-codex-sdk-sandbox-policy-check.js +0 -10
- package/dist/scripts/python-codex-sdk-stream-bridge-check.js +0 -12
- package/dist/scripts/python-tools-smoke-check.js +0 -71
- package/dist/scripts/qa-actual-route-backfill-check.js +0 -5
- package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
- package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/readme-architecture-imagegen-official-check.js +0 -448
- package/dist/scripts/release-cache-glob-hashing-check.js +0 -42
- package/dist/scripts/release-dag-full-coverage-check.js +0 -53
- package/dist/scripts/release-dist-freshness-check.js +0 -8
- package/dist/scripts/release-dynamic-performance-check.js +0 -103
- package/dist/scripts/release-gate-budget-check.js +0 -36
- package/dist/scripts/release-gate-dag-runner-check.js +0 -17
- package/dist/scripts/release-metadata-1-11-check.js +0 -37
- package/dist/scripts/release-metadata-1-12-check.js +0 -48
- package/dist/scripts/release-metadata-1-13-check.js +0 -53
- package/dist/scripts/release-metadata-1-14-check.js +0 -63
- package/dist/scripts/release-metadata-1-16-check.js +0 -81
- package/dist/scripts/release-metadata-1-17-check.js +0 -51
- package/dist/scripts/release-metadata-1-19-check.js +0 -371
- package/dist/scripts/release-metadata-check.js +0 -7
- package/dist/scripts/release-native-agent-fixture-check.js +0 -41
- package/dist/scripts/release-parallel-check.js +0 -374
- package/dist/scripts/release-parallel-full-coverage-check.js +0 -13
- package/dist/scripts/release-parallel-speed-budget-check.js +0 -79
- package/dist/scripts/release-provenance-check.js +0 -150
- package/dist/scripts/release-readiness-report.js +0 -1146
- package/dist/scripts/release-real-check.js +0 -330
- package/dist/scripts/release-registry-check.js +0 -344
- package/dist/scripts/release-runtime-truth-matrix-check.js +0 -47
- package/dist/scripts/release-stability-report-check.js +0 -99
- package/dist/scripts/release-version-truth-check.js +0 -134
- package/dist/scripts/research-actual-route-backfill-check.js +0 -5
- package/dist/scripts/research-backfill-route-blackbox.js +0 -5
- package/dist/scripts/research-quality-gate-check.js +0 -86
- package/dist/scripts/responses-retry-policy-centralized-check.js +0 -19
- package/dist/scripts/retention-cleanup-safety-check.js +0 -155
- package/dist/scripts/route-blackbox-realism-check.js +0 -21
- package/dist/scripts/route-proof-artifact-structure-check.js +0 -145
- package/dist/scripts/runtime-dist-parity-check.js +0 -78
- package/dist/scripts/runtime-no-mjs-scripts-check.js +0 -45
- package/dist/scripts/runtime-no-src-mjs-check.js +0 -32
- package/dist/scripts/runtime-no-tmux-check.js +0 -113
- package/dist/scripts/runtime-ts-python-boundary-check.js +0 -59
- package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -74
- package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -55
- package/dist/scripts/safety-check.js +0 -23
- package/dist/scripts/shared-memory-fixture-check.js +0 -27
- package/dist/scripts/side-effect-runtime-report-check.js +0 -19
- package/dist/scripts/side-effect-zero-gate-check.js +0 -226
- package/dist/scripts/sks-1-11-fixture-check.js +0 -130
- package/dist/scripts/source-intelligence-all-modes-check.js +0 -32
- package/dist/scripts/source-intelligence-policy-check.js +0 -13
- package/dist/scripts/strategy-adhd-orchestrating-gate-check.js +0 -22
- package/dist/scripts/strategy-file-ownership-plan-check.js +0 -18
- package/dist/scripts/strategy-parallel-modification-plan-check.js +0 -19
- package/dist/scripts/strategy-verification-rollback-dag-check.js +0 -19
- package/dist/scripts/team-actual-route-backfill-check.js +0 -5
- package/dist/scripts/team-backfill-route-blackbox.js +0 -5
- package/dist/scripts/team-parallel-write-blackbox.js +0 -55
- package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/terminal-keyboard-enhancement-safety-check.js +0 -12
- package/dist/scripts/terminal-tui-output-stability-check.js +0 -35
- package/dist/scripts/test-no-orphan-dist-imports-check.js +0 -73
- package/dist/scripts/trust-fixture-check.js +0 -33
- package/dist/scripts/typescript-migration-report.js +0 -78
- package/dist/scripts/ultra-router-auto-router-check.js +0 -33
- package/dist/scripts/ultra-router-classification-check.js +0 -28
- package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/ux-ppt-structured-extraction-check.js +0 -21
- package/dist/scripts/ux-review-extract-real-callouts-fixture-check.js +0 -8
- package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -15
- package/dist/scripts/ux-review-generate-callouts-fixture-check.js +0 -9
- package/dist/scripts/ux-review-image-voxel-relations-check.js +0 -31
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
- package/dist/scripts/ux-review-no-fake-callouts-check.js +0 -8
- package/dist/scripts/ux-review-no-text-fallback-check.js +0 -25
- package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -20
- package/dist/scripts/ux-review-patch-handoff-fixture-check.js +0 -8
- package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -31
- package/dist/scripts/ux-review-real-loop-fixture-check.js +0 -24
- package/dist/scripts/ux-review-recapture-recheck-fixture-check.js +0 -8
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -11
- package/dist/scripts/worker-pane-communication-contract-check.js +0 -54
- package/dist/scripts/wrongness-fixture-check.js +0 -65
- package/dist/scripts/xai-mcp-capability-check.js +0 -14
- package/dist/scripts/zellij-capability-check.js +0 -15
- package/dist/scripts/zellij-dashboard-pane-check.js +0 -70
- package/dist/scripts/zellij-developer-controls-check.js +0 -20
- package/dist/scripts/zellij-doctor-readiness-check.js +0 -63
- package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -21
- package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
- package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -356
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
- package/dist/scripts/zellij-lane-renderer-check.js +0 -65
- package/dist/scripts/zellij-launch-command-truth-check.js +0 -75
- package/dist/scripts/zellij-layout-valid-check.js +0 -90
- package/dist/scripts/zellij-pane-proof-check.js +0 -59
- package/dist/scripts/zellij-real-session-cleanup-check.js +0 -21
- package/dist/scripts/zellij-real-session-heartbeat-check.js +0 -49
- package/dist/scripts/zellij-real-session-launch-check.js +0 -57
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -22
- package/dist/scripts/zellij-right-column-manager-check.js +0 -27
- package/dist/scripts/zellij-screen-proof-check.js +0 -45
- package/dist/scripts/zellij-slot-column-anchor-check.js +0 -66
- package/dist/scripts/zellij-slot-only-ui-check.js +0 -26
- package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -106
- package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -59
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -40
- package/dist/scripts/zellij-ui-design-check.js +0 -105
- package/dist/scripts/zellij-worker-pane-manager-check.js +0 -109
- package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
- package/dist/scripts/zellij-worker-pane-spawn-order-check.js +0 -35
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.input.schema.json +0 -61
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.output.schema.json +0 -103
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.input.schema.json +0 -52
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.output.schema.json +0 -24
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-tool-use.command.input.schema.json +0 -67
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-tool-use.command.output.schema.json +0 -84
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-compact.command.input.schema.json +0 -52
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-compact.command.output.schema.json +0 -24
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-tool-use.command.input.schema.json +0 -65
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-tool-use.command.output.schema.json +0 -105
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/session-start.command.input.schema.json +0 -59
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/session-start.command.output.schema.json +0 -63
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/snapshot-metadata.json +0 -31
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/stop.command.input.schema.json +0 -63
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/stop.command.output.schema.json +0 -45
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/user-prompt-submit.command.input.schema.json +0 -59
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/user-prompt-submit.command.output.schema.json +0 -81
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { spawn } from 'node:child_process';
|
|
5
|
-
import { writeJsonAtomic } from '../core/fsx.js';
|
|
6
|
-
const args = process.argv.slice(2);
|
|
7
|
-
const skipReleaseCheck = args.includes('--skip-release-check') || process.env.SKS_RELEASE_REAL_CHECK_SKIP_RELEASE_CHECK === '1';
|
|
8
|
-
const root = process.cwd();
|
|
9
|
-
const concurrency = Math.max(1, Math.floor(Number(process.env.SKS_RELEASE_REAL_CHECK_CONCURRENCY || 4)));
|
|
10
|
-
const report = {
|
|
11
|
-
schema: 'sks.release-real-check.v1',
|
|
12
|
-
generated_at: new Date().toISOString(),
|
|
13
|
-
ok: false,
|
|
14
|
-
pipeline_shape: {
|
|
15
|
-
schema: 'sks.release-real-check-diamond.v1',
|
|
16
|
-
stages: ['design', 'parallel_processing', 'parallel_verification', 'aggregation'],
|
|
17
|
-
concurrency,
|
|
18
|
-
dependency_model: 'dag-with-ordered-zellij-proof-chains'
|
|
19
|
-
},
|
|
20
|
-
release_check: null,
|
|
21
|
-
environment_required_checks: [],
|
|
22
|
-
real_smoke_checks: [],
|
|
23
|
-
real_ui_checks: [],
|
|
24
|
-
all_checks: [],
|
|
25
|
-
phase_results: [],
|
|
26
|
-
blockers: [],
|
|
27
|
-
warnings: []
|
|
28
|
-
};
|
|
29
|
-
const tasks = [
|
|
30
|
-
task('codex:actual-config-load-probe', 'codex:actual-config-load-probe', { group: 'environment_required', phase: 'parallel_processing' }),
|
|
31
|
-
task('codex:0.137-compat:require-real', 'codex:0.137-compat:require-real', { group: 'environment_required', phase: 'parallel_processing', env: { SKS_REQUIRE_CODEX_0137: '1' } }),
|
|
32
|
-
task('codex:0.136-compat:require-real', 'codex:0.136-compat:require-real', { group: 'environment_required', phase: 'parallel_processing' }),
|
|
33
|
-
task('codex:0.135-compat:require-real', 'codex:0.135-compat:require-real', { group: 'environment_required', phase: 'parallel_processing' }),
|
|
34
|
-
task('doctor:codex-doctor-parity:actual', 'doctor:codex-doctor-parity:actual', { group: 'environment_required', phase: 'parallel_processing' }),
|
|
35
|
-
task('publish:dry-run-performance', 'publish:dry-run-performance', { group: 'environment_required', phase: 'parallel_processing' }),
|
|
36
|
-
task('zellij:capability', 'zellij:capability', { group: 'environment_required', phase: 'parallel_processing', args: ['--require-real'], env: { SKS_REQUIRE_ZELLIJ: '1' } }),
|
|
37
|
-
task('zellij:layout-valid', 'zellij:layout-valid', { group: 'environment_required', phase: 'parallel_processing', args: ['--require-real'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:capability'] }),
|
|
38
|
-
task('zellij:real-session-launch:base', 'zellij:real-session-launch', { group: 'environment_required', phase: 'parallel_verification', args: ['--require-real', '--main-only', '--mission', 'M-release-real-zellij', '--session', 'sks-rrz'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:layout-valid'] }),
|
|
39
|
-
task('zellij:pane-proof:base', 'zellij:pane-proof', { group: 'environment_required', phase: 'parallel_verification', args: ['--require-real', '--mission', 'M-release-real-zellij', '--session', 'sks-rrz', '--expected-lanes', '0'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:real-session-launch:base'] }),
|
|
40
|
-
task('zellij:screen-proof:base', 'zellij:screen-proof', { group: 'environment_required', phase: 'parallel_verification', args: ['--require-real', '--main-only', '--mission', 'M-release-real-zellij'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:real-session-launch:base'] }),
|
|
41
|
-
task('zellij:real-session-cleanup:base', 'zellij:real-session-cleanup', { group: 'environment_required', phase: 'aggregation', args: ['--mission', 'M-release-real-zellij', '--session', 'sks-rrz'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:pane-proof:base', 'zellij:screen-proof:base'] }),
|
|
42
|
-
task('zellij:first-slot-down-stack:real', 'zellij:first-slot-down-stack:real', { group: 'real_ui', phase: 'parallel_verification', args: ['--require-real'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:layout-valid'] }),
|
|
43
|
-
task('zellij:right-column-real-geometry', 'zellij:right-column-real-geometry', { group: 'real_ui', phase: 'parallel_verification', args: ['--require-real'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:layout-valid'] }),
|
|
44
|
-
task('naruto:zellij-dynamic-right-column', 'naruto:zellij-dynamic-right-column', { group: 'real_ui', phase: 'parallel_verification', args: ['--require-real'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:layout-valid'] }),
|
|
45
|
-
task('zellij:worker-pane-real-ui:blackbox', 'zellij:worker-pane-real-ui:blackbox', { group: 'real_ui', phase: 'parallel_verification', args: ['--require-real'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:layout-valid'] }),
|
|
46
|
-
task('zellij:real-session-launch:extra', 'zellij:real-session-launch', { group: 'real_ui', phase: 'parallel_verification', args: ['--require-real', '--main-only', '--mission', 'M-release-real-zellij-extra', '--session', 'sks-rrz-extra'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:layout-valid'] }),
|
|
47
|
-
task('zellij:pane-proof:extra', 'zellij:pane-proof', { group: 'real_ui', phase: 'parallel_verification', args: ['--require-real', '--mission', 'M-release-real-zellij-extra', '--session', 'sks-rrz-extra', '--expected-lanes', '0'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:real-session-launch:extra'] }),
|
|
48
|
-
task('zellij:screen-proof:extra', 'zellij:screen-proof', { group: 'real_ui', phase: 'parallel_verification', args: ['--require-real', '--main-only', '--mission', 'M-release-real-zellij-extra'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:real-session-launch:extra'] }),
|
|
49
|
-
task('zellij:real-session-cleanup:extra', 'zellij:real-session-cleanup', { group: 'real_ui', phase: 'aggregation', args: ['--mission', 'M-release-real-zellij-extra', '--session', 'sks-rrz-extra'], env: { SKS_REQUIRE_ZELLIJ: '1' }, deps: ['zellij:pane-proof:extra', 'zellij:screen-proof:extra'] }),
|
|
50
|
-
task('naruto:worktree-coding:blackbox', 'naruto:worktree-coding:blackbox', { group: 'real_smoke', phase: 'parallel_processing', args: ['--require-real'], env: { SKS_REQUIRE_GIT_WORKTREE: '1' } }),
|
|
51
|
-
task('codex-control:real-smoke', 'codex-control:real-smoke', { group: 'real_smoke', phase: 'parallel_processing', args: ['--require-real'] }),
|
|
52
|
-
task('codex-sdk:real-smoke', 'codex-sdk:real-smoke', { group: 'real_smoke', phase: 'parallel_processing', args: ['--require-real'] }),
|
|
53
|
-
task('local-llm:smoke', 'local-llm:smoke', { group: 'real_smoke', phase: 'parallel_processing', args: ['--require-real'], env: { SKS_REQUIRE_LOCAL_LLM: '1' } }),
|
|
54
|
-
task('local-llm:throughput', 'local-llm:throughput', { group: 'real_smoke', phase: 'parallel_verification', env: { SKS_REQUIRE_LOCAL_LLM: '1' }, deps: ['local-llm:smoke'] }),
|
|
55
|
-
task('local-llm:cache-performance', 'local-llm:cache-performance', { group: 'real_smoke', phase: 'parallel_verification', env: { SKS_REQUIRE_LOCAL_LLM: '1' }, deps: ['local-llm:smoke'] }),
|
|
56
|
-
task('python-sdk:real-smoke', 'python-sdk:real-smoke', {
|
|
57
|
-
group: 'real_smoke',
|
|
58
|
-
phase: 'parallel_verification',
|
|
59
|
-
env: { SKS_REQUIRE_PYTHON_CODEX_SDK: '1', SKS_PYTHON_CODEX_SDK_TIMEOUT_MS: '240000' },
|
|
60
|
-
deps: ['codex-sdk:real-smoke', 'codex-control:real-smoke', 'agent:real-codex-in-zellij-worker-pane'],
|
|
61
|
-
retries: 2,
|
|
62
|
-
retryDelayMs: 1500
|
|
63
|
-
}),
|
|
64
|
-
task('codex:0.134-runner-truth', 'codex:0.134-runner-truth', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
65
|
-
task('agent:real-codex-patch-envelope-smoke', 'agent:real-codex-patch-envelope-smoke', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
66
|
-
task('agent:real-codex-parallel-workers', 'agent:real-codex-parallel-workers', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
67
|
-
task('agent:real-codex-parallel-workers-5', 'agent:real-codex-parallel-workers-5', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
68
|
-
task('agent:real-codex-parallel-workers-10', 'agent:real-codex-parallel-workers-10', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
69
|
-
task('agent:real-codex-parallel-workers-20', 'agent:real-codex-parallel-workers-20', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
70
|
-
task('agent:real-codex-dynamic-smoke-v2', 'agent:real-codex-dynamic-smoke-v2', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
71
|
-
task('agent:real-codex-dynamic-smoke', 'agent:real-codex-dynamic-smoke', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
72
|
-
task('agent:real-codex-in-zellij-worker-pane', 'agent:real-codex-in-zellij-worker-pane', { group: 'real_ui', phase: 'parallel_verification', args: ['--require-real'], deps: ['zellij:layout-valid'] }),
|
|
73
|
-
task('imagegen:real-smoke', 'imagegen:real-smoke', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
74
|
-
task('ux-review:real-imagegen-smoke', 'ux-review:real-imagegen-smoke', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
75
|
-
task('ppt:real-imagegen-smoke', 'ppt:real-imagegen-smoke', { group: 'real_smoke', phase: 'parallel_processing' }),
|
|
76
|
-
task('naruto:real-local-gpt-final-smoke', 'naruto:real-local-gpt-final-smoke', { group: 'real_smoke', phase: 'parallel_verification', env: { SKS_REQUIRE_LOCAL_LLM: '1', SKS_REQUIRE_GPT_FINAL: '1' }, deps: ['local-llm:smoke'] }),
|
|
77
|
-
task('local-collab:gpt-final-performance', 'local-collab:gpt-final-performance', { group: 'real_smoke', phase: 'parallel_verification', env: { SKS_REQUIRE_LOCAL_LLM: '1', SKS_REQUIRE_GPT_FINAL: '1' }, deps: ['local-llm:smoke'] })
|
|
78
|
-
];
|
|
79
|
-
main().catch(async (err) => {
|
|
80
|
-
report.blockers.push(`release_real_check_exception:${err?.message || String(err)}`);
|
|
81
|
-
await finish(false);
|
|
82
|
-
});
|
|
83
|
-
async function main() {
|
|
84
|
-
if (!skipReleaseCheck) {
|
|
85
|
-
report.release_check = await runNpm(task('release:check', 'release:check', { group: 'design', phase: 'design' }));
|
|
86
|
-
collect(report.release_check);
|
|
87
|
-
if (!report.release_check.ok)
|
|
88
|
-
return await finish(false);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
report.release_check = {
|
|
92
|
-
id: 'release:check',
|
|
93
|
-
script: 'release:check',
|
|
94
|
-
group: 'design',
|
|
95
|
-
phase: 'design',
|
|
96
|
-
ok: true,
|
|
97
|
-
skipped: true,
|
|
98
|
-
note: 'Skipped because caller already verified release:check in this workspace.'
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
const result = await runDag(tasks, concurrency);
|
|
102
|
-
report.all_checks = result.results;
|
|
103
|
-
report.environment_required_checks = result.results.filter((row) => row.group === 'environment_required');
|
|
104
|
-
report.real_smoke_checks = result.results.filter((row) => row.group === 'real_smoke');
|
|
105
|
-
report.real_ui_checks = result.results.filter((row) => row.group === 'real_ui');
|
|
106
|
-
report.phase_results = summarizePhases(result.results);
|
|
107
|
-
for (const row of result.results)
|
|
108
|
-
collect(row);
|
|
109
|
-
await finish(result.results.every((row) => row.ok));
|
|
110
|
-
}
|
|
111
|
-
function task(id, script, options = {}) {
|
|
112
|
-
return {
|
|
113
|
-
id,
|
|
114
|
-
script,
|
|
115
|
-
group: options.group || 'real_smoke',
|
|
116
|
-
phase: options.phase || 'parallel_processing',
|
|
117
|
-
args: options.args || [],
|
|
118
|
-
env: options.env || {},
|
|
119
|
-
deps: options.deps || [],
|
|
120
|
-
retries: Number(options.retries || 0),
|
|
121
|
-
retryDelayMs: Number(options.retryDelayMs || 0)
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
async function runDag(taskList, maxConcurrency) {
|
|
125
|
-
const pending = new Map(taskList.map((row) => [row.id, row]));
|
|
126
|
-
const running = new Map();
|
|
127
|
-
const completed = new Map();
|
|
128
|
-
const results = [];
|
|
129
|
-
while (pending.size || running.size) {
|
|
130
|
-
for (const [id, row] of [...pending]) {
|
|
131
|
-
const failedDeps = row.deps.filter((dep) => completed.has(dep) && !completed.get(dep).ok);
|
|
132
|
-
if (failedDeps.length) {
|
|
133
|
-
pending.delete(id);
|
|
134
|
-
const blocked = blockedResult(row, failedDeps);
|
|
135
|
-
completed.set(id, blocked);
|
|
136
|
-
results.push(blocked);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
const ready = [...pending.values()].filter((row) => row.deps.every((dep) => completed.get(dep)?.ok === true));
|
|
140
|
-
while (running.size < maxConcurrency && ready.length) {
|
|
141
|
-
const row = ready.shift();
|
|
142
|
-
pending.delete(row.id);
|
|
143
|
-
const promise = runNpm(row);
|
|
144
|
-
running.set(row.id, promise);
|
|
145
|
-
}
|
|
146
|
-
if (!running.size) {
|
|
147
|
-
if (pending.size) {
|
|
148
|
-
for (const row of pending.values()) {
|
|
149
|
-
const blocked = blockedResult(row, row.deps.filter((dep) => !completed.get(dep)?.ok));
|
|
150
|
-
completed.set(row.id, blocked);
|
|
151
|
-
results.push(blocked);
|
|
152
|
-
}
|
|
153
|
-
pending.clear();
|
|
154
|
-
}
|
|
155
|
-
continue;
|
|
156
|
-
}
|
|
157
|
-
const result = await Promise.race([...running.values()]);
|
|
158
|
-
running.delete(result.id);
|
|
159
|
-
completed.set(result.id, result);
|
|
160
|
-
results.push(result);
|
|
161
|
-
}
|
|
162
|
-
return { results };
|
|
163
|
-
}
|
|
164
|
-
async function runNpm(row) {
|
|
165
|
-
const maxAttempts = Math.max(1, Number(row.retries || 0) + 1);
|
|
166
|
-
const attempts = [];
|
|
167
|
-
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
168
|
-
const result = await runNpmOnce(row, attempt);
|
|
169
|
-
attempts.push(compactAttempt(result));
|
|
170
|
-
if (result.ok || attempt >= maxAttempts) {
|
|
171
|
-
return {
|
|
172
|
-
...result,
|
|
173
|
-
attempt,
|
|
174
|
-
attempts,
|
|
175
|
-
retried: attempts.length > 1
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
await sleep(Math.max(0, Number(row.retryDelayMs || 0)));
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
function runNpmOnce(row, attempt) {
|
|
182
|
-
const npmArgs = ['run', row.script, '--silent'];
|
|
183
|
-
if (row.args?.length)
|
|
184
|
-
npmArgs.push('--', ...row.args);
|
|
185
|
-
const started = Date.now();
|
|
186
|
-
let stdout = '';
|
|
187
|
-
let stderr = '';
|
|
188
|
-
return new Promise((resolve) => {
|
|
189
|
-
const child = spawn('npm', npmArgs, {
|
|
190
|
-
cwd: root,
|
|
191
|
-
env: { ...process.env, ...(row.env || {}) },
|
|
192
|
-
stdio: ['ignore', 'pipe', 'pipe']
|
|
193
|
-
});
|
|
194
|
-
child.stdout.on('data', (chunk) => { stdout = appendTail(stdout, chunk); });
|
|
195
|
-
child.stderr.on('data', (chunk) => { stderr = appendTail(stderr, chunk); });
|
|
196
|
-
child.on('error', (err) => {
|
|
197
|
-
resolve(normalizeResult(row, npmArgs, 1, null, { code: err.code, message: err.message }, stdout, stderr, Date.now() - started, attempt));
|
|
198
|
-
});
|
|
199
|
-
child.on('close', (code, signal) => {
|
|
200
|
-
resolve(normalizeResult(row, npmArgs, code, signal, null, stdout, stderr, Date.now() - started, attempt));
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
function normalizeResult(row, npmArgs, code, signal, error, stdout, stderr, durationMs, attempt) {
|
|
205
|
-
const parsed = parseJson(stdout);
|
|
206
|
-
return {
|
|
207
|
-
id: row.id,
|
|
208
|
-
script: row.script,
|
|
209
|
-
group: row.group,
|
|
210
|
-
phase: row.phase,
|
|
211
|
-
deps: row.deps || [],
|
|
212
|
-
command: ['npm', ...npmArgs],
|
|
213
|
-
ok: code === 0,
|
|
214
|
-
attempt,
|
|
215
|
-
exit_code: code,
|
|
216
|
-
signal,
|
|
217
|
-
duration_ms: durationMs,
|
|
218
|
-
error,
|
|
219
|
-
parsed_schema: parsed?.schema || null,
|
|
220
|
-
parsed_ok: typeof parsed?.ok === 'boolean' ? parsed.ok : null,
|
|
221
|
-
blockers: extractList(parsed, 'blockers'),
|
|
222
|
-
warnings: extractList(parsed, 'warnings'),
|
|
223
|
-
stdout_tail: tail(stdout),
|
|
224
|
-
stderr_tail: tail(stderr)
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
function compactAttempt(result) {
|
|
228
|
-
return {
|
|
229
|
-
attempt: result.attempt,
|
|
230
|
-
ok: result.ok,
|
|
231
|
-
exit_code: result.exit_code,
|
|
232
|
-
duration_ms: result.duration_ms,
|
|
233
|
-
blockers: result.blockers || [],
|
|
234
|
-
stderr_tail: tail(result.stderr_tail || '', 600)
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
function sleep(ms) {
|
|
238
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
239
|
-
}
|
|
240
|
-
function blockedResult(row, failedDeps) {
|
|
241
|
-
return {
|
|
242
|
-
id: row.id,
|
|
243
|
-
script: row.script,
|
|
244
|
-
group: row.group,
|
|
245
|
-
phase: row.phase,
|
|
246
|
-
deps: row.deps || [],
|
|
247
|
-
command: ['npm', 'run', row.script, '--silent'],
|
|
248
|
-
ok: false,
|
|
249
|
-
blocked: true,
|
|
250
|
-
exit_code: null,
|
|
251
|
-
signal: null,
|
|
252
|
-
duration_ms: 0,
|
|
253
|
-
error: null,
|
|
254
|
-
parsed_schema: null,
|
|
255
|
-
parsed_ok: null,
|
|
256
|
-
blockers: failedDeps.map((dep) => `blocked_by_failed_dependency:${dep}`),
|
|
257
|
-
warnings: [],
|
|
258
|
-
stdout_tail: '',
|
|
259
|
-
stderr_tail: `blocked by failed dependency: ${failedDeps.join(', ')}`
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
function collect(result) {
|
|
263
|
-
for (const blocker of result.blockers || []) {
|
|
264
|
-
if (!report.blockers.includes(blocker))
|
|
265
|
-
report.blockers.push(blocker);
|
|
266
|
-
}
|
|
267
|
-
if (!result.ok && !(result.blockers || []).length) {
|
|
268
|
-
const blocker = `${result.id.replace(/[^A-Za-z0-9]+/g, '_')}_failed`;
|
|
269
|
-
if (!report.blockers.includes(blocker))
|
|
270
|
-
report.blockers.push(blocker);
|
|
271
|
-
}
|
|
272
|
-
for (const warning of result.warnings || []) {
|
|
273
|
-
if (!report.warnings.includes(warning))
|
|
274
|
-
report.warnings.push(warning);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
function summarizePhases(results) {
|
|
278
|
-
return ['design', 'parallel_processing', 'parallel_verification', 'aggregation'].map((phase) => {
|
|
279
|
-
const rows = phase === 'design' ? [report.release_check].filter(Boolean) : results.filter((row) => row.phase === phase);
|
|
280
|
-
return {
|
|
281
|
-
phase,
|
|
282
|
-
total: rows.length,
|
|
283
|
-
passed: rows.filter((row) => row.ok).length,
|
|
284
|
-
failed: rows.filter((row) => !row.ok).length,
|
|
285
|
-
duration_ms: rows.reduce((sum, row) => sum + Number(row.duration_ms || 0), 0)
|
|
286
|
-
};
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
async function finish(ok) {
|
|
290
|
-
report.ok = ok && report.blockers.length === 0;
|
|
291
|
-
await writeJsonAtomic(path.join(root, '.sneakoscope', 'reports', 'release-real-check.json'), report);
|
|
292
|
-
console.log(JSON.stringify(report, null, 2));
|
|
293
|
-
if (!report.ok)
|
|
294
|
-
process.exitCode = 1;
|
|
295
|
-
}
|
|
296
|
-
function parseJson(text) {
|
|
297
|
-
const value = String(text || '').trim();
|
|
298
|
-
if (!value)
|
|
299
|
-
return null;
|
|
300
|
-
const start = value.indexOf('{');
|
|
301
|
-
if (start < 0)
|
|
302
|
-
return null;
|
|
303
|
-
try {
|
|
304
|
-
return JSON.parse(value.slice(start));
|
|
305
|
-
}
|
|
306
|
-
catch {
|
|
307
|
-
return null;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
function extractList(parsed, key) {
|
|
311
|
-
if (!parsed || typeof parsed !== 'object')
|
|
312
|
-
return [];
|
|
313
|
-
const values = [];
|
|
314
|
-
const top = parsed[key];
|
|
315
|
-
const nested = parsed.report && typeof parsed.report === 'object' ? parsed.report[key] : null;
|
|
316
|
-
for (const list of [top, nested]) {
|
|
317
|
-
if (Array.isArray(list))
|
|
318
|
-
values.push(...list);
|
|
319
|
-
}
|
|
320
|
-
return [...new Set(values)];
|
|
321
|
-
}
|
|
322
|
-
function appendTail(previous, chunk, limit = 50 * 1024) {
|
|
323
|
-
const text = previous + String(chunk || '');
|
|
324
|
-
return text.length <= limit ? text : text.slice(-limit);
|
|
325
|
-
}
|
|
326
|
-
function tail(value, limit = 4000) {
|
|
327
|
-
const text = String(value || '');
|
|
328
|
-
return text.length <= limit ? text : text.slice(-limit);
|
|
329
|
-
}
|
|
330
|
-
//# sourceMappingURL=release-real-check.js.map
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { spawnSync } from 'node:child_process';
|
|
4
|
-
import fs from 'node:fs';
|
|
5
|
-
import os from 'node:os';
|
|
6
|
-
import path from 'node:path';
|
|
7
|
-
import { fileURLToPath } from 'node:url';
|
|
8
|
-
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
|
|
9
|
-
const expectedRegistry = 'https://registry.npmjs.org/';
|
|
10
|
-
const requireUnpublished = process.argv.includes('--require-unpublished');
|
|
11
|
-
const requirePublishAuth = process.argv.includes('--require-publish-auth');
|
|
12
|
-
const skipNetwork = process.env.SKS_SKIP_REGISTRY_NETWORK_CHECK === '1';
|
|
13
|
-
const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
14
|
-
function fail(message, detail = '') {
|
|
15
|
-
console.error(`Release registry check failed: ${message}`);
|
|
16
|
-
if (detail)
|
|
17
|
-
console.error(detail.trim());
|
|
18
|
-
process.exit(2);
|
|
19
|
-
}
|
|
20
|
-
function normalizeRegistry(value) {
|
|
21
|
-
if (!value)
|
|
22
|
-
return '';
|
|
23
|
-
return String(value).trim().replace(/\/?$/, '/');
|
|
24
|
-
}
|
|
25
|
-
function readJson(file) {
|
|
26
|
-
try {
|
|
27
|
-
return JSON.parse(fs.readFileSync(path.join(root, file), 'utf8'));
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
fail(`unable to read ${file}`, err.message);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function run(cmd, args, options = {}) {
|
|
34
|
-
return spawnSync(cmd, args, {
|
|
35
|
-
cwd: root,
|
|
36
|
-
encoding: 'utf8',
|
|
37
|
-
timeout: 30000,
|
|
38
|
-
...options
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function npmRegistryReadEnv(overrides = {}) {
|
|
42
|
-
const env = { ...process.env, ...overrides };
|
|
43
|
-
delete env.npm_config_tag;
|
|
44
|
-
delete env.NPM_CONFIG_TAG;
|
|
45
|
-
return env;
|
|
46
|
-
}
|
|
47
|
-
function checkPackagePublishConfig(pkg) {
|
|
48
|
-
if (pkg.private)
|
|
49
|
-
fail('package.json private=true would block public npm publication');
|
|
50
|
-
if (pkg.publishConfig?.access !== 'public') {
|
|
51
|
-
fail('package.json publishConfig.access must be public', `found: ${pkg.publishConfig?.access || 'missing'}`);
|
|
52
|
-
}
|
|
53
|
-
const registry = normalizeRegistry(pkg.publishConfig?.registry);
|
|
54
|
-
if (registry !== expectedRegistry) {
|
|
55
|
-
fail('package.json publishConfig.registry must target npmjs', `found: ${registry || 'missing'}\nexpected: ${expectedRegistry}`);
|
|
56
|
-
}
|
|
57
|
-
const isPrerelease = /-/.test(String(pkg.version || ''));
|
|
58
|
-
if (isPrerelease && pkg.publishConfig?.tag !== 'rc') {
|
|
59
|
-
fail('package.json publishConfig.tag must be rc for prerelease versions', `found: ${pkg.publishConfig?.tag || 'missing'}\nversion: ${pkg.version}`);
|
|
60
|
-
}
|
|
61
|
-
if (!isPrerelease && pkg.publishConfig?.tag && pkg.publishConfig.tag !== 'latest') {
|
|
62
|
-
fail('package.json publishConfig.tag must be latest or omitted for stable versions', `found: ${pkg.publishConfig.tag}\nversion: ${pkg.version}`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function checkRootNpmrc(pkg) {
|
|
66
|
-
const npmrcPath = path.join(root, '.npmrc');
|
|
67
|
-
if (!fs.existsSync(npmrcPath))
|
|
68
|
-
return;
|
|
69
|
-
const text = fs.readFileSync(npmrcPath, 'utf8');
|
|
70
|
-
const unsafe = [];
|
|
71
|
-
const isPrerelease = /-/.test(String(pkg.version || ''));
|
|
72
|
-
for (const [index, line] of text.split(/\r?\n/).entries()) {
|
|
73
|
-
const trimmed = line.trim();
|
|
74
|
-
if (!trimmed || trimmed.startsWith('#') || trimmed.startsWith(';'))
|
|
75
|
-
continue;
|
|
76
|
-
const match = trimmed.match(/^(?:@[^:]+:)?registry\s*=\s*(.+)$/);
|
|
77
|
-
if (match && normalizeRegistry(match[1]) !== expectedRegistry)
|
|
78
|
-
unsafe.push(`${index + 1}: ${trimmed}`);
|
|
79
|
-
const tagMatch = trimmed.match(/^tag\s*=\s*(.+)$/);
|
|
80
|
-
if (tagMatch) {
|
|
81
|
-
const tag = tagMatch[1].trim();
|
|
82
|
-
if (isPrerelease && tag !== 'rc')
|
|
83
|
-
unsafe.push(`${index + 1}: ${trimmed}`);
|
|
84
|
-
if (!isPrerelease && tag !== 'latest')
|
|
85
|
-
unsafe.push(`${index + 1}: ${trimmed}`);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
if (unsafe.length) {
|
|
89
|
-
fail('root .npmrc contains publish config incompatible with this release', unsafe.join('\n'));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function checkLockfile(pkg) {
|
|
93
|
-
const lock = readJson('package-lock.json');
|
|
94
|
-
const rootPackage = lock.packages?.[''];
|
|
95
|
-
const mismatches = [
|
|
96
|
-
['package-lock.json name', lock.name, pkg.name],
|
|
97
|
-
['package-lock.json version', lock.version, pkg.version],
|
|
98
|
-
['package-lock root package name', rootPackage?.name, pkg.name],
|
|
99
|
-
['package-lock root package version', rootPackage?.version, pkg.version]
|
|
100
|
-
].filter(([, actual, expected]) => actual !== expected);
|
|
101
|
-
if (mismatches.length) {
|
|
102
|
-
fail('package-lock metadata is not synchronized', mismatches.map(([label, actual, expected]) => `${label}: ${actual || 'missing'} (expected ${expected})`).join('\n'));
|
|
103
|
-
}
|
|
104
|
-
const unsafeResolved = [];
|
|
105
|
-
for (const [entry, meta] of Object.entries(lock.packages || {})) {
|
|
106
|
-
const resolved = meta?.resolved;
|
|
107
|
-
if (!resolved || resolved.startsWith('file:') || resolved.startsWith('link:'))
|
|
108
|
-
continue;
|
|
109
|
-
let parsed;
|
|
110
|
-
try {
|
|
111
|
-
parsed = new URL(resolved);
|
|
112
|
-
}
|
|
113
|
-
catch {
|
|
114
|
-
unsafeResolved.push(`${entry || '<root>'}: ${resolved}`);
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
if (parsed.protocol === 'https:' && parsed.hostname === 'registry.npmjs.org')
|
|
118
|
-
continue;
|
|
119
|
-
unsafeResolved.push(`${entry || '<root>'}: ${resolved}`);
|
|
120
|
-
}
|
|
121
|
-
if (unsafeResolved.length) {
|
|
122
|
-
fail('package-lock contains dependencies resolved outside registry.npmjs.org', unsafeResolved.join('\n'));
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
function checkPackedMetadata(pkg) {
|
|
126
|
-
const env = npmRegistryReadEnv({
|
|
127
|
-
npm_config_cache: process.env.SKS_RELEASE_NPM_CACHE || path.join(os.tmpdir(), 'sneakoscope-npm-cache')
|
|
128
|
-
});
|
|
129
|
-
const result = run(npmBin, ['pack', '--dry-run', '--json', '--ignore-scripts', '--registry', expectedRegistry], { env });
|
|
130
|
-
if (result.status !== 0)
|
|
131
|
-
fail('npm pack dry-run failed', `${result.stdout || ''}\n${result.stderr || ''}`);
|
|
132
|
-
let info;
|
|
133
|
-
try {
|
|
134
|
-
info = JSON.parse(result.stdout)[0];
|
|
135
|
-
}
|
|
136
|
-
catch {
|
|
137
|
-
fail('npm pack dry-run returned non-json output', result.stdout || '');
|
|
138
|
-
}
|
|
139
|
-
if (!info)
|
|
140
|
-
fail('npm pack dry-run returned no package metadata');
|
|
141
|
-
if (info.name !== pkg.name || info.version !== pkg.version) {
|
|
142
|
-
fail('packed package metadata differs from package.json', `pack: ${info.name || 'missing'}@${info.version || 'missing'}\npackage.json: ${pkg.name}@${pkg.version}`);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function compareVersions(a, b) {
|
|
146
|
-
const pa = String(a || '').split(/[.-]/).map((part) => Number.parseInt(part, 10));
|
|
147
|
-
const pb = String(b || '').split(/[.-]/).map((part) => Number.parseInt(part, 10));
|
|
148
|
-
const len = Math.max(pa.length, pb.length);
|
|
149
|
-
for (let i = 0; i < len; i += 1) {
|
|
150
|
-
const da = Number.isFinite(pa[i]) ? pa[i] : 0;
|
|
151
|
-
const db = Number.isFinite(pb[i]) ? pb[i] : 0;
|
|
152
|
-
if (da !== db)
|
|
153
|
-
return da > db ? 1 : -1;
|
|
154
|
-
}
|
|
155
|
-
return 0;
|
|
156
|
-
}
|
|
157
|
-
function checkPublishedVersion(pkg) {
|
|
158
|
-
if (skipNetwork) {
|
|
159
|
-
console.log('Registry network check skipped by SKS_SKIP_REGISTRY_NETWORK_CHECK=1.');
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
const env = npmRegistryReadEnv({
|
|
163
|
-
npm_config_cache: process.env.SKS_RELEASE_NPM_CACHE || path.join(os.tmpdir(), 'sneakoscope-npm-cache')
|
|
164
|
-
});
|
|
165
|
-
const result = run(npmBin, ['view', `${pkg.name}@latest`, 'version', 'dist-tags', '--json', '--registry', expectedRegistry], { env });
|
|
166
|
-
if (result.status !== 0)
|
|
167
|
-
fail('npm registry metadata lookup failed', `${result.stdout || ''}\n${result.stderr || ''}`);
|
|
168
|
-
let info;
|
|
169
|
-
try {
|
|
170
|
-
info = JSON.parse(result.stdout);
|
|
171
|
-
}
|
|
172
|
-
catch {
|
|
173
|
-
fail('npm registry metadata lookup returned non-json output', result.stdout || '');
|
|
174
|
-
}
|
|
175
|
-
const latest = info?.['dist-tags']?.latest || info?.version || null;
|
|
176
|
-
if (!latest)
|
|
177
|
-
fail('npm registry metadata lookup did not return a latest version');
|
|
178
|
-
const exact = run(npmBin, ['view', `${pkg.name}@${pkg.version}`, 'version', '--json', '--registry', expectedRegistry], { env });
|
|
179
|
-
let exactPublished = false;
|
|
180
|
-
if (exact.status === 0) {
|
|
181
|
-
try {
|
|
182
|
-
const exactInfo = JSON.parse(exact.stdout);
|
|
183
|
-
exactPublished = Array.isArray(exactInfo) ? exactInfo.includes(pkg.version) : exactInfo === pkg.version;
|
|
184
|
-
}
|
|
185
|
-
catch {
|
|
186
|
-
exactPublished = String(exact.stdout || '').includes(pkg.version);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
else if (!/E404|No match found|not in this registry/i.test(`${exact.stdout || ''}\n${exact.stderr || ''}`)) {
|
|
190
|
-
fail('npm exact-version lookup failed', `${exact.stdout || ''}\n${exact.stderr || ''}`);
|
|
191
|
-
}
|
|
192
|
-
if (requireUnpublished && exactPublished) {
|
|
193
|
-
fail('package version is already published on npm', `${pkg.name}@${pkg.version}`);
|
|
194
|
-
}
|
|
195
|
-
const cmp = compareVersions(pkg.version, latest);
|
|
196
|
-
if (requireUnpublished && cmp <= 0) {
|
|
197
|
-
fail('package version is not newer than the npm latest dist-tag', `package.json: ${pkg.version}\nnpm latest: ${latest}`);
|
|
198
|
-
}
|
|
199
|
-
const note = exactPublished
|
|
200
|
-
? `exact version already exists; current npm latest is ${latest}`
|
|
201
|
-
: (cmp > 0 ? `ready for new publish over npm latest ${latest}` : `current npm latest is ${latest}`);
|
|
202
|
-
console.log(`Registry metadata check passed: ${pkg.name}@${pkg.version}; ${note}.`);
|
|
203
|
-
}
|
|
204
|
-
function checkPublishAuth(pkg) {
|
|
205
|
-
if (skipNetwork) {
|
|
206
|
-
fail('publish auth check cannot run when SKS_SKIP_REGISTRY_NETWORK_CHECK=1 is set');
|
|
207
|
-
}
|
|
208
|
-
const env = npmRegistryReadEnv({
|
|
209
|
-
npm_config_cache: process.env.SKS_RELEASE_NPM_CACHE || path.join(os.tmpdir(), 'sneakoscope-npm-cache')
|
|
210
|
-
});
|
|
211
|
-
const whoami = run(npmBin, ['whoami', '--registry', expectedRegistry], { env });
|
|
212
|
-
if (whoami.status !== 0) {
|
|
213
|
-
const authHints = npmAuthSourceHints(env);
|
|
214
|
-
fail('npm publish auth is missing or invalid', [
|
|
215
|
-
tail(`${whoami.stdout || ''}\n${whoami.stderr || ''}`),
|
|
216
|
-
'',
|
|
217
|
-
...publishAuthRepairInstructions(pkg, authHints)
|
|
218
|
-
].join('\n'));
|
|
219
|
-
}
|
|
220
|
-
const user = normalizeNpmUser(whoami.stdout);
|
|
221
|
-
if (!user)
|
|
222
|
-
fail('npm whoami returned an empty username', whoami.stdout || '');
|
|
223
|
-
const maintainers = packageMaintainers(pkg, env);
|
|
224
|
-
if (maintainers.length > 0 && !maintainers.includes(user)) {
|
|
225
|
-
fail('authenticated npm user is not a package maintainer', [
|
|
226
|
-
`npm whoami: ${user}`,
|
|
227
|
-
`${pkg.name} maintainers: ${maintainers.join(', ')}`,
|
|
228
|
-
`Log in as one of the listed maintainers or ask an owner to run \`npm owner add ${user} ${pkg.name}\`.`
|
|
229
|
-
].join('\n'));
|
|
230
|
-
}
|
|
231
|
-
const report = {
|
|
232
|
-
schema: 'sks.release-publish-auth.v1',
|
|
233
|
-
ok: true,
|
|
234
|
-
package: pkg.name,
|
|
235
|
-
version: pkg.version,
|
|
236
|
-
registry: expectedRegistry,
|
|
237
|
-
npm_user: user,
|
|
238
|
-
maintainers,
|
|
239
|
-
maintainer_match: maintainers.length === 0 ? null : maintainers.includes(user),
|
|
240
|
-
generated_at: new Date().toISOString()
|
|
241
|
-
};
|
|
242
|
-
const out = path.join(root, '.sneakoscope', 'reports', 'release-publish-auth.json');
|
|
243
|
-
fs.mkdirSync(path.dirname(out), { recursive: true });
|
|
244
|
-
fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
|
|
245
|
-
console.log(`Publish auth check passed: ${pkg.name}@${pkg.version} as ${user}.`);
|
|
246
|
-
}
|
|
247
|
-
function publishAuthRepairInstructions(pkg, authHints) {
|
|
248
|
-
const lines = [];
|
|
249
|
-
if (authHints.length > 0) {
|
|
250
|
-
lines.push(`npm auth config was found (${authHints.join(', ')}), but the npm registry rejected it.`);
|
|
251
|
-
lines.push('That usually means the token is expired, revoked, not valid for npmjs.org, or not publish-capable for this package.');
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
254
|
-
lines.push('No npm auth token was found in the checked npm config/env locations.');
|
|
255
|
-
}
|
|
256
|
-
lines.push(`Refresh local auth: \`npm logout --registry ${expectedRegistry}\`, then \`npm login --registry ${expectedRegistry}\` as a maintainer of ${pkg.name}.`);
|
|
257
|
-
lines.push(`Verify before publishing: \`npm whoami --registry ${expectedRegistry}\`.`);
|
|
258
|
-
lines.push('For token-based publishing, configure npm itself with a registry token, for example `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}` in the npm userconfig/project .npmrc and export a publish-capable token. A raw `NPM_TOKEN` environment variable alone is not enough unless npm config references it.');
|
|
259
|
-
return lines;
|
|
260
|
-
}
|
|
261
|
-
function npmAuthSourceHints(env) {
|
|
262
|
-
const hints = [];
|
|
263
|
-
if (env.NODE_AUTH_TOKEN)
|
|
264
|
-
hints.push('NODE_AUTH_TOKEN env');
|
|
265
|
-
if (env.NPM_TOKEN)
|
|
266
|
-
hints.push('NPM_TOKEN env (requires npmrc interpolation)');
|
|
267
|
-
for (const file of npmConfigCandidateFiles(env)) {
|
|
268
|
-
for (const hint of npmAuthHintsFromFile(file))
|
|
269
|
-
hints.push(hint);
|
|
270
|
-
}
|
|
271
|
-
return [...new Set(hints)];
|
|
272
|
-
}
|
|
273
|
-
function npmConfigCandidateFiles(env) {
|
|
274
|
-
const files = [
|
|
275
|
-
path.join(root, '.npmrc'),
|
|
276
|
-
env.npm_config_userconfig,
|
|
277
|
-
env.NPM_CONFIG_USERCONFIG,
|
|
278
|
-
path.join(os.homedir(), '.npmrc')
|
|
279
|
-
].filter(Boolean);
|
|
280
|
-
return [...new Set(files.map((file) => path.resolve(String(file))))];
|
|
281
|
-
}
|
|
282
|
-
function npmAuthHintsFromFile(file) {
|
|
283
|
-
if (!fs.existsSync(file))
|
|
284
|
-
return [];
|
|
285
|
-
let text = '';
|
|
286
|
-
try {
|
|
287
|
-
text = fs.readFileSync(file, 'utf8');
|
|
288
|
-
}
|
|
289
|
-
catch {
|
|
290
|
-
return [];
|
|
291
|
-
}
|
|
292
|
-
const hints = [];
|
|
293
|
-
for (const [index, line] of text.split(/\r?\n/).entries()) {
|
|
294
|
-
const trimmed = line.trim();
|
|
295
|
-
if (!trimmed || trimmed.startsWith('#') || trimmed.startsWith(';'))
|
|
296
|
-
continue;
|
|
297
|
-
const lower = trimmed.toLowerCase();
|
|
298
|
-
const hasAuthKey = /(?::|^)_authtoken\s*=|(?::|^)_auth\s*=|(?::|^)username\s*=|(?::|^)_password\s*=/.test(lower);
|
|
299
|
-
if (!hasAuthKey)
|
|
300
|
-
continue;
|
|
301
|
-
const scopedToExpectedRegistry = lower.includes('//registry.npmjs.org/') || lower.startsWith('_auth');
|
|
302
|
-
if (scopedToExpectedRegistry)
|
|
303
|
-
hints.push(`${file}:${index + 1}`);
|
|
304
|
-
}
|
|
305
|
-
return hints;
|
|
306
|
-
}
|
|
307
|
-
function packageMaintainers(pkg, env) {
|
|
308
|
-
const result = run(npmBin, ['view', pkg.name, 'maintainers', '--json', '--registry', expectedRegistry], { env });
|
|
309
|
-
if (result.status !== 0) {
|
|
310
|
-
const text = `${result.stdout || ''}\n${result.stderr || ''}`;
|
|
311
|
-
if (/E404|not in this registry|No match found/i.test(text))
|
|
312
|
-
return [];
|
|
313
|
-
fail('npm maintainer lookup failed', text);
|
|
314
|
-
}
|
|
315
|
-
try {
|
|
316
|
-
const parsed = JSON.parse(result.stdout);
|
|
317
|
-
const rows = Array.isArray(parsed) ? parsed : (parsed ? [parsed] : []);
|
|
318
|
-
return [...new Set(rows.map(normalizeNpmUser).filter(Boolean))].sort();
|
|
319
|
-
}
|
|
320
|
-
catch {
|
|
321
|
-
return [...new Set(String(result.stdout || '').split(/\r?\n/).map(normalizeNpmUser).filter(Boolean))].sort();
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
function normalizeNpmUser(value) {
|
|
325
|
-
if (!value)
|
|
326
|
-
return '';
|
|
327
|
-
if (typeof value === 'object')
|
|
328
|
-
return normalizeNpmUser(value.name || value.username || '');
|
|
329
|
-
return String(value).trim().replace(/^@/, '').split(/\s+/)[0].toLowerCase();
|
|
330
|
-
}
|
|
331
|
-
function tail(value, limit = 1200) {
|
|
332
|
-
const text = String(value || '').trim();
|
|
333
|
-
return text.length > limit ? text.slice(-limit) : text;
|
|
334
|
-
}
|
|
335
|
-
const pkg = readJson('package.json');
|
|
336
|
-
checkPackagePublishConfig(pkg);
|
|
337
|
-
checkRootNpmrc(pkg);
|
|
338
|
-
checkLockfile(pkg);
|
|
339
|
-
checkPackedMetadata(pkg);
|
|
340
|
-
checkPublishedVersion(pkg);
|
|
341
|
-
if (requirePublishAuth)
|
|
342
|
-
checkPublishAuth(pkg);
|
|
343
|
-
console.log(`Release registry check passed: ${pkg.name}@${pkg.version} -> ${expectedRegistry}`);
|
|
344
|
-
//# sourceMappingURL=release-registry-check.js.map
|