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,65 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
3
|
-
import { buildZellijSlotColumnAnchorCommand, renderZellijSlotColumnAnchor } from '../core/zellij/zellij-slot-column-anchor.js';
|
|
4
|
-
const rendered = renderZellijSlotColumnAnchor({
|
|
5
|
-
activeWorkers: 3,
|
|
6
|
-
visiblePaneCap: 8,
|
|
7
|
-
headlessWorkers: 12,
|
|
8
|
-
queueDepth: 44,
|
|
9
|
-
mode: 'compact-slots'
|
|
10
|
-
});
|
|
11
|
-
const roster = renderZellijSlotColumnAnchor({
|
|
12
|
-
activeWorkers: 1,
|
|
13
|
-
visiblePaneCap: 5,
|
|
14
|
-
headlessWorkers: 0,
|
|
15
|
-
queueDepth: 0,
|
|
16
|
-
mode: 'compact-slots',
|
|
17
|
-
workerRows: [
|
|
18
|
-
{
|
|
19
|
-
slotId: 'slot-004',
|
|
20
|
-
generationIndex: 1,
|
|
21
|
-
placement: 'zellij-pane',
|
|
22
|
-
status: 'running',
|
|
23
|
-
backend: 'codex-sdk',
|
|
24
|
-
task: 'Inspect Zellij slot UI assignment',
|
|
25
|
-
heartbeatAgeMs: 900
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
});
|
|
29
|
-
const overflow = renderZellijSlotColumnAnchor({
|
|
30
|
-
activeWorkers: 6,
|
|
31
|
-
visiblePaneCap: 5,
|
|
32
|
-
headlessWorkers: 1,
|
|
33
|
-
queueDepth: 0,
|
|
34
|
-
mode: 'compact-slots',
|
|
35
|
-
workerRows: [
|
|
36
|
-
{
|
|
37
|
-
slotId: 'slot-009',
|
|
38
|
-
generationIndex: 1,
|
|
39
|
-
placement: 'headless',
|
|
40
|
-
status: 'running',
|
|
41
|
-
backend: 'local-llm',
|
|
42
|
-
task: 'Waiting for a visible slot pane',
|
|
43
|
-
heartbeatAgeMs: 1200
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
});
|
|
47
|
-
const command = buildZellijSlotColumnAnchorCommand({
|
|
48
|
-
nodePath: '/usr/bin/node',
|
|
49
|
-
cliPath: '/repo/dist/bin/sks.js',
|
|
50
|
-
missionId: 'M-check',
|
|
51
|
-
mode: 'compact-slots',
|
|
52
|
-
artifactRoot: '/repo/.sneakoscope/missions/M-check/agents',
|
|
53
|
-
watch: true
|
|
54
|
-
});
|
|
55
|
-
const ok = rendered.includes('SLOTS active 3/8 · headless 12 · q 44')
|
|
56
|
-
&& rendered.includes('visible slot panes stack below this anchor')
|
|
57
|
-
&& roster.includes('SLOTS active 1/5 · headless 0 · q 0')
|
|
58
|
-
&& roster.includes('visible slot panes stack below this anchor')
|
|
59
|
-
&& !roster.includes('slot-004 g1 running codex-sdk')
|
|
60
|
-
&& overflow.includes('slot-009 g1 running local-llm')
|
|
61
|
-
&& overflow.includes('Waiting for a visible slot pane')
|
|
62
|
-
&& command.includes('zellij-slot-column-anchor')
|
|
63
|
-
&& command.includes('--watch');
|
|
64
|
-
assertGate(ok, 'Zellij slot-column anchor must stay an anchor while slot workers render in dedicated stacked panes', { rendered, roster, overflow, command });
|
|
65
|
-
emitGate('zellij:slot-column-anchor', { rendered, roster, overflow, command });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { assertGate, emitGate, readText } from './sks-1-18-gate-lib.js';
|
|
3
|
-
const anchor = readText('src/core/zellij/zellij-slot-column-anchor.ts');
|
|
4
|
-
assertGate(anchor.includes('readZellijSlotTelemetrySnapshot'), 'slot column anchor must read aggregate telemetry snapshots');
|
|
5
|
-
assertGate(anchor.includes('snapshot.counts') && anchor.includes('counts.running'), 'slot column anchor must show aggregate status counts');
|
|
6
|
-
assertGate(anchor.includes('SLOTS telemetry stale'), 'slot column anchor must mark stale telemetry');
|
|
7
|
-
assertGate(anchor.includes('update-notice.json') && anchor.includes('MAD-SKS SQL-PLANE ACTIVE'), 'slot column anchor must include update notice and MAD-SKS SQL-plane state');
|
|
8
|
-
emitGate('zellij:slot-column-anchor-telemetry', { aggregate_snapshot: true });
|
|
@@ -1,29 +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 uiMode = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-ui-mode.ts'), 'utf8');
|
|
6
|
-
const manager = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-right-column-manager.ts'), 'utf8');
|
|
7
|
-
const worker = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-worker-pane-manager.ts'), 'utf8');
|
|
8
|
-
const runtime = fs.readFileSync(path.join(root, 'src/core/agents/native-cli-worker-runtime.ts'), 'utf8');
|
|
9
|
-
const report = {
|
|
10
|
-
schema: 'sks.zellij-slot-only-ui-check.v1',
|
|
11
|
-
default_compact_slots: uiMode.includes("return 'compact-slots'"),
|
|
12
|
-
worker_panes_default_live_renderer: uiMode.includes('resolveZellijWorkerPaneUiMode') && uiMode.includes("|| 'compact-slots'"),
|
|
13
|
-
full_debug_opt_in_available: uiMode.includes("'--zellij-full-debug'") && uiMode.includes("fromEnv === 'full-debug'"),
|
|
14
|
-
compact_explicit_fallback: uiMode.includes("'--zellij-compact-slots'") && uiMode.includes("fromEnv === 'compact-slots'"),
|
|
15
|
-
supported_modes_present: ["'compact-slots'", "'full-debug'"].every((token) => uiMode.includes(token)),
|
|
16
|
-
state_records_ui_mode: manager.includes('ui_mode: uiMode'),
|
|
17
|
-
first_slot_creates_slot_anchor_right: worker.includes('buildZellijSlotColumnAnchorCommand') && worker.includes("'--direction', 'right', '--name', 'SLOTS'"),
|
|
18
|
-
anchor_creation_serialized: worker.includes('withZellijPaneCreationLock'),
|
|
19
|
-
workers_stack_down_from_anchor: worker.includes("const directionRequested: 'right' | 'down' = 'down'")
|
|
20
|
-
&& worker.includes("'--near-current-pane'")
|
|
21
|
-
&& worker.includes("'--stacked'")
|
|
22
|
-
&& worker.includes('slot_column_anchor_pane_id'),
|
|
23
|
-
explicit_compact_uses_renderer: runtime.includes('buildZellijSlotPaneCommand') && runtime.includes("liveWorkerPane ? 'worker-command-pane' : 'zellij-slot-pane-renderer'")
|
|
24
|
-
&& runtime.includes('paneRecord.pane_kind')
|
|
25
|
-
&& runtime.includes('paneRecord.scaling_primitive')
|
|
26
|
-
};
|
|
27
|
-
const ok = Object.values(report).every((value) => value === true || typeof value === 'string');
|
|
28
|
-
assertGate(ok, 'Zellij UI must remain compact slot and viewport based', report);
|
|
29
|
-
emitGate('zellij:slot-only-ui', report);
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
6
|
-
const renderer = await importDist('core/zellij/zellij-slot-pane-renderer.js');
|
|
7
|
-
const text = renderer.renderZellijSlotPane({
|
|
8
|
-
slotId: 'slot-003',
|
|
9
|
-
generationIndex: 2,
|
|
10
|
-
role: 'implementer',
|
|
11
|
-
backend: 'local-llm',
|
|
12
|
-
status: 'coding',
|
|
13
|
-
fastMode: true,
|
|
14
|
-
serviceTier: 'fast',
|
|
15
|
-
provider: 'codex-lb',
|
|
16
|
-
authMode: 'codex_lb_key',
|
|
17
|
-
model: 'gpt-5.6-terra',
|
|
18
|
-
reasoningEffort: 'medium',
|
|
19
|
-
currentFile: 'src/core/foo.ts',
|
|
20
|
-
currentTask: 'Editing Zellij slot pane renderer',
|
|
21
|
-
changedFiles: ['src/core/foo.ts', 'src/core/bar.ts'],
|
|
22
|
-
patchStatus: 'candidate',
|
|
23
|
-
verifyStatus: 'queued',
|
|
24
|
-
heartbeatAgeMs: 2000,
|
|
25
|
-
worktreeId: 'WT-0007',
|
|
26
|
-
eventLines: ['running: tool apply_patch', 'running: file src/core/foo.ts'],
|
|
27
|
-
stdoutTail: ['renderer updated live pane output'],
|
|
28
|
-
mode: 'compact-slots'
|
|
29
|
-
});
|
|
30
|
-
const lines = text.split(/\n/);
|
|
31
|
-
const artifactDir = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-slot-pane-renderer-'));
|
|
32
|
-
await fs.writeFile(path.join(artifactDir, 'worker-intake.json'), JSON.stringify({
|
|
33
|
-
agent: { session_id: 'session-slot-003', role: 'implementer' },
|
|
34
|
-
backend: 'codex-sdk',
|
|
35
|
-
fast_mode: true,
|
|
36
|
-
service_tier: 'fast',
|
|
37
|
-
slice: {
|
|
38
|
-
title: 'Hydrate live slot pane from artifacts',
|
|
39
|
-
write_paths: ['src/core/zellij/zellij-slot-pane-renderer.ts']
|
|
40
|
-
},
|
|
41
|
-
worktree: { id: 'WT-0007' }
|
|
42
|
-
}, null, 2));
|
|
43
|
-
await fs.writeFile(path.join(artifactDir, 'worker-process-report.json'), JSON.stringify({
|
|
44
|
-
fast_mode: true,
|
|
45
|
-
service_tier: 'fast',
|
|
46
|
-
session_proof: { ok: true, session_id: 'session-slot-003' }
|
|
47
|
-
}, null, 2));
|
|
48
|
-
await fs.writeFile(path.join(artifactDir, 'zellij-worker-pane.json'), JSON.stringify({
|
|
49
|
-
provider: 'codex-lb',
|
|
50
|
-
service_tier: 'fast',
|
|
51
|
-
provider_context: {
|
|
52
|
-
provider: 'codex-lb',
|
|
53
|
-
auth_mode: 'codex_lb_key'
|
|
54
|
-
}
|
|
55
|
-
}, null, 2));
|
|
56
|
-
await fs.writeFile(path.join(artifactDir, 'codex-control-proof.json'), JSON.stringify({
|
|
57
|
-
config: {
|
|
58
|
-
model: 'gpt-5.6-terra',
|
|
59
|
-
model_provider: 'codex-lb',
|
|
60
|
-
service_tier: 'fast',
|
|
61
|
-
model_reasoning_effort: 'medium'
|
|
62
|
-
}
|
|
63
|
-
}, null, 2));
|
|
64
|
-
await fs.writeFile(path.join(artifactDir, 'worker-heartbeat.jsonl'), `${JSON.stringify({ event: 'started', status: 'running' })}\n`);
|
|
65
|
-
await fs.writeFile(path.join(artifactDir, 'codex-sdk-events.jsonl'), `${JSON.stringify({
|
|
66
|
-
sdk_event_type: 'item.completed',
|
|
67
|
-
lane_status: 'running',
|
|
68
|
-
current_tool: 'apply_patch',
|
|
69
|
-
current_file: 'src/core/zellij/zellij-slot-pane-renderer.ts',
|
|
70
|
-
message_tail: null
|
|
71
|
-
})}\n`);
|
|
72
|
-
await fs.writeFile(path.join(artifactDir, 'worker.stdout.log'), 'renderer stdout tail\n');
|
|
73
|
-
const hydrated = await renderer.renderZellijSlotPaneFromArtifacts({
|
|
74
|
-
artifactDir,
|
|
75
|
-
slotId: 'slot-003',
|
|
76
|
-
generationIndex: 2,
|
|
77
|
-
mode: 'compact-slots'
|
|
78
|
-
});
|
|
79
|
-
const missionRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-slot-pane-mission-'));
|
|
80
|
-
const missionId = 'M-slot-pane-renderer';
|
|
81
|
-
const snapshotDir = path.join(missionRoot, '.sneakoscope', 'missions', missionId, 'zellij');
|
|
82
|
-
await fs.mkdir(snapshotDir, { recursive: true });
|
|
83
|
-
await fs.writeFile(path.join(snapshotDir, 'slot-telemetry.snapshot.json'), `${JSON.stringify({
|
|
84
|
-
schema: 'sks.zellij-slot-telemetry-snapshot.v1',
|
|
85
|
-
mission_id: missionId,
|
|
86
|
-
updated_at: new Date(Date.now() - 61000).toISOString(),
|
|
87
|
-
flush_count: 1,
|
|
88
|
-
slots: {
|
|
89
|
-
'slot-003:g2': {
|
|
90
|
-
slot_id: 'slot-003',
|
|
91
|
-
generation_index: 2,
|
|
92
|
-
worker_id: 'slot-003',
|
|
93
|
-
status: 'running',
|
|
94
|
-
role: 'implementer',
|
|
95
|
-
backend: 'codex-sdk',
|
|
96
|
-
provider: 'codex-lb',
|
|
97
|
-
service_tier: 'fast',
|
|
98
|
-
worktree_id: 'WT-0007',
|
|
99
|
-
worktree_path: null,
|
|
100
|
-
task_title: 'mission telemetry stale fixture',
|
|
101
|
-
current_file: null,
|
|
102
|
-
latest_event_type: 'task_started',
|
|
103
|
-
latest_ts: new Date(Date.now() - 12000).toISOString(),
|
|
104
|
-
progress: null,
|
|
105
|
-
artifact_paths: [],
|
|
106
|
-
blockers: [],
|
|
107
|
-
log_tail: ''
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
counts: { queued: 0, running: 1, verifying: 0, completed: 0, failed: 0, headless: 0 }
|
|
111
|
-
})}\n`, 'utf8');
|
|
112
|
-
const missionHydrated = await renderer.renderZellijSlotPaneFromArtifacts({
|
|
113
|
-
artifactDir,
|
|
114
|
-
artifactRoot: missionRoot,
|
|
115
|
-
missionId,
|
|
116
|
-
slotId: 'slot-003',
|
|
117
|
-
generationIndex: 2,
|
|
118
|
-
mode: 'compact-slots'
|
|
119
|
-
});
|
|
120
|
-
await fs.rm(missionRoot, { recursive: true, force: true });
|
|
121
|
-
await fs.rm(artifactDir, { recursive: true, force: true });
|
|
122
|
-
const command = renderer.buildZellijSlotPaneCommand({
|
|
123
|
-
cliPath: '/repo/dist/bin/sks.js',
|
|
124
|
-
missionId: 'M-test',
|
|
125
|
-
slotId: 'slot-003',
|
|
126
|
-
generationIndex: 2,
|
|
127
|
-
artifactDir: '/tmp/worker',
|
|
128
|
-
watch: true
|
|
129
|
-
});
|
|
130
|
-
const report = {
|
|
131
|
-
schema: 'sks.zellij-slot-pane-renderer-check.v1',
|
|
132
|
-
line_count: lines.length,
|
|
133
|
-
max_compact_lines: 14,
|
|
134
|
-
contains_slot: /┌─ slot-003/.test(text) && /slot-003/.test(text),
|
|
135
|
-
contains_status: /coding/.test(text),
|
|
136
|
-
contains_runtime: /gpt-5\.6-terra·fast/.test(text),
|
|
137
|
-
contains_files: /src\/core\/foo\.ts/.test(text),
|
|
138
|
-
contains_live_event: /renderer updated live pane output/.test(text),
|
|
139
|
-
artifact_hydrates_runtime: /gpt-5\.6-terra·fast/.test(hydrated),
|
|
140
|
-
artifact_hydrates_live_event: /renderer stdout tail/.test(hydrated),
|
|
141
|
-
artifact_hydrates_planned_file: /zellij-slot-pane-renderer\.ts/.test(hydrated),
|
|
142
|
-
mission_live_telemetry_wins: /mission telemetry stale fixture/.test(missionHydrated) && /renderer stdout tail/.test(missionHydrated),
|
|
143
|
-
command_uses_slot_pane: command.includes('zellij-slot-pane') && command.includes('--watch'),
|
|
144
|
-
snapshot: text,
|
|
145
|
-
hydrated_snapshot: hydrated,
|
|
146
|
-
mission_hydrated_snapshot: missionHydrated
|
|
147
|
-
};
|
|
148
|
-
assertGate(lines.length <= 14 && report.contains_slot && report.contains_status && report.contains_runtime && report.contains_files && report.contains_live_event && report.artifact_hydrates_runtime && report.artifact_hydrates_live_event && report.artifact_hydrates_planned_file && report.mission_live_telemetry_wins && report.command_uses_slot_pane, 'compact slot pane renderer must render one live work pane per slot', report);
|
|
149
|
-
emitGate('zellij:compact-slot-renderer', report);
|
|
@@ -1,65 +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 { slotTelemetrySnapshotPath } from '../core/zellij/zellij-slot-telemetry.js';
|
|
6
|
-
import { renderZellijSlotPaneFromArtifacts, renderZellijSlotPaneStatusFromArtifacts } from '../core/zellij/zellij-slot-pane-renderer.js';
|
|
7
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
8
|
-
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-zellij-stale-'));
|
|
9
|
-
const missionId = 'M-zellij-stale';
|
|
10
|
-
const file = slotTelemetrySnapshotPath(root, missionId);
|
|
11
|
-
const artifactDir = path.join(root, 'worker-artifacts');
|
|
12
|
-
await fs.mkdir(path.dirname(file), { recursive: true });
|
|
13
|
-
await fs.mkdir(artifactDir, { recursive: true });
|
|
14
|
-
await fs.writeFile(path.join(artifactDir, 'worker-intake.json'), JSON.stringify({
|
|
15
|
-
agent: { session_id: 'stale-session', role: 'worker' },
|
|
16
|
-
backend: 'codex-sdk',
|
|
17
|
-
slice: { title: 'fresh artifact fallback', write_paths: ['src/core/zellij/zellij-slot-pane-renderer.ts'] }
|
|
18
|
-
}, null, 2));
|
|
19
|
-
await fs.writeFile(path.join(artifactDir, 'worker-heartbeat.jsonl'), `${JSON.stringify({ event: 'progress', status: 'running', message: 'fresh heartbeat fallback' })}\n`);
|
|
20
|
-
await fs.writeFile(path.join(artifactDir, 'codex-sdk-events.jsonl'), `${JSON.stringify({ sdk_event_type: 'item.completed', lane_status: 'running', current_tool: 'apply_patch', current_file: 'src/core/zellij/zellij-slot-pane-renderer.ts' })}\n`);
|
|
21
|
-
await fs.writeFile(path.join(artifactDir, 'worker.stdout.log'), 'fresh worker stdout fallback\n');
|
|
22
|
-
const snapshot = {
|
|
23
|
-
schema: 'sks.zellij-slot-telemetry-snapshot.v1',
|
|
24
|
-
mission_id: missionId,
|
|
25
|
-
updated_at: new Date().toISOString(),
|
|
26
|
-
flush_count: 1,
|
|
27
|
-
slots: {
|
|
28
|
-
'slot-001:g1': {
|
|
29
|
-
slot_id: 'slot-001',
|
|
30
|
-
generation_index: 1,
|
|
31
|
-
worker_id: 'worker-001',
|
|
32
|
-
status: 'running',
|
|
33
|
-
role: 'worker',
|
|
34
|
-
backend: 'fixture',
|
|
35
|
-
provider: 'fixture',
|
|
36
|
-
service_tier: 'fast',
|
|
37
|
-
worktree_id: null,
|
|
38
|
-
worktree_path: null,
|
|
39
|
-
task_title: 'stale detection fixture',
|
|
40
|
-
current_file: null,
|
|
41
|
-
latest_event_type: 'task_started',
|
|
42
|
-
latest_ts: new Date().toISOString(),
|
|
43
|
-
progress: null,
|
|
44
|
-
artifact_paths: [],
|
|
45
|
-
blockers: [],
|
|
46
|
-
log_tail: ''
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
counts: { queued: 0, running: 1, verifying: 0, completed: 0, failed: 0, headless: 0 }
|
|
50
|
-
};
|
|
51
|
-
snapshot.updated_at = new Date(Date.now() - 3500).toISOString();
|
|
52
|
-
await fs.writeFile(file, `${JSON.stringify(snapshot)}\n`, 'utf8');
|
|
53
|
-
const freshStatus = await renderZellijSlotPaneStatusFromArtifacts({ artifactDir, artifactRoot: root, missionId, slotId: 'slot-001', generationIndex: 1 });
|
|
54
|
-
assertGate(freshStatus.telemetry_stale === false, 'slot pane status JSON must treat 3.5s-old telemetry as fresh under new 15s threshold', freshStatus);
|
|
55
|
-
snapshot.updated_at = new Date(Date.now() - 16000).toISOString();
|
|
56
|
-
await fs.writeFile(file, `${JSON.stringify(snapshot)}\n`, 'utf8');
|
|
57
|
-
const staleText = await renderZellijSlotPaneFromArtifacts({ artifactDir, artifactRoot: root, missionId, slotId: 'slot-001', generationIndex: 1 });
|
|
58
|
-
const staleStatus = await renderZellijSlotPaneStatusFromArtifacts({ artifactDir, artifactRoot: root, missionId, slotId: 'slot-001', generationIndex: 1 });
|
|
59
|
-
assertGate(staleStatus.telemetry_stale === true && staleStatus.telemetry_age_ms >= 15000, 'slot pane status JSON must expose stale telemetry above 15s', staleStatus);
|
|
60
|
-
assertGate(staleText.includes('fresh worker stdout fallback') || staleText.includes('apply_patch'), 'stale slot pane must show fresh artifact/log fallback', { staleText });
|
|
61
|
-
snapshot.updated_at = new Date(Date.now() - 61000).toISOString();
|
|
62
|
-
await fs.writeFile(file, `${JSON.stringify(snapshot)}\n`, 'utf8');
|
|
63
|
-
const blockedText = await renderZellijSlotPaneFromArtifacts({ artifactDir, artifactRoot: root, missionId, slotId: 'slot-001', generationIndex: 1 });
|
|
64
|
-
assertGate(blockedText.includes('fresh worker stdout fallback') || blockedText.includes('apply_patch'), 'blocked stale slot pane must keep artifact/log fallback', { blockedText });
|
|
65
|
-
emitGate('zellij:slot-pane-stale-detection', { stale_age_ms: staleStatus.telemetry_age_ms, artifact_fallback: true });
|
|
@@ -1,11 +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 command = readText('src/commands/zellij-slot-pane.ts');
|
|
5
|
-
assertGate(pane.includes('readZellijSlotTelemetrySnapshot'), 'slot pane renderer must read telemetry snapshots');
|
|
6
|
-
assertGate(pane.includes('mergeRenderInputWithLiveTelemetry'), 'slot pane renderer must prefer live telemetry over artifact detail');
|
|
7
|
-
assertGate(pane.includes('renderInputFromArtifactDir') && pane.includes('stdoutTail'), 'slot pane renderer must preserve artifact/log fallback details');
|
|
8
|
-
assertGate(pane.includes('latest_heartbeat') || pane.includes('heartbeat'), 'slot pane renderer must surface heartbeat/progress state');
|
|
9
|
-
assertGate(command.includes('artifactRoot') && command.includes('--artifact-root'), 'slot pane command must pass artifact root for telemetry lookup');
|
|
10
|
-
assertGate(command.includes('staleTicks') && command.includes('worker heartbeat lost >5m'), 'slot pane command must close zombie panes instead of freezing');
|
|
11
|
-
emitGate('zellij:slot-pane-telemetry-renderer', { telemetry_with_artifact_fallback: true });
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
5
|
-
import { buildWorkerPaneArtifact } from '../core/zellij/zellij-worker-pane-manager.js';
|
|
6
|
-
const root = process.cwd();
|
|
7
|
-
const managerSource = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-worker-pane-manager.ts'), 'utf8');
|
|
8
|
-
const runtimeSource = fs.readFileSync(path.join(root, 'src/core/agents/native-cli-worker-runtime.ts'), 'utf8');
|
|
9
|
-
const base = {
|
|
10
|
-
root,
|
|
11
|
-
missionId: 'M-slot-renderer-proof-semantics',
|
|
12
|
-
sessionName: 'sks-M-slot-renderer-proof-semantics',
|
|
13
|
-
slotId: 'slot-001',
|
|
14
|
-
generationIndex: 1,
|
|
15
|
-
sessionId: 'slot-001-gen-1',
|
|
16
|
-
workerArtifactDir: 'sessions/slot-001/gen-1/worker',
|
|
17
|
-
resultPath: 'sessions/slot-001/gen-1/worker/worker-result.json',
|
|
18
|
-
heartbeatPath: 'sessions/slot-001/gen-1/worker/worker-heartbeat.jsonl',
|
|
19
|
-
patchEnvelopePath: 'sessions/slot-001/gen-1/worker/worker-patch-envelope.json',
|
|
20
|
-
stdoutLog: 'sessions/slot-001/gen-1/worker/worker.stdout.log',
|
|
21
|
-
stderrLog: 'sessions/slot-001/gen-1/worker/worker.stderr.log',
|
|
22
|
-
paneId: '101',
|
|
23
|
-
paneIdSource: 'zellij_worker_new_pane_stdout',
|
|
24
|
-
status: 'running',
|
|
25
|
-
blockers: []
|
|
26
|
-
};
|
|
27
|
-
const slotRenderer = buildWorkerPaneArtifact({
|
|
28
|
-
...base,
|
|
29
|
-
workerCommand: 'node dist/bin/sks.js zellij-slot-pane --watch'
|
|
30
|
-
});
|
|
31
|
-
const workerCommand = buildWorkerPaneArtifact({
|
|
32
|
-
...base,
|
|
33
|
-
slotId: 'slot-002',
|
|
34
|
-
sessionId: 'slot-002-gen-1',
|
|
35
|
-
workerCommand: 'node dist/core/agents/native-cli-worker-entry.js --intake worker-intake.json --json'
|
|
36
|
-
});
|
|
37
|
-
const report = {
|
|
38
|
-
schema: 'sks.zellij-slot-renderer-proof-semantics-check.v2',
|
|
39
|
-
ok: true,
|
|
40
|
-
slot_renderer_pane_kind: slotRenderer.pane_kind,
|
|
41
|
-
slot_renderer_scaling_primitive: slotRenderer.scaling_primitive,
|
|
42
|
-
worker_pane_kind: workerCommand.pane_kind,
|
|
43
|
-
worker_scaling_primitive: workerCommand.scaling_primitive,
|
|
44
|
-
launch_ledger_uses_record_values: managerSource.includes('pane_kind: record.pane_kind') && managerSource.includes('scaling_primitive: record.scaling_primitive'),
|
|
45
|
-
runtime_uses_pane_record_values: runtimeSource.includes('input.record.pane_kind = paneRecord.pane_kind') && runtimeSource.includes('input.record.scaling_primitive = paneRecord.scaling_primitive'),
|
|
46
|
-
blockers: []
|
|
47
|
-
};
|
|
48
|
-
report.blockers = [
|
|
49
|
-
...(slotRenderer.pane_kind === 'slot_status_renderer' ? [] : ['slot_renderer_pane_kind_not_distinct']),
|
|
50
|
-
...(slotRenderer.scaling_primitive === 'native_cli_process_with_zellij_slot_renderer' ? [] : ['slot_renderer_scaling_primitive_not_distinct']),
|
|
51
|
-
...(workerCommand.pane_kind === 'worker_codex_sdk' ? [] : ['worker_pane_kind_regressed']),
|
|
52
|
-
...(workerCommand.scaling_primitive === 'native_cli_process_in_zellij_worker_pane' ? [] : ['worker_scaling_primitive_regressed']),
|
|
53
|
-
...(report.launch_ledger_uses_record_values ? [] : ['launch_ledger_semantics_not_record_backed']),
|
|
54
|
-
...(report.runtime_uses_pane_record_values ? [] : ['runtime_semantics_not_record_backed'])
|
|
55
|
-
];
|
|
56
|
-
report.ok = report.blockers.length === 0;
|
|
57
|
-
assertGate(report.ok, 'Zellij compact slot renderer proof semantics must distinguish status renderer panes from worker command panes', report);
|
|
58
|
-
emitGate('zellij:slot-renderer-proof-semantics', report);
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
6
|
-
const telemetry = await importDist('core/zellij/zellij-slot-telemetry.js');
|
|
7
|
-
const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-slot-telemetry-'));
|
|
8
|
-
const missionId = 'M-20260608-000000-test';
|
|
9
|
-
await telemetry.appendZellijSlotTelemetry(tempRoot, {
|
|
10
|
-
schema: telemetry.ZELLIJ_SLOT_TELEMETRY_EVENT_SCHEMA,
|
|
11
|
-
mission_id: missionId,
|
|
12
|
-
ts: new Date().toISOString(),
|
|
13
|
-
slot_id: 'slot-001',
|
|
14
|
-
generation_index: 1,
|
|
15
|
-
event_type: 'worker_spawned',
|
|
16
|
-
status: 'running',
|
|
17
|
-
placement: 'zellij-pane',
|
|
18
|
-
backend: 'fake',
|
|
19
|
-
service_tier: 'fast',
|
|
20
|
-
role: 'verifier'
|
|
21
|
-
});
|
|
22
|
-
await telemetry.appendZellijSlotTelemetry(tempRoot, {
|
|
23
|
-
schema: telemetry.ZELLIJ_SLOT_TELEMETRY_EVENT_SCHEMA,
|
|
24
|
-
mission_id: missionId,
|
|
25
|
-
ts: new Date().toISOString(),
|
|
26
|
-
slot_id: 'slot-001',
|
|
27
|
-
generation_index: 2,
|
|
28
|
-
event_type: 'worker_spawned',
|
|
29
|
-
status: 'queued',
|
|
30
|
-
backend: 'fake',
|
|
31
|
-
service_tier: 'fast',
|
|
32
|
-
role: 'verifier'
|
|
33
|
-
});
|
|
34
|
-
const snapshot = await telemetry.readZellijSlotTelemetrySnapshot(tempRoot, missionId);
|
|
35
|
-
assertGate(snapshot.schema === telemetry.ZELLIJ_SLOT_TELEMETRY_SNAPSHOT_SCHEMA, 'snapshot schema must match', snapshot);
|
|
36
|
-
assertGate(snapshot.slots['slot-001:g1']?.status === 'running', 'slot status must be snapshot-backed by slot generation', snapshot);
|
|
37
|
-
assertGate(snapshot.slots['slot-001:g2']?.status === 'queued', 'slot telemetry must preserve reused slot generations separately', snapshot);
|
|
38
|
-
emitGate('zellij:slot-telemetry', { slots: Object.keys(snapshot.slots).length });
|
|
@@ -1,46 +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 { appendZellijSlotTelemetry, readZellijSlotTelemetrySnapshot, slotTelemetrySnapshotPath } from '../core/zellij/zellij-slot-telemetry.js';
|
|
6
|
-
import { assertGate, emitGate, readText } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const removeTempDir = fs.rm.bind(fs);
|
|
8
|
-
const src = readText('src/core/zellij/zellij-slot-telemetry.ts');
|
|
9
|
-
assertGate(src.includes('applyTelemetryEventToSnapshot') && src.includes('readZellijSlotTelemetrySnapshotNoRebuild'), 'incremental telemetry helpers missing');
|
|
10
|
-
assertGate(src.includes('withFileLock') && src.includes('writeTextAtomic(file'), 'slot telemetry snapshot writes must be locked and atomically published');
|
|
11
|
-
const missionId = 'M-zellij-incremental';
|
|
12
|
-
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-zellij-incremental-'));
|
|
13
|
-
try {
|
|
14
|
-
process.env.SKS_ZELLIJ_SLOT_TELEMETRY_FLUSH_MS = '60000';
|
|
15
|
-
process.env.SKS_ZELLIJ_SLOT_TELEMETRY_FLUSH_EVERY_N = '1000';
|
|
16
|
-
const startedAt = '2026-01-01T00:00:00.000Z';
|
|
17
|
-
const completedAt = '2026-01-01T00:00:01.000Z';
|
|
18
|
-
const delayedHeartbeatAt = '2026-01-01T00:00:02.000Z';
|
|
19
|
-
const drainedAt = '2026-01-01T00:00:03.000Z';
|
|
20
|
-
await appendZellijSlotTelemetry(root, { schema: 'sks.zellij-slot-telemetry-event.v1', ts: startedAt, mission_id: missionId, slot_id: 'slot-001', generation_index: 1, worker_id: 'w1', event_type: 'slot_reserved', status: 'queued' });
|
|
21
|
-
await appendZellijSlotTelemetry(root, { schema: 'sks.zellij-slot-telemetry-event.v1', ts: completedAt, mission_id: missionId, slot_id: 'slot-001', generation_index: 1, worker_id: 'w1', event_type: 'worker_completed', status: 'completed' });
|
|
22
|
-
await appendZellijSlotTelemetry(root, { schema: 'sks.zellij-slot-telemetry-event.v1', ts: startedAt, mission_id: missionId, slot_id: 'slot-001', generation_index: 1, worker_id: 'w1', event_type: 'heartbeat', status: 'running', artifact_paths: ['late-artifact.txt'] });
|
|
23
|
-
await appendZellijSlotTelemetry(root, { schema: 'sks.zellij-slot-telemetry-event.v1', ts: completedAt, mission_id: missionId, slot_id: 'slot-001', generation_index: 1, worker_id: 'w1', event_type: 'heartbeat', status: 'running' });
|
|
24
|
-
await appendZellijSlotTelemetry(root, { schema: 'sks.zellij-slot-telemetry-event.v1', ts: delayedHeartbeatAt, mission_id: missionId, slot_id: 'slot-001', generation_index: 1, worker_id: 'w1', event_type: 'heartbeat', status: 'running', log_tail: 'late heartbeat after completion' });
|
|
25
|
-
await appendZellijSlotTelemetry(root, { schema: 'sks.zellij-slot-telemetry-event.v1', ts: startedAt, mission_id: missionId, slot_id: 'slot-002', generation_index: 1, worker_id: 'w2', event_type: 'worker_spawned', status: 'running' });
|
|
26
|
-
await appendZellijSlotTelemetry(root, { schema: 'sks.zellij-slot-telemetry-event.v1', ts: drainedAt, mission_id: missionId, slot_id: 'slot-002', generation_index: 1, worker_id: 'w2', event_type: 'heartbeat', status: 'drained' });
|
|
27
|
-
const snapshot = await readZellijSlotTelemetrySnapshot(root, missionId);
|
|
28
|
-
assertGate(snapshot.counts.completed === 2 && Object.keys(snapshot.slots).length === 2, 'incremental snapshot merge failed', snapshot);
|
|
29
|
-
assertGate(snapshot.counts.running === 0 && snapshot.slots['slot-001:g1']?.status === 'completed', 'stale slot telemetry must not regress terminal status', snapshot);
|
|
30
|
-
assertGate(snapshot.slots['slot-001:g1']?.artifact_paths?.includes('late-artifact.txt'), 'stale slot telemetry should still preserve additive artifacts', snapshot);
|
|
31
|
-
assertGate(!String(snapshot.slots['slot-001:g1']?.log_tail || '').includes('late heartbeat after completion'), 'delayed heartbeat must not replace terminal telemetry tail', snapshot);
|
|
32
|
-
const diskSnapshot = JSON.parse(await fs.readFile(slotTelemetrySnapshotPath(root, missionId), 'utf8'));
|
|
33
|
-
assertGate(diskSnapshot.slots?.['slot-002:g1']?.status === 'drained', 'drained terminal status must flush to disk immediately', diskSnapshot);
|
|
34
|
-
emitGate('zellij:slot-telemetry-incremental', snapshot.counts);
|
|
35
|
-
}
|
|
36
|
-
finally {
|
|
37
|
-
await guardedRm(root, 'sks-zellij-incremental-');
|
|
38
|
-
}
|
|
39
|
-
async function guardedRm(target, prefix) {
|
|
40
|
-
const tempRoot = path.resolve(os.tmpdir());
|
|
41
|
-
const resolved = path.resolve(target);
|
|
42
|
-
if (path.dirname(resolved) !== tempRoot || !path.basename(resolved).startsWith(prefix)) {
|
|
43
|
-
throw new Error(`refusing_to_remove_unscoped_temp_dir:${target}`);
|
|
44
|
-
}
|
|
45
|
-
await removeTempDir(resolved, { recursive: true, force: true });
|
|
46
|
-
}
|
|
@@ -1,55 +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 { appendZellijSlotTelemetry, readZellijSlotTelemetrySnapshot, slotTelemetrySnapshotPath } from '../core/zellij/zellij-slot-telemetry.js';
|
|
6
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const removeTempDir = fs.rm.bind(fs);
|
|
8
|
-
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-zellij-live-flush-'));
|
|
9
|
-
const missionId = 'M-zellij-live-flush';
|
|
10
|
-
try {
|
|
11
|
-
process.env.SKS_ZELLIJ_SLOT_TELEMETRY_FLUSH_MS = '1000';
|
|
12
|
-
process.env.SKS_ZELLIJ_SLOT_TELEMETRY_FLUSH_EVERY_N = '100';
|
|
13
|
-
await appendZellijSlotTelemetry(root, event('task_started', 'running', { task_title: 'live flush fixture' }));
|
|
14
|
-
let snapshot = JSON.parse(await fs.readFile(slotTelemetrySnapshotPath(root, missionId), 'utf8'));
|
|
15
|
-
assertGate(Object.keys(snapshot.slots || {}).length === 1, 'task_started must flush snapshot immediately', snapshot);
|
|
16
|
-
const updates = [snapshot.updated_at];
|
|
17
|
-
for (let i = 0; i < 7; i++) {
|
|
18
|
-
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
19
|
-
await appendZellijSlotTelemetry(root, event('heartbeat', 'running', { log_tail: `heartbeat ${i}` }));
|
|
20
|
-
const current = JSON.parse(await fs.readFile(slotTelemetrySnapshotPath(root, missionId), 'utf8'));
|
|
21
|
-
if (current.updated_at !== updates[updates.length - 1])
|
|
22
|
-
updates.push(current.updated_at);
|
|
23
|
-
}
|
|
24
|
-
await appendZellijSlotTelemetry(root, event('worker_completed', 'completed', { artifact_paths: ['artifact.json'] }));
|
|
25
|
-
const completed = await readZellijSlotTelemetrySnapshot(root, missionId);
|
|
26
|
-
assertGate(completed.counts.completed === 1, 'completed event must flush immediately', completed);
|
|
27
|
-
const eventCount = 1 + 7 + 1;
|
|
28
|
-
assertGate(updates.length >= 2, 'heartbeat stream must update snapshot at least twice in about 2s', { updates });
|
|
29
|
-
assertGate(Number(completed.flush_count || 0) < eventCount, 'flush count must be throttled below event count', { flush_count: completed.flush_count, eventCount });
|
|
30
|
-
emitGate('zellij:slot-telemetry-live-flush', { flush_count: completed.flush_count, event_count: eventCount, updates: updates.length });
|
|
31
|
-
}
|
|
32
|
-
finally {
|
|
33
|
-
await guardedRm(root, 'sks-zellij-live-flush-');
|
|
34
|
-
}
|
|
35
|
-
async function guardedRm(target, prefix) {
|
|
36
|
-
const tempRoot = path.resolve(os.tmpdir());
|
|
37
|
-
const resolved = path.resolve(target);
|
|
38
|
-
if (path.dirname(resolved) !== tempRoot || !path.basename(resolved).startsWith(prefix)) {
|
|
39
|
-
throw new Error(`refusing_to_remove_unscoped_temp_dir:${target}`);
|
|
40
|
-
}
|
|
41
|
-
await removeTempDir(resolved, { recursive: true, force: true });
|
|
42
|
-
}
|
|
43
|
-
function event(eventType, status, extra = {}) {
|
|
44
|
-
return {
|
|
45
|
-
schema: 'sks.zellij-slot-telemetry-event.v1',
|
|
46
|
-
ts: new Date().toISOString(),
|
|
47
|
-
mission_id: missionId,
|
|
48
|
-
slot_id: 'slot-001',
|
|
49
|
-
generation_index: 1,
|
|
50
|
-
worker_id: 'worker-001',
|
|
51
|
-
event_type: eventType,
|
|
52
|
-
status,
|
|
53
|
-
...extra
|
|
54
|
-
};
|
|
55
|
-
}
|
|
@@ -1,32 +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 { appendZellijSlotTelemetry, readZellijSlotTelemetrySnapshot } from '../core/zellij/zellij-slot-telemetry.js';
|
|
6
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const removeTempDir = fs.rm.bind(fs);
|
|
8
|
-
const missionId = 'M-zellij-performance';
|
|
9
|
-
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-zellij-perf-'));
|
|
10
|
-
try {
|
|
11
|
-
const started = Date.now();
|
|
12
|
-
for (let i = 0; i < 5000; i++)
|
|
13
|
-
await appendZellijSlotTelemetry(root, { schema: 'sks.zellij-slot-telemetry-event.v1', ts: new Date().toISOString(), mission_id: missionId, slot_id: `slot-${String(i % 100).padStart(3, '0')}`, generation_index: Math.floor(i / 100) + 1, worker_id: `w${i}`, event_type: 'heartbeat', status: 'running' });
|
|
14
|
-
const wallMs = Date.now() - started;
|
|
15
|
-
const snapshot = await readZellijSlotTelemetrySnapshot(root, missionId);
|
|
16
|
-
assertGate(wallMs < 15000, '5000 telemetry appends exceeded performance threshold', { wallMs, counts: snapshot.counts });
|
|
17
|
-
assertGate(Object.keys(snapshot.slots).length === 5000, 'snapshot slot count mismatch', { wallMs, slot_count: Object.keys(snapshot.slots).length });
|
|
18
|
-
assertGate(Number(snapshot.flush_count || 0) > 0 && Number(snapshot.flush_count || 0) < 500, 'snapshot writes must be throttled far below event count', { flush_count: snapshot.flush_count });
|
|
19
|
-
assertGate(snapshot.slots['slot-099:g50']?.status === 'running', 'latest slot state must remain correct after incremental updates', snapshot.slots['slot-099:g50']);
|
|
20
|
-
emitGate('zellij:slot-telemetry-performance', { wall_ms: wallMs, slot_count: Object.keys(snapshot.slots).length, flush_count: snapshot.flush_count });
|
|
21
|
-
}
|
|
22
|
-
finally {
|
|
23
|
-
await guardedRm(root, 'sks-zellij-perf-');
|
|
24
|
-
}
|
|
25
|
-
async function guardedRm(target, prefix) {
|
|
26
|
-
const tempRoot = path.resolve(os.tmpdir());
|
|
27
|
-
const resolved = path.resolve(target);
|
|
28
|
-
if (path.dirname(resolved) !== tempRoot || !path.basename(resolved).startsWith(prefix)) {
|
|
29
|
-
throw new Error(`refusing_to_remove_unscoped_temp_dir:${target}`);
|
|
30
|
-
}
|
|
31
|
-
await removeTempDir(resolved, { recursive: true, force: true });
|
|
32
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { spawnSync } from 'node:child_process';
|
|
3
|
-
import { assertGate, emitGate, readText } from './sks-1-18-gate-lib.js';
|
|
4
|
-
const requireZellij = process.env.SKS_REQUIRE_ZELLIJ === '1';
|
|
5
|
-
const zellij = spawnSync('zellij', ['--version'], { encoding: 'utf8', timeout: 10000 });
|
|
6
|
-
assertGate(!requireZellij || zellij.status === 0, 'SKS_REQUIRE_ZELLIJ=1 requires zellij to be installed and runnable', {
|
|
7
|
-
status: zellij.status,
|
|
8
|
-
stderr: zellij.stderr
|
|
9
|
-
});
|
|
10
|
-
const telemetry = readText('src/core/zellij/zellij-slot-telemetry.ts');
|
|
11
|
-
const runtime = readText('src/core/agents/native-cli-worker-runtime.ts');
|
|
12
|
-
const pane = readText('src/core/zellij/zellij-slot-pane-renderer.ts');
|
|
13
|
-
assertGate(telemetry.includes('appendZellijSlotTelemetry') && telemetry.includes('readZellijSlotTelemetrySnapshot'), 'telemetry ledger/snapshot runtime must exist');
|
|
14
|
-
assertGate(runtime.includes('slot_reserved') && runtime.includes('worker_spawned'), 'real worker launch path must emit slot lifecycle telemetry');
|
|
15
|
-
assertGate(pane.includes('readZellijSlotTelemetrySnapshot'), 'real slot pane path must render from telemetry snapshot');
|
|
16
|
-
emitGate('zellij:slot-telemetry-real', {
|
|
17
|
-
zellij_available: zellij.status === 0,
|
|
18
|
-
required: requireZellij
|
|
19
|
-
});
|
|
@@ -1,11 +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 command = readText('src/commands/zellij-slot-pane.ts');
|
|
5
|
-
const anchor = readText('src/core/zellij/zellij-slot-column-anchor.ts');
|
|
6
|
-
assertGate(pane.includes('readZellijSlotTelemetrySnapshot') && pane.includes('mergeRenderInputWithLiveTelemetry'), 'slot pane must read telemetry first and merge it with artifact detail');
|
|
7
|
-
assertGate(pane.includes('renderInputFromArtifactDir') && pane.includes('stdoutTail'), 'slot pane must preserve artifact/log fallback while live telemetry wins');
|
|
8
|
-
assertGate(command.includes('staleTicks') && command.includes('worker heartbeat lost >5m'), 'slot pane watch loop must close frozen heartbeat panes');
|
|
9
|
-
assertGate(anchor.includes('readZellijSlotTelemetrySnapshot') && anchor.includes('SLOTS telemetry stale'), 'slot anchor must render telemetry snapshot and stale state');
|
|
10
|
-
assertGate(anchor.includes('update-notice.json') && anchor.includes('MAD-SKS SQL-PLANE ACTIVE'), 'anchor must surface update notice and MAD-SKS SQL-plane state');
|
|
11
|
-
emitGate('zellij:slot-telemetry-renderer', { telemetry_with_artifact_fallback: true });
|
|
@@ -1,23 +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 worker = readText('src/core/agents/native-cli-worker.ts');
|
|
5
|
-
const requiredEvents = [
|
|
6
|
-
'slot_reserved',
|
|
7
|
-
'worker_spawned',
|
|
8
|
-
'task_started',
|
|
9
|
-
'heartbeat',
|
|
10
|
-
'task_progress',
|
|
11
|
-
'patch_candidate',
|
|
12
|
-
'artifact_written',
|
|
13
|
-
'worker_completed',
|
|
14
|
-
'worker_failed'
|
|
15
|
-
];
|
|
16
|
-
for (const event of requiredEvents) {
|
|
17
|
-
assertGate(runtime.includes(event) || worker.includes(event), `missing runtime slot telemetry event ${event}`);
|
|
18
|
-
}
|
|
19
|
-
assertGate(runtime.includes('appendZellijSlotTelemetry'), 'session runtime must append Zellij slot telemetry');
|
|
20
|
-
assertGate(worker.includes('appendZellijSlotTelemetry'), 'native worker must append Zellij slot telemetry');
|
|
21
|
-
assertGate(worker.includes('startWorkerProgressTelemetry'), 'native worker must emit progress telemetry during backend runtime');
|
|
22
|
-
assertGate(!/progress:\s*\{\s*done:\s*tick,\s*total:\s*0/.test(worker), 'heartbeat ticks must not be reported as progress done/total counters');
|
|
23
|
-
emitGate('zellij:slot-telemetry-runtime', { lifecycle_events: requiredEvents.length, progress_pump: true });
|