sneakoscope 4.8.7 → 5.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 +51 -726
- package/config/bench-baseline.json +7 -0
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/bin/install.js +35 -0
- package/dist/bin/sks.js +1 -1
- package/dist/cli/cli-theme.js +51 -0
- package/dist/cli/command-registry.js +15 -4
- package/dist/cli/help-fast.js +18 -8
- package/dist/cli/insane-search-command.js +36 -8
- package/dist/cli/install-helpers.js +32 -0
- package/dist/commands/codex-lb.js +2 -0
- package/dist/commands/doctor.js +94 -9
- package/dist/commands/proof.js +6 -3
- package/dist/config/skills-manifest.json +82 -54
- package/dist/core/agents/agent-conflict-graph.js +5 -0
- package/dist/core/agents/agent-lease.js +5 -0
- package/dist/core/agents/agent-ledger-schemas.js +1 -0
- package/dist/core/agents/agent-lifecycle.js +5 -3
- package/dist/core/agents/agent-orchestrator.js +268 -62
- package/dist/core/agents/agent-output-validator.js +14 -3
- package/dist/core/agents/agent-patch-queue-store.js +95 -2
- package/dist/core/agents/agent-patch-queue.js +6 -3
- package/dist/core/agents/agent-patch-schema.js +13 -0
- package/dist/core/agents/agent-proof-evidence.js +6 -1
- package/dist/core/agents/agent-runner-fake.js +40 -0
- package/dist/core/agents/agent-worker-pipeline.js +36 -2
- package/dist/core/agents/codex-exec-worker-adapter.js +2 -0
- package/dist/core/agents/native-cli-worker.js +0 -1
- package/dist/core/agents/native-worker-backend-router.js +58 -1
- package/dist/core/codex-app/sks-menubar.js +477 -132
- package/dist/core/codex-app.js +1 -0
- package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
- package/dist/core/codex-control/codex-sdk-env-policy.js +1 -1
- package/dist/core/codex-control/schemas/agent-worker-result.schema.js +12 -3
- package/dist/core/codex-hooks/codex-hook-managed-install.js +5 -0
- package/dist/core/codex-hooks/codex-hook-state-writer.js +70 -11
- package/dist/core/codex-hooks/codex-hook-trust-doctor.js +2 -2
- package/dist/core/codex-lb/codex-lb-env.js +20 -1
- package/dist/core/commands/basic-cli.js +18 -1
- package/dist/core/commands/check-command.js +37 -5
- package/dist/core/commands/computer-use-command.js +62 -7
- package/dist/core/commands/db-command.js +31 -5
- package/dist/core/commands/fast-mode-command.js +3 -0
- package/dist/core/commands/gate-result-contract.js +43 -0
- package/dist/core/commands/gates-command.js +6 -1
- package/dist/core/commands/gc-command.js +29 -2
- package/dist/core/commands/goal-command.js +9 -2
- package/dist/core/commands/gx-command.js +79 -7
- package/dist/core/commands/image-ux-review-command.js +188 -13
- package/dist/core/commands/mad-db-command.js +85 -176
- package/dist/core/commands/mad-sks-command.js +230 -29
- package/dist/core/commands/menubar-command.js +24 -2
- package/dist/core/commands/naruto-command.js +64 -10
- package/dist/core/commands/plan-command.js +76 -0
- package/dist/core/commands/ppt-command.js +159 -24
- package/dist/core/commands/qa-loop-command.js +6 -2
- package/dist/core/commands/release-command.js +55 -2
- package/dist/core/commands/research-command.js +1 -1
- package/dist/core/commands/review-command.js +217 -0
- package/dist/core/commands/route-success-helpers.js +59 -0
- package/dist/core/commands/run-command.js +19 -7
- package/dist/core/commands/seo-command.js +49 -1
- package/dist/core/commands/ui-command.js +161 -0
- package/dist/core/commands/uninstall-command.js +15 -1
- package/dist/core/db-safety.js +2 -2
- package/dist/core/doctor/doctor-dirty-planner.js +51 -7
- package/dist/core/doctor/doctor-transaction.js +8 -0
- package/dist/core/doctor/doctor-zellij-repair.js +1 -0
- package/dist/core/doctor/imagegen-repair.js +161 -0
- package/dist/core/feature-fixture-runner.js +2 -2
- package/dist/core/feature-fixtures.js +58 -37
- package/dist/core/feature-registry.js +102 -2
- package/dist/core/fsx.js +39 -6
- package/dist/core/image-ux-review/imagegen-adapter.js +48 -11
- package/dist/core/image-ux-review.js +16 -0
- package/dist/core/imagegen/imagegen-capability.js +11 -5
- package/dist/core/imagegen/require-imagegen.js +57 -0
- package/dist/core/init/skills.js +10 -5
- package/dist/core/mad-db/mad-db-coordinator.js +94 -18
- package/dist/core/mad-db/mad-db-policy.js +12 -10
- package/dist/core/mad-sks/executors/executor-base.js +8 -2
- package/dist/core/mad-sks/executors/index.js +4 -0
- package/dist/core/mad-sks/executors/sql-plane-executor.js +194 -0
- package/dist/core/naruto/naruto-active-pool.js +15 -4
- package/dist/core/naruto/naruto-real-worker-child.js +11 -1
- package/dist/core/naruto/naruto-role-policy.js +3 -0
- package/dist/core/naruto/naruto-task-hints.js +10 -0
- package/dist/core/naruto/naruto-work-graph.js +8 -2
- package/dist/core/naruto/naruto-work-item.js +6 -0
- package/dist/core/naruto/solution-tournament.js +101 -0
- package/dist/core/permission-gates.js +30 -0
- package/dist/core/pipeline-internals/runtime-core.js +11 -3
- package/dist/core/pipeline-internals/runtime-gates.js +27 -0
- package/dist/core/ppt-review/index.js +6 -1
- package/dist/core/ppt-review/slide-imagegen-review.js +75 -10
- package/dist/core/ppt.js +70 -2
- package/dist/core/proof/auto-finalize.js +70 -11
- package/dist/core/proof/proof-schema.js +2 -0
- package/dist/core/proof/route-adapter.js +5 -1
- package/dist/core/proof/route-finalizer.js +8 -5
- package/dist/core/proof/selftest-proof-fixtures.js +18 -5
- package/dist/core/proof/validation.js +2 -0
- package/dist/core/provider/model-router.js +53 -0
- package/dist/core/release/release-gate-node.js +3 -0
- package/dist/core/release/release-gate-resource-governor.js +1 -0
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes.js +65 -18
- package/dist/core/safety/mutation-guard.js +5 -1
- package/dist/core/stop-gate/gate-evaluator.js +102 -0
- package/dist/core/stop-gate/stop-gate-check.js +16 -1
- package/dist/core/stop-gate/stop-gate-writer.js +4 -0
- package/dist/core/triwiki/agents-md-projector.js +184 -0
- package/dist/core/triwiki-wrongness/wrongness-schema.js +3 -1
- package/dist/core/trust-kernel/trust-kernel-schema.js +1 -0
- package/dist/core/trust-kernel/trust-report.js +1 -1
- package/dist/core/trust-kernel/trust-status.js +2 -0
- package/dist/core/ui/dashboard-html.js +111 -0
- package/dist/core/update/update-migration-state.js +386 -15
- package/dist/core/update-check.js +178 -81
- package/dist/core/verification/diff-quality.js +100 -0
- package/dist/core/verification/impact-scan.js +164 -0
- package/dist/core/verification/machine-feedback.js +146 -0
- package/dist/core/verification/mistake-rule-compiler.js +195 -0
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-self-heal.js +9 -6
- package/dist/core/zellij/zellij-slot-telemetry.js +1 -1
- package/dist/scripts/check-feature-quality.js +2 -2
- package/dist/scripts/cli-output-consistency-check.js +57 -0
- package/dist/scripts/coding-bench-check.js +136 -0
- package/dist/scripts/doctor-imagegen-repair-check.js +62 -0
- package/dist/scripts/ensure-bin-executable.js +11 -3
- package/dist/scripts/harness-benchmark-check.js +104 -0
- package/dist/scripts/legacy-update-e2e-check.js +228 -0
- package/dist/scripts/mad-db-command-check.js +11 -8
- package/dist/scripts/mad-db-route-identity-check.js +8 -6
- package/dist/scripts/mad-db-safety-conflict-matrix-check.js +31 -8
- package/dist/scripts/mad-db-skill-policy-snapshot-check.js +4 -5
- package/dist/scripts/naruto-real-active-pool-runtime-check.js +26 -1
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +5 -1
- package/dist/scripts/proof-root-cause-policy-check.js +2 -0
- package/dist/scripts/release-dag-full-coverage-check.js +13 -4
- package/dist/scripts/release-gate-dag-runner.js +14 -0
- package/dist/scripts/release-gate-existence-audit.js +2 -1
- package/dist/scripts/release-gate-planner.js +2 -1
- package/dist/scripts/release-gate-script-parity-check.js +45 -17
- package/dist/scripts/release-metadata-1-19-check.js +2 -1
- package/dist/scripts/seo-geo-feature-fixture-quality-check.js +1 -1
- package/dist/scripts/sks-1-11-gate-lib.js +8 -6
- package/dist/scripts/sks-menubar-install-check.js +57 -20
- package/dist/scripts/ux-review-real-loop-fixture-check.js +9 -4
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +4 -0
- package/dist/scripts/zellij-slot-telemetry-runtime-check.js +1 -0
- package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
- package/docs/demo.tape +28 -0
- package/package.json +31 -24
- package/schemas/codex/completion-proof.schema.json +3 -2
- package/schemas/release/release-gate-node.schema.json +2 -1
- package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
- package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
- package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
- package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/agent-route-blackbox-lib.js +0 -132
- package/dist/scripts/blackbox-command-import-smoke.js +0 -143
- package/dist/scripts/blackbox-global-shim.js +0 -77
- package/dist/scripts/blackbox-matrix.js +0 -70
- package/dist/scripts/blackbox-npx-one-shot.js +0 -69
- package/dist/scripts/blackbox-pack-install.js +0 -174
- package/dist/scripts/brand-neutrality-zero-leakage-blackbox.js +0 -4
- package/dist/scripts/build-once-runner-blackbox.js +0 -34
- package/dist/scripts/codex-0140-integration-blackbox.js +0 -13
- package/dist/scripts/codex-agent-type-blackbox.js +0 -4
- package/dist/scripts/codex-app-harness-blackbox.js +0 -4
- package/dist/scripts/codex-app-skill-agent-blackbox.js +0 -4
- package/dist/scripts/codex-hook-approval-blackbox.js +0 -4
- package/dist/scripts/codex-init-deep-directory-local-blackbox.js +0 -4
- package/dist/scripts/codex-native-feature-broker-blackbox.js +0 -4
- package/dist/scripts/codex-native-pattern-analysis-blackbox.js +0 -4
- package/dist/scripts/codex-native-read-repair-split-blackbox.js +0 -55
- package/dist/scripts/codex-native-reference-cache-blackbox.js +0 -41
- package/dist/scripts/core-skill-integrity-blackbox.js +0 -32
- package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
- package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
- package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/doctor-dirty-repair-blackbox.js +0 -22
- package/dist/scripts/doctor-dirty-semantic-blackbox.js +0 -8
- package/dist/scripts/doctor-native-capability-repair-blackbox.js +0 -39
- package/dist/scripts/doctor-transaction-engine-blackbox.js +0 -28
- package/dist/scripts/doctor-zellij-fix-blackbox.js +0 -4
- package/dist/scripts/doctor-zellij-no-homebrew-blackbox.js +0 -4
- package/dist/scripts/doctor-zellij-upgrade-blackbox.js +0 -4
- package/dist/scripts/gate-pack-runner-blackbox.js +0 -27
- package/dist/scripts/gate-pack-v2-blackbox.js +0 -18
- package/dist/scripts/geo-cli-blackbox-check.js +0 -18
- package/dist/scripts/loop-collision-blackbox.js +0 -3
- package/dist/scripts/loop-concurrency-oversubscription-blackbox.js +0 -3
- package/dist/scripts/loop-fixture-production-misuse-blackbox.js +0 -3
- package/dist/scripts/loop-kill-interrupt-real-blackbox.js +0 -3
- package/dist/scripts/loop-merge-strategy-blackbox.js +0 -3
- package/dist/scripts/loop-mesh-production-e2e-blackbox.js +0 -3
- package/dist/scripts/loop-side-effect-blackbox.js +0 -3
- package/dist/scripts/mad-db-operation-lifecycle-blackbox.js +0 -29
- package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
- package/dist/scripts/mad-zellij-headless-fallback-blackbox.js +0 -4
- package/dist/scripts/mad-zellij-self-heal-blackbox.js +0 -4
- package/dist/scripts/naruto-loop-mesh-blackbox.js +0 -3
- package/dist/scripts/naruto-real-parallelism-blackbox.js +0 -307
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
- package/dist/scripts/parallel-runtime-real-blackbox.js +0 -44
- package/dist/scripts/pipeline-codex-native-doctor-mad-routing-real-blackbox.js +0 -77
- package/dist/scripts/pipeline-codex-native-e2e-blackbox.js +0 -13
- package/dist/scripts/pipeline-codex-native-image-routing-real-blackbox.js +0 -50
- package/dist/scripts/pipeline-codex-native-loop-routing-real-blackbox.js +0 -74
- package/dist/scripts/pipeline-codex-native-qa-routing-real-blackbox.js +0 -51
- package/dist/scripts/pipeline-codex-native-research-routing-real-blackbox.js +0 -45
- package/dist/scripts/pipeline-execution-profile-routing-blackbox.js +0 -4
- package/dist/scripts/postinstall-global-doctor-blackbox.js +0 -12
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
- package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
- package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
- package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/release-full-parallelism-blackbox.js +0 -41
- package/dist/scripts/release-triwiki-first-runner-blackbox.js +0 -48
- package/dist/scripts/release-wiring-3110-blackbox.js +0 -27
- package/dist/scripts/release-wiring-3112-blackbox.js +0 -17
- package/dist/scripts/release-wiring-3113-blackbox.js +0 -17
- package/dist/scripts/research-backfill-route-blackbox.js +0 -5
- package/dist/scripts/research-final-reviewer-blackbox.js +0 -70
- package/dist/scripts/research-stage-cycle-runtime-blackbox.js +0 -40
- package/dist/scripts/research-synthesis-writer-blackbox.js +0 -24
- package/dist/scripts/route-blackbox-realism-check.js +0 -21
- package/dist/scripts/scheduler-resource-claim-blackbox.js +0 -24
- package/dist/scripts/seo-cli-blackbox-check.js +0 -18
- package/dist/scripts/sks-3110-all-feature-regression-blackbox.js +0 -116
- package/dist/scripts/sks-3112-all-feature-regression-blackbox.js +0 -29
- package/dist/scripts/sks-3113-all-feature-regression-blackbox.js +0 -17
- package/dist/scripts/sks-400-all-feature-regression-blackbox.js +0 -21
- package/dist/scripts/sks-400-extreme-parallel-blackbox.js +0 -8
- package/dist/scripts/sks-400-five-minute-blackbox.js +0 -9
- package/dist/scripts/sks-400-legacy-purge-blackbox.js +0 -8
- package/dist/scripts/sks-401-all-feature-regression-blackbox.js +0 -46
- package/dist/scripts/sks-401-five-minute-actual-blackbox.js +0 -23
- package/dist/scripts/sks-402-all-feature-regression-blackbox.js +0 -9
- package/dist/scripts/sks-402-five-minute-real-blackbox.js +0 -22
- package/dist/scripts/sksd-warm-cache-blackbox.js +0 -12
- package/dist/scripts/team-backfill-route-blackbox.js +0 -5
- package/dist/scripts/team-parallel-write-blackbox.js +0 -55
- package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/triwiki-affected-graph-blackbox.js +0 -28
- package/dist/scripts/triwiki-proof-bank-blackbox.js +0 -30
- package/dist/scripts/triwiki-proof-bank-lock-blackbox.js +0 -7
- package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
- package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -80
- package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -137
- package/dist/scripts/zellij-self-heal-typed-blackbox.js +0 -4
- package/dist/scripts/zellij-slot-telemetry-real-blackbox.js +0 -20
- package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -81
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { runPatchSwarmRouteBlackbox } from './agent-patch-swarm-gate-lib.js';
|
|
4
|
-
await runPatchSwarmRouteBlackbox({
|
|
5
|
-
gate: 'team:patch-swarm-route-blackbox',
|
|
6
|
-
route: '$Team',
|
|
7
|
-
routeCommand: 'sks team',
|
|
8
|
-
reportName: 'team-patch-swarm-route-blackbox'
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=team-patch-swarm-route-blackbox.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { assertGate, emitGate, makeTempRoot } from './sks-3-1-8-check-lib.js';
|
|
5
|
-
import { importDist } from './sks-1-18-gate-lib.js';
|
|
6
|
-
const tmp = await makeTempRoot('sks-triwiki-affected-');
|
|
7
|
-
await fs.writeFile(path.join(tmp, 'package.json'), JSON.stringify({ scripts: { 'triwiki:affected-graph': 'node fixture.js' } }));
|
|
8
|
-
await fs.writeFile(path.join(tmp, 'release-gates.v2.json'), JSON.stringify({
|
|
9
|
-
schema: 'sks.release-gates.v2',
|
|
10
|
-
gates: [{
|
|
11
|
-
id: 'triwiki:affected-graph',
|
|
12
|
-
command: 'npm run triwiki:affected-graph --silent',
|
|
13
|
-
deps: [],
|
|
14
|
-
resource: ['cpu-light'],
|
|
15
|
-
side_effect: 'hermetic',
|
|
16
|
-
timeout_ms: 1000,
|
|
17
|
-
cache: { enabled: true, inputs: ['src/core/triwiki/**'] },
|
|
18
|
-
isolation: { home: 'temp', codex_home: 'temp', report_dir: 'per-gate' },
|
|
19
|
-
preset: ['release']
|
|
20
|
-
}]
|
|
21
|
-
}, null, 2));
|
|
22
|
-
await fs.mkdir(path.join(tmp, 'src/core/triwiki'), { recursive: true });
|
|
23
|
-
await fs.writeFile(path.join(tmp, 'src/core/triwiki/a.ts'), 'export const a = 1;\n');
|
|
24
|
-
const mod = await importDist('core/triwiki/triwiki-affected-graph.js');
|
|
25
|
-
const graph = mod.computeTriWikiAffectedGraph({ root: tmp, changedFiles: ['src/core/triwiki/a.ts'], tier: 'affected' });
|
|
26
|
-
assertGate(graph.gates.includes('triwiki:affected-graph'), 'blackbox affected graph must select changed gate', graph);
|
|
27
|
-
emitGate('triwiki:affected-graph-blackbox', { gates: graph.gates });
|
|
28
|
-
//# sourceMappingURL=triwiki-affected-graph-blackbox.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { assertGate, emitGate, makeTempRoot } from './sks-3-1-8-check-lib.js';
|
|
5
|
-
import { importDist } from './sks-1-18-gate-lib.js';
|
|
6
|
-
const tmp = await makeTempRoot('sks-triwiki-proof-bank-');
|
|
7
|
-
await fs.writeFile(path.join(tmp, 'package.json'), JSON.stringify({ version: '4.0.0' }));
|
|
8
|
-
await fs.writeFile(path.join(tmp, 'package-lock.json'), JSON.stringify({ lockfileVersion: 3 }));
|
|
9
|
-
const cardMod = await importDist('core/triwiki/triwiki-proof-card.js');
|
|
10
|
-
const bank = await importDist('core/triwiki/triwiki-proof-bank.js');
|
|
11
|
-
const card = cardMod.createTriWikiProofCard({
|
|
12
|
-
subject_type: 'gate',
|
|
13
|
-
subject_id: 'fixture:gate',
|
|
14
|
-
cache_key: 'fixture-cache',
|
|
15
|
-
input_hash: 'input',
|
|
16
|
-
implementation_hash: 'impl',
|
|
17
|
-
tool_version: '4.0.0',
|
|
18
|
-
fixture_version: 'sks-4.0.0',
|
|
19
|
-
result: 'passed',
|
|
20
|
-
reusable: true,
|
|
21
|
-
evidence: { blackbox: true }
|
|
22
|
-
});
|
|
23
|
-
bank.writeTriWikiProofCard(tmp, card);
|
|
24
|
-
const hit = bank.readReusableTriWikiProofCard({ root: tmp, subjectId: 'fixture:gate', cacheKey: 'fixture-cache' });
|
|
25
|
-
assertGate(hit.hit === true && hit.card?.proof_id === card.proof_id, 'proof bank must reuse matching passed card', hit);
|
|
26
|
-
bank.markTriWikiProofInvalidated(tmp, 'fixture:gate', card.proof_id, 'fixture_invalidated');
|
|
27
|
-
const miss = bank.readReusableTriWikiProofCard({ root: tmp, subjectId: 'fixture:gate', cacheKey: 'fixture-cache' });
|
|
28
|
-
assertGate(miss.hit === false, 'invalidated proof card must not be reused', miss);
|
|
29
|
-
emitGate('triwiki:proof-bank-blackbox', { hit: true, invalidation_blocked_reuse: true });
|
|
30
|
-
//# sourceMappingURL=triwiki-proof-bank-blackbox.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { assertGate, emitGate, readText } from './sks-1-18-gate-lib.js';
|
|
2
|
-
const source = readText('src/core/triwiki/triwiki-proof-bank.ts');
|
|
3
|
-
assertGate(source.includes('function pidAlive(pid: number): boolean'), 'proof bank lock must use a pidAlive helper');
|
|
4
|
-
assertGate(!source.includes('process.kill(raw.pid, 0) !== undefined'), 'proof bank lock must not compare process.kill(pid, 0) to undefined');
|
|
5
|
-
assertGate(source.includes("code === 'EPERM'"), 'proof bank lock must treat EPERM as alive');
|
|
6
|
-
emitGate('triwiki:proof-bank-lock-blackbox');
|
|
7
|
-
//# sourceMappingURL=triwiki-proof-bank-lock-blackbox.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { runPatchSwarmRouteBlackbox } from './agent-patch-swarm-gate-lib.js';
|
|
4
|
-
await runPatchSwarmRouteBlackbox({
|
|
5
|
-
gate: 'ux:patch-swarm-route-blackbox',
|
|
6
|
-
route: '$UX-Review',
|
|
7
|
-
routeCommand: 'sks ux-review',
|
|
8
|
-
reportName: 'ux-patch-swarm-route-blackbox'
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=ux-patch-swarm-route-blackbox.js.map
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { spawnSync } from 'node:child_process';
|
|
6
|
-
import { osTempPngFixtureArg } from './lib/valid-png-fixture.js';
|
|
7
|
-
const sourceImage = osTempPngFixtureArg('ux-review-imagegen-blackbox-source.png');
|
|
8
|
-
const run = spawnSync(process.execPath, ['./dist/bin/sks.js', 'ux-review', 'run', '--image', sourceImage, '--generate-callouts', '--json'], {
|
|
9
|
-
cwd: process.cwd(),
|
|
10
|
-
env: { ...process.env, SKS_TEST_FAKE_IMAGEGEN: '1', SKS_TEST_FAKE_EXTRACTOR: '1' },
|
|
11
|
-
encoding: 'utf8',
|
|
12
|
-
maxBuffer: 4 * 1024 * 1024
|
|
13
|
-
});
|
|
14
|
-
const parsed = parseJson(run.stdout);
|
|
15
|
-
const missionDir = parsed?.mission_id ? path.join(process.cwd(), '.sneakoscope', 'missions', parsed.mission_id) : null;
|
|
16
|
-
const request = missionDir ? readJson(path.join(missionDir, 'image-ux-gpt-image-2-request.json')) : null;
|
|
17
|
-
const response = missionDir ? readJson(path.join(missionDir, 'image-ux-gpt-image-2-response.json')) : null;
|
|
18
|
-
const issues = missionDir ? readJson(path.join(missionDir, 'image-ux-issue-ledger.json')) : null;
|
|
19
|
-
const generated = missionDir ? readJson(path.join(missionDir, 'image-ux-generated-review-ledger.json')) : null;
|
|
20
|
-
const proof = missionDir ? readJson(path.join(missionDir, 'completion-proof.json')) : null;
|
|
21
|
-
const ok = Boolean(parsed?.mission_id)
|
|
22
|
-
&& run.status === 0
|
|
23
|
-
&& parsed?.status === 'verified_partial_reference'
|
|
24
|
-
&& request?.validation?.ok === true
|
|
25
|
-
&& response?.fake_adapter === true
|
|
26
|
-
&& generated?.generated_count === 1
|
|
27
|
-
&& generated?.real_generated_count === 0
|
|
28
|
-
&& generated?.non_real_generated_count === 1
|
|
29
|
-
&& generated?.generated_review_images?.[0]?.mock === true
|
|
30
|
-
&& Array.isArray(issues?.issues)
|
|
31
|
-
&& issues.issues.length > 0
|
|
32
|
-
&& issues.issues.every((issue) => issue.source === 'mock_fixture')
|
|
33
|
-
&& proof?.status === 'verified_partial'
|
|
34
|
-
&& proof?.evidence?.image_ux_review?.reference_only === true
|
|
35
|
-
&& proof?.evidence?.image_ux_review?.generated_gpt_image_2_callout_images_count === 0;
|
|
36
|
-
console.log(JSON.stringify({
|
|
37
|
-
schema: 'sks.ux-review-imagegen-blackbox-check.v1',
|
|
38
|
-
ok,
|
|
39
|
-
process_status: run.status,
|
|
40
|
-
mission_id: parsed?.mission_id || null,
|
|
41
|
-
gate_status: parsed?.status || null,
|
|
42
|
-
proof_status: proof?.status || null,
|
|
43
|
-
reference_only: proof?.evidence?.image_ux_review?.reference_only === true,
|
|
44
|
-
source_image: sourceImage,
|
|
45
|
-
request,
|
|
46
|
-
response,
|
|
47
|
-
issue_count: issues?.issues?.length || 0
|
|
48
|
-
}, null, 2));
|
|
49
|
-
if (!ok)
|
|
50
|
-
process.exitCode = 1;
|
|
51
|
-
function parseJson(text) {
|
|
52
|
-
try {
|
|
53
|
-
return JSON.parse(text);
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function readJson(file) {
|
|
60
|
-
try {
|
|
61
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
62
|
-
}
|
|
63
|
-
catch {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=ux-review-imagegen-blackbox-check.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
6
|
-
const mad = fs.readFileSync(path.join(root, 'src/core/commands/mad-sks-command.ts'), 'utf8');
|
|
7
|
-
const naruto = fs.readFileSync(path.join(root, 'src/core/commands/naruto-command.ts'), 'utf8');
|
|
8
|
-
const launcher = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-launcher.ts'), 'utf8');
|
|
9
|
-
const report = {
|
|
10
|
-
schema: 'sks.zellij-initial-main-only-blackbox.v1',
|
|
11
|
-
ok: true,
|
|
12
|
-
mad_slot_zero: /launchMadZellijUi\([\s\S]*slotCount:\s*0/.test(mad),
|
|
13
|
-
mad_no_launch_dashboard: !/launch\.dashboard_pane\s*=\s*await openZellijDashboardPane/.test(mad),
|
|
14
|
-
mad_initial_ui_artifact: mad.includes('zellij-initial-ui.json') && mad.includes("ui_architecture: 'monitor_plus_viewports'") && mad.includes('worker_panes_created: 0'),
|
|
15
|
-
naruto_slot_zero: /launchZellijLayout\([\s\S]*slotCount:\s*0/.test(naruto),
|
|
16
|
-
naruto_no_launch_dashboard: !/liveZellij\.dashboard_pane\s*=\s*await openZellijDashboardPane/.test(naruto),
|
|
17
|
-
naruto_initial_ui_artifact: naruto.includes('zellij-initial-ui.json'),
|
|
18
|
-
launcher_uses_layout_builder: launcher.includes('writeZellijLayout(root, layoutInput)')
|
|
19
|
-
};
|
|
20
|
-
report.ok = report.mad_slot_zero
|
|
21
|
-
&& report.mad_no_launch_dashboard
|
|
22
|
-
&& report.mad_initial_ui_artifact
|
|
23
|
-
&& report.naruto_slot_zero
|
|
24
|
-
&& report.naruto_no_launch_dashboard
|
|
25
|
-
&& report.naruto_initial_ui_artifact;
|
|
26
|
-
assertGate(report.ok, 'Zellij initial UI must use monitor plus fixed viewports with no worker panes at launch', report);
|
|
27
|
-
emitGate('zellij:initial-main-only-blackbox', report);
|
|
28
|
-
//# sourceMappingURL=zellij-initial-main-only-blackbox.js.map
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs/promises';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { spawn } from 'node:child_process';
|
|
7
|
-
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
8
|
-
const missionId = 'M-zellij-pane-lock-blackbox';
|
|
9
|
-
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-pane-lock-'));
|
|
10
|
-
const metricsFile = path.join(tmp, '.sneakoscope', 'missions', missionId, 'zellij', 'pane-creation-lock-events.jsonl');
|
|
11
|
-
await fs.mkdir(path.dirname(metricsFile), { recursive: true });
|
|
12
|
-
const workers = 32;
|
|
13
|
-
const visiblePaneCap = 8;
|
|
14
|
-
const workerSleepMs = 3000;
|
|
15
|
-
const paneDelayMs = 300;
|
|
16
|
-
const started = Date.now();
|
|
17
|
-
let active = 0;
|
|
18
|
-
let maxActive = 0;
|
|
19
|
-
const pids = new Set();
|
|
20
|
-
const events = [];
|
|
21
|
-
let lock = Promise.resolve();
|
|
22
|
-
const runs = Array.from({ length: workers }, (_, index) => runWorker(index + 1));
|
|
23
|
-
await Promise.all(runs);
|
|
24
|
-
const wall = Date.now() - started;
|
|
25
|
-
const metricsText = await fs.readFile(metricsFile, 'utf8');
|
|
26
|
-
const metrics = metricsText.trim().split(/\n+/).map((line) => JSON.parse(line));
|
|
27
|
-
const visiblePanes = metrics.length;
|
|
28
|
-
const headlessWorkers = workers - visiblePanes;
|
|
29
|
-
const lastPaneCreated = Math.max(...events.filter((event) => event.type === 'zellij_pane_created').map((event) => event.at));
|
|
30
|
-
const firstSpawn = Math.min(...events.filter((event) => event.type === 'worker_process_spawned').map((event) => event.at));
|
|
31
|
-
assertGate(maxActive >= 32, 'max active workers must reach 32', { maxActive });
|
|
32
|
-
assertGate(pids.size >= 32, 'unique PIDs must reach 32', { unique: pids.size });
|
|
33
|
-
assertGate(wall < 9000, 'wall time must prove overlap under 9s', { wall });
|
|
34
|
-
assertGate(metrics.length === visiblePaneCap && metrics.every((row) => row.wait_ms >= 0 && row.held_ms >= paneDelayMs - 40), 'pane lock metrics missing or invalid', metrics);
|
|
35
|
-
assertGate(firstSpawn <= lastPaneCreated, 'worker processes must spawn before all pane creation finishes', { firstSpawn, lastPaneCreated });
|
|
36
|
-
assertGate(visiblePanes <= 8 && headlessWorkers >= 24, 'visible/headless worker counts mismatch', { visiblePanes, headlessWorkers });
|
|
37
|
-
emitGate('zellij:pane-lock-concurrency-blackbox', { wall_ms: wall, max_active_workers: maxActive, unique_pids: pids.size, visible_panes: visiblePanes, headless_workers: headlessWorkers });
|
|
38
|
-
async function runWorker(slot) {
|
|
39
|
-
const child = spawn(process.execPath, ['-e', `setTimeout(()=>process.exit(0), ${workerSleepMs})`], { stdio: 'ignore' });
|
|
40
|
-
active += 1;
|
|
41
|
-
maxActive = Math.max(maxActive, active);
|
|
42
|
-
if (child.pid)
|
|
43
|
-
pids.add(child.pid);
|
|
44
|
-
events.push({ type: 'worker_process_spawned', slot, at: Date.now() - started, pid: child.pid || null });
|
|
45
|
-
const paneTask = slot <= visiblePaneCap ? withPaneLock(slot) : Promise.resolve();
|
|
46
|
-
await Promise.all([
|
|
47
|
-
new Promise((resolve) => child.on('close', resolve)),
|
|
48
|
-
paneTask
|
|
49
|
-
]);
|
|
50
|
-
active -= 1;
|
|
51
|
-
}
|
|
52
|
-
async function withPaneLock(slot) {
|
|
53
|
-
const requestedAt = new Date().toISOString();
|
|
54
|
-
const requestedMs = Date.now();
|
|
55
|
-
events.push({ type: 'zellij_pane_creation_lock_requested', slot, at: requestedMs - started });
|
|
56
|
-
const previous = lock;
|
|
57
|
-
let release;
|
|
58
|
-
lock = new Promise((resolve) => { release = resolve; });
|
|
59
|
-
await previous;
|
|
60
|
-
const acquiredAt = new Date().toISOString();
|
|
61
|
-
const acquiredMs = Date.now();
|
|
62
|
-
await new Promise((resolve) => setTimeout(resolve, paneDelayMs));
|
|
63
|
-
events.push({ type: 'zellij_pane_created', slot, at: Date.now() - started });
|
|
64
|
-
const releasedAt = new Date().toISOString();
|
|
65
|
-
const releasedMs = Date.now();
|
|
66
|
-
await fs.appendFile(metricsFile, JSON.stringify({
|
|
67
|
-
schema: 'sks.zellij-pane-creation-lock-metrics.v1',
|
|
68
|
-
mission_id: missionId,
|
|
69
|
-
session_name: 'fixture',
|
|
70
|
-
slot_id: `slot-${String(slot).padStart(3, '0')}`,
|
|
71
|
-
generation_index: 1,
|
|
72
|
-
requested_at: requestedAt,
|
|
73
|
-
acquired_at: acquiredAt,
|
|
74
|
-
released_at: releasedAt,
|
|
75
|
-
wait_ms: acquiredMs - requestedMs,
|
|
76
|
-
held_ms: releasedMs - acquiredMs
|
|
77
|
-
}) + '\n');
|
|
78
|
-
release();
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=zellij-pane-lock-concurrency-blackbox.js.map
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs/promises';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { spawn } from 'node:child_process';
|
|
7
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
8
|
-
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-open-worker-pane-'));
|
|
9
|
-
const missionId = 'M-zellij-open-worker-pane';
|
|
10
|
-
const sessionName = 'sks-open-worker-pane-fixture';
|
|
11
|
-
const workers = 32;
|
|
12
|
-
const visible = 8;
|
|
13
|
-
const workerSleepMs = 3000;
|
|
14
|
-
const events = [];
|
|
15
|
-
const pids = new Set();
|
|
16
|
-
let active = 0;
|
|
17
|
-
let maxActive = 0;
|
|
18
|
-
const started = Date.now();
|
|
19
|
-
process.env.SKS_ZELLIJ_FAKE_ADAPTER = '1';
|
|
20
|
-
process.env.SKS_ZELLIJ_FAKE_ROOT = tmp;
|
|
21
|
-
process.env.SKS_ZELLIJ_FAKE_DELAY_MS = '300';
|
|
22
|
-
process.env.SKS_ZELLIJ_FAKE_VERSION = '0.43.1';
|
|
23
|
-
process.env.SKS_ZELLIJ_WORKER_STACKED = '1';
|
|
24
|
-
const { openWorkerPane } = await importDist('core/zellij/zellij-worker-pane-manager.js');
|
|
25
|
-
const runs = Array.from({ length: workers }, (_, index) => runWorker(index + 1));
|
|
26
|
-
const records = await Promise.all(runs);
|
|
27
|
-
const wall = Date.now() - started;
|
|
28
|
-
const visibleRecords = records.filter(Boolean);
|
|
29
|
-
const calls = await readJsonl(path.join(tmp, '.sneakoscope', 'fake-zellij-calls.jsonl'));
|
|
30
|
-
const metrics = await readJsonl(path.join(tmp, '.sneakoscope', 'missions', missionId, 'zellij', 'pane-creation-lock-events.jsonl'));
|
|
31
|
-
const anchorCalls = calls.filter((row) => row.args.includes('--name') && row.args.includes('SLOTS'));
|
|
32
|
-
const stackedCalls = calls.filter((row) => row.args.includes('--stacked'));
|
|
33
|
-
const stackPaneCalls = calls.filter((row) => row.args.includes('stack-panes'));
|
|
34
|
-
const workerArtifacts = await Promise.all(visibleRecords.map((record) => readJson(path.join(tmp, record.worker_artifact_dir, 'zellij-worker-pane.json'))));
|
|
35
|
-
const stackedWorkerArtifacts = workerArtifacts.filter((row) => row.worker_stacked_requested === true);
|
|
36
|
-
const lastPaneCreated = Math.max(...events.filter((event) => event.type === 'zellij_pane_created').map((event) => event.at));
|
|
37
|
-
const firstSpawn = Math.min(...events.filter((event) => event.type === 'worker_process_spawned').map((event) => event.at));
|
|
38
|
-
assertGate(visibleRecords.length === visible, 'visible openWorkerPane records missing', { visibleRecords: visibleRecords.length });
|
|
39
|
-
assertGate(workerArtifacts.every((row) => row?.schema === 'sks.zellij-worker-pane.v1'), 'openWorkerPane must write zellij-worker-pane.json artifacts', workerArtifacts);
|
|
40
|
-
assertGate(anchorCalls.length === 1, 'exactly one SLOTS anchor must be created', { anchorCalls });
|
|
41
|
-
assertGate(new Set(anchorCalls.map((row) => JSON.stringify(row.args))).size === 1, 'SLOTS anchor must not be created N side-by-side times', { anchorCalls });
|
|
42
|
-
assertGate(metrics.length >= visible, 'pane lock metrics must cover visible panes', { metrics: metrics.length });
|
|
43
|
-
assertGate(firstSpawn <= lastPaneCreated, 'worker processes must spawn before all pane creation finishes', { firstSpawn, lastPaneCreated });
|
|
44
|
-
assertGate(maxActive >= workers, 'worker process execution must not be serialized by pane lock', { maxActive });
|
|
45
|
-
assertGate(pids.size >= workers, 'unique worker process PIDs must reach requested worker count', { pids: pids.size });
|
|
46
|
-
assertGate(wall < 9000, 'openWorkerPane integration wall time must stay below 9s', { wall });
|
|
47
|
-
assertGate(stackedCalls.length >= visible - 1, 'second+ visible workers must request native stacked panes on fake zellij >=0.43', { stackedCalls: stackedCalls.length });
|
|
48
|
-
assertGate(stackPaneCalls.length >= visible - 1, 'second+ visible workers must reconcile native stacked panes with stack-panes', { stackPaneCalls: stackPaneCalls.length });
|
|
49
|
-
assertGate(stackedWorkerArtifacts.length >= visible - 1, 'second+ visible worker artifacts must record stacked requested', workerArtifacts);
|
|
50
|
-
assertGate(stackedWorkerArtifacts.every((row) => row.worker_stacked_applied === true), 'second+ visible worker artifacts must record stacked applied', workerArtifacts);
|
|
51
|
-
emitGate('zellij:pane-lock-open-worker-integration', {
|
|
52
|
-
wall_ms: wall,
|
|
53
|
-
max_active_workers: maxActive,
|
|
54
|
-
unique_pids: pids.size,
|
|
55
|
-
visible_panes: visibleRecords.length,
|
|
56
|
-
stacked_calls: stackedCalls.length,
|
|
57
|
-
stack_panes_calls: stackPaneCalls.length,
|
|
58
|
-
pane_lock_metrics: metrics.length
|
|
59
|
-
});
|
|
60
|
-
async function runWorker(slot) {
|
|
61
|
-
const child = spawn(process.execPath, ['-e', `setTimeout(()=>process.exit(0), ${workerSleepMs})`], { stdio: 'ignore' });
|
|
62
|
-
active += 1;
|
|
63
|
-
maxActive = Math.max(maxActive, active);
|
|
64
|
-
if (child.pid)
|
|
65
|
-
pids.add(child.pid);
|
|
66
|
-
events.push({ type: 'worker_process_spawned', slot, at: Date.now() - started, pid: child.pid || null });
|
|
67
|
-
const paneTask = slot <= visible
|
|
68
|
-
? openWorkerPane(workerInput(slot)).then((record) => {
|
|
69
|
-
events.push({ type: 'zellij_pane_created', slot, at: Date.now() - started, pane_id: record.pane_id });
|
|
70
|
-
return record;
|
|
71
|
-
})
|
|
72
|
-
: Promise.resolve(null);
|
|
73
|
-
const [, record] = await Promise.all([
|
|
74
|
-
new Promise((resolve) => child.on('close', resolve)),
|
|
75
|
-
paneTask
|
|
76
|
-
]);
|
|
77
|
-
active -= 1;
|
|
78
|
-
return record;
|
|
79
|
-
}
|
|
80
|
-
function workerInput(slot) {
|
|
81
|
-
const slotId = `slot-${String(slot).padStart(3, '0')}`;
|
|
82
|
-
const workerDir = path.join('sessions', slotId, 'gen-1', 'worker');
|
|
83
|
-
return {
|
|
84
|
-
root: tmp,
|
|
85
|
-
cwd: tmp,
|
|
86
|
-
projectRoot: tmp,
|
|
87
|
-
missionId,
|
|
88
|
-
sessionName,
|
|
89
|
-
slotId,
|
|
90
|
-
generationIndex: 1,
|
|
91
|
-
sessionId: `${slotId}-gen-1`,
|
|
92
|
-
workerArtifactDir: workerDir,
|
|
93
|
-
resultPath: path.join(workerDir, 'worker-result.json'),
|
|
94
|
-
heartbeatPath: path.join(workerDir, 'worker-heartbeat.jsonl'),
|
|
95
|
-
patchEnvelopePath: path.join(workerDir, 'worker-patch-envelope.json'),
|
|
96
|
-
stdoutLog: path.join(workerDir, 'worker.stdout.log'),
|
|
97
|
-
stderrLog: path.join(workerDir, 'worker.stderr.log'),
|
|
98
|
-
workerCommand: `node -e "setTimeout(()=>{}, ${workerSleepMs})"`,
|
|
99
|
-
providerContext: providerContext(),
|
|
100
|
-
serviceTier: 'fast',
|
|
101
|
-
backend: 'codex-sdk',
|
|
102
|
-
statusLabel: 'running',
|
|
103
|
-
rightColumnMode: 'spawn-on-first-worker',
|
|
104
|
-
visiblePaneCap: visible,
|
|
105
|
-
uiMode: 'compact-slots',
|
|
106
|
-
dashboardSnapshot: { mission_id: missionId, active_workers: workers, visible_panes: visible }
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
function providerContext() {
|
|
110
|
-
return {
|
|
111
|
-
schema: 'sks.provider-context.v1',
|
|
112
|
-
generated_at: new Date().toISOString(),
|
|
113
|
-
provider: 'codex-lb',
|
|
114
|
-
auth_mode: 'codex_lb_key',
|
|
115
|
-
route: '$Naruto',
|
|
116
|
-
service_tier: 'fast',
|
|
117
|
-
source: 'fixture',
|
|
118
|
-
confidence: 'high',
|
|
119
|
-
conflict: false,
|
|
120
|
-
warnings: [],
|
|
121
|
-
signals: {
|
|
122
|
-
openai_api_key_present: false,
|
|
123
|
-
codex_lb_key_present: true,
|
|
124
|
-
codex_lb_explicit: true,
|
|
125
|
-
codex_app_auth_present: false,
|
|
126
|
-
model_provider: 'codex-lb'
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
async function readJson(file) {
|
|
131
|
-
return JSON.parse(await fs.readFile(file, 'utf8'));
|
|
132
|
-
}
|
|
133
|
-
async function readJsonl(file) {
|
|
134
|
-
const text = await fs.readFile(file, 'utf8');
|
|
135
|
-
return text.trim().split(/\n+/).filter(Boolean).map((line) => JSON.parse(line));
|
|
136
|
-
}
|
|
137
|
-
//# sourceMappingURL=zellij-pane-lock-open-worker-integration-blackbox.js.map
|
|
@@ -1,20 +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 swarm = readText('src/core/agents/native-cli-session-swarm.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(swarm.includes('slot_reserved') && swarm.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
|
-
});
|
|
20
|
-
//# sourceMappingURL=zellij-slot-telemetry-real-blackbox.js.map
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs/promises';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
7
|
-
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-zellij-fallback-'));
|
|
8
|
-
const missionId = 'M-zellij-stacked-fallback';
|
|
9
|
-
const sessionName = 'sks-stacked-fallback-fixture';
|
|
10
|
-
process.env.SKS_ZELLIJ_FAKE_ADAPTER = '1';
|
|
11
|
-
process.env.SKS_ZELLIJ_FAKE_ROOT = tmp;
|
|
12
|
-
process.env.SKS_ZELLIJ_FAKE_DELAY_MS = '10';
|
|
13
|
-
process.env.SKS_ZELLIJ_FAKE_VERSION = '0.42.2';
|
|
14
|
-
process.env.SKS_ZELLIJ_WORKER_STACKED = '1';
|
|
15
|
-
const { openWorkerPane } = await importDist('core/zellij/zellij-worker-pane-manager.js');
|
|
16
|
-
const records = [];
|
|
17
|
-
for (let slot = 1; slot <= 3; slot += 1)
|
|
18
|
-
records.push(await openWorkerPane(workerInput(slot)));
|
|
19
|
-
const calls = await readJsonl(path.join(tmp, '.sneakoscope', 'fake-zellij-calls.jsonl'));
|
|
20
|
-
const stackedCalls = calls.filter((row) => row.args.includes('--stacked'));
|
|
21
|
-
assertGate(records.every((row) => row.ok === true), 'fallback integration workers must still run', records);
|
|
22
|
-
assertGate(stackedCalls.length === 0, 'Zellij <0.43 fallback path must not call --stacked', stackedCalls);
|
|
23
|
-
assertGate(records.slice(1).every((row) => row.worker_stacked_requested === true), 'second+ workers must record stacked intent', records);
|
|
24
|
-
assertGate(records.slice(1).every((row) => row.worker_stacked_applied === false), 'fallback workers must record stacked_applied=false', records);
|
|
25
|
-
assertGate(records.slice(1).every((row) => row.worker_stacked_fallback_mode === 'down-split-stack-emulation'), 'fallback mode must be down-split-stack-emulation', records);
|
|
26
|
-
emitGate('zellij:stacked-fallback-integration', { workers: records.length, stacked_calls: stackedCalls.length });
|
|
27
|
-
function workerInput(slot) {
|
|
28
|
-
const slotId = `slot-${String(slot).padStart(3, '0')}`;
|
|
29
|
-
const workerDir = path.join('sessions', slotId, 'gen-1', 'worker');
|
|
30
|
-
return {
|
|
31
|
-
root: tmp,
|
|
32
|
-
cwd: tmp,
|
|
33
|
-
projectRoot: tmp,
|
|
34
|
-
missionId,
|
|
35
|
-
sessionName,
|
|
36
|
-
slotId,
|
|
37
|
-
generationIndex: 1,
|
|
38
|
-
sessionId: `${slotId}-gen-1`,
|
|
39
|
-
workerArtifactDir: workerDir,
|
|
40
|
-
resultPath: path.join(workerDir, 'worker-result.json'),
|
|
41
|
-
heartbeatPath: path.join(workerDir, 'worker-heartbeat.jsonl'),
|
|
42
|
-
patchEnvelopePath: path.join(workerDir, 'worker-patch-envelope.json'),
|
|
43
|
-
stdoutLog: path.join(workerDir, 'worker.stdout.log'),
|
|
44
|
-
stderrLog: path.join(workerDir, 'worker.stderr.log'),
|
|
45
|
-
workerCommand: 'node -e "setTimeout(()=>{}, 100)"',
|
|
46
|
-
providerContext: providerContext(),
|
|
47
|
-
serviceTier: 'fast',
|
|
48
|
-
backend: 'codex-sdk',
|
|
49
|
-
statusLabel: 'running',
|
|
50
|
-
rightColumnMode: 'spawn-on-first-worker',
|
|
51
|
-
visiblePaneCap: 3,
|
|
52
|
-
uiMode: 'compact-slots',
|
|
53
|
-
dashboardSnapshot: { mission_id: missionId, active_workers: 3, visible_panes: 3 }
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function providerContext() {
|
|
57
|
-
return {
|
|
58
|
-
schema: 'sks.provider-context.v1',
|
|
59
|
-
generated_at: new Date().toISOString(),
|
|
60
|
-
provider: 'codex-lb',
|
|
61
|
-
auth_mode: 'codex_lb_key',
|
|
62
|
-
route: '$Naruto',
|
|
63
|
-
service_tier: 'fast',
|
|
64
|
-
source: 'fixture',
|
|
65
|
-
confidence: 'high',
|
|
66
|
-
conflict: false,
|
|
67
|
-
warnings: [],
|
|
68
|
-
signals: {
|
|
69
|
-
openai_api_key_present: false,
|
|
70
|
-
codex_lb_key_present: true,
|
|
71
|
-
codex_lb_explicit: true,
|
|
72
|
-
codex_app_auth_present: false,
|
|
73
|
-
model_provider: 'codex-lb'
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
async function readJsonl(file) {
|
|
78
|
-
const text = await fs.readFile(file, 'utf8');
|
|
79
|
-
return text.trim().split(/\n+/).filter(Boolean).map((line) => JSON.parse(line));
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=zellij-stacked-fallback-integration-blackbox.js.map
|