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,120 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import { randomBytes } from 'node:crypto';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { pathToFileURL } from 'node:url';
|
|
7
|
-
import { ensureDistFresh, root } from './lib/ensure-dist-fresh.js';
|
|
8
|
-
const freshness = ensureDistFresh({ rebuild: true });
|
|
9
|
-
if (!freshness.ok)
|
|
10
|
-
fail('dist_not_fresh', { freshness });
|
|
11
|
-
const layoutMod = await import(pathToFileURL(path.join(root, 'dist', 'core', 'zellij', 'zellij-layout-builder.js')).href);
|
|
12
|
-
const capabilityMod = await import(pathToFileURL(path.join(root, 'dist', 'core', 'zellij', 'zellij-capability.js')).href);
|
|
13
|
-
const commandMod = await import(pathToFileURL(path.join(root, 'dist', 'core', 'zellij', 'zellij-command.js')).href);
|
|
14
|
-
process.env.SKS_ZELLIJ_VIEWPORTS = '3';
|
|
15
|
-
const built = layoutMod.buildZellijLayoutKdl({ missionId: 'M-layout-check', ledgerRoot: path.join(root, '.sneakoscope', 'tmp', 'layout-check'), cwd: root, kind: 'mad', slotCount: 2, codexArgs: ['--profile', 'sks-mad-high', '-c', 'service_tier=fast'] });
|
|
16
|
-
const staticValidation = layoutMod.validateZellijLayoutKdl(built.layout_kdl);
|
|
17
|
-
const viewportLayoutOk = built.initial_worker_panes === 0
|
|
18
|
-
&& built.viewport_count === 3
|
|
19
|
-
&& built.ui_architecture === 'monitor_plus_viewports'
|
|
20
|
-
&& built.lane_runtime_policies.length === 0
|
|
21
|
-
&& built.layout_kdl.includes('pane name="orchestrator"')
|
|
22
|
-
&& built.layout_kdl.includes('pane size="35%" name="sks-monitor"')
|
|
23
|
-
&& !built.layout_kdl.includes('zellij-lane')
|
|
24
|
-
&& !built.layout_kdl.includes('zellij-slot-pane')
|
|
25
|
-
&& (built.layout_kdl.match(/pane name="sks-viewport-/g) || []).length === 3
|
|
26
|
-
&& built.lane_dispatch_policy?.mode === 'jsonl_nonblocking'
|
|
27
|
-
&& built.lane_dispatch_policy?.fifo_policy === 'disabled_to_avoid_writer_blocking'
|
|
28
|
-
&& built.lane_dispatch_policy?.pane_transport === 'monitor_plus_viewports';
|
|
29
|
-
const narutoFanoutLayout = layoutMod.buildZellijLayoutKdl({
|
|
30
|
-
missionId: 'M-layout-naruto-fanout',
|
|
31
|
-
ledgerRoot: path.join(root, '.sneakoscope', 'tmp', 'layout-naruto-fanout'),
|
|
32
|
-
cwd: root,
|
|
33
|
-
kind: 'naruto',
|
|
34
|
-
slotCount: 24
|
|
35
|
-
});
|
|
36
|
-
const narutoFanoutPaneCount = (narutoFanoutLayout.layout_kdl.match(/pane name="sks-viewport-/g) || []).length;
|
|
37
|
-
const kindsValidated = ['mad', 'naruto'].map((kind) => {
|
|
38
|
-
const b = layoutMod.buildZellijLayoutKdl({
|
|
39
|
-
missionId: `M-layout-${kind}`,
|
|
40
|
-
ledgerRoot: path.join(root, '.sneakoscope', 'tmp', `layout-${kind}`),
|
|
41
|
-
cwd: root,
|
|
42
|
-
kind,
|
|
43
|
-
slotCount: 2,
|
|
44
|
-
codexArgs: kind === 'mad' ? ['--profile', 'sks-mad-high', '-c', 'service_tier=fast'] : []
|
|
45
|
-
});
|
|
46
|
-
const hasCodexPane = kind !== 'mad' || (b.main_pane_kind === 'codex_interactive' && /exec\s+'?codex'?/.test(b.layout_kdl) && b.layout_kdl.includes('sks-mad-high') && b.layout_kdl.includes('--no-alt-screen'));
|
|
47
|
-
const viewportPaneCount = (b.layout_kdl.match(/pane name="sks-viewport-/g) || []).length;
|
|
48
|
-
const noLanePane = !b.layout_kdl.includes('zellij-lane');
|
|
49
|
-
return { kind, ok: layoutMod.validateZellijLayoutKdl(b.layout_kdl).ok && hasCodexPane && noLanePane && viewportPaneCount === 3 && b.initial_worker_panes === 0 && b.viewport_count === 3, main_pane_kind: b.main_pane_kind, has_codex_pane: hasCodexPane, no_lane_pane: noLanePane, viewport_pane_count: viewportPaneCount };
|
|
50
|
-
});
|
|
51
|
-
const allKindsOk = kindsValidated.every((k) => k.ok);
|
|
52
|
-
const invalidValidation = layoutMod.validateZellijLayoutKdl('layout { pane command="zellij-lane" {');
|
|
53
|
-
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-zellij-layout-'));
|
|
54
|
-
const layoutPath = path.join(tmp, 'layout.kdl');
|
|
55
|
-
await fs.writeFile(layoutPath, built.layout_kdl, 'utf8');
|
|
56
|
-
const requireReal = process.env.SKS_REQUIRE_ZELLIJ === '1' || process.argv.includes('--require-real');
|
|
57
|
-
const capability = await capabilityMod.checkZellijCapability({ root, require: requireReal, writeReport: true });
|
|
58
|
-
const runId = `${process.pid}-${Date.now().toString(36)}-${randomBytes(3).toString('hex')}`;
|
|
59
|
-
const sessionName = `sks-layout-check-${runId}`;
|
|
60
|
-
const socketDir = path.join('/tmp', `sks-zj-layout-${runId}`);
|
|
61
|
-
const zellijEnv = { ZELLIJ_SOCKET_DIR: socketDir };
|
|
62
|
-
const realRun = capability.status === 'ok'
|
|
63
|
-
? {
|
|
64
|
-
create_background: await commandMod.runZellij(['attach', '--create-background', sessionName, 'options', '--default-layout', layoutPath], { cwd: root, env: zellijEnv, timeoutMs: 5000, optional: !requireReal }),
|
|
65
|
-
cleanup: null,
|
|
66
|
-
session_removed: false,
|
|
67
|
-
socket_dir_removed: false,
|
|
68
|
-
ok: false
|
|
69
|
-
}
|
|
70
|
-
: null;
|
|
71
|
-
if (realRun) {
|
|
72
|
-
realRun.cleanup = await commandMod.runZellij(['kill-session', sessionName], { cwd: root, env: zellijEnv, timeoutMs: 5000, optional: true });
|
|
73
|
-
const remaining = await waitForSocketEntriesToClear(socketDir, 2000);
|
|
74
|
-
realRun.session_removed = !remaining.includes(sessionName);
|
|
75
|
-
if (remaining.length === 0)
|
|
76
|
-
await fs.rm(socketDir, { recursive: true, force: true });
|
|
77
|
-
realRun.socket_dir_removed = !(await exists(socketDir));
|
|
78
|
-
realRun.ok = realRun.create_background.ok === true && realRun.session_removed && realRun.socket_dir_removed;
|
|
79
|
-
}
|
|
80
|
-
const ok = staticValidation.ok
|
|
81
|
-
&& viewportLayoutOk
|
|
82
|
-
&& allKindsOk
|
|
83
|
-
&& layoutMod.validateZellijLayoutKdl(narutoFanoutLayout.layout_kdl).ok
|
|
84
|
-
&& narutoFanoutPaneCount === 3
|
|
85
|
-
&& invalidValidation.ok === false
|
|
86
|
-
&& capability.ok
|
|
87
|
-
&& (requireReal ? realRun?.ok === true : true);
|
|
88
|
-
await fs.rm(tmp, { recursive: true, force: true });
|
|
89
|
-
emit({
|
|
90
|
-
schema: 'sks.zellij-layout-valid-check.v1',
|
|
91
|
-
ok,
|
|
92
|
-
layout: { ...built, layout_kdl: undefined, layout_path: layoutPath },
|
|
93
|
-
viewport_layout_ok: viewportLayoutOk,
|
|
94
|
-
kinds_validated: kindsValidated,
|
|
95
|
-
naruto_fanout_layout: { viewport_count: narutoFanoutLayout.viewport_count, pane_count: narutoFanoutPaneCount, initial_worker_panes: narutoFanoutLayout.initial_worker_panes },
|
|
96
|
-
static_validation: staticValidation,
|
|
97
|
-
invalid_fixture: invalidValidation,
|
|
98
|
-
capability,
|
|
99
|
-
real_run: realRun,
|
|
100
|
-
isolated_session: true,
|
|
101
|
-
socket_dir: socketDir,
|
|
102
|
-
temporary_layout_removed: !(await exists(tmp)),
|
|
103
|
-
integration_optional: !requireReal,
|
|
104
|
-
blockers: ok ? [] : ['zellij_layout_valid_check_failed']
|
|
105
|
-
});
|
|
106
|
-
function emit(report) { console.log(JSON.stringify(report, null, 2)); if (!report.ok)
|
|
107
|
-
process.exitCode = 1; }
|
|
108
|
-
function fail(blocker, detail) { emit({ schema: 'sks.zellij-layout-valid-check.v1', ok: false, blockers: [blocker], detail }); process.exit(1); }
|
|
109
|
-
async function waitForSocketEntriesToClear(socketDir, timeoutMs) {
|
|
110
|
-
const deadline = Date.now() + timeoutMs;
|
|
111
|
-
for (;;) {
|
|
112
|
-
const entries = await fs.readdir(path.join(socketDir, 'contract_version_1')).catch(() => []);
|
|
113
|
-
if (entries.length === 0 || Date.now() >= deadline)
|
|
114
|
-
return entries;
|
|
115
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
async function exists(value) {
|
|
119
|
-
return fs.access(value).then(() => true).catch(() => false);
|
|
120
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, readText } from './sks-1-18-gate-lib.js';
|
|
3
|
-
const src = readText('src/core/zellij/zellij-worker-pane-manager.ts');
|
|
4
|
-
assertGate(src.includes('sks.zellij-pane-creation-lock-metrics.v1'), 'pane lock metrics schema missing');
|
|
5
|
-
assertGate(src.includes('pane-creation-lock-events.jsonl'), 'pane lock metrics artifact path missing');
|
|
6
|
-
for (const token of ['requested_at', 'acquired_at', 'released_at', 'wait_ms', 'held_ms']) {
|
|
7
|
-
assertGate(src.includes(token), `pane lock metrics missing ${token}`);
|
|
8
|
-
}
|
|
9
|
-
assertGate(src.includes('zellij_pane_creation_lock_requested') && src.includes('zellij_pane_creation_lock_released'), 'pane lock runtime events missing');
|
|
10
|
-
emitGate('zellij:pane-creation-lock-metrics');
|
|
@@ -1,78 +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 { spawn } from 'node:child_process';
|
|
6
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const missionId = 'M-zellij-pane-lock-blackbox';
|
|
8
|
-
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-pane-lock-'));
|
|
9
|
-
const metricsFile = path.join(tmp, '.sneakoscope', 'missions', missionId, 'zellij', 'pane-creation-lock-events.jsonl');
|
|
10
|
-
await fs.mkdir(path.dirname(metricsFile), { recursive: true });
|
|
11
|
-
const workers = 32;
|
|
12
|
-
const visiblePaneCap = 8;
|
|
13
|
-
const workerSleepMs = 3000;
|
|
14
|
-
const paneDelayMs = 300;
|
|
15
|
-
const started = Date.now();
|
|
16
|
-
let active = 0;
|
|
17
|
-
let maxActive = 0;
|
|
18
|
-
const pids = new Set();
|
|
19
|
-
const events = [];
|
|
20
|
-
let lock = Promise.resolve();
|
|
21
|
-
const runs = Array.from({ length: workers }, (_, index) => runWorker(index + 1));
|
|
22
|
-
await Promise.all(runs);
|
|
23
|
-
const wall = Date.now() - started;
|
|
24
|
-
const metricsText = await fs.readFile(metricsFile, 'utf8');
|
|
25
|
-
const metrics = metricsText.trim().split(/\n+/).map((line) => JSON.parse(line));
|
|
26
|
-
const visiblePanes = metrics.length;
|
|
27
|
-
const headlessWorkers = workers - visiblePanes;
|
|
28
|
-
const lastPaneCreated = Math.max(...events.filter((event) => event.type === 'zellij_pane_created').map((event) => event.at));
|
|
29
|
-
const firstSpawn = Math.min(...events.filter((event) => event.type === 'worker_process_spawned').map((event) => event.at));
|
|
30
|
-
assertGate(maxActive >= 32, 'max active workers must reach 32', { maxActive });
|
|
31
|
-
assertGate(pids.size >= 32, 'unique PIDs must reach 32', { unique: pids.size });
|
|
32
|
-
assertGate(wall < 9000, 'wall time must prove overlap under 9s', { wall });
|
|
33
|
-
assertGate(metrics.length === visiblePaneCap && metrics.every((row) => row.wait_ms >= 0 && row.held_ms >= paneDelayMs - 40), 'pane lock metrics missing or invalid', metrics);
|
|
34
|
-
assertGate(firstSpawn <= lastPaneCreated, 'worker processes must spawn before all pane creation finishes', { firstSpawn, lastPaneCreated });
|
|
35
|
-
assertGate(visiblePanes <= 8 && headlessWorkers >= 24, 'visible/headless worker counts mismatch', { visiblePanes, headlessWorkers });
|
|
36
|
-
emitGate('zellij:pane-lock-concurrency-blackbox', { wall_ms: wall, max_active_workers: maxActive, unique_pids: pids.size, visible_panes: visiblePanes, headless_workers: headlessWorkers });
|
|
37
|
-
async function runWorker(slot) {
|
|
38
|
-
const child = spawn(process.execPath, ['-e', `setTimeout(()=>process.exit(0), ${workerSleepMs})`], { stdio: 'ignore' });
|
|
39
|
-
active += 1;
|
|
40
|
-
maxActive = Math.max(maxActive, active);
|
|
41
|
-
if (child.pid)
|
|
42
|
-
pids.add(child.pid);
|
|
43
|
-
events.push({ type: 'worker_process_spawned', slot, at: Date.now() - started, pid: child.pid || null });
|
|
44
|
-
const paneTask = slot <= visiblePaneCap ? withPaneLock(slot) : Promise.resolve();
|
|
45
|
-
await Promise.all([
|
|
46
|
-
new Promise((resolve) => child.on('close', resolve)),
|
|
47
|
-
paneTask
|
|
48
|
-
]);
|
|
49
|
-
active -= 1;
|
|
50
|
-
}
|
|
51
|
-
async function withPaneLock(slot) {
|
|
52
|
-
const requestedAt = new Date().toISOString();
|
|
53
|
-
const requestedMs = Date.now();
|
|
54
|
-
events.push({ type: 'zellij_pane_creation_lock_requested', slot, at: requestedMs - started });
|
|
55
|
-
const previous = lock;
|
|
56
|
-
let release;
|
|
57
|
-
lock = new Promise((resolve) => { release = resolve; });
|
|
58
|
-
await previous;
|
|
59
|
-
const acquiredAt = new Date().toISOString();
|
|
60
|
-
const acquiredMs = Date.now();
|
|
61
|
-
await new Promise((resolve) => setTimeout(resolve, paneDelayMs));
|
|
62
|
-
events.push({ type: 'zellij_pane_created', slot, at: Date.now() - started });
|
|
63
|
-
const releasedAt = new Date().toISOString();
|
|
64
|
-
const releasedMs = Date.now();
|
|
65
|
-
await fs.appendFile(metricsFile, JSON.stringify({
|
|
66
|
-
schema: 'sks.zellij-pane-creation-lock-metrics.v1',
|
|
67
|
-
mission_id: missionId,
|
|
68
|
-
session_name: 'fixture',
|
|
69
|
-
slot_id: `slot-${String(slot).padStart(3, '0')}`,
|
|
70
|
-
generation_index: 1,
|
|
71
|
-
requested_at: requestedAt,
|
|
72
|
-
acquired_at: acquiredAt,
|
|
73
|
-
released_at: releasedAt,
|
|
74
|
-
wait_ms: acquiredMs - requestedMs,
|
|
75
|
-
held_ms: releasedMs - acquiredMs
|
|
76
|
-
}) + '\n');
|
|
77
|
-
release();
|
|
78
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, readText } from './sks-1-18-gate-lib.js';
|
|
3
|
-
const runtime = readText('src/core/agents/native-cli-worker-runtime.ts');
|
|
4
|
-
const processRunStart = runtime.indexOf('const processRun = liveWorkerPane');
|
|
5
|
-
const compactBlock = runtime.slice(processRunStart, runtime.indexOf('const zellijRequired'));
|
|
6
|
-
assertGate(processRunStart >= 0, 'worker runtime compact branch missing');
|
|
7
|
-
assertGate(compactBlock.indexOf('spawnCompactSlotWorkerProcess') >= 0 && compactBlock.indexOf('spawnCompactSlotWorkerProcess') < compactBlock.indexOf('openWorkerPane'), 'compact worker process must spawn before pane creation');
|
|
8
|
-
const parallel = readText('src/core/agents/parallel-runtime-proof.ts');
|
|
9
|
-
for (const event of ['worker_process_spawned', 'zellij_pane_creation_lock_requested', 'zellij_pane_created']) {
|
|
10
|
-
assertGate(parallel.includes(event), `parallel proof event missing ${event}`);
|
|
11
|
-
}
|
|
12
|
-
emitGate('zellij:pane-lock-does-not-block-worker');
|
|
@@ -1,134 +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 { spawn } from 'node:child_process';
|
|
6
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-open-worker-pane-'));
|
|
8
|
-
const missionId = 'M-zellij-open-worker-pane';
|
|
9
|
-
const sessionName = 'sks-open-worker-pane-fixture';
|
|
10
|
-
const workers = 32;
|
|
11
|
-
const visible = 8;
|
|
12
|
-
const workerSleepMs = 3000;
|
|
13
|
-
const events = [];
|
|
14
|
-
const pids = new Set();
|
|
15
|
-
let active = 0;
|
|
16
|
-
let maxActive = 0;
|
|
17
|
-
const started = Date.now();
|
|
18
|
-
process.env.SKS_ZELLIJ_FAKE_ADAPTER = '1';
|
|
19
|
-
process.env.SKS_ZELLIJ_FAKE_ROOT = tmp;
|
|
20
|
-
process.env.SKS_ZELLIJ_FAKE_DELAY_MS = '300';
|
|
21
|
-
process.env.SKS_ZELLIJ_FAKE_VERSION = '0.43.1';
|
|
22
|
-
process.env.SKS_ZELLIJ_WORKER_STACKED = '1';
|
|
23
|
-
const { openWorkerPane } = await importDist('core/zellij/zellij-worker-pane-manager.js');
|
|
24
|
-
const runs = Array.from({ length: workers }, (_, index) => runWorker(index + 1));
|
|
25
|
-
const records = await Promise.all(runs);
|
|
26
|
-
const wall = Date.now() - started;
|
|
27
|
-
const visibleRecords = records.filter(Boolean);
|
|
28
|
-
const calls = await readJsonl(path.join(tmp, '.sneakoscope', 'fake-zellij-calls.jsonl'));
|
|
29
|
-
const metrics = await readJsonl(path.join(tmp, '.sneakoscope', 'missions', missionId, 'zellij', 'pane-creation-lock-events.jsonl'));
|
|
30
|
-
const anchorCalls = calls.filter((row) => row.args.includes('--name') && row.args.includes('SLOTS'));
|
|
31
|
-
const stackedCalls = calls.filter((row) => row.args.includes('--stacked'));
|
|
32
|
-
const stackPaneCalls = calls.filter((row) => row.args.includes('stack-panes'));
|
|
33
|
-
const workerArtifacts = await Promise.all(visibleRecords.map((record) => readJson(path.join(tmp, record.worker_artifact_dir, 'zellij-worker-pane.json'))));
|
|
34
|
-
const stackedWorkerArtifacts = workerArtifacts.filter((row) => row.worker_stacked_requested === true);
|
|
35
|
-
const lastPaneCreated = Math.max(...events.filter((event) => event.type === 'zellij_pane_created').map((event) => event.at));
|
|
36
|
-
const firstSpawn = Math.min(...events.filter((event) => event.type === 'worker_process_spawned').map((event) => event.at));
|
|
37
|
-
assertGate(visibleRecords.length === visible, 'visible openWorkerPane records missing', { visibleRecords: visibleRecords.length });
|
|
38
|
-
assertGate(workerArtifacts.every((row) => row?.schema === 'sks.zellij-worker-pane.v1'), 'openWorkerPane must write zellij-worker-pane.json artifacts', workerArtifacts);
|
|
39
|
-
assertGate(anchorCalls.length === 1, 'exactly one SLOTS anchor must be created', { anchorCalls });
|
|
40
|
-
assertGate(new Set(anchorCalls.map((row) => JSON.stringify(row.args))).size === 1, 'SLOTS anchor must not be created N side-by-side times', { anchorCalls });
|
|
41
|
-
assertGate(metrics.length >= visible, 'pane lock metrics must cover visible panes', { metrics: metrics.length });
|
|
42
|
-
assertGate(firstSpawn <= lastPaneCreated, 'worker processes must spawn before all pane creation finishes', { firstSpawn, lastPaneCreated });
|
|
43
|
-
assertGate(maxActive >= workers, 'worker process execution must not be serialized by pane lock', { maxActive });
|
|
44
|
-
assertGate(pids.size >= workers, 'unique worker process PIDs must reach requested worker count', { pids: pids.size });
|
|
45
|
-
assertGate(wall < 9000, 'openWorkerPane integration wall time must stay below 9s', { wall });
|
|
46
|
-
assertGate(stackedCalls.length >= visible - 1, 'second+ visible workers must request native stacked panes on fake zellij >=0.43', { stackedCalls: stackedCalls.length });
|
|
47
|
-
assertGate(stackPaneCalls.length >= visible - 1, 'second+ visible workers must reconcile native stacked panes with stack-panes', { stackPaneCalls: stackPaneCalls.length });
|
|
48
|
-
assertGate(stackedWorkerArtifacts.length >= visible - 1, 'second+ visible worker artifacts must record stacked requested', workerArtifacts);
|
|
49
|
-
assertGate(stackedWorkerArtifacts.every((row) => row.worker_stacked_applied === true), 'second+ visible worker artifacts must record stacked applied', workerArtifacts);
|
|
50
|
-
emitGate('zellij:pane-lock-open-worker-integration', {
|
|
51
|
-
wall_ms: wall,
|
|
52
|
-
max_active_workers: maxActive,
|
|
53
|
-
unique_pids: pids.size,
|
|
54
|
-
visible_panes: visibleRecords.length,
|
|
55
|
-
stacked_calls: stackedCalls.length,
|
|
56
|
-
stack_panes_calls: stackPaneCalls.length,
|
|
57
|
-
pane_lock_metrics: metrics.length
|
|
58
|
-
});
|
|
59
|
-
async function runWorker(slot) {
|
|
60
|
-
const child = spawn(process.execPath, ['-e', `setTimeout(()=>process.exit(0), ${workerSleepMs})`], { stdio: 'ignore' });
|
|
61
|
-
active += 1;
|
|
62
|
-
maxActive = Math.max(maxActive, active);
|
|
63
|
-
if (child.pid)
|
|
64
|
-
pids.add(child.pid);
|
|
65
|
-
events.push({ type: 'worker_process_spawned', slot, at: Date.now() - started, pid: child.pid || null });
|
|
66
|
-
const paneTask = slot <= visible
|
|
67
|
-
? openWorkerPane(workerInput(slot)).then((record) => {
|
|
68
|
-
events.push({ type: 'zellij_pane_created', slot, at: Date.now() - started, pane_id: record.pane_id });
|
|
69
|
-
return record;
|
|
70
|
-
})
|
|
71
|
-
: Promise.resolve(null);
|
|
72
|
-
const [, record] = await Promise.all([
|
|
73
|
-
new Promise((resolve) => child.on('close', resolve)),
|
|
74
|
-
paneTask
|
|
75
|
-
]);
|
|
76
|
-
active -= 1;
|
|
77
|
-
return record;
|
|
78
|
-
}
|
|
79
|
-
function workerInput(slot) {
|
|
80
|
-
const slotId = `slot-${String(slot).padStart(3, '0')}`;
|
|
81
|
-
const workerDir = path.join('sessions', slotId, 'gen-1', 'worker');
|
|
82
|
-
return {
|
|
83
|
-
root: tmp,
|
|
84
|
-
cwd: tmp,
|
|
85
|
-
projectRoot: tmp,
|
|
86
|
-
missionId,
|
|
87
|
-
sessionName,
|
|
88
|
-
slotId,
|
|
89
|
-
generationIndex: 1,
|
|
90
|
-
sessionId: `${slotId}-gen-1`,
|
|
91
|
-
workerArtifactDir: workerDir,
|
|
92
|
-
resultPath: path.join(workerDir, 'worker-result.json'),
|
|
93
|
-
heartbeatPath: path.join(workerDir, 'worker-heartbeat.jsonl'),
|
|
94
|
-
patchEnvelopePath: path.join(workerDir, 'worker-patch-envelope.json'),
|
|
95
|
-
stdoutLog: path.join(workerDir, 'worker.stdout.log'),
|
|
96
|
-
stderrLog: path.join(workerDir, 'worker.stderr.log'),
|
|
97
|
-
workerCommand: `node -e "setTimeout(()=>{}, ${workerSleepMs})"`,
|
|
98
|
-
providerContext: providerContext(),
|
|
99
|
-
serviceTier: 'fast',
|
|
100
|
-
backend: 'codex-sdk',
|
|
101
|
-
statusLabel: 'running',
|
|
102
|
-
rightColumnMode: 'spawn-on-first-worker',
|
|
103
|
-
visiblePaneCap: visible,
|
|
104
|
-
uiMode: 'compact-slots'
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function providerContext() {
|
|
108
|
-
return {
|
|
109
|
-
schema: 'sks.provider-context.v1',
|
|
110
|
-
generated_at: new Date().toISOString(),
|
|
111
|
-
provider: 'codex-lb',
|
|
112
|
-
auth_mode: 'codex_lb_key',
|
|
113
|
-
route: '$Naruto',
|
|
114
|
-
service_tier: 'fast',
|
|
115
|
-
source: 'fixture',
|
|
116
|
-
confidence: 'high',
|
|
117
|
-
conflict: false,
|
|
118
|
-
warnings: [],
|
|
119
|
-
signals: {
|
|
120
|
-
openai_api_key_present: false,
|
|
121
|
-
codex_lb_key_present: true,
|
|
122
|
-
codex_lb_explicit: true,
|
|
123
|
-
codex_app_auth_present: false,
|
|
124
|
-
model_provider: 'codex-lb'
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
async function readJson(file) {
|
|
129
|
-
return JSON.parse(await fs.readFile(file, 'utf8'));
|
|
130
|
-
}
|
|
131
|
-
async function readJsonl(file) {
|
|
132
|
-
const text = await fs.readFile(file, 'utf8');
|
|
133
|
-
return text.trim().split(/\n+/).filter(Boolean).map((line) => JSON.parse(line));
|
|
134
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, readText } from './sks-1-18-gate-lib.js';
|
|
3
|
-
const pane = readText('src/core/zellij/zellij-slot-pane-renderer.ts');
|
|
4
|
-
const anchor = readText('src/core/zellij/zellij-slot-column-anchor.ts');
|
|
5
|
-
assertGate(pane.includes('QA app handoff pending') && pane.includes('app-handoff.json'), 'Zellij slot pane must surface QA app handoff pending status');
|
|
6
|
-
assertGate(anchor.includes('QA /app handoff pending') && anchor.includes('qa-loop/app-handoff.json'), 'Zellij column anchor must surface QA app handoff pending status');
|
|
7
|
-
emitGate('zellij:qa-app-handoff-status');
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
4
|
-
import { tmpdir, writeTextAtomic } from '../core/fsx.js';
|
|
5
|
-
import { checkZellijCapability } from '../core/zellij/zellij-capability.js';
|
|
6
|
-
import { runZellij } from '../core/zellij/zellij-command.js';
|
|
7
|
-
const requireReal = process.argv.includes('--require-real') || process.env.SKS_REQUIRE_ZELLIJ === '1';
|
|
8
|
-
const visiblePaneCap = Number(process.env.SKS_ZELLIJ_GEOMETRY_VISIBLE_CAP || 8);
|
|
9
|
-
const report = requireReal ? await realGeometryProof() : syntheticGeometryProof();
|
|
10
|
-
assertGate(report.ok, 'right-column geometry proof failed', report);
|
|
11
|
-
emitGate('zellij:right-column-geometry-proof', report);
|
|
12
|
-
function syntheticGeometryProof() {
|
|
13
|
-
const panes = [
|
|
14
|
-
{ pane_id: 'main', role: 'main', geometry: { x: 0, y: 0, width: 120, height: 60 }, name: 'orchestrator' },
|
|
15
|
-
{ pane_id: 'w1', role: 'worker', geometry: { x: 121, y: 0, width: 80, height: 15 }, name: 'slot-001' },
|
|
16
|
-
{ pane_id: 'w2', role: 'worker', geometry: { x: 121, y: 16, width: 80, height: 15 }, name: 'slot-002' }
|
|
17
|
-
];
|
|
18
|
-
return buildReport({ synthetic: true, panes, commands: [], listPanes: null, dumpScreen: null, blockers: [] });
|
|
19
|
-
}
|
|
20
|
-
async function realGeometryProof() {
|
|
21
|
-
const root = process.cwd();
|
|
22
|
-
const capability = await checkZellijCapability({ root, require: true, writeReport: false });
|
|
23
|
-
const sessionName = `sks-geom-${process.pid}-${Date.now()}`;
|
|
24
|
-
const tmpDir = await fsTempDir();
|
|
25
|
-
const layoutPath = path.join(tmpDir, 'layout.kdl');
|
|
26
|
-
const commands = [];
|
|
27
|
-
let listPanes = null;
|
|
28
|
-
let dumpScreen = null;
|
|
29
|
-
const blockers = [...(capability.blockers || [])];
|
|
30
|
-
try {
|
|
31
|
-
await writeTextAtomic(layoutPath, buildRealGeometryLayout(root));
|
|
32
|
-
await runZellij(['kill-session', sessionName], { cwd: root, timeoutMs: 2500, optional: true });
|
|
33
|
-
const launch = await runZellij(['attach', '--create-background', sessionName, 'options', '--default-layout', layoutPath], { cwd: root, timeoutMs: 5000, optional: false });
|
|
34
|
-
commands.push(launch);
|
|
35
|
-
if (!launch.ok)
|
|
36
|
-
blockers.push(...launch.blockers.map((blocker) => `zellij_geometry_launch_${blocker}`));
|
|
37
|
-
await sleep(1000);
|
|
38
|
-
listPanes = await runZellij(['--session', sessionName, 'action', 'list-panes', '--json', '--all'], { cwd: root, timeoutMs: 5000, optional: false });
|
|
39
|
-
commands.push(listPanes);
|
|
40
|
-
if (!listPanes.ok)
|
|
41
|
-
blockers.push(...listPanes.blockers.map((blocker) => `zellij_geometry_list_panes_${blocker}`));
|
|
42
|
-
dumpScreen = await runZellij(['--session', sessionName, 'action', 'dump-screen'], { cwd: root, timeoutMs: 5000, optional: false });
|
|
43
|
-
commands.push(dumpScreen);
|
|
44
|
-
if (!dumpScreen.ok)
|
|
45
|
-
blockers.push(...dumpScreen.blockers.map((blocker) => `zellij_geometry_dump_screen_${blocker}`));
|
|
46
|
-
const panes = parseRealPanes(listPanes.stdout_tail);
|
|
47
|
-
return buildReport({ synthetic: false, panes, commands, listPanes, dumpScreen, blockers });
|
|
48
|
-
}
|
|
49
|
-
finally {
|
|
50
|
-
commands.push(await runZellij(['kill-session', sessionName], { cwd: root, timeoutMs: 5000, optional: true }).catch((err) => ({
|
|
51
|
-
ok: false,
|
|
52
|
-
command: 'zellij',
|
|
53
|
-
args: ['kill-session', sessionName],
|
|
54
|
-
blockers: [`zellij_geometry_cleanup_exception:${err?.message || String(err)}`],
|
|
55
|
-
warnings: []
|
|
56
|
-
})));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function buildReport(input) {
|
|
60
|
-
const main = input.panes.find((pane) => pane.role === 'main') || null;
|
|
61
|
-
const workers = input.panes.filter((pane) => pane.role === 'worker');
|
|
62
|
-
const sameRightX = workers.length > 0 && workers.every((pane) => Math.abs(Number(pane.geometry.x) - Number(workers[0].geometry.x)) <= 2);
|
|
63
|
-
const rightOfMain = Boolean(main) && workers.length > 0 && workers.every((pane) => Number(pane.geometry.x) >= Number(main.geometry.x) + Number(main.geometry.width) - 2);
|
|
64
|
-
const increasingY = workers.every((pane, index) => index === 0 || Number(pane.geometry.y) > Number(workers[index - 1].geometry.y));
|
|
65
|
-
const capOk = workers.length <= visiblePaneCap;
|
|
66
|
-
const realEvidenceOk = input.synthetic || (input.listPanes?.ok === true && input.dumpScreen?.ok === true && workers.length >= 2);
|
|
67
|
-
const blockers = [
|
|
68
|
-
...input.blockers,
|
|
69
|
-
...(main ? [] : ['zellij_geometry_main_missing']),
|
|
70
|
-
...(workers.length >= 2 ? [] : ['zellij_geometry_workers_missing']),
|
|
71
|
-
...(sameRightX ? [] : ['zellij_geometry_worker_x_mismatch']),
|
|
72
|
-
...(rightOfMain ? [] : ['zellij_geometry_workers_not_right_of_main']),
|
|
73
|
-
...(increasingY ? [] : ['zellij_geometry_workers_not_stacked_down']),
|
|
74
|
-
...(capOk ? [] : ['zellij_geometry_visible_cap_exceeded']),
|
|
75
|
-
...(realEvidenceOk ? [] : ['zellij_geometry_real_evidence_missing'])
|
|
76
|
-
];
|
|
77
|
-
return {
|
|
78
|
-
schema: 'sks.zellij-right-column-geometry-proof.v1',
|
|
79
|
-
ok: blockers.length === 0,
|
|
80
|
-
gate: 'zellij:right-column-geometry-proof',
|
|
81
|
-
synthetic: input.synthetic,
|
|
82
|
-
same_right_x: sameRightX,
|
|
83
|
-
right_of_main: rightOfMain,
|
|
84
|
-
increasing_y: increasingY,
|
|
85
|
-
visible_cap_ok: capOk,
|
|
86
|
-
real_list_panes_json_observed: input.synthetic ? false : input.listPanes?.ok === true,
|
|
87
|
-
real_dump_screen_observed: input.synthetic ? false : input.dumpScreen?.ok === true,
|
|
88
|
-
panes: input.panes,
|
|
89
|
-
command_count: input.commands.length,
|
|
90
|
-
command_blockers: input.commands.flatMap((row) => row?.blockers || []),
|
|
91
|
-
blockers
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
function parseRealPanes(text) {
|
|
95
|
-
let rows = [];
|
|
96
|
-
try {
|
|
97
|
-
const parsed = JSON.parse(String(text || '[]'));
|
|
98
|
-
rows = Array.isArray(parsed) ? parsed : Array.isArray(parsed?.panes) ? parsed.panes : [];
|
|
99
|
-
}
|
|
100
|
-
catch {
|
|
101
|
-
rows = [];
|
|
102
|
-
}
|
|
103
|
-
return rows
|
|
104
|
-
.filter((row) => row && row.is_plugin !== true && row.exited !== true)
|
|
105
|
-
.map((row) => {
|
|
106
|
-
const title = String(row.title || row.name || row.pane_name || '');
|
|
107
|
-
return {
|
|
108
|
-
pane_id: String(row.pane_id ?? row.paneId ?? row.id ?? title),
|
|
109
|
-
role: /^slot-\d+/i.test(title) ? 'worker' : title === 'orchestrator' ? 'main' : 'unknown',
|
|
110
|
-
geometry: {
|
|
111
|
-
x: Number(row.pane_x ?? row.x ?? 0),
|
|
112
|
-
y: Number(row.pane_y ?? row.y ?? 0),
|
|
113
|
-
width: Number(row.pane_columns ?? row.width ?? 0),
|
|
114
|
-
height: Number(row.pane_rows ?? row.height ?? 0)
|
|
115
|
-
},
|
|
116
|
-
name: title,
|
|
117
|
-
pane_command: row.pane_command || row.terminal_command || null
|
|
118
|
-
};
|
|
119
|
-
})
|
|
120
|
-
.filter((row) => row.role === 'main' || row.role === 'worker')
|
|
121
|
-
.sort((a, b) => a.role === b.role ? a.geometry.y - b.geometry.y : a.role === 'main' ? -1 : 1);
|
|
122
|
-
}
|
|
123
|
-
function buildRealGeometryLayout(cwd) {
|
|
124
|
-
const hold = 'sleep 30';
|
|
125
|
-
return [
|
|
126
|
-
'layout {',
|
|
127
|
-
' default_tab_template {',
|
|
128
|
-
' pane size=1 borderless=true {',
|
|
129
|
-
' plugin location="zellij:tab-bar"',
|
|
130
|
-
' }',
|
|
131
|
-
' children',
|
|
132
|
-
' pane size=2 borderless=true {',
|
|
133
|
-
' plugin location="zellij:status-bar"',
|
|
134
|
-
' }',
|
|
135
|
-
' }',
|
|
136
|
-
` tab name="SKS geometry proof" cwd=${JSON.stringify(cwd)} split_direction="vertical" {`,
|
|
137
|
-
' pane name="orchestrator" command="sh" {',
|
|
138
|
-
` args "-lc" ${JSON.stringify(hold)}`,
|
|
139
|
-
' }',
|
|
140
|
-
' pane name="slot-column" split_direction="horizontal" {',
|
|
141
|
-
' pane name="slot-001" command="sh" {',
|
|
142
|
-
` args "-lc" ${JSON.stringify(hold)}`,
|
|
143
|
-
' }',
|
|
144
|
-
' pane name="slot-002" command="sh" {',
|
|
145
|
-
` args "-lc" ${JSON.stringify(hold)}`,
|
|
146
|
-
' }',
|
|
147
|
-
' }',
|
|
148
|
-
' }',
|
|
149
|
-
'}',
|
|
150
|
-
''
|
|
151
|
-
].join('\n');
|
|
152
|
-
}
|
|
153
|
-
async function fsTempDir() {
|
|
154
|
-
return tmpdir('sks-zellij-geometry-');
|
|
155
|
-
}
|
|
156
|
-
function sleep(ms) {
|
|
157
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
158
|
-
}
|
|
@@ -1,20 +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-18-gate-lib.js';
|
|
5
|
-
const worker = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-worker-pane-manager.ts'), 'utf8');
|
|
6
|
-
const manager = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-right-column-manager.ts'), 'utf8');
|
|
7
|
-
const runtime = fs.readFileSync(path.join(root, 'src/core/agents/native-cli-worker-runtime.ts'), 'utf8');
|
|
8
|
-
const headlessReturnIndex = worker.indexOf("rightColumn?.placement === 'headless'");
|
|
9
|
-
const newPaneIndex = worker.indexOf("action', 'new-pane'");
|
|
10
|
-
const report = {
|
|
11
|
-
schema: 'sks.zellij-right-column-headless-overflow-check.v1',
|
|
12
|
-
headless_source: worker.includes("'zellij_worker_headless_overflow'"),
|
|
13
|
-
headless_scaling_primitive: worker.includes('native_cli_process_headless_with_slot_column'),
|
|
14
|
-
returns_before_new_pane: headlessReturnIndex >= 0 && newPaneIndex >= 0 && headlessReturnIndex < newPaneIndex,
|
|
15
|
-
manager_records_overflow: manager.includes('worker_headless_overflow') && manager.includes('visible_pane_cap'),
|
|
16
|
-
runtime_records_overflow: runtime.includes('recordHeadlessWorkerInRightColumn')
|
|
17
|
-
};
|
|
18
|
-
const ok = report.headless_source && report.headless_scaling_primitive && report.returns_before_new_pane && report.manager_records_overflow && report.runtime_records_overflow;
|
|
19
|
-
assertGate(ok, 'headless overflow must not call zellij action new-pane', report);
|
|
20
|
-
emitGate('zellij:right-column-headless-overflow', report);
|
|
@@ -1,24 +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-18-gate-lib.js';
|
|
5
|
-
const source = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-right-column-manager.ts'), 'utf8');
|
|
6
|
-
const worker = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-worker-pane-manager.ts'), 'utf8');
|
|
7
|
-
const schemaExists = fs.existsSync(path.join(root, 'schemas/zellij/zellij-right-column-state.schema.json'));
|
|
8
|
-
const report = {
|
|
9
|
-
schema: 'sks.zellij-right-column-manager-check.v1',
|
|
10
|
-
ok: true,
|
|
11
|
-
exports: ['ensureRightColumn', 'prepareWorkerInRightColumn', 'recordWorkerPaneInRightColumn', 'recordHeadlessWorkerInRightColumn', 'closeWorkerInRightColumn'].every((name) => source.includes(`function ${name}`)),
|
|
12
|
-
slot_state_after_worker_reservation: source.includes('right_column_creating') && source.includes('scheduler_slot_reserved'),
|
|
13
|
-
slot_column_anchor_right: worker.includes('buildZellijSlotColumnAnchorCommand') && worker.includes("'--direction', 'right', '--name', 'SLOTS'"),
|
|
14
|
-
worker_direction_stack: worker.includes("'--direction', directionRequested")
|
|
15
|
-
&& worker.includes("const directionRequested: 'right' | 'down' = 'down'")
|
|
16
|
-
&& worker.includes("'--near-current-pane'")
|
|
17
|
-
&& worker.includes('worker_direction_requested')
|
|
18
|
-
&& worker.includes('slot_column_anchor_pane_id'),
|
|
19
|
-
headless_overflow: source.includes('worker_headless_overflow') && source.includes('visible_pane_cap'),
|
|
20
|
-
schema_exists: schemaExists
|
|
21
|
-
};
|
|
22
|
-
report.ok = report.exports && report.slot_state_after_worker_reservation && report.slot_column_anchor_right && report.worker_direction_stack && report.headless_overflow && report.schema_exists;
|
|
23
|
-
assertGate(report.ok, 'right-column manager must own neutral slot state, stacked workers, headless overflow, and state schema', report);
|
|
24
|
-
emitGate('zellij:right-column-manager', report);
|