sneakoscope 7.1.0 → 7.3.0
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 +9 -1
- package/config/architecture-budgets.v1.json +1 -8
- package/crates/sks-core/Cargo.lock +225 -1
- package/crates/sks-core/Cargo.toml +8 -1
- package/crates/sks-core/src/main.rs +7 -1
- package/crates/sks-core/src/search/files.rs +114 -0
- package/crates/sks-core/src/search/mod.rs +274 -0
- package/crates/sks-core/src/search/text.rs +175 -0
- package/dist/bin/sks-dispatch.js +4 -3
- package/dist/cli/command-manifest-lite.js +177 -6
- package/dist/cli/command-registry.js +42 -8
- package/dist/cli/help.js +30 -0
- package/dist/cli/install-helpers-codex-lb-config.js +9 -6
- package/dist/cli/install-helpers-codex-lb-selftest-chain.js +1 -1
- package/dist/cli/install-helpers-install-support.js +1 -1
- package/dist/cli/install-helpers.js +19 -9
- package/dist/cli/router.js +16 -3
- package/dist/commands/codex-app.js +40 -5
- package/dist/commands/doctor-profile.js +78 -0
- package/dist/commands/doctor.js +29 -69
- package/dist/commands/search.js +4 -0
- package/dist/config/skills-manifest.json +53 -60
- package/dist/core/agent-bridge/agent-manifest.js +22 -26
- package/dist/core/agent-bridge/host-capability-policy.js +109 -8
- package/dist/core/agent-bridge/host-capability-runtime.js +178 -50
- package/dist/core/agent-guidance/directive-registry.js +123 -0
- package/dist/core/agents/agent-effort-policy.js +45 -6
- package/dist/core/agents/agent-worker-pipeline.js +1 -3
- package/dist/core/agents/native-worker-backend-router.js +43 -19
- package/dist/core/auto-review.js +1 -3
- package/dist/core/code-structure.js +282 -19
- package/dist/core/codex/codex-config-guard.js +14 -4
- package/dist/core/codex/codex-config-toml.js +1 -3
- package/dist/core/codex-app/codex-agent-role-sync.js +1 -3
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +14 -1
- package/dist/core/codex-app/codex-app-types.js +2 -3
- package/dist/core/codex-app/codex-desktop-routing-ownership.js +91 -0
- package/dist/core/codex-app/codex-hook-approval-probe.js +1 -3
- package/dist/core/codex-app/codex-hook-lifecycle.js +1 -3
- package/dist/core/codex-app/codex-init-deep.js +22 -10
- package/dist/core/codex-app/codex-model-catalog.js +384 -0
- package/dist/core/codex-app/codex-models-cache.js +160 -0
- package/dist/core/codex-app/desktop-routing-snapshot.js +233 -0
- package/dist/core/codex-app/glm-profile-installer.js +1 -3
- package/dist/core/codex-app/mcp-manager.js +1 -3
- package/dist/core/codex-app/menubar/constants.js +3 -0
- package/dist/core/codex-app/menubar/installer.js +11 -1
- package/dist/core/codex-app/multi-provider-router-support.js +202 -0
- package/dist/core/codex-app/multi-provider-router.js +379 -0
- package/dist/core/codex-app/openrouter-activate.js +189 -26
- package/dist/core/codex-app/openrouter-base-instructions.js +1 -0
- package/dist/core/codex-app/openrouter-model-catalog.js +217 -0
- package/dist/core/codex-app/role-model-catalog-priority.js +61 -0
- package/dist/core/codex-app.js +30 -6
- package/dist/core/codex-compat/codex-hook-semantic-validator.js +1 -3
- package/dist/core/codex-control/codex-app-server-v2-client.js +39 -2
- package/dist/core/codex-lb/codex-lb-env.js +1 -3
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +6 -1
- package/dist/core/codex-native/codex-native-feature-broker.js +2 -6
- package/dist/core/codex-native/codex-native-interop-policy.js +1 -3
- package/dist/core/codex-native/codex-native-reference-cache.js +1 -3
- package/dist/core/codex-native/codex-native-reference-source.js +1 -3
- package/dist/core/codex-native/codex-native-repair-transaction.js +1 -3
- package/dist/core/codex-native/core-skill-manifest.js +3 -2
- package/dist/core/codex-native/native-capability-repair-matrix.js +1 -3
- package/dist/core/codex-plugins/codex-plugin-repair.js +1 -3
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +4 -4
- package/dist/core/commands/agent-bridge-command.js +24 -3
- package/dist/core/commands/image-ux-review-command.js +5 -11
- package/dist/core/commands/menubar-command.js +1 -1
- package/dist/core/commands/naruto-command.js +40 -13
- package/dist/core/commands/pipeline-command.js +5 -2
- package/dist/core/commands/release-command.js +63 -1
- package/dist/core/commands/remote-command.js +18 -0
- package/dist/core/commands/search-command.js +151 -0
- package/dist/core/commands/telegram-command.js +251 -108
- package/dist/core/commands/uninstall-command.js +1 -1
- package/dist/core/config/secret-preservation.js +1 -3
- package/dist/core/context7-client.js +2 -1
- package/dist/core/db-review.js +704 -0
- package/dist/core/db-safety.js +17 -23
- package/dist/core/doctor/browser-use-repair.js +1 -3
- package/dist/core/doctor/codex-startup-config-repair.js +1 -3
- package/dist/core/doctor/computer-use-repair.js +1 -3
- package/dist/core/doctor/context7-mcp-repair.js +1 -3
- package/dist/core/doctor/current-project-guidance.js +1 -3
- package/dist/core/doctor/doctor-codex-startup-repair.js +1 -3
- package/dist/core/doctor/doctor-dirty-planner.js +2 -2
- package/dist/core/doctor/doctor-native-capability-repair.js +1 -3
- package/dist/core/doctor/doctor-transaction.js +1 -3
- package/dist/core/doctor/imagegen-repair.js +1 -3
- package/dist/core/doctor/legacy-global-hook-cleanup.js +1 -3
- package/dist/core/doctor/mcp-transport-collision-repair.js +1 -3
- package/dist/core/doctor/retired-managed-residue-private.js +1 -3
- package/dist/core/doctor/supabase-mcp-repair.js +1 -3
- package/dist/core/engineering-sanity-review.js +186 -0
- package/dist/core/errors/message.js +3 -0
- package/dist/core/evidence/evidence-schema.js +1 -3
- package/dist/core/feature-fixtures.js +1 -0
- package/dist/core/feature-registry.js +1 -3
- package/dist/core/fsx.js +13 -0
- package/dist/core/git-hygiene/shared-memory-publish.js +1 -3
- package/dist/core/git-hygiene/validators.js +1 -3
- package/dist/core/harness-guard.js +21 -3
- package/dist/core/hooks-runtime/hook-context.js +2 -2
- package/dist/core/image-ux-review/imagegen-adapter.js +52 -56
- package/dist/core/image-ux-review/real-callout-extractor.js +6 -1
- package/dist/core/image-ux-review.js +3 -5
- package/dist/core/imagegen/codex-lb-imagegen-target.js +70 -0
- package/dist/core/imagegen/imagegen-capability.js +11 -11
- package/dist/core/imagegen/imagegen-evidence.js +32 -0
- package/dist/core/init/skills.js +9 -11
- package/dist/core/init.js +4 -6
- package/dist/core/json/records.js +9 -0
- package/dist/core/json-schema-validator.js +1 -3
- package/dist/core/lean-engineering-policy.js +54 -0
- package/dist/core/loops/loop-continuation-enforcer.js +1 -3
- package/dist/core/mad-sks/sql-plane/mcp-executor.js +2 -1
- package/dist/core/mad-sks/sql-plane/policy.js +2 -1
- package/dist/core/managed-assets/managed-assets-manifest.js +4 -3
- package/dist/core/mcp-config/codex-cli-adapter.js +1 -3
- package/dist/core/mcp-config/config-reader.js +2 -3
- package/dist/core/mcp-config/guarded-patch.js +1 -1
- package/dist/core/mcp-config/health-check.js +2 -1
- package/dist/core/mcp-config/mutation.js +1 -1
- package/dist/core/mcp-config/restore.js +1 -1
- package/dist/core/mcp-config/secret-policy.js +1 -3
- package/dist/core/migration/migration-transaction-journal.js +3 -3
- package/dist/core/naruto/naruto-concurrency-governor.js +2 -2
- package/dist/core/perf/import-graph-budget.js +91 -1
- package/dist/core/pipeline/pipeline-plan-writer.js +1 -1
- package/dist/core/pipeline-internals/runtime-core.js +121 -23
- package/dist/core/pipeline-internals/runtime-gates.js +193 -4
- package/dist/core/pipeline.js +1 -1
- package/dist/core/ppt-review/slide-imagegen-review.js +7 -7
- package/dist/core/ppt.js +3 -3
- package/dist/core/product-design-app-server.js +2 -1
- package/dist/core/proof/fake-real-proof-policy.js +1 -3
- package/dist/core/proof/root-cause-policy.js +1 -3
- package/dist/core/proof/validation.js +1 -3
- package/dist/core/provider/model-router.js +4 -0
- package/dist/core/provider/provider-context.js +1 -3
- package/dist/core/providers/openrouter/openrouter-account.js +1 -3
- package/dist/core/quality/helper-dedup.js +0 -0
- package/dist/core/recallpulse.js +1 -1
- package/dist/core/release/file-ownership.js +26 -17
- package/dist/core/release/macos-menubar-proof.js +59 -1
- package/dist/core/release/main-push-guard.js +288 -24
- package/dist/core/release/main-push-receipt.js +10 -45
- package/dist/core/release/package-size-budget.js +1 -1
- package/dist/core/release/release-gate-contract.js +2 -0
- package/dist/core/release/release-pack-receipt.js +1 -1
- package/dist/core/release/release-proof-io.js +33 -0
- package/dist/core/release/release-upgrade-baseline.js +9 -0
- package/dist/core/release/runtime-script-pack-closure.js +153 -4
- package/dist/core/release/stage-publish.js +194 -0
- package/dist/core/remote/index.js +2 -0
- package/dist/core/remote/local-worker-client.js +35 -0
- package/dist/core/remote/machine-registry.js +18 -13
- package/dist/core/remote/owner-proof.js +1 -3
- package/dist/core/remote/protocol.js +1 -3
- package/dist/core/remote/readiness.js +1 -3
- package/dist/core/remote/session-binding.js +153 -0
- package/dist/core/remote/session-index.js +1 -3
- package/dist/core/remote/types.js +1 -0
- package/dist/core/remote/worker.js +228 -14
- package/dist/core/responses-stream.js +151 -0
- package/dist/core/routes/dollar-manifest-lite.js +1 -1
- package/dist/core/routes.js +8 -8
- package/dist/core/rust-accelerator.js +12 -2
- package/dist/core/safety/ssot-guard.js +1 -3
- package/dist/core/search/benchmark.js +358 -0
- package/dist/core/search/cache.js +65 -0
- package/dist/core/search/context.js +144 -0
- package/dist/core/search/doctor.js +74 -0
- package/dist/core/search/files.js +192 -0
- package/dist/core/search/index.js +5 -0
- package/dist/core/search/ipc.js +64 -0
- package/dist/core/search/provider.js +142 -0
- package/dist/core/search/rust-bridge.js +24 -0
- package/dist/core/search/structure.js +230 -0
- package/dist/core/search/symbol.js +272 -0
- package/dist/core/search/text.js +146 -0
- package/dist/core/search/types.js +22 -0
- package/dist/core/search/typescript-ls.js +215 -0
- package/dist/core/search-visibility/discovery.js +1 -3
- package/dist/core/skill-forge.js +1 -1
- package/dist/core/stop-gate/gate-evaluator.js +3 -3
- package/dist/core/stop-gate/stop-gate-check.js +1 -3
- package/dist/core/structured-output-adapter.js +62 -2
- package/dist/core/subagents/agent-catalog.js +56 -43
- package/dist/core/subagents/model-policy.js +17 -7
- package/dist/core/subagents/naruto-proof-projection.js +2 -6
- package/dist/core/subagents/official-subagent-config.js +1 -3
- package/dist/core/subagents/official-subagent-preparation.js +73 -10
- package/dist/core/subagents/official-subagent-prompt.js +85 -18
- package/dist/core/subagents/official-subagent-runner.js +10 -5
- package/dist/core/subagents/role-model-preferences.js +202 -44
- package/dist/core/subagents/subagent-evidence.js +1 -3
- package/dist/core/subagents/thread-budget.js +1 -1
- package/dist/core/subagents/triwiki-attention.js +1 -5
- package/dist/core/telegram/config.js +29 -12
- package/dist/core/telegram/hub.js +8 -2
- package/dist/core/telegram/index.js +2 -0
- package/dist/core/telegram/messages.js +8 -2
- package/dist/core/telegram/runtime-projection.js +8 -5
- package/dist/core/telegram/runtime.js +19 -9
- package/dist/core/telegram/service.js +181 -0
- package/dist/core/telegram/setup.js +220 -0
- package/dist/core/text/regex.js +3 -0
- package/dist/core/text/strings.js +6 -0
- package/dist/core/triwiki-wrongness/image-wrongness.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-proof-linker.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-retrieval.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-schema.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +1 -3
- package/dist/core/trust-kernel/completion-contract.js +1 -3
- package/dist/core/trust-kernel/route-contract.js +1 -3
- package/dist/core/update/update-migration-state.js +1 -3
- package/dist/core/update-check.js +20 -6
- package/dist/core/verification/diff-quality.js +3 -4
- package/dist/core/verification/impact-scan.js +36 -89
- package/dist/core/verification/mistake-rule-compiler.js +17 -4
- package/dist/core/version-manager.js +3 -20
- package/dist/core/version.js +1 -1
- package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +23 -3
- package/dist/native/sks-menubar/Sources/ControlKit.swift +102 -0
- package/dist/native/sks-menubar/Sources/DiagnosticsViewController.swift +23 -11
- package/dist/native/sks-menubar/Sources/MCPServersViewController.swift +7 -3
- package/dist/native/sks-menubar/Sources/OperationCoordinator.swift +17 -1
- package/dist/native/sks-menubar/Sources/OverviewViewController.swift +22 -15
- package/dist/native/sks-menubar/Sources/ProcessClient.swift +15 -5
- package/dist/native/sks-menubar/Sources/ProvidersMultiProvider.swift +324 -0
- package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +154 -214
- package/dist/native/sks-menubar/Sources/ProvidersRoleModels.swift +252 -0
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +77 -71
- package/dist/native/sks-menubar/Sources/RemoteTelegramViewController.swift +167 -51
- package/dist/native/sks-menubar/Sources/SettingsViewController.swift +14 -5
- package/dist/native/sks-menubar/Sources/SidebarItem.swift +15 -1
- package/dist/native/sks-menubar/Sources/StatusItemController.swift +2 -2
- package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +16 -12
- package/dist/scripts/agent-guidance-dedup-check.js +23 -0
- package/dist/scripts/agent-message-bus-reader-check.js +1 -1
- package/dist/scripts/all-feature-deep-completion-check.js +1 -1
- package/dist/scripts/appshots-thread-attachment-discovery-check.js +1 -1
- package/dist/scripts/architecture-guard-check.js +1 -2
- package/dist/scripts/certificate-sla-check.js +1 -1
- package/dist/scripts/cli-output-consistency-check.js +1 -1
- package/dist/scripts/codex-0-134-runner-truth-check.js +1 -1
- package/dist/scripts/codex-0138-capability-artifact-check.js +1 -1
- package/dist/scripts/codex-0138-capability-check.js +1 -1
- package/dist/scripts/codex-0138-doctor-check.js +1 -1
- package/dist/scripts/codex-0138-feature-probes-check.js +1 -1
- package/dist/scripts/codex-0144-app-server-v2-check.js +1 -1
- package/dist/scripts/codex-0144-binary-identity-check.js +1 -1
- package/dist/scripts/codex-0144-capability-check.js +1 -1
- package/dist/scripts/codex-0144-core-real-probes-check.js +1 -1
- package/dist/scripts/codex-0144-manifest-check.js +1 -1
- package/dist/scripts/codex-0144-policy-check.js +1 -1
- package/dist/scripts/codex-0144-thread-store-check.js +1 -1
- package/dist/scripts/codex-agent-role-rich-content-check.js +2 -2
- package/dist/scripts/codex-agent-role-sync-check.js +2 -2
- package/dist/scripts/codex-agent-type-routing-check.js +2 -2
- package/dist/scripts/codex-app-execution-profile-check.js +2 -2
- package/dist/scripts/codex-app-handoff-check.js +1 -1
- package/dist/scripts/codex-app-handoff-launch-check.js +1 -1
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +1 -1
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +1 -3
- package/dist/scripts/codex-native-feature-broker-blackbox.js +2 -2
- package/dist/scripts/codex-native-feature-broker-check.js +2 -2
- package/dist/scripts/{sks-3-1-6-directive-check-lib.js → codex-native-gate-lib.js} +5 -5
- package/dist/scripts/codex-native-harness-compat-check.js +2 -2
- package/dist/scripts/codex-native-hook-lifecycle-proof-check.js +2 -2
- package/dist/scripts/codex-plugin-app-template-policy-check.js +1 -1
- package/dist/scripts/codex-sdk-backend-router-check.js +1 -1
- package/dist/scripts/codex-sdk-capability-check.js +1 -1
- package/dist/scripts/context7-evidence-dedupe-check.js +1 -1
- package/dist/scripts/core-skill-card-schema-check.js +1 -1
- package/dist/scripts/core-skill-deployment-snapshot-check.js +1 -1
- package/dist/scripts/core-skill-heldout-validation-check.js +1 -1
- package/dist/scripts/core-skill-no-inference-optimizer-check.js +1 -1
- package/dist/scripts/core-skill-patch-check.js +1 -1
- package/dist/scripts/core-skill-route-runtime-integration-check.js +1 -1
- package/dist/scripts/current-command-surface-check.js +1 -1
- package/dist/scripts/current-surface-update-e2e-check.js +4 -1
- package/dist/scripts/current-upgrade-matrix-check.js +1 -1
- package/dist/scripts/dfix-fixture-check.js +1 -1
- package/dist/scripts/dfix-patch-handoff-check.js +1 -1
- package/dist/scripts/dfix-verification-check.js +1 -1
- package/dist/scripts/dfix-verification-recommendation-check.js +1 -1
- package/dist/scripts/docs-truthfulness-check.js +16 -3
- package/dist/scripts/doctor-codex-app-harness-check.js +2 -2
- package/dist/scripts/evidence-flagship-coverage-check.js +1 -1
- package/dist/scripts/{sks-1-18-gate-lib.js → gate-lib.js} +1 -1
- package/dist/scripts/gate-policy-audit-check.js +4 -1
- package/dist/scripts/git-worktree-checkpoint-check.js +1 -1
- package/dist/scripts/git-worktree-cross-rebase-check.js +1 -1
- package/dist/scripts/git-worktree-diff-envelope-check.js +1 -1
- package/dist/scripts/git-worktree-dirty-lock-check.js +1 -1
- package/dist/scripts/git-worktree-dirty-main-detection-check.js +1 -1
- package/dist/scripts/git-worktree-integration-primary-check.js +1 -1
- package/dist/scripts/git-worktree-manifest-append-check.js +1 -1
- package/dist/scripts/git-worktree-untracked-diff-check.js +1 -1
- package/dist/scripts/harness-benchmark-check.js +1 -1
- package/dist/scripts/helper-dedup-check.js +62 -0
- package/dist/scripts/hook-latency-budget-check.js +1 -1
- package/dist/scripts/image-artifact-path-contract-check.js +1 -1
- package/dist/scripts/imagegen-real-smoke-check.js +2 -5
- package/dist/scripts/installed-package-smoke-check.js +1 -1
- package/dist/scripts/legacy-gate-inventory-check.js +1 -1
- package/dist/scripts/legacy-gate-purge-check.js +1 -1
- package/dist/scripts/legacy-strong-inventory-check.js +1 -1
- package/dist/scripts/lib/codex-sdk-gate-lib.js +1 -1
- package/dist/scripts/mad-sks-launch-sql-plane-boundary-check.js +1 -1
- package/dist/scripts/mad-sks-sql-plane-capability-check.js +1 -1
- package/dist/scripts/mad-sks-sql-plane-lifecycle-hook-decision-check.js +1 -1
- package/dist/scripts/mad-sks-sql-plane-result-lifecycle-check.js +1 -1
- package/dist/scripts/managed-config-merge-check.js +1 -1
- package/dist/scripts/mcp-plugin-inventory-check.js +1 -1
- package/dist/scripts/model-call-concurrency-check.js +1 -1
- package/dist/scripts/mutation-callsite-coverage-check.js +1 -1
- package/dist/scripts/naruto-ssot-gate-aliases-check.js +1 -1
- package/dist/scripts/naruto-ssot-pipeline-default-check.js +1 -1
- package/dist/scripts/naruto-ssot-route-normalization-check.js +1 -1
- package/dist/scripts/naruto-ssot-routing-check.js +1 -1
- package/dist/scripts/naruto-worktree-coding-blackbox.js +1 -1
- package/dist/scripts/native-capability-repair-matrix-check.js +1 -1
- package/dist/scripts/native-image-generation-repair-check.js +1 -1
- package/dist/scripts/official-subagent-workflow-check.js +3 -3
- package/dist/scripts/package-published-contract-check.js +37 -4
- package/dist/scripts/packlist-performance-check.js +17 -1
- package/dist/scripts/pipeline-codex-native-doctor-mad-routing-real-blackbox.js +1 -3
- package/dist/scripts/ppt-real-export-adapter-check.js +1 -1
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +1 -1
- package/dist/scripts/ppt-reexport-rereview-check.js +1 -1
- package/dist/scripts/prepublish-fast-check.js +1 -1
- package/dist/scripts/probe-memoization-check.js +2 -2
- package/dist/scripts/prompt-placeholder-guard-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-capability-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-cli-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-confirmation-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-gate-lifecycle-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-launch-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-status-lifecycle-check.js +1 -1
- package/dist/scripts/qa-loop-budget-policy-check.js +1 -1
- package/dist/scripts/qa-loop-effort-escalation-check.js +1 -1
- package/dist/scripts/qa-loop-execution-profile-routing-check.js +2 -2
- package/dist/scripts/qa-loop-image-path-exposure-check.js +1 -1
- package/dist/scripts/qa-loop-image-path-prompt-injection-check.js +1 -1
- package/dist/scripts/{sks-1-12-real-execution-check-lib.js → real-execution-check-lib.js} +1 -1
- package/dist/scripts/release-affected-selector-check.js +1 -1
- package/dist/scripts/release-aggressive-resource-governor-check.js +1 -1
- package/dist/scripts/release-cache-glob-hashing-check.js +1 -1
- package/dist/scripts/release-cache-input-classifier-check.js +1 -1
- package/dist/scripts/release-cache-neutralization-report-check.js +1 -1
- package/dist/scripts/release-cache-version-neutral-fixture-check.js +1 -1
- package/dist/scripts/release-dynamic-presets-check.js +2 -2
- package/dist/scripts/release-full-parallelism-blackbox.js +1 -1
- package/dist/scripts/release-gate-batch-runner-check.js +1 -1
- package/dist/scripts/release-gate-budget-check.js +1 -1
- package/dist/scripts/release-gate-dag-runner-check.js +1 -1
- package/dist/scripts/release-latency-slo-check.js +1 -1
- package/dist/scripts/release-metadata-check.js +256 -2
- package/dist/scripts/release-parallel-speed-budget-check.js +1 -1
- package/dist/scripts/release-proof-truth-check.js +1 -1
- package/dist/scripts/release-provenance-check.js +4 -2
- package/dist/scripts/release-runtime-truth-matrix-check.js +1 -1
- package/dist/scripts/research-blueprint-densifier-check.js +1 -1
- package/dist/scripts/research-claim-builder-check.js +1 -1
- package/dist/scripts/research-complete-package-fixture-check.js +1 -1
- package/dist/scripts/research-execution-profile-routing-check.js +2 -2
- package/dist/scripts/research-final-reviewer-blackbox.js +1 -1
- package/dist/scripts/{sks-3-1-4-directive-check-lib.js → runtime-domain-gate-lib.js} +2 -2
- package/dist/scripts/runtime-proof-summary-check.js +1 -1
- package/dist/scripts/runtime-script-pack-closure-check.js +7 -1
- package/dist/scripts/scheduler-batch-dispatch-check.js +1 -1
- package/dist/scripts/scheduler-parallel-proof-consistency-check.js +1 -1
- package/dist/scripts/scheduler-utilization-integral-check.js +1 -1
- package/dist/scripts/search-visibility-gate-lib.js +1 -1
- package/dist/scripts/secret-preservation-check.js +1 -1
- package/dist/scripts/seo-geo-geo-disambiguation-check.js +1 -1
- package/dist/scripts/seo-geo-skill-rich-content-check.js +1 -1
- package/dist/scripts/side-effect-runtime-report-check.js +1 -1
- package/dist/scripts/{sks-3-1-8-check-lib.js → skill-fixture-check-lib.js} +1 -1
- package/dist/scripts/skill-name-canonicalizer-check.js +1 -1
- package/dist/scripts/skills-manifest-continuity-check.js +1 -1
- package/dist/scripts/sks-uninstall-regression-check.js +1 -1
- package/dist/scripts/sksd-daemon-check.js +1 -1
- package/dist/scripts/super-search-provider-interface-check.js +1 -1
- package/dist/scripts/triwiki-cache-key-check.js +1 -1
- package/dist/scripts/triwiki-proof-bank-blackbox.js +2 -2
- package/dist/scripts/triwiki-proof-bank-check.js +1 -1
- package/dist/scripts/triwiki-proof-card-check.js +1 -1
- package/dist/scripts/type-surface-codex-app-check.js +2 -2
- package/dist/scripts/{sks-3-1-5-directive-check-lib.js → typed-routing-gate-lib.js} +2 -2
- package/dist/scripts/ultra-router-auto-router-check.js +1 -1
- package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +1 -1
- package/dist/scripts/ux-review-patch-diff-recheck-check.js +1 -1
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +9 -2
- package/package.json +5 -7
- package/release-gates.v2.json +66 -11
- package/runtime-required-scripts.json +138 -14
- package/config/bench-baseline.json +0 -7
- package/dist/core/codex-app/sks-menubar.js +0 -1
- package/dist/core/release/release-closure-contract.js +0 -30
- package/dist/core/release/release-closure-helpers.js +0 -293
- package/dist/core/release/release-closure-validation.js +0 -284
- package/dist/core/release/release-closure.js +0 -163
- package/dist/scripts/build-dist.js +0 -124
- package/dist/scripts/build-once-runner-check.js +0 -6
- package/dist/scripts/canonical-test-runner.js +0 -234
- package/dist/scripts/changelog-check.js +0 -45
- package/dist/scripts/check-architecture.js +0 -295
- package/dist/scripts/check-cli-entrypoint.js +0 -41
- package/dist/scripts/check-command-module-budget.js +0 -77
- package/dist/scripts/check-feature-quality.js +0 -51
- package/dist/scripts/check-legacy-free.js +0 -64
- package/dist/scripts/check-pipeline-budget.js +0 -49
- package/dist/scripts/check-pipeline-runtime.js +0 -16
- package/dist/scripts/check-publish-tag.js +0 -56
- package/dist/scripts/check-route-modularity.js +0 -72
- package/dist/scripts/codex-0140-capability-check.js +0 -14
- package/dist/scripts/codex-0140-feature-probes-check.js +0 -23
- package/dist/scripts/codex-permission-profiles-check.js +0 -34
- package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -49
- package/dist/scripts/competitor-scorecard-check.js +0 -24
- package/dist/scripts/core-skill-no-drift-check.js +0 -23
- package/dist/scripts/db-route-materialization-check.js +0 -32
- package/dist/scripts/doctor-context7-mcp-repair-blackbox.js +0 -15
- package/dist/scripts/doctor-fastpath-check.js +0 -25
- package/dist/scripts/doctor-fix-production-blackbox.js +0 -35
- package/dist/scripts/doctor-idempotence-check.js +0 -6
- package/dist/scripts/doctor-ops-semantics-check.js +0 -83
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +0 -18
- package/dist/scripts/doctor-supabase-mcp-repair-blackbox.js +0 -13
- package/dist/scripts/ensure-bin-executable.js +0 -16
- package/dist/scripts/fsx-hotpath-check.js +0 -9
- package/dist/scripts/high-risk-contracts-check.js +0 -183
- package/dist/scripts/hook-latency-quantum-check.js +0 -120
- package/dist/scripts/import-graph-budget-check.js +0 -9
- package/dist/scripts/mcp-tool-naming-parity-check.js +0 -14
- package/dist/scripts/naruto-codex-e2e-check.js +0 -105
- package/dist/scripts/naruto-write-e2e-check.js +0 -31
- package/dist/scripts/native-capability-postcheck-check.js +0 -16
- package/dist/scripts/ops-diagnostics-bundle-check.js +0 -11
- package/dist/scripts/parallel-production-smoke-check.js +0 -20
- package/dist/scripts/perf-budget-check.js +0 -12
- package/dist/scripts/project-skill-dedupe-blackbox.js +0 -62
- package/dist/scripts/release-dag-full-coverage-check.js +0 -98
- package/dist/scripts/release-dist-freshness-check.js +0 -6
- package/dist/scripts/release-file-ownership-check.js +0 -35
- package/dist/scripts/release-gate-script-parity-check.js +0 -148
- package/dist/scripts/release-macos-menubar-proof.js +0 -167
- package/dist/scripts/release-main-push-guard.js +0 -37
- package/dist/scripts/release-main-push-receipt.js +0 -43
- package/dist/scripts/release-metadata-1-19-check.js +0 -257
- package/dist/scripts/release-version-truth-check.js +0 -138
- package/dist/scripts/retention-apply-smoke-check.js +0 -19
- package/dist/scripts/retention-budget-check.js +0 -6
- package/dist/scripts/retention-dry-run-check.js +0 -8
- package/dist/scripts/rollback-recovery-smoke-check.js +0 -70
- package/dist/scripts/route-intent-regression-check.js +0 -42
- package/dist/scripts/runtime-current-terminal-check.js +0 -108
- package/dist/scripts/runtime-dist-parity-check.js +0 -76
- package/dist/scripts/runtime-no-src-mjs-check.js +0 -30
- package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -58
- package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -53
- package/dist/scripts/secret-preservation-guard-check.js +0 -36
- package/dist/scripts/seo-marketing-truthfulness-check.js +0 -98
- package/dist/scripts/seo-metadata-sync-check.js +0 -60
- package/dist/scripts/sizecheck.js +0 -148
- package/dist/scripts/sks-menubar-install-check.js +0 -333
- package/dist/scripts/supabase-secret-preservation-blackbox.js +0 -28
- package/dist/scripts/super-search-live-smoke-check.js +0 -115
- package/dist/scripts/super-search-local-http-smoke-check.js +0 -16
- package/dist/scripts/super-search-offline-contract-check.js +0 -43
- package/dist/scripts/update-fastpath-check.js +0 -28
- package/dist/scripts/update-preserves-supabase-keys-blackbox.js +0 -26
- package/dist/scripts/upgrade-migration-matrix-check.js +0 -351
- package/dist/scripts/write-build-manifest.js +0 -70
- package/dist/scripts/zellij-capability-check.js +0 -13
- package/dist/scripts/zellij-developer-controls-check.js +0 -16
- package/dist/scripts/zellij-doctor-readiness-check.js +0 -49
- package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -19
- package/dist/scripts/zellij-fake-adapter-check.js +0 -31
- package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
- package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -348
- package/dist/scripts/zellij-homebrew-policy-check.js +0 -3
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -21
- package/dist/scripts/zellij-lane-renderer-check.js +0 -78
- package/dist/scripts/zellij-launch-command-truth-check.js +0 -62
- package/dist/scripts/zellij-layout-valid-check.js +0 -120
- package/dist/scripts/zellij-pane-creation-lock-metrics-check.js +0 -10
- package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -78
- package/dist/scripts/zellij-pane-lock-does-not-block-worker-check.js +0 -12
- package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -134
- package/dist/scripts/zellij-qa-app-handoff-status-check.js +0 -7
- package/dist/scripts/zellij-right-column-geometry-proof.js +0 -158
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -20
- package/dist/scripts/zellij-right-column-manager-check.js +0 -24
- package/dist/scripts/zellij-self-heal-check.js +0 -3
- package/dist/scripts/zellij-self-heal-dry-run-check.js +0 -3
- package/dist/scripts/zellij-self-heal-status-contract-check.js +0 -3
- package/dist/scripts/zellij-self-heal-typed-blackbox.js +0 -3
- package/dist/scripts/zellij-slot-column-anchor-check.js +0 -65
- package/dist/scripts/zellij-slot-column-anchor-telemetry-check.js +0 -8
- package/dist/scripts/zellij-slot-only-ui-check.js +0 -29
- package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -149
- package/dist/scripts/zellij-slot-pane-stale-detection-check.js +0 -65
- package/dist/scripts/zellij-slot-pane-telemetry-renderer-check.js +0 -11
- package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -58
- package/dist/scripts/zellij-slot-telemetry-check.js +0 -38
- package/dist/scripts/zellij-slot-telemetry-incremental-check.js +0 -46
- package/dist/scripts/zellij-slot-telemetry-live-flush-check.js +0 -55
- package/dist/scripts/zellij-slot-telemetry-performance-check.js +0 -32
- package/dist/scripts/zellij-slot-telemetry-real-blackbox.js +0 -19
- package/dist/scripts/zellij-slot-telemetry-renderer-check.js +0 -11
- package/dist/scripts/zellij-slot-telemetry-runtime-check.js +0 -23
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -45
- package/dist/scripts/zellij-stacked-capability-routing-check.js +0 -9
- package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -78
- package/dist/scripts/zellij-stacked-version-matrix-check.js +0 -29
- package/dist/scripts/zellij-stacked-version-parser-check.js +0 -19
- package/dist/scripts/zellij-ui-design-check.js +0 -92
- package/dist/scripts/zellij-update-missing-self-heal-check.js +0 -3
- package/dist/scripts/zellij-update-prompt-matrix-check.js +0 -16
- package/dist/scripts/zellij-update-prompt-mode-check.js +0 -18
- package/dist/scripts/zellij-update-prompt-safety-check.js +0 -8
- package/dist/scripts/zellij-worker-pane-manager-check.js +0 -108
- package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -199
- /package/dist/scripts/{sks-1-11-gate-lib.js → sks-cli-gate-lib.js} +0 -0
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { assertGate, emitGate, root } from './sks-1-11-gate-lib.js';
|
|
5
|
-
const pkg = readJson('package.json');
|
|
6
|
-
const lock = readJson('package-lock.json');
|
|
7
|
-
const releaseManifest = readJson('release-gates.v2.json');
|
|
8
|
-
const harnessManifest = readJson('infra-harness-gates.json');
|
|
9
|
-
const RELEASE_VERSION = String(pkg.version || '');
|
|
10
|
-
const distManifest = readJsonIfExists('dist/build-manifest.json');
|
|
11
|
-
const releaseGates = Array.isArray(releaseManifest?.gates)
|
|
12
|
-
? releaseManifest.gates.filter((gate) => Array.isArray(gate.preset) && gate.preset.includes('release'))
|
|
13
|
-
: [];
|
|
14
|
-
const harnessGates = Array.isArray(harnessManifest?.gates)
|
|
15
|
-
? harnessManifest.gates.filter((gate) => Array.isArray(gate.preset) && gate.preset.includes('harness'))
|
|
16
|
-
: [];
|
|
17
|
-
const releaseGateIds = new Set(releaseGates.map((gate) => gate.id));
|
|
18
|
-
const harnessGateIds = new Set(harnessGates.map((gate) => gate.id));
|
|
19
|
-
const allManifestGates = [...releaseGates, ...harnessGates];
|
|
20
|
-
const requiredDocs = [
|
|
21
|
-
'README.md',
|
|
22
|
-
'CHANGELOG.md',
|
|
23
|
-
'docs/release-readiness.md',
|
|
24
|
-
'docs/release-proof-truth.md',
|
|
25
|
-
'docs/naruto.md',
|
|
26
|
-
'docs/zellij-ui.md',
|
|
27
|
-
'docs/AGENT-BRIDGE.md',
|
|
28
|
-
'docs/runtime-truth-matrix.md',
|
|
29
|
-
'docs/feature-fixtures.md',
|
|
30
|
-
'docs/orchestration-layers.md'
|
|
31
|
-
];
|
|
32
|
-
const versionedDocs = new Set([
|
|
33
|
-
'README.md',
|
|
34
|
-
'CHANGELOG.md',
|
|
35
|
-
'docs/release-readiness.md',
|
|
36
|
-
'docs/release-proof-truth.md'
|
|
37
|
-
]);
|
|
38
|
-
const requiredPackageScripts = [
|
|
39
|
-
'build',
|
|
40
|
-
'build:incremental',
|
|
41
|
-
'release:ensure-build',
|
|
42
|
-
'typecheck',
|
|
43
|
-
'release:check',
|
|
44
|
-
'release:metadata',
|
|
45
|
-
'release:check:affected',
|
|
46
|
-
'release:check:fast',
|
|
47
|
-
'release:check:confidence',
|
|
48
|
-
'release:check:full',
|
|
49
|
-
'prepublishOnly',
|
|
50
|
-
'release:file-ownership',
|
|
51
|
-
'release:macos-menubar-proof',
|
|
52
|
-
'release:main-push-guard',
|
|
53
|
-
'release:main-push-receipt',
|
|
54
|
-
'release:pack-receipt',
|
|
55
|
-
'runtime:installed-smoke',
|
|
56
|
-
'gates:run',
|
|
57
|
-
'policy:gate-audit',
|
|
58
|
-
'naruto:e2e-hermetic',
|
|
59
|
-
'naruto:e2e-hermetic-write'
|
|
60
|
-
];
|
|
61
|
-
const requiredReleaseGates = [
|
|
62
|
-
'commands:current-surface-only',
|
|
63
|
-
'naruto:ssot-routing',
|
|
64
|
-
'naruto:ssot-route-normalization',
|
|
65
|
-
'naruto:ssot-gate-aliases',
|
|
66
|
-
'naruto:ssot-pipeline-default',
|
|
67
|
-
'naruto:canonical-stop-gate',
|
|
68
|
-
'codex:app-handoff-comprehensive',
|
|
69
|
-
'qa-loop:comprehensive-verification',
|
|
70
|
-
'loop-integration-finalizer-check',
|
|
71
|
-
'codex-control:event-stream-ledger',
|
|
72
|
-
'runtime:proof-summary',
|
|
73
|
-
'runtime:installed-smoke',
|
|
74
|
-
'release:metadata-current',
|
|
75
|
-
'docs:truthfulness',
|
|
76
|
-
'publish:packlist-performance',
|
|
77
|
-
'publish:runtime-script-closure',
|
|
78
|
-
'package:published-contract',
|
|
79
|
-
'release:dag-runner',
|
|
80
|
-
'release:gate-budget',
|
|
81
|
-
'release:gate-selection-comprehensive',
|
|
82
|
-
'policy:gate-audit',
|
|
83
|
-
'typecheck'
|
|
84
|
-
];
|
|
85
|
-
const requiredHarnessGates = [
|
|
86
|
-
'zellij:layout-valid',
|
|
87
|
-
'zellij:compact-slot-renderer',
|
|
88
|
-
'zellij:slot-telemetry',
|
|
89
|
-
'zellij:slot-pane-telemetry-renderer',
|
|
90
|
-
'zellij:first-slot-down-stack',
|
|
91
|
-
'zellij:right-column-geometry-proof'
|
|
92
|
-
];
|
|
93
|
-
assertGate(/^\d+\.\d+\.\d+$/.test(RELEASE_VERSION), 'package.json version must be a stable semver', { version: pkg.version });
|
|
94
|
-
assertGate(lock.version === RELEASE_VERSION, `package-lock version must be ${RELEASE_VERSION}`, { version: lock.version });
|
|
95
|
-
assertGate(lock.packages?.['']?.version === RELEASE_VERSION, `package-lock root version must be ${RELEASE_VERSION}`, { version: lock.packages?.['']?.version });
|
|
96
|
-
assertVersionSurface('src/core/version.ts', `PACKAGE_VERSION = '${RELEASE_VERSION}'`);
|
|
97
|
-
assertVersionSurface('src/core/fsx.ts', "PACKAGE_VERSION } from './version.js'");
|
|
98
|
-
assertVersionSurface('src/bin/sks.ts', "PACKAGE_VERSION } from '../core/version.js'");
|
|
99
|
-
assertVersionSurface('crates/sks-core/Cargo.toml', `version = "${RELEASE_VERSION}"`);
|
|
100
|
-
assertVersionSurface('crates/sks-core/Cargo.lock', `version = "${RELEASE_VERSION}"`);
|
|
101
|
-
assertVersionSurface('crates/sks-core/src/main.rs', 'sks-rs {}", env!("CARGO_PKG_VERSION")');
|
|
102
|
-
assertGate(distManifest?.version === RELEASE_VERSION, `dist/build-manifest version must be ${RELEASE_VERSION}`, { version: distManifest?.version || null });
|
|
103
|
-
assertGate(distManifest?.package_version === RELEASE_VERSION, `dist/build-manifest package_version must be ${RELEASE_VERSION}`, { package_version: distManifest?.package_version || null });
|
|
104
|
-
assertGate(typeof distManifest?.source_digest === 'string' && distManifest.source_digest.length >= 32, 'dist/build-manifest must include source_digest', { source_digest: distManifest?.source_digest || null });
|
|
105
|
-
assertGate(pkg.scripts?.['release:metadata']?.includes('dist/scripts/release-metadata-check.js'), 'release:metadata must point to the generic release metadata check');
|
|
106
|
-
const releaseCheckScript = String(pkg.scripts?.['release:check'] || '');
|
|
107
|
-
assertGate(releaseCheckScript.startsWith('npm run release:check:parallel')
|
|
108
|
-
|| releaseCheckScript.includes('release-gate-dag-runner.js --preset release')
|
|
109
|
-
|| releaseCheckScript.includes('release:check:affected'), 'release:check must use the current release DAG');
|
|
110
|
-
assertGate(releaseManifest?.schema === 'sks.release-gates.v2', 'release gate manifest schema mismatch', { schema: releaseManifest?.schema || null });
|
|
111
|
-
assertGate(harnessManifest?.schema === 'sks.infra-harness-gates.v1', 'infra harness manifest schema mismatch', { schema: harnessManifest?.schema || null });
|
|
112
|
-
assertGate(releaseGates.length > 0 && releaseGates.length <= 200, 'release manifest must include 1..200 release gates', { release_gates: releaseGates.length });
|
|
113
|
-
assertGate(harnessGates.length > 0, 'infra harness manifest must include harness gates', { harness_gates: harnessGates.length });
|
|
114
|
-
assertGate(Object.keys(pkg.scripts || {}).length <= 100, 'package script budget exceeded', { script_count: Object.keys(pkg.scripts || {}).length, limit: 100 });
|
|
115
|
-
for (const script of requiredPackageScripts)
|
|
116
|
-
assertGate(Boolean(pkg.scripts?.[script]), `missing package script: ${script}`);
|
|
117
|
-
const fullReleaseScript = String(pkg.scripts?.['release:check:full'] || '');
|
|
118
|
-
assertGate((fullReleaseScript.match(/build:clean/g) || []).length === 1, 'release:check:full must perform exactly one clean build', { script: fullReleaseScript });
|
|
119
|
-
assertGate((fullReleaseScript.match(/npm test --silent/g) || []).length === 1, 'release:check:full must run the canonical test suite exactly once', { script: fullReleaseScript });
|
|
120
|
-
for (const id of requiredReleaseGates)
|
|
121
|
-
assertGate(releaseGateIds.has(id), `critical release gate missing: ${id}`, { id });
|
|
122
|
-
for (const id of requiredHarnessGates)
|
|
123
|
-
assertGate(harnessGateIds.has(id), `critical harness gate missing: ${id}`, { id });
|
|
124
|
-
const duplicateAcrossManifests = [...releaseGateIds].filter((id) => harnessGateIds.has(id));
|
|
125
|
-
assertGate(duplicateAcrossManifests.length === 0, 'gate appears in both release and harness manifests', { duplicate_count: duplicateAcrossManifests.length });
|
|
126
|
-
assertGate([...releaseGateIds].every((id) => !id.startsWith('zellij:')), 'Zellij gates must remain in the harness preset');
|
|
127
|
-
assertGate([...harnessGateIds].every((id) => id.startsWith('zellij:')), 'harness manifest must contain only Zellij gates');
|
|
128
|
-
assertGate(allManifestGates.every((gate) => !/\bnpm\s+run\b/.test(String(gate.command))), 'gate manifest commands must not use npm run indirection');
|
|
129
|
-
const retiredPublicSurfaceGateCount = allManifestGates.filter((gate) => /(?:^|[^a-z0-9])(?:team|mad-db|tmux|xai|swarm|ralph)(?:[^a-z0-9]|$)/i.test(`${String(gate.id || '')}\n${String(gate.command || '')}`)).length;
|
|
130
|
-
assertGate(retiredPublicSurfaceGateCount === 0, 'release and harness manifests must use only the current public surface', { violation_count: retiredPublicSurfaceGateCount });
|
|
131
|
-
for (const gate of allManifestGates)
|
|
132
|
-
assertDistScriptTargetsExist(gate);
|
|
133
|
-
assertGate(pkg.bin?.sks === 'dist/bin/sks.js', 'package runtime must use dist/bin/sks.js');
|
|
134
|
-
assertGate(pkg.bin?.sneakoscope === 'dist/bin/sks.js', 'sneakoscope runtime must use dist/bin/sks.js');
|
|
135
|
-
assertGate(!pkg.files?.includes('src'), 'package files must not include source runtime shadows');
|
|
136
|
-
for (const removed of ['publish:dry', 'publish:verify-ignore-scripts', 'publish:prep-ignore-scripts', 'publish:ignore-scripts']) {
|
|
137
|
-
assertGate(!pkg.scripts?.[removed], `direct publish package script must be removed: ${removed}`);
|
|
138
|
-
}
|
|
139
|
-
assertGate(!/\bnpm\s+publish\b/.test(Object.values(pkg.scripts || {}).join('\n')), 'package scripts must not contain direct npm publish');
|
|
140
|
-
const currentCommandManifest = text('src/cli/command-manifest-lite.ts');
|
|
141
|
-
const currentDollarManifest = text('src/core/routes/dollar-manifest-lite.ts');
|
|
142
|
-
for (const token of ["{ name: 'team',", "{ name: 'mad-db',", "{ name: 'tmux',", "{ name: 'xai',", "{ name: 'swarm',", "{ name: 'agent',", "{ name: 'ralph',"]) {
|
|
143
|
-
assertGate(!currentCommandManifest.includes(token), 'current command manifest contains a retired public command');
|
|
144
|
-
}
|
|
145
|
-
for (const token of ["command: '$Agent'", "command: '$Team'", "command: '$MAD-DB'", "command: '$Swarm'", "command: '$ShadowClone'", "command: '$Kagebunshin'", "command: '$Ralph'"]) {
|
|
146
|
-
assertGate(!currentDollarManifest.includes(token), 'current dollar manifest contains a retired route identity');
|
|
147
|
-
}
|
|
148
|
-
assertGate(currentDollarManifest.includes("{ command: '$Naruto'") && currentDollarManifest.includes("{ command: '$Work'"), 'current dollar manifest must expose the canonical workflow and intended alias');
|
|
149
|
-
const stageWorkflow = text('.github/workflows/publish-npm.yml');
|
|
150
|
-
const stageJob = stageWorkflow.match(/^ stage-publish:\n[\s\S]*$/m)?.[0] || '';
|
|
151
|
-
const workflowPermissions = stageWorkflow.match(/^permissions:\n(?: [^\n]+\n)+/m)?.[0] || '';
|
|
152
|
-
const stageVerifierSource = text('src/core/release/npm-stage-tarball-verifier.ts');
|
|
153
|
-
const stageVerifierSupport = text('src/core/release/npm-stage-tarball-verifier-support.ts');
|
|
154
|
-
const stageVerifierCli = text('src/scripts/npm-stage-tarball-verifier.ts');
|
|
155
|
-
const releaseReadinessDoc = text('docs/release-readiness.md');
|
|
156
|
-
for (const job of ['linux-release-proof', 'macos-menubar-proof', 'pack-and-compare', 'stage-publish']) {
|
|
157
|
-
assertGate(new RegExp(`^ ${job}:`, 'm').test(stageWorkflow), `stage workflow missing job: ${job}`);
|
|
158
|
-
}
|
|
159
|
-
assertGate(/npm install --global npm@\$\{NPM_STAGE_CLI_VERSION\}/.test(stageWorkflow), 'stage workflow must install the exact pinned npm CLI');
|
|
160
|
-
assertGate(/NPM_STAGE_CLI_VERSION: 11\.15\.0/.test(stageWorkflow), 'stage workflow must pin npm 11.15.0');
|
|
161
|
-
assertGate(/npm stage publish "\$TARBALL"/.test(stageWorkflow), 'stage workflow must stage the exact tarball path');
|
|
162
|
-
assertGate((stageWorkflow.match(/npm stage publish "\$TARBALL"/g) || []).length === 1, 'stage workflow must contain exactly one registry mutation');
|
|
163
|
-
assertGate(!/\bnpm\s+publish\b/.test(stageWorkflow), 'stage workflow must not call direct npm publish');
|
|
164
|
-
assertGate(!/npm\s+stage\s+(?:list|view|download|approve|reject)\b/.test(stageWorkflow), 'OIDC stage job must not use maintainer-only stage subcommands');
|
|
165
|
-
assertGate(/environment: npm-production/.test(stageWorkflow), 'stage workflow must use the npm-production environment');
|
|
166
|
-
assertGate(!/id-token:/.test(workflowPermissions), 'workflow-global permissions must not grant OIDC identity');
|
|
167
|
-
assertGate((stageWorkflow.match(/id-token: write/g) || []).length === 1 && /permissions:\n contents: read\n id-token: write/.test(stageJob), 'OIDC identity must be scoped only to stage-publish');
|
|
168
|
-
for (const artifact of ['linux-release-proof', 'macos-menubar-proof', 'stage-input', 'npm-stage-receipt']) {
|
|
169
|
-
assertGate(new RegExp(`name: ${artifact}-\\$\\{\\{ github\\.sha \\}\\}`).test(stageWorkflow), `stage workflow artifact name mismatch: ${artifact}`);
|
|
170
|
-
}
|
|
171
|
-
for (const receiptField of ['tarball_sha256', 'tarball_sha512', 'tarball_integrity', 'packed_bytes', 'unpacked_bytes', 'file_count', 'workflow_run_id', 'local_pack_receipt_sha256', 'stage_command_digest', 'stage_output_digest', 'stage_id', 'review_verifier_schema', 'human_2fa_pending']) {
|
|
172
|
-
assertGate(new RegExp(`${receiptField}:`).test(stageJob), `stage receipt missing field: ${receiptField}`);
|
|
173
|
-
}
|
|
174
|
-
assertGate(/stage_id_uuid_invalid/.test(stageJob), 'stage workflow must fail closed on non-UUID stage IDs');
|
|
175
|
-
assertGate(/sha512Integrity !== receipt\.sha512_integrity/.test(stageJob), 'stage workflow must recompute and verify tarball SHA-512 integrity');
|
|
176
|
-
assertGate(/tarball_integrity: sha512Integrity/.test(stageJob), 'stage receipt must serialize recomputed tarball integrity');
|
|
177
|
-
assertGate(/stage-receipt\/stage-output\.json/.test(stageJob) && /path: stage-receipt/.test(stageJob), 'stage receipt artifact must preserve digest-bound raw stage output');
|
|
178
|
-
assertGate(/review_verifier_schema: 'sks\.npm-stage-review-receipt\.v1'/.test(stageJob), 'stage receipt must declare the maintainer verifier schema');
|
|
179
|
-
assertGate(/localPackReceiptSha256 = crypto\.createHash\('sha256'\)\.update\(localPackReceiptBytes\)/.test(stageJob), 'stage receipt must bind immutable local pack receipt bytes');
|
|
180
|
-
assertGate(!/approve_command/.test(stageWorkflow), 'stage workflow must not serialize an approval command');
|
|
181
|
-
assertGate(!/\bnpm[ \t]+(?:ci|pack|run|publish|login|logout|whoami)\b/.test(stageJob), 'stage job must not install dependencies, repack, run lifecycle scripts, or use session credentials');
|
|
182
|
-
assertGate(!/NODE_AUTH_TOKEN|NPM_TOKEN|_authToken/.test(stageWorkflow), 'stage workflow must not inject npm tokens');
|
|
183
|
-
assertGate(/REQUIRED_NPM_STAGE_CLI_VERSION = '11\.15\.0'/.test(stageVerifierSupport), 'maintainer stage verifier must require exact npm 11.15.0');
|
|
184
|
-
assertGate(/\['stage', 'view', stageId, '--json'/.test(stageVerifierSource), 'maintainer stage verifier must inspect the exact stage ID read-only');
|
|
185
|
-
assertGate(/\['stage', 'download', stageId, '--json'/.test(stageVerifierSource), 'maintainer stage verifier must download the exact stage ID read-only');
|
|
186
|
-
assertGate(/exact_bytes_match/.test(stageVerifierSource) && /sha256_match/.test(stageVerifierSource) && /sha512_match/.test(stageVerifierSource) && /integrity_match/.test(stageVerifierSource), 'maintainer stage verifier must compare bytes and digests');
|
|
187
|
-
assertGate(/oidc_environment_not_allowed/.test(stageVerifierSupport), 'maintainer stage verifier must reject OIDC and GitHub Actions environments');
|
|
188
|
-
assertGate(!/\['stage',\s*'(?:publish|approve|reject)'/.test(`${stageVerifierSource}\n${stageVerifierSupport}\n${stageVerifierCli}`), 'maintainer stage verifier must not contain mutating stage argv');
|
|
189
|
-
assertGate(/npm-stage-tarball-verifier\.js/.test(releaseReadinessDoc) && /--local-receipt/.test(releaseReadinessDoc) && /--local-tarball/.test(releaseReadinessDoc) && /--stage-receipt/.test(releaseReadinessDoc), 'release readiness must document the maintainer-local read-only verifier inputs');
|
|
190
|
-
assertGate(pkg.scripts?.prepublishOnly === 'node ./dist/scripts/prepublish-release-check-or-fast.js', 'prepublishOnly must verify release proof during official npm publish');
|
|
191
|
-
assertGate(pkg.scripts?.prepack === 'node ./dist/scripts/prepublish-release-check-or-fast.js --prepack-build', 'prepack must rebuild and reverify official npm publish output');
|
|
192
|
-
for (const file of requiredDocs) {
|
|
193
|
-
const absolute = path.join(root, file);
|
|
194
|
-
assertGate(fs.existsSync(absolute), `missing release doc: ${file}`);
|
|
195
|
-
if (versionedDocs.has(file)) {
|
|
196
|
-
assertGate(fs.readFileSync(absolute, 'utf8').includes(RELEASE_VERSION), `release doc does not mention ${RELEASE_VERSION}: ${file}`);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
const retiredPublicDocReferenceCount = requiredDocs
|
|
200
|
-
.filter((file) => file !== 'CHANGELOG.md')
|
|
201
|
-
.reduce((count, file) => {
|
|
202
|
-
const source = text(file);
|
|
203
|
-
const commandHit = /\bsks\s+(?:agent(?=\s|$)|--agent(?=\s|$)|team(?=\s|$)|mad-db(?=\s|$)|tmux(?=\s|$)|xai(?=\s|$)|swarm(?=\s|$)|ralph(?=\s|$))/i.test(source);
|
|
204
|
-
const routeHit = /\$(?:Team|MAD-DB|Swarm|ShadowClone|Kagebunshin|Ralph)\b/.test(source);
|
|
205
|
-
return count + Number(commandHit || routeHit);
|
|
206
|
-
}, 0);
|
|
207
|
-
assertGate(retiredPublicDocReferenceCount === 0, 'current release documentation must not republish retired command or route identities', { violation_count: retiredPublicDocReferenceCount });
|
|
208
|
-
const report = {
|
|
209
|
-
schema: 'sks.version-metadata-current.v1',
|
|
210
|
-
version: RELEASE_VERSION,
|
|
211
|
-
package_version: pkg.version,
|
|
212
|
-
current_public_surface: true,
|
|
213
|
-
official_subagent_workflow: true,
|
|
214
|
-
version_surface_count: 9,
|
|
215
|
-
package_script_count: requiredPackageScripts.length,
|
|
216
|
-
release_gate_count: releaseGates.length,
|
|
217
|
-
harness_gate_count: harnessGates.length,
|
|
218
|
-
required_doc_count: requiredDocs.length,
|
|
219
|
-
dist_source_digest: distManifest?.source_digest || null,
|
|
220
|
-
generated_at: new Date().toISOString(),
|
|
221
|
-
ok: true
|
|
222
|
-
};
|
|
223
|
-
const out = path.join(root, '.sneakoscope', 'reports', `version-metadata-${RELEASE_VERSION}.json`);
|
|
224
|
-
fs.mkdirSync(path.dirname(out), { recursive: true });
|
|
225
|
-
fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
|
|
226
|
-
emitGate('release:metadata', {
|
|
227
|
-
version: pkg.version,
|
|
228
|
-
package_scripts: requiredPackageScripts.length,
|
|
229
|
-
release_gates: releaseGates.length,
|
|
230
|
-
harness_gates: harnessGates.length,
|
|
231
|
-
docs: requiredDocs.length,
|
|
232
|
-
current_public_surface: true
|
|
233
|
-
});
|
|
234
|
-
function text(relFile) {
|
|
235
|
-
return fs.readFileSync(path.join(root, relFile), 'utf8');
|
|
236
|
-
}
|
|
237
|
-
function readJson(relFile) {
|
|
238
|
-
return JSON.parse(text(relFile));
|
|
239
|
-
}
|
|
240
|
-
function readJsonIfExists(relFile) {
|
|
241
|
-
const absolute = path.join(root, relFile);
|
|
242
|
-
return fs.existsSync(absolute) ? JSON.parse(fs.readFileSync(absolute, 'utf8')) : null;
|
|
243
|
-
}
|
|
244
|
-
function assertVersionSurface(relFile, needle) {
|
|
245
|
-
const absolute = path.join(root, relFile);
|
|
246
|
-
assertGate(fs.existsSync(absolute), `missing version surface: ${relFile}`);
|
|
247
|
-
const source = fs.readFileSync(absolute, 'utf8');
|
|
248
|
-
assertGate(source.includes(needle), `${relFile} must contain ${needle}`, { file: relFile, needle });
|
|
249
|
-
}
|
|
250
|
-
function assertDistScriptTargetsExist(gate) {
|
|
251
|
-
for (const match of String(gate.command || '').matchAll(/node\s+(\.\/dist\/scripts\/[^ &|;]+\.js)/g)) {
|
|
252
|
-
assertGate(fs.existsSync(path.join(root, match[1])), `gate command target missing: ${gate.id}`, {
|
|
253
|
-
id: gate.id,
|
|
254
|
-
target: match[1]
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { spawnSync } from 'node:child_process';
|
|
5
|
-
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
6
|
-
const pkg = readJson('package.json');
|
|
7
|
-
const expected = String(pkg.version || '');
|
|
8
|
-
const mismatches = [];
|
|
9
|
-
const warnings = [];
|
|
10
|
-
checkJson('package.json', 'version', pkg.version);
|
|
11
|
-
const lock = readJson('package-lock.json');
|
|
12
|
-
checkJson('package-lock.json', 'version', lock.version);
|
|
13
|
-
checkJson('package-lock.json', 'packages[""].version', lock.packages?.['']?.version);
|
|
14
|
-
checkRegex('src/core/version.ts', /PACKAGE_VERSION\s*=\s*['"]([^'"]+)['"]/, 'PACKAGE_VERSION');
|
|
15
|
-
checkReExportOrRegex('src/core/fsx.ts', /PACKAGE_VERSION\s*}\s*from\s*['"]\.\/version(?:\.js)?['"]/, /PACKAGE_VERSION\s*=\s*['"]([^'"]+)['"]/, 'PACKAGE_VERSION');
|
|
16
|
-
checkReExportOrRegex('src/bin/sks.ts', /PACKAGE_VERSION\s*}\s*from\s*['"]\.\.\/core\/version(?:\.js)?['"]/, /FAST_PACKAGE_VERSION\s*=\s*['"]([^'"]+)['"]/, 'FAST_PACKAGE_VERSION');
|
|
17
|
-
checkRegex('crates/sks-core/Cargo.toml', /^version\s*=\s*"([^"]+)"/m, 'package.version');
|
|
18
|
-
checkCargoLock('crates/sks-core/Cargo.lock', 'sks-core');
|
|
19
|
-
const dist = readJson('dist/build-manifest.json', null);
|
|
20
|
-
checkJson('dist/build-manifest.json', 'package_version', dist?.package_version);
|
|
21
|
-
checkJson('dist/build-manifest.json', 'version', dist?.version);
|
|
22
|
-
checkChangelog();
|
|
23
|
-
checkReadme();
|
|
24
|
-
checkReleaseMetadataScript();
|
|
25
|
-
checkCargoMetadata();
|
|
26
|
-
const ok = mismatches.length === 0;
|
|
27
|
-
const report = {
|
|
28
|
-
schema: 'sks.release-version-truth.v1',
|
|
29
|
-
ok,
|
|
30
|
-
expected,
|
|
31
|
-
mismatches,
|
|
32
|
-
warnings,
|
|
33
|
-
generated_at: new Date().toISOString()
|
|
34
|
-
};
|
|
35
|
-
const out = path.join(root, '.sneakoscope', 'reports', 'release-version-truth.json');
|
|
36
|
-
fs.mkdirSync(path.dirname(out), { recursive: true });
|
|
37
|
-
fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
|
|
38
|
-
assertGate(ok, 'release version truth mismatch', { expected, mismatches });
|
|
39
|
-
emitGate('release:version-truth', { version: expected, checked: 13, warnings: warnings.length });
|
|
40
|
-
function checkJson(file, field, actual) {
|
|
41
|
-
if (actual !== expected)
|
|
42
|
-
mismatch(file, field, actual);
|
|
43
|
-
}
|
|
44
|
-
function checkRegex(file, re, field) {
|
|
45
|
-
const text = readText(file);
|
|
46
|
-
const match = text.match(re);
|
|
47
|
-
if (!match)
|
|
48
|
-
mismatch(file, field, null);
|
|
49
|
-
else if (match[1] !== expected)
|
|
50
|
-
mismatch(file, field, match[1]);
|
|
51
|
-
}
|
|
52
|
-
function checkReExportOrRegex(file, reExportRe, literalRe, field) {
|
|
53
|
-
const text = readText(file);
|
|
54
|
-
if (reExportRe.test(text))
|
|
55
|
-
return;
|
|
56
|
-
checkRegex(file, literalRe, field);
|
|
57
|
-
}
|
|
58
|
-
function checkCargoLock(file, name) {
|
|
59
|
-
const text = readText(file);
|
|
60
|
-
const block = text.split(/\n\[\[package\]\]\n/).find((part) => new RegExp(`name\\s*=\\s*"${escapeRe(name)}"`).test(part));
|
|
61
|
-
const match = block?.match(/version\s*=\s*"([^"]+)"/);
|
|
62
|
-
if (!match)
|
|
63
|
-
mismatch(file, `${name}.version`, null);
|
|
64
|
-
else if (match[1] !== expected)
|
|
65
|
-
mismatch(file, `${name}.version`, match[1]);
|
|
66
|
-
}
|
|
67
|
-
function checkChangelog() {
|
|
68
|
-
const text = readText('CHANGELOG.md');
|
|
69
|
-
const latest = latestVersionedChangelogSection(text);
|
|
70
|
-
if (latest !== expected)
|
|
71
|
-
mismatch('CHANGELOG.md', 'latest release section', latest);
|
|
72
|
-
}
|
|
73
|
-
function checkReadme() {
|
|
74
|
-
const text = readText('README.md');
|
|
75
|
-
const displayed = text.match(/SKS \*\*([0-9]+\.[0-9]+\.[0-9]+)\*\*/)?.[1] || null;
|
|
76
|
-
if (displayed && displayed !== expected)
|
|
77
|
-
mismatch('README.md', 'displayed current version', displayed);
|
|
78
|
-
}
|
|
79
|
-
function checkReleaseMetadataScript() {
|
|
80
|
-
const script = String(pkg.scripts?.['release:metadata'] || '');
|
|
81
|
-
if (!script.includes('dist/scripts/release-metadata-check.js')) {
|
|
82
|
-
mismatch('package.json', 'scripts.release:metadata', script || null, 'node ./dist/scripts/release-metadata-check.js');
|
|
83
|
-
}
|
|
84
|
-
const text = readText('src/scripts/release-metadata-check.ts');
|
|
85
|
-
if (!text.includes('release-metadata-1-19-check.js')) {
|
|
86
|
-
warnings.push({ file: 'src/scripts/release-metadata-check.ts', message: 'generic entrypoint does not reference historical implementation wrapper' });
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function checkCargoMetadata() {
|
|
90
|
-
const res = spawnSync('cargo', ['metadata', '--no-deps', '--manifest-path', path.join(root, 'crates/sks-core/Cargo.toml'), '--format-version', '1'], {
|
|
91
|
-
cwd: root,
|
|
92
|
-
encoding: 'utf8',
|
|
93
|
-
timeout: 30000
|
|
94
|
-
});
|
|
95
|
-
if (res.status !== 0) {
|
|
96
|
-
warnings.push({ file: 'crates/sks-core/Cargo.toml', message: 'cargo metadata unavailable', stderr_tail: tail(res.stderr) });
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
try {
|
|
100
|
-
const metadata = JSON.parse(res.stdout);
|
|
101
|
-
const crate = metadata.packages?.find((row) => row.name === 'sks-core');
|
|
102
|
-
if (crate?.version !== expected)
|
|
103
|
-
mismatch('cargo metadata', 'sks-core.version', crate?.version || null);
|
|
104
|
-
}
|
|
105
|
-
catch (err) {
|
|
106
|
-
warnings.push({ file: 'cargo metadata', message: `unparseable:${err instanceof Error ? err.message : String(err)}` });
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
function mismatch(file, field, actual, wanted = expected) {
|
|
110
|
-
mismatches.push({ file, field, expected: wanted, actual: actual ?? null });
|
|
111
|
-
}
|
|
112
|
-
function readJson(rel, fallback) {
|
|
113
|
-
try {
|
|
114
|
-
return JSON.parse(readText(rel));
|
|
115
|
-
}
|
|
116
|
-
catch (err) {
|
|
117
|
-
if (arguments.length > 1)
|
|
118
|
-
return fallback;
|
|
119
|
-
throw err;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function readText(rel) {
|
|
123
|
-
return fs.readFileSync(path.join(root, rel), 'utf8');
|
|
124
|
-
}
|
|
125
|
-
function escapeRe(value) {
|
|
126
|
-
return String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
127
|
-
}
|
|
128
|
-
function latestVersionedChangelogSection(text) {
|
|
129
|
-
for (const match of text.matchAll(/^## \[([^\]]+)\]/gm)) {
|
|
130
|
-
if (/^[0-9]+\.[0-9]+\.[0-9]+$/.test(match[1]))
|
|
131
|
-
return match[1];
|
|
132
|
-
}
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
function tail(value, limit = 1000) {
|
|
136
|
-
const text = String(value || '');
|
|
137
|
-
return text.length > limit ? text.slice(-limit) : text;
|
|
138
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
|
|
3
|
-
const { applyRetentionPlan, enforceRetention, retentionStatus } = await importDist('core/retention.js');
|
|
4
|
-
const planned = await enforceRetention(root, {
|
|
5
|
-
dryRun: true,
|
|
6
|
-
lightweight: true,
|
|
7
|
-
skipStorageReport: true,
|
|
8
|
-
policy: { max_tmp_age_hours: 999999, max_session_state_files: 1000000, prune_old_missions: false }
|
|
9
|
-
});
|
|
10
|
-
const applied = await applyRetentionPlan(root, {
|
|
11
|
-
planHash: planned.plan.plan_hash,
|
|
12
|
-
lightweight: true,
|
|
13
|
-
skipStorageReport: true,
|
|
14
|
-
policy: { max_tmp_age_hours: 999999, max_session_state_files: 1000000, prune_old_missions: false }
|
|
15
|
-
});
|
|
16
|
-
const status = await retentionStatus(root);
|
|
17
|
-
assertGate(applied.ok === true, 'retention apply smoke must accept matching dry-run plan hash', applied);
|
|
18
|
-
assertGate(status.mission_index?.ok !== false, 'retention apply smoke must keep status readable', status);
|
|
19
|
-
emitGate('retention:apply-smoke', { action_count: applied.action_count || 0, plan_hash: planned.plan.plan_hash });
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
|
|
3
|
-
const { runRetentionBudget } = await importDist('core/retention/retention-budget.js');
|
|
4
|
-
const report = await runRetentionBudget(root);
|
|
5
|
-
assertGate(report.ok, 'retention_budget_failed', report);
|
|
6
|
-
emitGate('retention:budget', { budgets: report.budgets.length, oversized_jsonl: report.oversized_jsonl.length });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
|
|
3
|
-
const { enforceRetention, retentionStatus } = await importDist('core/retention.js');
|
|
4
|
-
const result = await enforceRetention(root, { dryRun: true, lightweight: true, skipStorageReport: true });
|
|
5
|
-
const status = await retentionStatus(root);
|
|
6
|
-
assertGate(Boolean(result.plan?.plan_hash), 'retention dry run must write a plan hash', result);
|
|
7
|
-
assertGate(status.mission_index?.ok !== false, 'retention dry run must keep mission index readable', status);
|
|
8
|
-
emitGate('retention:dry-run', { action_count: result.actions.length, plan_hash: result.plan.plan_hash });
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
6
|
-
const scenarios = [
|
|
7
|
-
'seo_marketing_apply_interrupted',
|
|
8
|
-
'doctor_fix_interrupted',
|
|
9
|
-
'gc_apply_interrupted',
|
|
10
|
-
'super_search_artifact_write_interrupted',
|
|
11
|
-
'naruto_patch_apply_interrupted'
|
|
12
|
-
];
|
|
13
|
-
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-rollback-recovery-smoke-'));
|
|
14
|
-
try {
|
|
15
|
-
const results = [];
|
|
16
|
-
for (const scenario of scenarios)
|
|
17
|
-
results.push(await runScenario(scenario));
|
|
18
|
-
const blockers = [
|
|
19
|
-
...results.filter((result) => result.ok !== true).flatMap((result) => result.blockers.map((blocker) => `${result.scenario}:${blocker}`)),
|
|
20
|
-
...results.filter((result) => result.unsafe_rollback_succeeded).map((result) => `${result.scenario}:unsafe_rollback_succeeded`)
|
|
21
|
-
];
|
|
22
|
-
const report = {
|
|
23
|
-
schema: 'sks.rollback-recovery-smoke.v1',
|
|
24
|
-
ok: blockers.length === 0,
|
|
25
|
-
generated_at: new Date().toISOString(),
|
|
26
|
-
scenarios: results,
|
|
27
|
-
blockers
|
|
28
|
-
};
|
|
29
|
-
const reportPath = path.join(root, '.sneakoscope', 'reports', 'rollback-recovery-smoke.json');
|
|
30
|
-
await fs.mkdir(path.dirname(reportPath), { recursive: true });
|
|
31
|
-
await fs.writeFile(reportPath, `${JSON.stringify(report, null, 2)}\n`);
|
|
32
|
-
assertGate(report.ok, 'rollback recovery smoke failed', report);
|
|
33
|
-
emitGate('recovery:rollback-smoke', { scenarios: results.length, report: reportPath.replace(`${root}/`, '') });
|
|
34
|
-
}
|
|
35
|
-
finally {
|
|
36
|
-
await fs.rm(tmp, { recursive: true, force: true }).catch(() => undefined);
|
|
37
|
-
}
|
|
38
|
-
async function runScenario(scenario) {
|
|
39
|
-
const dir = path.join(tmp, scenario);
|
|
40
|
-
await fs.mkdir(dir, { recursive: true });
|
|
41
|
-
const userFile = path.join(dir, 'user-owned.txt');
|
|
42
|
-
await fs.writeFile(userFile, 'preserve me\n');
|
|
43
|
-
const partial = path.join(dir, 'partial-artifact.json');
|
|
44
|
-
await fs.writeFile(partial, '{"status":"partial"', 'utf8');
|
|
45
|
-
const manifest = scenario === 'super_search_artifact_write_interrupted'
|
|
46
|
-
? null
|
|
47
|
-
: path.join(dir, 'rollback-manifest.json');
|
|
48
|
-
if (manifest) {
|
|
49
|
-
await fs.writeFile(manifest, JSON.stringify({ schema: 'sks.rollback-manifest.v1', scenario, files: [partial], rollback_id: `${scenario}-rollback` }, null, 2));
|
|
50
|
-
}
|
|
51
|
-
const unsafeRollbackSucceeded = manifest === null ? false : false;
|
|
52
|
-
const recovered = manifest !== null;
|
|
53
|
-
const blockers = [
|
|
54
|
-
...(await fs.readFile(userFile, 'utf8') === 'preserve me\n' ? [] : ['user_file_damaged']),
|
|
55
|
-
...(manifest === null ? ['rollback_manifest_missing_blocks_rollback'] : []),
|
|
56
|
-
...(unsafeRollbackSucceeded ? ['unsafe_rollback_succeeded'] : [])
|
|
57
|
-
];
|
|
58
|
-
return {
|
|
59
|
-
scenario,
|
|
60
|
-
ok: blockers.length === 0 || blockers.every((blocker) => blocker === 'rollback_manifest_missing_blocks_rollback'),
|
|
61
|
-
status: recovered ? 'recoverable' : 'blocked',
|
|
62
|
-
partial_artifact_status: 'partial',
|
|
63
|
-
rollback_manifest: manifest ? path.relative(dir, manifest) : null,
|
|
64
|
-
unsafe_rollback_succeeded: unsafeRollbackSucceeded,
|
|
65
|
-
retry_duplicate_writes: false,
|
|
66
|
-
user_files_untouched: true,
|
|
67
|
-
blockers: blockers.filter((blocker) => blocker !== 'rollback_manifest_missing_blocks_rollback'),
|
|
68
|
-
blocked_reasons: blockers.filter((blocker) => blocker === 'rollback_manifest_missing_blocks_rollback')
|
|
69
|
-
};
|
|
70
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
|
|
4
|
-
import { writeJsonAtomic } from '../core/fsx.js';
|
|
5
|
-
const { routePrompt } = await importDist('core/routes.js');
|
|
6
|
-
const cases = [
|
|
7
|
-
{ prompt: 'Can you fix the failing tests?', expected: ['Naruto'] },
|
|
8
|
-
{ prompt: '고쳐줄 수 있어? 로그인 테스트 깨져', expected: ['Naruto'] },
|
|
9
|
-
{ prompt: '이거 왜 안 고쳐져? 수정해줘', expected: ['Naruto'] },
|
|
10
|
-
{ prompt: 'How do I fix this myself?', expected: ['Answer'] },
|
|
11
|
-
{ prompt: '이 함수 왜 이렇게 동작해? 설명만 해줘', expected: ['Answer'] },
|
|
12
|
-
{ prompt: 'README 오타만 고쳐줄래?', expected: ['DFix'] },
|
|
13
|
-
{ prompt: '$Super-Search run "npm release notes"', expected: ['SuperSearch'] },
|
|
14
|
-
{ prompt: 'site:x.com product launch 찾아줘', expected: ['SuperSearch'] },
|
|
15
|
-
{ prompt: 'Supabase RLS 수정해줘', expected: ['DB', 'MadSKS'] },
|
|
16
|
-
{ prompt: '커밋하고 푸시해줘', expected: ['CommitAndPush'] }
|
|
17
|
-
];
|
|
18
|
-
const results = cases.map((row) => {
|
|
19
|
-
const route = routePrompt(row.prompt);
|
|
20
|
-
return {
|
|
21
|
-
prompt: row.prompt,
|
|
22
|
-
expected: row.expected,
|
|
23
|
-
actual: route?.id || null,
|
|
24
|
-
reasons: route?.intent_scores?.reasons || []
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
const failures = results.filter((row) => !row.expected.includes(row.actual));
|
|
28
|
-
const report = {
|
|
29
|
-
schema: 'sks.route-intent-regression.v1',
|
|
30
|
-
ok: failures.length === 0,
|
|
31
|
-
generated_at: new Date().toISOString(),
|
|
32
|
-
checked: results.length,
|
|
33
|
-
results,
|
|
34
|
-
blockers: failures.map((row) => `route_intent_mismatch:${row.prompt}`)
|
|
35
|
-
};
|
|
36
|
-
await writeJsonAtomic(path.join(root, '.sneakoscope', 'reports', 'route-intent-regression.json'), report);
|
|
37
|
-
await writeJsonAtomic(path.join(root, '.sneakoscope', 'reports', 'route-regression.json'), report);
|
|
38
|
-
assertGate(report.ok, 'route intent regression matrix failed', report);
|
|
39
|
-
emitGate('route:intent-regression', {
|
|
40
|
-
checked: results.length,
|
|
41
|
-
results
|
|
42
|
-
});
|