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,12 +1,41 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { readMacosMenubarProof, validateMacosMenubarProofArtifacts } from './macos-menubar-proof.js';
|
|
3
|
-
import {
|
|
4
|
-
import { fileSha256, gitOk, gitText, readJson, unique } from './release-closure-helpers.js';
|
|
3
|
+
import { fileSha256, gitOk, gitText, readJson, relative, unique } from './release-proof-io.js';
|
|
5
4
|
import { releaseOriginIdentity } from './release-origin.js';
|
|
6
5
|
import { releaseProofDir, validateLocalReleasePackBinding } from './release-pack-receipt.js';
|
|
7
6
|
import { validateFullReleaseStamp } from './release-stamp-proof.js';
|
|
8
|
-
|
|
7
|
+
import { RELEASE_UPGRADE_BASELINE_SHA256, RELEASE_UPGRADE_BASELINE_VERSION, releaseUpgradeExpectedVersion, releaseUpgradeProofFilename } from './release-upgrade-baseline.js';
|
|
9
8
|
export const MAIN_PUSH_GUARD_SCHEMA = 'sks.release-main-push-guard.v1';
|
|
9
|
+
const RELEASE_UPGRADE_SMOKE_SCHEMA = 'sks.release-upgrade-smoke.v2';
|
|
10
|
+
const RELEASE_UPGRADE_COMMAND_STAGES = Object.freeze([
|
|
11
|
+
'baseline_fetch',
|
|
12
|
+
'baseline_install',
|
|
13
|
+
'baseline_version',
|
|
14
|
+
'baseline_bootstrap',
|
|
15
|
+
'baseline_doctor',
|
|
16
|
+
'baseline_menubar_install',
|
|
17
|
+
'baseline_menubar_status',
|
|
18
|
+
'target_install',
|
|
19
|
+
'target_version',
|
|
20
|
+
'target_doctor',
|
|
21
|
+
'target_menubar_install',
|
|
22
|
+
'target_menubar_status',
|
|
23
|
+
'target_menubar_rollback',
|
|
24
|
+
'target_menubar_reinstall_install',
|
|
25
|
+
'target_menubar_reinstall_status',
|
|
26
|
+
'package_rollback_install',
|
|
27
|
+
'package_rollback_version',
|
|
28
|
+
'package_rollback_doctor'
|
|
29
|
+
]);
|
|
30
|
+
const RELEASE_UPGRADE_STATE_STAGES = Object.freeze({
|
|
31
|
+
baseline_package: ['baseline_install', 'baseline_version', 'baseline_bootstrap', 'baseline_doctor'],
|
|
32
|
+
baseline_menubar: ['baseline_menubar_install', 'baseline_menubar_status'],
|
|
33
|
+
target_package: ['target_install', 'target_version', 'target_doctor'],
|
|
34
|
+
target_menubar: ['target_menubar_install', 'target_menubar_status'],
|
|
35
|
+
menubar_rollback: ['target_menubar_rollback'],
|
|
36
|
+
target_menubar_reinstall: ['target_menubar_reinstall_install', 'target_menubar_reinstall_status'],
|
|
37
|
+
package_rollback: ['package_rollback_install', 'package_rollback_version', 'package_rollback_doctor']
|
|
38
|
+
});
|
|
10
39
|
export function inspectMainPushGuard(input) {
|
|
11
40
|
const blockers = [];
|
|
12
41
|
const pkg = readJson(path.join(input.root, 'package.json')) || {};
|
|
@@ -25,15 +54,6 @@ export function inspectMainPushGuard(input) {
|
|
|
25
54
|
blockers.push('origin_main_not_ancestor_of_head');
|
|
26
55
|
if (input.requireCleanTree && gitText(input.root, ['status', '--porcelain=v1']))
|
|
27
56
|
blockers.push('worktree_not_clean');
|
|
28
|
-
const closure = inspectReleaseClosureContract({
|
|
29
|
-
root: input.root,
|
|
30
|
-
version: input.expectedVersion,
|
|
31
|
-
expectedHead: head,
|
|
32
|
-
expectedBaseline: input.expectedOriginMain,
|
|
33
|
-
expectedMissionId: input.expectedReleaseMissionId || DEFAULT_RELEASE_MISSION_ID,
|
|
34
|
-
...(input.expectedWorkOrderSha256 === undefined ? {} : { expectedWorkOrderSha256: input.expectedWorkOrderSha256 })
|
|
35
|
-
});
|
|
36
|
-
blockers.push(...closure.blockers.map((blocker) => `release_closure:${blocker}`));
|
|
37
57
|
const proofDir = releaseProofDir(input.root, input.expectedVersion);
|
|
38
58
|
if (input.requireReleaseStamp !== true)
|
|
39
59
|
blockers.push('release_stamp_requirement_missing');
|
|
@@ -67,7 +87,10 @@ export function inspectMainPushGuard(input) {
|
|
|
67
87
|
if (input.requireMacosProof)
|
|
68
88
|
blockers.push(...validateMacosMenubarProofArtifacts(input.root, macos, {
|
|
69
89
|
version: input.expectedVersion,
|
|
70
|
-
...(head ? { sourceCommit: head } : {})
|
|
90
|
+
...(head ? { sourceCommit: head } : {}),
|
|
91
|
+
upgradeReportPath: upgrade.path,
|
|
92
|
+
upgradeReportSha256: upgrade.sha256,
|
|
93
|
+
targetTarballSha256: pack?.sha256
|
|
71
94
|
}).blockers);
|
|
72
95
|
if (input.requireCleanTree !== true)
|
|
73
96
|
blockers.push('clean_tree_requirement_missing');
|
|
@@ -85,47 +108,73 @@ export function inspectMainPushGuard(input) {
|
|
|
85
108
|
pack_proof: input.requirePackProof ? path.relative(input.root, path.join(proofDir, 'pack-receipt.json')) : null,
|
|
86
109
|
upgrade_proof: upgrade,
|
|
87
110
|
macos_proof: input.requireMacosProof ? path.relative(input.root, path.join(proofDir, 'macos-menubar-proof.json')) : null,
|
|
88
|
-
release_closure: closure,
|
|
89
111
|
force_push_allowed: false,
|
|
90
112
|
blockers: unique(blockers),
|
|
91
113
|
checked_at: new Date().toISOString()
|
|
92
114
|
};
|
|
93
115
|
}
|
|
94
116
|
export function validateReleaseUpgradeProof(root, version, sourceCommit, pack) {
|
|
95
|
-
const file = path.join(releaseProofDir(root, version),
|
|
117
|
+
const file = path.join(releaseProofDir(root, version), releaseUpgradeProofFilename(version));
|
|
96
118
|
const report = readJson(file);
|
|
97
119
|
const blockers = [];
|
|
98
120
|
const targetReceipt = path.join(releaseProofDir(root, version), 'pack-receipt.json');
|
|
99
121
|
const targetTarball = pack?.tarball_path ? path.resolve(root, pack.tarball_path) : '';
|
|
100
|
-
const
|
|
101
|
-
|
|
122
|
+
const expectedReceiptPath = relative(root, targetReceipt);
|
|
123
|
+
const expectedTarballPath = targetTarball ? relative(root, targetTarball) : '';
|
|
124
|
+
const targetReceiptSha256 = fileSha256(targetReceipt);
|
|
125
|
+
if (report?.schema !== RELEASE_UPGRADE_SMOKE_SCHEMA)
|
|
102
126
|
blockers.push('missing_or_invalid');
|
|
103
127
|
if (report?.ok !== true || !Array.isArray(report?.blockers) || report.blockers.length)
|
|
104
128
|
blockers.push('not_ok');
|
|
105
|
-
if (report?.platform !== 'darwin' || report?.baseline_version !==
|
|
129
|
+
if (report?.platform !== 'darwin' || report?.baseline_version !== RELEASE_UPGRADE_BASELINE_VERSION || report?.target_version !== version)
|
|
106
130
|
blockers.push('version_or_platform_mismatch');
|
|
107
|
-
if (report?.
|
|
131
|
+
if (!validTimestamp(report?.started_at) || !validTimestamp(report?.generated_at)
|
|
132
|
+
|| Date.parse(report.generated_at) < Date.parse(report.started_at))
|
|
133
|
+
blockers.push('timestamp_invalid');
|
|
134
|
+
if (report?.baseline?.source !== 'registry'
|
|
135
|
+
|| report?.baseline?.spec !== `sneakoscope@${RELEASE_UPGRADE_BASELINE_VERSION}`
|
|
136
|
+
|| report?.baseline?.pinned_sha256 !== RELEASE_UPGRADE_BASELINE_SHA256
|
|
137
|
+
|| report?.baseline?.tarball_sha256 !== RELEASE_UPGRADE_BASELINE_SHA256
|
|
138
|
+
|| !validSha512(report?.baseline?.sha512_integrity)
|
|
139
|
+
|| !/^[a-f0-9]{40}$/i.test(String(report?.baseline?.registry_shasum || ''))
|
|
140
|
+
|| !Array.isArray(report?.baseline?.inspection_warnings))
|
|
108
141
|
blockers.push('baseline_binding_mismatch');
|
|
109
142
|
if (report?.source_tree?.ok !== true || report?.source_tree?.head !== sourceCommit
|
|
110
143
|
|| !Array.isArray(report?.source_tree?.dirty_entries) || report.source_tree.dirty_entries.length
|
|
111
144
|
|| !Array.isArray(report?.source_tree?.blockers) || report.source_tree.blockers.length)
|
|
112
145
|
blockers.push('source_commit_mismatch');
|
|
113
|
-
if (report?.target?.binding_ok !== true
|
|
146
|
+
if (report?.target?.binding_ok !== true
|
|
147
|
+
|| report?.target?.source_commit !== sourceCommit
|
|
148
|
+
|| report?.target?.receipt_source_commit !== sourceCommit)
|
|
114
149
|
blockers.push('target_source_commit_mismatch');
|
|
115
|
-
if (
|
|
150
|
+
if (report?.target?.package_version !== version)
|
|
151
|
+
blockers.push('target_package_version_mismatch');
|
|
152
|
+
if (portableProofPath(report?.root, report?.target?.receipt_path) !== expectedReceiptPath)
|
|
116
153
|
blockers.push('target_receipt_path_mismatch');
|
|
117
|
-
if (!targetTarball ||
|
|
154
|
+
if (!targetTarball || portableProofPath(report?.root, report?.target?.tarball_path) !== expectedTarballPath)
|
|
118
155
|
blockers.push('target_tarball_path_mismatch');
|
|
156
|
+
if (!targetReceiptSha256 || report?.target?.receipt_sha256 !== targetReceiptSha256)
|
|
157
|
+
blockers.push('target_receipt_sha256_mismatch');
|
|
119
158
|
if (report?.target?.tarball_sha256 !== pack?.sha256)
|
|
120
159
|
blockers.push('target_tarball_sha256_mismatch');
|
|
121
|
-
|
|
160
|
+
if (report?.target?.tarball_sha512_integrity !== pack?.sha512_integrity)
|
|
161
|
+
blockers.push('target_tarball_integrity_mismatch');
|
|
162
|
+
if (report?.target?.npm_pack_proof?.proof_id !== pack?.npm_pack_proof?.proof_id
|
|
163
|
+
|| report?.target?.npm_pack_proof?.info_sha256 !== pack?.npm_pack_proof?.info_sha256
|
|
164
|
+
|| report?.target?.npm_pack_proof?.file_list_sha256 !== pack?.npm_pack_proof?.file_list_sha256) {
|
|
165
|
+
blockers.push('target_npm_pack_proof_mismatch');
|
|
166
|
+
}
|
|
167
|
+
const stateNames = Object.keys(RELEASE_UPGRADE_STATE_STAGES);
|
|
122
168
|
if (Object.keys(report?.states || {}).length !== stateNames.length || stateNames.some((name) => {
|
|
123
169
|
const state = report?.states?.[name];
|
|
124
|
-
const expected = name
|
|
170
|
+
const expected = releaseUpgradeExpectedVersion(name, version);
|
|
125
171
|
return state?.status !== 'passed' || state?.expected_version !== expected || state?.observed_version !== expected
|
|
172
|
+
|| !Array.isArray(state?.command_stages)
|
|
173
|
+
|| !sameStringArray(state.command_stages, RELEASE_UPGRADE_STATE_STAGES[name])
|
|
126
174
|
|| !Array.isArray(state?.blockers) || state.blockers.length;
|
|
127
175
|
}))
|
|
128
176
|
blockers.push('lifecycle_incomplete');
|
|
177
|
+
validateReleaseUpgradeIsolationAndCommands(report, blockers);
|
|
129
178
|
return {
|
|
130
179
|
ok: blockers.length === 0,
|
|
131
180
|
path: path.relative(root, file),
|
|
@@ -133,3 +182,218 @@ export function validateReleaseUpgradeProof(root, version, sourceCommit, pack) {
|
|
|
133
182
|
blockers: unique(blockers)
|
|
134
183
|
};
|
|
135
184
|
}
|
|
185
|
+
function validateReleaseUpgradeIsolationAndCommands(report, blockers) {
|
|
186
|
+
const isolation = report?.isolation || {};
|
|
187
|
+
const sandbox = String(isolation.sandbox || '');
|
|
188
|
+
const isolationPaths = {
|
|
189
|
+
home: isolation.home,
|
|
190
|
+
codex_home: isolation.codex_home,
|
|
191
|
+
npm_cache: isolation.npm_cache,
|
|
192
|
+
npm_prefix: isolation.npm_prefix,
|
|
193
|
+
npm_userconfig: isolation.npm_userconfig,
|
|
194
|
+
workspace: isolation.workspace,
|
|
195
|
+
baseline_pack_dir: isolation.baseline_pack_dir,
|
|
196
|
+
command_reports_dir: isolation.command_reports_dir,
|
|
197
|
+
sealed_inputs_dir: isolation.sealed_inputs_dir
|
|
198
|
+
};
|
|
199
|
+
if (!path.isAbsolute(sandbox))
|
|
200
|
+
blockers.push('isolation_sandbox_invalid');
|
|
201
|
+
for (const [name, value] of Object.entries(isolationPaths)) {
|
|
202
|
+
if (!path.isAbsolute(String(value || '')) || !lexicalSubpath(String(value || ''), sandbox)) {
|
|
203
|
+
blockers.push(`isolation_path_invalid:${name}`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (isolation.host_home_reused !== false
|
|
207
|
+
|| isolation.host_codex_home_reused !== false
|
|
208
|
+
|| isolation.host_npm_prefix_reused !== false)
|
|
209
|
+
blockers.push('host_isolation_reused');
|
|
210
|
+
if (isolation.retained !== false
|
|
211
|
+
|| isolation.removed_after_success !== true
|
|
212
|
+
|| isolation.cleanup_status !== 'removed'
|
|
213
|
+
|| isolation.cleanup_error !== null)
|
|
214
|
+
blockers.push('sandbox_cleanup_incomplete');
|
|
215
|
+
const launchPolicy = report?.menubar_launch_policy;
|
|
216
|
+
if (launchPolicy?.applicable !== true
|
|
217
|
+
|| launchPolicy?.launch_skipped !== true
|
|
218
|
+
|| launchPolicy?.proof_scope !== 'bundle_install_status_rollback_only'
|
|
219
|
+
|| launchPolicy?.separate_real_launch_proof_required !== true)
|
|
220
|
+
blockers.push('menubar_launch_policy_invalid');
|
|
221
|
+
const safety = report?.install_safety_policy;
|
|
222
|
+
if (safety?.host_process_mutation_allowed !== false
|
|
223
|
+
|| safety?.host_session_mutation_allowed !== false
|
|
224
|
+
|| safety?.postinstall_network_allowed !== false
|
|
225
|
+
|| safety?.real_launchctl_allowed !== false
|
|
226
|
+
|| !Array.isArray(safety?.postinstall_skip_env)
|
|
227
|
+
|| safety.postinstall_skip_env.length === 0
|
|
228
|
+
|| !path.isAbsolute(String(safety?.launchctl_stub_path || ''))
|
|
229
|
+
|| !lexicalSubpath(String(safety?.launchctl_stub_path || ''), sandbox)
|
|
230
|
+
|| !validSha256(safety?.launchctl_stub_sha256)
|
|
231
|
+
|| !path.isAbsolute(String(safety?.launchctl_log_path || ''))
|
|
232
|
+
|| !lexicalSubpath(String(safety?.launchctl_log_path || ''), sandbox)
|
|
233
|
+
|| !Array.isArray(safety?.launchctl_calls)
|
|
234
|
+
|| safety.launchctl_calls.some((call) => !/^(?:unsetenv (?:CODEX_LB_API_KEY|OPENROUTER_API_KEY)|print)$/.test(String(call)))
|
|
235
|
+
|| !Array.isArray(safety?.launchctl_unexpected_calls)
|
|
236
|
+
|| safety.launchctl_unexpected_calls.length > 0)
|
|
237
|
+
blockers.push('install_safety_policy_invalid');
|
|
238
|
+
if (!path.isAbsolute(String(report?.target?.sealed_tarball_path || ''))
|
|
239
|
+
|| !lexicalSubpath(String(report?.target?.sealed_tarball_path || ''), String(isolation.sealed_inputs_dir || ''))) {
|
|
240
|
+
blockers.push('target_sealed_tarball_path_invalid');
|
|
241
|
+
}
|
|
242
|
+
if (!path.isAbsolute(String(report?.baseline?.sealed_tarball_path || ''))
|
|
243
|
+
|| !lexicalSubpath(String(report?.baseline?.sealed_tarball_path || ''), String(isolation.sealed_inputs_dir || ''))) {
|
|
244
|
+
blockers.push('baseline_sealed_tarball_path_invalid');
|
|
245
|
+
}
|
|
246
|
+
const commands = Array.isArray(report?.commands) ? report.commands : [];
|
|
247
|
+
const stages = commands.map((command) => String(command?.stage || ''));
|
|
248
|
+
if (!sameStringArray(stages, RELEASE_UPGRADE_COMMAND_STAGES))
|
|
249
|
+
blockers.push('command_inventory_incomplete');
|
|
250
|
+
for (const command of commands)
|
|
251
|
+
validateReleaseUpgradeCommand(report, command, blockers);
|
|
252
|
+
}
|
|
253
|
+
function validateReleaseUpgradeCommand(report, command, blockers) {
|
|
254
|
+
const stage = String(command?.stage || '');
|
|
255
|
+
const isolation = report?.isolation || {};
|
|
256
|
+
const argv = Array.isArray(command?.argv) ? command.argv.map(String) : [];
|
|
257
|
+
const statusMayBeNotRunning = stage.endsWith('_menubar_status') || stage === 'target_menubar_reinstall_status';
|
|
258
|
+
if (!argv.length
|
|
259
|
+
|| command?.cwd !== isolation.workspace
|
|
260
|
+
|| command?.isolated_home !== isolation.home
|
|
261
|
+
|| command?.isolated_codex_home !== isolation.codex_home
|
|
262
|
+
|| command?.isolated_npm_cache !== isolation.npm_cache
|
|
263
|
+
|| command?.isolated_npm_prefix !== isolation.npm_prefix
|
|
264
|
+
|| command?.timed_out !== false
|
|
265
|
+
|| (statusMayBeNotRunning ? ![0, 1].includes(command?.exit_code) : command?.exit_code !== 0)
|
|
266
|
+
|| !Number.isFinite(command?.duration_ms)
|
|
267
|
+
|| command.duration_ms < 0
|
|
268
|
+
|| !validSha256(command?.stdout_sha256)
|
|
269
|
+
|| !validSha256(command?.stderr_sha256)) {
|
|
270
|
+
blockers.push(`command_receipt_invalid:${stage || 'missing'}`);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
const npmPrefix = String(isolation.npm_prefix || '');
|
|
274
|
+
const sksBinary = path.join(npmPrefix, 'bin', 'sks');
|
|
275
|
+
const packageRoot = path.join(npmPrefix, 'lib', 'node_modules', 'sneakoscope');
|
|
276
|
+
const args = argv.slice(1);
|
|
277
|
+
const exact = (expected) => sameStringArray(args, expected);
|
|
278
|
+
let commandOk = true;
|
|
279
|
+
if (stage === 'baseline_fetch') {
|
|
280
|
+
commandOk = /^(?:npm|npm\.cmd)$/.test(path.basename(argv[0] || '')) && exact([
|
|
281
|
+
'pack',
|
|
282
|
+
`sneakoscope@${RELEASE_UPGRADE_BASELINE_VERSION}`,
|
|
283
|
+
'--ignore-scripts',
|
|
284
|
+
'--json',
|
|
285
|
+
'--pack-destination',
|
|
286
|
+
String(isolation.baseline_pack_dir || '')
|
|
287
|
+
]);
|
|
288
|
+
}
|
|
289
|
+
else if (['baseline_install', 'target_install', 'package_rollback_install'].includes(stage)) {
|
|
290
|
+
const tarball = stage === 'target_install'
|
|
291
|
+
? String(report?.target?.sealed_tarball_path || '')
|
|
292
|
+
: String(report?.baseline?.sealed_tarball_path || '');
|
|
293
|
+
commandOk = /^(?:npm|npm\.cmd)$/.test(path.basename(argv[0] || '')) && exact([
|
|
294
|
+
'install',
|
|
295
|
+
'--global',
|
|
296
|
+
'--prefix',
|
|
297
|
+
npmPrefix,
|
|
298
|
+
'--no-audit',
|
|
299
|
+
'--no-fund',
|
|
300
|
+
'--loglevel=error',
|
|
301
|
+
tarball
|
|
302
|
+
]);
|
|
303
|
+
}
|
|
304
|
+
else if (stage.endsWith('_version')) {
|
|
305
|
+
commandOk = argv[0] === sksBinary && exact(['--version']);
|
|
306
|
+
}
|
|
307
|
+
else if (stage === 'baseline_bootstrap') {
|
|
308
|
+
commandOk = argv[0] === sksBinary && exact(['bootstrap', '--json']);
|
|
309
|
+
}
|
|
310
|
+
else if (stage.endsWith('_doctor')) {
|
|
311
|
+
const reportFile = path.join(String(isolation.command_reports_dir || ''), `${stage}.json`);
|
|
312
|
+
commandOk = argv[0] === sksBinary && exact(['doctor', '--json', '--report-file', reportFile]);
|
|
313
|
+
validateDoctorCommandReceipt(command, stage, reportFile, isolation, String(report?.target_version || ''), blockers);
|
|
314
|
+
}
|
|
315
|
+
else if (stage.endsWith('_menubar_install') || stage === 'target_menubar_reinstall_install') {
|
|
316
|
+
commandOk = argv[0] === sksBinary && exact([
|
|
317
|
+
'menubar', 'install', '--no-launch', '--json', '--home', String(isolation.home || ''), '--root', packageRoot
|
|
318
|
+
]);
|
|
319
|
+
}
|
|
320
|
+
else if (stage.endsWith('_menubar_status') || stage === 'target_menubar_reinstall_status') {
|
|
321
|
+
commandOk = argv[0] === sksBinary && exact([
|
|
322
|
+
'menubar', 'status', '--json', '--home', String(isolation.home || ''), '--root', packageRoot
|
|
323
|
+
]);
|
|
324
|
+
}
|
|
325
|
+
else if (stage === 'target_menubar_rollback') {
|
|
326
|
+
commandOk = argv[0] === sksBinary && exact([
|
|
327
|
+
'menubar', 'rollback', '--no-launch', '--json', '--home', String(isolation.home || ''), '--root', packageRoot
|
|
328
|
+
]);
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
commandOk = false;
|
|
332
|
+
}
|
|
333
|
+
if (!commandOk)
|
|
334
|
+
blockers.push(`command_argv_invalid:${stage || 'missing'}`);
|
|
335
|
+
}
|
|
336
|
+
function validateDoctorCommandReceipt(command, stage, reportFile, isolation, targetVersion, blockers) {
|
|
337
|
+
const binding = command?.report_file;
|
|
338
|
+
const requiredVersion = stage === 'target_doctor' ? targetVersion : RELEASE_UPGRADE_BASELINE_VERSION;
|
|
339
|
+
if (!binding
|
|
340
|
+
|| binding.path !== reportFile
|
|
341
|
+
|| binding.expected_package_version !== requiredVersion
|
|
342
|
+
|| command?.json_schema !== 'sks.doctor-status.v3'
|
|
343
|
+
|| command?.json_ok !== true) {
|
|
344
|
+
blockers.push(`doctor_command_receipt_invalid:${stage}`);
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
if (binding.validation_mode === 'strict_report_file') {
|
|
348
|
+
if (binding.inside_sandbox !== true
|
|
349
|
+
|| binding.regular_file !== true
|
|
350
|
+
|| binding.symlink_refused !== false
|
|
351
|
+
|| !validSha256(binding.sha256)
|
|
352
|
+
|| !validSha256(binding.json_sha256)
|
|
353
|
+
|| !validSha256(binding.stdout_json_sha256)
|
|
354
|
+
|| binding.matches_stdout !== true
|
|
355
|
+
|| binding.schema !== 'sks.doctor-status.v3'
|
|
356
|
+
|| binding.ok !== true
|
|
357
|
+
|| binding.root !== isolation.workspace)
|
|
358
|
+
blockers.push(`doctor_report_binding_invalid:${stage}`);
|
|
359
|
+
}
|
|
360
|
+
else if (stage !== 'target_doctor' && binding.validation_mode === 'pinned_baseline_stdout_only') {
|
|
361
|
+
if (binding.regular_file !== false
|
|
362
|
+
|| binding.symlink_refused !== false
|
|
363
|
+
|| binding.matches_stdout !== false
|
|
364
|
+
|| !validSha256(binding.stdout_json_sha256))
|
|
365
|
+
blockers.push(`doctor_report_binding_invalid:${stage}`);
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
blockers.push(`doctor_report_binding_invalid:${stage}`);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
function portableProofPath(reportRootValue, fileValue) {
|
|
372
|
+
const reportRoot = String(reportRootValue || '');
|
|
373
|
+
const file = String(fileValue || '');
|
|
374
|
+
if (!path.isAbsolute(reportRoot) || !file)
|
|
375
|
+
return null;
|
|
376
|
+
const absolute = path.isAbsolute(file) ? path.resolve(file) : path.resolve(reportRoot, file);
|
|
377
|
+
const normalized = path.relative(path.resolve(reportRoot), absolute).split(path.sep).join('/');
|
|
378
|
+
if (!normalized || normalized.startsWith('../') || path.isAbsolute(normalized))
|
|
379
|
+
return null;
|
|
380
|
+
return normalized;
|
|
381
|
+
}
|
|
382
|
+
function lexicalSubpath(candidateValue, rootValue) {
|
|
383
|
+
if (!path.isAbsolute(candidateValue) || !path.isAbsolute(rootValue))
|
|
384
|
+
return false;
|
|
385
|
+
const relativePath = path.relative(path.resolve(rootValue), path.resolve(candidateValue));
|
|
386
|
+
return relativePath === '' || (!relativePath.startsWith('..') && !path.isAbsolute(relativePath));
|
|
387
|
+
}
|
|
388
|
+
function validSha256(value) {
|
|
389
|
+
return /^[a-f0-9]{64}$/i.test(String(value || ''));
|
|
390
|
+
}
|
|
391
|
+
function validSha512(value) {
|
|
392
|
+
return /^sha512-[A-Za-z0-9+/]+={0,2}$/.test(String(value || ''));
|
|
393
|
+
}
|
|
394
|
+
function validTimestamp(value) {
|
|
395
|
+
return typeof value === 'string' && !Number.isNaN(Date.parse(value));
|
|
396
|
+
}
|
|
397
|
+
function sameStringArray(left, right) {
|
|
398
|
+
return left.length === right.length && left.every((value, index) => String(value) === String(right[index]));
|
|
399
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
1
|
import path from 'node:path';
|
|
3
2
|
import { spawnSync } from 'node:child_process';
|
|
4
|
-
import {
|
|
3
|
+
import { MAIN_PUSH_GUARD_SCHEMA, validateReleaseUpgradeProof } from './main-push-guard.js';
|
|
5
4
|
import { readMacosMenubarProof, validateMacosMenubarProofArtifacts } from './macos-menubar-proof.js';
|
|
5
|
+
import { gitOk, gitText, readJson } from './release-proof-io.js';
|
|
6
6
|
import { releaseProofDir, validateLocalReleasePackBinding } from './release-pack-receipt.js';
|
|
7
7
|
import { validateFullReleaseStamp } from './release-stamp-proof.js';
|
|
8
8
|
import { releaseOriginIdentity } from './release-origin.js';
|
|
@@ -16,7 +16,6 @@ export function inspectMainPushReceipt(input) {
|
|
|
16
16
|
const origin = releaseOriginIdentity(input.root);
|
|
17
17
|
const proofDir = releaseProofDir(input.root, input.version);
|
|
18
18
|
const guard = readJson(path.join(proofDir, 'main-push-guard.json'));
|
|
19
|
-
const expectedMissionId = input.expectedReleaseMissionId || RELEASE_630_MISSION_ID;
|
|
20
19
|
const releaseStamp = path.join('.sneakoscope', 'reports', 'release-check-stamp.json');
|
|
21
20
|
const packProof = path.relative(input.root, path.join(proofDir, 'pack-receipt.json'));
|
|
22
21
|
const macosProof = path.relative(input.root, path.join(proofDir, 'macos-menubar-proof.json'));
|
|
@@ -46,31 +45,6 @@ export function inspectMainPushReceipt(input) {
|
|
|
46
45
|
blockers.push('pre_push_guard_origin_identity_mismatch');
|
|
47
46
|
if (!Array.isArray(guard?.blockers) || guard.blockers.length > 0)
|
|
48
47
|
blockers.push('pre_push_guard_blockers_present');
|
|
49
|
-
const closure = inspectReleaseClosure({
|
|
50
|
-
root: input.root,
|
|
51
|
-
version: input.version,
|
|
52
|
-
expectedHead: head,
|
|
53
|
-
expectedBaseline: input.baseline,
|
|
54
|
-
expectedMissionId,
|
|
55
|
-
...(input.expectedWorkOrderSha256 === undefined ? {} : { expectedWorkOrderSha256: input.expectedWorkOrderSha256 })
|
|
56
|
-
});
|
|
57
|
-
if (!closure.ok)
|
|
58
|
-
blockers.push(...closure.blockers.map((blocker) => `release_closure:${blocker}`));
|
|
59
|
-
const guardedClosure = guard?.release_closure;
|
|
60
|
-
if (guardedClosure?.schema !== closure.schema || guardedClosure?.ok !== true
|
|
61
|
-
|| !Array.isArray(guardedClosure?.blockers) || guardedClosure.blockers.length > 0) {
|
|
62
|
-
blockers.push('pre_push_guard_release_closure_missing_or_invalid');
|
|
63
|
-
}
|
|
64
|
-
if (guardedClosure?.head !== closure.head || guardedClosure?.source_commit !== closure.source_commit) {
|
|
65
|
-
blockers.push('pre_push_guard_release_closure_commit_mismatch');
|
|
66
|
-
}
|
|
67
|
-
if (guardedClosure?.mission_id !== expectedMissionId || guardedClosure?.mission_id !== closure.mission_id) {
|
|
68
|
-
blockers.push('pre_push_guard_release_closure_mission_mismatch');
|
|
69
|
-
}
|
|
70
|
-
if (guardedClosure?.manifest_path !== closure.manifest_path
|
|
71
|
-
|| guardedClosure?.manifest_sha256 !== closure.manifest_sha256) {
|
|
72
|
-
blockers.push('pre_push_guard_release_closure_manifest_mismatch');
|
|
73
|
-
}
|
|
74
48
|
const stampValidation = validateFullReleaseStamp({
|
|
75
49
|
root: input.root,
|
|
76
50
|
stampFile: path.join(input.root, releaseStamp),
|
|
@@ -94,7 +68,13 @@ export function inspectMainPushReceipt(input) {
|
|
|
94
68
|
|| guard?.upgrade_proof?.sha256 !== upgrade.sha256)
|
|
95
69
|
blockers.push('pre_push_guard_upgrade_proof_mismatch');
|
|
96
70
|
const macos = readMacosMenubarProof(input.root, input.version);
|
|
97
|
-
const macosValidation = validateMacosMenubarProofArtifacts(input.root, macos, {
|
|
71
|
+
const macosValidation = validateMacosMenubarProofArtifacts(input.root, macos, {
|
|
72
|
+
version: input.version,
|
|
73
|
+
sourceCommit: head,
|
|
74
|
+
upgradeReportPath: upgrade.path,
|
|
75
|
+
upgradeReportSha256: upgrade.sha256,
|
|
76
|
+
targetTarballSha256: pack?.sha256
|
|
77
|
+
});
|
|
98
78
|
if (!macosValidation.ok)
|
|
99
79
|
blockers.push(...macosValidation.blockers);
|
|
100
80
|
return {
|
|
@@ -112,8 +92,8 @@ export function inspectMainPushReceipt(input) {
|
|
|
112
92
|
method: input.method,
|
|
113
93
|
release_stamp: releaseStamp,
|
|
114
94
|
pack_proof: packProof,
|
|
95
|
+
upgrade_proof: upgrade,
|
|
115
96
|
macos_proof: macosProof,
|
|
116
|
-
release_closure: closure,
|
|
117
97
|
blockers: [...new Set(blockers)]
|
|
118
98
|
};
|
|
119
99
|
}
|
|
@@ -130,18 +110,3 @@ function gitRemoteMain(root) {
|
|
|
130
110
|
const value = String(result.stdout || '').trim().split(/\s+/, 1)[0] || '';
|
|
131
111
|
return /^[a-f0-9]{40}$/i.test(value) ? value : '';
|
|
132
112
|
}
|
|
133
|
-
function readJson(file) {
|
|
134
|
-
try {
|
|
135
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
136
|
-
}
|
|
137
|
-
catch {
|
|
138
|
-
return null;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
function gitText(root, args) {
|
|
142
|
-
const result = spawnSync('git', args, { cwd: root, encoding: 'utf8' });
|
|
143
|
-
return result.status === 0 ? String(result.stdout || '').trim() : '';
|
|
144
|
-
}
|
|
145
|
-
function gitOk(root, args) {
|
|
146
|
-
return spawnSync('git', args, { cwd: root, stdio: 'ignore' }).status === 0;
|
|
147
|
-
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const DEFAULT_MAX_PACK_BYTES = 2510 * 1024;
|
|
2
|
-
export const DEFAULT_MAX_UNPACKED_BYTES =
|
|
2
|
+
export const DEFAULT_MAX_UNPACKED_BYTES = 11_425_000;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import crypto from 'node:crypto';
|
|
2
2
|
export const RELEASE_GATE_CONTRACT_SCHEMA = 'sks.release-gate-contract.v1';
|
|
3
3
|
export const RELEASE_GATE_CONTRACT_IDS = Object.freeze([
|
|
4
|
+
'agent-guidance:dedup',
|
|
4
5
|
'agent:message-bus-reader',
|
|
5
6
|
'all-features:deep-completion',
|
|
6
7
|
'appshots:thread-attachment-discovery',
|
|
@@ -99,6 +100,7 @@ export const RELEASE_GATE_CONTRACT_IDS = Object.freeze([
|
|
|
99
100
|
'publish:runtime-script-closure',
|
|
100
101
|
'python-sdk:all-pipelines',
|
|
101
102
|
'qa-loop:comprehensive-verification',
|
|
103
|
+
'quality:helper-dedup',
|
|
102
104
|
'release:aggressive-resource-governor',
|
|
103
105
|
'release:batch-runner-comprehensive',
|
|
104
106
|
'release:cache-key-comprehensive',
|
|
@@ -332,7 +332,7 @@ const RETIRED_SURFACE_ALLOWLIST = [
|
|
|
332
332
|
{ path: /^dist\/scripts\/docs-truthfulness-check\.js$/, kinds: new Set(['retired_ralph_identity']) },
|
|
333
333
|
{ path: /^dist\/scripts\/naruto-ssot-(?:routing|route-normalization|gate-aliases|pipeline-default)-check\.js$/, kinds: new Set(['retired_cli_command', 'retired_dollar_command', 'retired_team_runtime_identity']) },
|
|
334
334
|
{ path: /^dist\/scripts\/upgrade-migration-matrix-check\.js$/, kinds: new Set(['retired_team_workdir']) },
|
|
335
|
-
{ path: /^dist\/scripts\/(?:current-command-surface-check|current-surface-update-e2e-check|current-upgrade-matrix-check|legacy-gate-inventory-check|legacy-gate-purge-check|legacy-strong-inventory-check|release-metadata-
|
|
335
|
+
{ path: /^dist\/scripts\/(?:current-command-surface-check|current-surface-update-e2e-check|current-upgrade-matrix-check|legacy-gate-inventory-check|legacy-gate-purge-check|legacy-strong-inventory-check|release-metadata-check|runtime-current-terminal-check)\.js$/, kinds: new Set(RETIRED_SURFACE_PATTERNS.map((pattern) => pattern.kind)) }
|
|
336
336
|
];
|
|
337
337
|
function retiredSurfaceFindingAllowed(finding) {
|
|
338
338
|
return RETIRED_SURFACE_ALLOWLIST.some((rule) => rule.path.test(finding.file) && rule.kinds.has(finding.kind));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { spawnSync } from 'node:child_process';
|
|
5
|
+
export function unique(values) {
|
|
6
|
+
return [...new Set(values)];
|
|
7
|
+
}
|
|
8
|
+
export function relative(root, file) {
|
|
9
|
+
return path.relative(root, file).split(path.sep).join('/');
|
|
10
|
+
}
|
|
11
|
+
export function fileSha256(file) {
|
|
12
|
+
try {
|
|
13
|
+
return crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function readJson(file) {
|
|
20
|
+
try {
|
|
21
|
+
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function gitText(root, args) {
|
|
28
|
+
const result = spawnSync('git', args, { cwd: root, encoding: 'utf8' });
|
|
29
|
+
return result.status === 0 ? String(result.stdout || '').trim() : '';
|
|
30
|
+
}
|
|
31
|
+
export function gitOk(root, args) {
|
|
32
|
+
return spawnSync('git', args, { cwd: root, stdio: 'ignore' }).status === 0;
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const RELEASE_UPGRADE_BASELINE_VERSION = '6.2.0';
|
|
2
|
+
export const RELEASE_UPGRADE_BASELINE_LABEL = '6.2';
|
|
3
|
+
export const RELEASE_UPGRADE_BASELINE_SHA256 = 'dd0bfc022348c11dc737055845708f6272beaf2a8f9c16d068acf3c8c612f9bc';
|
|
4
|
+
export function releaseUpgradeProofFilename(targetVersion) {
|
|
5
|
+
return `upgrade-${RELEASE_UPGRADE_BASELINE_LABEL}-to-${targetVersion}.json`;
|
|
6
|
+
}
|
|
7
|
+
export function releaseUpgradeExpectedVersion(stateName, targetVersion) {
|
|
8
|
+
return stateName.startsWith('target_') ? targetVersion : RELEASE_UPGRADE_BASELINE_VERSION;
|
|
9
|
+
}
|