sneakoscope 7.3.0 → 7.6.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 +129 -10
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/cli/codex-app-command.js +1 -1
- package/dist/cli/command-manifest-lite.js +4 -1
- package/dist/cli/command-registry.js +2 -0
- package/dist/cli/install-helpers-codex-lb-chain.js +42 -0
- package/dist/cli/install-helpers-codex-lb-config.js +114 -9
- package/dist/cli/install-helpers-install-support.js +6 -16
- package/dist/cli/install-helpers.js +788 -600
- package/dist/cli/router.js +30 -2
- package/dist/commands/codex-app.js +37 -1
- package/dist/commands/codex-lb.js +491 -300
- package/dist/config/skills-manifest.json +57 -71
- package/dist/core/align/align-route.js +127 -0
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +8 -4
- package/dist/core/codex-app/codex-app-restart.js +83 -0
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +8 -4
- package/dist/core/codex-app/desktop-routing-snapshot.js +1 -1
- package/dist/core/codex-app/menubar/constants.js +5 -0
- package/dist/core/codex-app/menubar/generation-transaction-journal.js +1 -3
- package/dist/core/codex-app/menubar/installer.js +18 -0
- package/dist/core/codex-app/multi-provider-router.js +22 -10
- package/dist/core/codex-app/openrouter-activate.js +26 -1
- package/dist/core/codex-app.js +118 -26
- package/dist/core/codex-control/codex-app-server-runtime-env.js +86 -0
- package/dist/core/codex-control/codex-app-server-v2-client.js +78 -8
- package/dist/core/codex-control/codex-task-runner.js +2 -2
- package/dist/core/codex-lb/capability-runner.js +204 -0
- package/dist/core/codex-lb/capability-types.js +1 -0
- package/dist/core/codex-lb/codex-lb-env.js +9 -13
- package/dist/core/codex-lb/codex-lb-setup.js +45 -8
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +52 -74
- package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +1 -1
- package/dist/core/codex-lb/desktop-auth-invariant.js +185 -0
- package/dist/core/codex-lb/desktop-bridge/client.js +34 -0
- package/dist/core/codex-lb/desktop-bridge/header-policy.js +106 -0
- package/dist/core/codex-lb/desktop-bridge/http-forward.js +101 -0
- package/dist/core/codex-lb/desktop-bridge/index.js +10 -0
- package/dist/core/codex-lb/desktop-bridge/launchd.js +81 -0
- package/dist/core/codex-lb/desktop-bridge/location-rewrite.js +27 -0
- package/dist/core/codex-lb/desktop-bridge/security.js +274 -0
- package/dist/core/codex-lb/desktop-bridge/server.js +179 -0
- package/dist/core/codex-lb/desktop-bridge/state.js +119 -0
- package/dist/core/codex-lb/desktop-bridge/types.js +16 -0
- package/dist/core/codex-lb/desktop-bridge/websocket-forward.js +151 -0
- package/dist/core/codex-lb/desktop-center-credentials.js +189 -0
- package/dist/core/codex-lb/desktop-controller.js +1410 -0
- package/dist/core/codex-lb/desktop-mode.js +32 -0
- package/dist/core/codex-lb/desktop-real-evidence.js +168 -0
- package/dist/core/codex-lb/desktop-service.js +613 -0
- package/dist/core/codex-lb/legacy-migration.js +575 -0
- package/dist/core/codex-lb/migration-receipt.js +246 -0
- package/dist/core/codex-lb/probes/auxiliary-surfaces-probe.js +60 -0
- package/dist/core/codex-lb/probes/bridge-probe.js +75 -0
- package/dist/core/codex-lb/probes/catalog-probe.js +128 -0
- package/dist/core/codex-lb/probes/computer-use-probe.js +50 -0
- package/dist/core/codex-lb/probes/image-generation-probe.js +47 -0
- package/dist/core/codex-lb/probes/probe-evidence.js +39 -0
- package/dist/core/codex-lb/probes/voice-realtime-probe.js +44 -0
- package/dist/core/codex-lb/trusted-deep-evidence.js +403 -0
- package/dist/core/codex-native/core-skill-manifest.js +22 -6
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +2 -1
- package/dist/core/commands/align-command.js +220 -0
- package/dist/core/commands/image-ux-review-command.js +280 -68
- package/dist/core/commands/naruto-command.js +257 -8
- package/dist/core/commands/ppt-command.js +2 -2
- package/dist/core/commands/telegram-command.js +402 -34
- package/dist/core/commands/triwiki-command.js +11 -1
- package/dist/core/commands/triwiki-graph-command.js +160 -0
- package/dist/core/commands/wiki-command.js +100 -20
- package/dist/core/doctor/skill-legacy-surface.js +1 -3
- package/dist/core/errors/message.js +3 -0
- package/dist/core/evidence/evidence-freshness.js +14 -0
- package/dist/core/feature-fixtures.js +9 -1
- package/dist/core/feature-registry.js +5 -3
- package/dist/core/fsx.js +7 -3
- package/dist/core/hooks-runtime/codex-commit-hooks-selftest.js +82 -0
- package/dist/core/hooks-runtime/context-graph-freshness-preflight.js +113 -0
- package/dist/core/hooks-runtime/hook-context.js +15 -2
- package/dist/core/hooks-runtime/managed-skill-generation-heal.js +46 -0
- package/dist/core/hooks-runtime/naruto-terminal-finalization.js +1 -0
- package/dist/core/hooks-runtime/official-subagent-lifecycle.js +1 -1
- package/dist/core/hooks-runtime/tool-output-quarantine.js +1 -1
- package/dist/core/hooks-runtime.js +33 -89
- package/dist/core/image-ux-review/callout-extraction.js +6 -0
- package/dist/core/image-ux-review/imagegen-adapter.js +64 -23
- package/dist/core/image-ux-review/real-callout-extractor.js +1 -0
- package/dist/core/image-ux-review.js +230 -12
- package/dist/core/imagegen/codex-lb-imagegen-target.js +21 -7
- package/dist/core/imagegen/imagegen-capability.js +10 -4
- package/dist/core/imagegen/require-imagegen.js +29 -5
- package/dist/core/init/skills.js +25 -13
- package/dist/core/init.js +1 -1
- package/dist/core/install/installed-package-smoke.js +157 -4
- package/dist/core/managed-assets/managed-assets-manifest.js +2 -1
- package/dist/core/managed-path-safety.js +8 -10
- package/dist/core/mcp-config/backup.js +2 -4
- package/dist/core/mcp-config/config-reader.js +2 -4
- package/dist/core/mcp-config/scope.js +3 -5
- package/dist/core/naruto/context-graph-advisor-scope.js +242 -0
- package/dist/core/naruto/context-graph-advisor.js +0 -0
- package/dist/core/perf/release-latency-slo.js +12 -6
- package/dist/core/pipeline-internals/runtime-core.js +78 -0
- package/dist/core/pipeline-internals/runtime-gates.js +5 -2
- package/dist/core/policy/latest-version-guidance.js +113 -0
- package/dist/core/ppt.js +8 -8
- package/dist/core/preflight/parallel-preflight-engine.js +1 -1
- package/dist/core/proof/auto-finalize.js +98 -6
- package/dist/core/proof/route-proof-gate.js +12 -1
- package/dist/core/proof/route-proof-policy.js +8 -8
- package/dist/core/release/gate-manifest.js +32 -1
- package/dist/core/release/npm-stage-contract.js +21 -0
- package/dist/core/release/package-size-budget.js +2 -2
- package/dist/core/release/release-gate-contract.js +5 -0
- package/dist/core/release/release-proof-io.js +1 -3
- package/dist/core/release/release-real-contract.js +5 -4
- package/dist/core/release/release-stamp-proof.js +1 -3
- package/dist/core/release/stage-publish.js +27 -0
- package/dist/core/remote/audit-idempotency.js +50 -18
- package/dist/core/remote/codex-public-activity.js +283 -0
- package/dist/core/remote/index.js +1 -0
- package/dist/core/remote/ssh-worker-client.js +4 -1
- package/dist/core/remote/worker.js +206 -27
- package/dist/core/research/research-adversarial-review.js +1 -3
- package/dist/core/research/research-claim-synthesizer.js +1 -3
- package/dist/core/research/research-falsification-runner.js +1 -3
- package/dist/core/research/research-source-evidence.js +1 -3
- package/dist/core/responses-stream.js +65 -19
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/design-policy.js +7 -2
- package/dist/core/routes/dollar-manifest-lite.js +2 -4
- package/dist/core/routes/evidence.js +1 -1
- package/dist/core/routes.js +30 -10
- package/dist/core/safety/command-contract/contracts.js +2 -0
- package/dist/core/safety/command-contract/types.js +1 -1
- package/dist/core/search/context-graph-seeds.js +205 -0
- package/dist/core/search/context.js +0 -0
- package/dist/core/search/provider.js +2 -2
- package/dist/core/secret-redaction.js +6 -0
- package/dist/core/subagents/naruto-help-contract.js +2 -1
- package/dist/core/subagents/naruto-host-credentials.js +161 -0
- package/dist/core/subagents/official-subagent-preparation.js +4 -1
- package/dist/core/subagents/official-subagent-prompt.js +44 -2
- package/dist/core/subagents/official-subagent-runner.js +26 -8
- package/dist/core/subagents/triwiki-attention.js +135 -123
- package/dist/core/telegram/bot-api.js +85 -10
- package/dist/core/telegram/center-snapshot.js +718 -0
- package/dist/core/telegram/config.js +158 -31
- package/dist/core/telegram/hub.js +288 -33
- package/dist/core/telegram/index.js +2 -0
- package/dist/core/telegram/ingress-spool.js +419 -0
- package/dist/core/telegram/ledgers.js +188 -29
- package/dist/core/telegram/messages.js +26 -6
- package/dist/core/telegram/owner-lock.js +10 -7
- package/dist/core/telegram/runtime-projection.js +38 -3
- package/dist/core/telegram/runtime.js +298 -63
- package/dist/core/telegram/service.js +137 -8
- package/dist/core/telegram/setup.js +291 -73
- package/dist/core/text/strings.js +3 -0
- package/dist/core/triwiki/code-pack.js +12 -120
- package/dist/core/triwiki/context-graph/compiler/cache-key.js +277 -0
- package/dist/core/triwiki/context-graph/compiler/extract.js +104 -0
- package/dist/core/triwiki/context-graph/compiler/freshness.js +108 -0
- package/dist/core/triwiki/context-graph/compiler/index.js +237 -0
- package/dist/core/triwiki/context-graph/compiler/merge.js +0 -0
- package/dist/core/triwiki/context-graph/compiler/serialize.js +115 -0
- package/dist/core/triwiki/context-graph/contracts.js +236 -0
- package/dist/core/triwiki/context-graph/extractors/code/builders.js +150 -0
- package/dist/core/triwiki/context-graph/extractors/code/declarations.js +161 -0
- package/dist/core/triwiki/context-graph/extractors/code/index.js +265 -0
- package/dist/core/triwiki/context-graph/extractors/code/inventory.js +237 -0
- package/dist/core/triwiki/context-graph/extractors/code/module-graph.js +252 -0
- package/dist/core/triwiki/context-graph/extractors/code/modules.js +79 -0
- package/dist/core/triwiki/context-graph/extractors/code/references.js +184 -0
- package/dist/core/triwiki/context-graph/extractors/code/selection.js +100 -0
- package/dist/core/triwiki/context-graph/extractors/code/ts-config.js +161 -0
- package/dist/core/triwiki/context-graph/extractors/code/types.js +18 -0
- package/dist/core/triwiki/context-graph/extractors/evidence/claims.js +289 -0
- package/dist/core/triwiki/context-graph/extractors/evidence/index.js +54 -0
- package/dist/core/triwiki/context-graph/extractors/evidence/proof-index.js +213 -0
- package/dist/core/triwiki/context-graph/extractors/evidence/proofs.js +266 -0
- package/dist/core/triwiki/context-graph/extractors/evidence/redaction.js +177 -0
- package/dist/core/triwiki/context-graph/extractors/evidence/shared.js +0 -0
- package/dist/core/triwiki/context-graph/extractors/evidence/sources.js +154 -0
- package/dist/core/triwiki/context-graph/extractors/index.js +7 -0
- package/dist/core/triwiki/context-graph/extractors/topology/commands.js +207 -0
- package/dist/core/triwiki/context-graph/extractors/topology/gate-edges.js +201 -0
- package/dist/core/triwiki/context-graph/extractors/topology/gates.js +182 -0
- package/dist/core/triwiki/context-graph/extractors/topology/globs.js +124 -0
- package/dist/core/triwiki/context-graph/extractors/topology/index.js +92 -0
- package/dist/core/triwiki/context-graph/extractors/topology/routes.js +135 -0
- package/dist/core/triwiki/context-graph/extractors/topology/shared.js +215 -0
- package/dist/core/triwiki/context-graph/graph-index.js +143 -0
- package/dist/core/triwiki/context-graph/ids.js +0 -0
- package/dist/core/triwiki/context-graph/lint/index.js +0 -0
- package/dist/core/triwiki/context-graph/lint/rules.js +232 -0
- package/dist/core/triwiki/context-graph/lint/warnings.js +93 -0
- package/dist/core/triwiki/context-graph/paths.js +116 -0
- package/dist/core/triwiki/context-graph/profiles.js +78 -0
- package/dist/core/triwiki/context-graph/projections/anchors.js +91 -0
- package/dist/core/triwiki/context-graph/projections/attention.js +58 -0
- package/dist/core/triwiki/context-graph/projections/code-pack-workspace.js +62 -0
- package/dist/core/triwiki/context-graph/projections/code-pack.js +144 -0
- package/dist/core/triwiki/context-graph/projections/index.js +7 -0
- package/dist/core/triwiki/context-graph/projections/module-view.js +140 -0
- package/dist/core/triwiki/context-graph/projections/node-summary.js +118 -0
- package/dist/core/triwiki/context-graph/projections/pack-contract.js +6 -0
- package/dist/core/triwiki/context-graph/query/explain.js +0 -0
- package/dist/core/triwiki/context-graph/query/index.js +178 -0
- package/dist/core/triwiki/context-graph/query/load.js +116 -0
- package/dist/core/triwiki/context-graph/query/pack.js +117 -0
- package/dist/core/triwiki/context-graph/query/rank.js +142 -0
- package/dist/core/triwiki/context-graph/query/ranking-config.js +64 -0
- package/dist/core/triwiki/context-graph/query/seeds.js +241 -0
- package/dist/core/triwiki/context-graph/query/snapshot-cache.js +72 -0
- package/dist/core/triwiki/context-graph/query/traverse.js +154 -0
- package/dist/core/triwiki/context-graph/query-types.js +29 -0
- package/dist/core/triwiki/context-graph/store/compile-lock.js +21 -0
- package/dist/core/triwiki/context-graph/store/event-log.js +48 -0
- package/dist/core/triwiki/context-graph/store/fragment-cache.js +85 -0
- package/dist/core/triwiki/context-graph/store/graph-status.js +85 -0
- package/dist/core/triwiki/context-graph/store/snapshot-store.js +155 -0
- package/dist/core/triwiki/triwiki-proof-bank-index-repair.js +115 -0
- package/dist/core/triwiki/triwiki-proof-bank-index-store.js +290 -0
- package/dist/core/triwiki/triwiki-proof-bank-index.js +126 -0
- package/dist/core/triwiki/triwiki-proof-bank.js +7 -1
- package/dist/core/verification/context-graph-affected.js +271 -0
- package/dist/core/version.js +1 -1
- package/dist/native/sks-menubar/Sources/AlertFactory.swift +11 -3
- package/dist/native/sks-menubar/Sources/AppDelegate.swift +9 -0
- package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +25 -3
- package/dist/native/sks-menubar/Sources/ControlKit.swift +19 -8
- package/dist/native/sks-menubar/Sources/DiagnosticsViewController.swift +1 -2
- package/dist/native/sks-menubar/Sources/MCPServersViewController.swift +45 -17
- package/dist/native/sks-menubar/Sources/OverviewSummary.swift +162 -0
- package/dist/native/sks-menubar/Sources/OverviewViewController.swift +136 -190
- package/dist/native/sks-menubar/Sources/ProcessClient.swift +107 -11
- package/dist/native/sks-menubar/Sources/ProvidersMultiProvider.swift +5 -1
- package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +16 -4
- package/dist/native/sks-menubar/Sources/ProvidersRoleModels.swift +4 -1
- package/dist/native/sks-menubar/Sources/ProvidersRoutingTruth.swift +131 -0
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +288 -341
- package/dist/native/sks-menubar/Sources/RemoteTelegramCenterState.swift +447 -0
- package/dist/native/sks-menubar/Sources/RemoteTelegramRendering.swift +484 -0
- package/dist/native/sks-menubar/Sources/RemoteTelegramViewController.swift +364 -115
- package/dist/native/sks-menubar/Sources/SettingsViewController.swift +73 -12
- package/dist/native/sks-menubar/Sources/SidebarItem.swift +3 -3
- package/dist/native/sks-menubar/Sources/StatusItemController.swift +13 -13
- package/dist/native/sks-menubar/Sources/TelegramHubSupervisor.swift +469 -0
- package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +1 -6
- package/dist/native/sks-menubar/Tests/AppRuntimeTestSupport.swift +12 -0
- package/dist/native/sks-menubar/Tests/NativeTelegramRegressionRunner.swift +55 -0
- package/dist/native/sks-menubar/Tests/ProcessClientTests.swift +33 -0
- package/dist/native/sks-menubar/Tests/ProvidersViewControllerTests.swift +142 -0
- package/dist/native/sks-menubar/Tests/RemoteTelegramCenterStateTests.swift +56 -0
- package/dist/native/sks-menubar/Tests/TelegramHubSupervisorTests.swift +55 -0
- package/dist/scripts/codex-lb-catalog-passthrough-check.js +120 -0
- package/dist/scripts/codex-lb-desktop-auth-invariant-check.js +169 -0
- package/dist/scripts/codex-lb-desktop-bridge-check.js +394 -0
- package/dist/scripts/codex-lb-desktop-bridge-latency-check.js +196 -0
- package/dist/scripts/codex-lb-desktop-capabilities-check.js +287 -0
- package/dist/scripts/codex-lb-desktop-real-evidence-check.js +123 -0
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +10 -3
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +81 -40
- package/dist/scripts/codex-lb-gpt56-fast-profile-check.js +99 -37
- package/dist/scripts/context-graph-check.js +191 -0
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +1 -1
- package/dist/scripts/gate-policy-audit-check.js +1 -1
- package/dist/scripts/helper-dedup-check.js +0 -2
- package/dist/scripts/installed-package-smoke-check.js +4 -1
- package/dist/scripts/latest-version-guidance-check.js +74 -0
- package/dist/scripts/release-metadata-check.js +21 -4
- package/dist/scripts/release-real-check.js +7 -0
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +25 -1
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +9 -1
- package/package.json +8 -3
- package/release-gates.v2.json +176 -1
- package/runtime-required-scripts.json +30 -0
- package/schemas/triwiki/context-graph.schema.json +119 -0
- package/dist/cli/install-helpers-codex-lb-selftest-chain.js +0 -112
- package/dist/cli/install-helpers-codex-lb-selftest.js +0 -481
- package/dist/core/triwiki/code-index-scanner.js +0 -309
|
@@ -8,7 +8,7 @@ const repoRoot = process.cwd();
|
|
|
8
8
|
const runRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-ux-review-imagegen-blackbox-'));
|
|
9
9
|
const sksBin = path.join(repoRoot, 'dist', 'bin', 'sks.js');
|
|
10
10
|
const sourceImage = osTempPngFixtureArg('ux-review-imagegen-blackbox-source.png');
|
|
11
|
-
const run = spawnSync(process.execPath, [sksBin, 'ux-review', 'run', '--image', sourceImage, '--
|
|
11
|
+
const run = spawnSync(process.execPath, [sksBin, 'ux-review', 'run', '--image', sourceImage, '--mock', '--json'], {
|
|
12
12
|
cwd: runRoot,
|
|
13
13
|
env: { ...process.env, SKS_TEST_FAKE_IMAGEGEN: '1', SKS_TEST_FAKE_EXTRACTOR: '1', SKS_MOCK: '1', NODE_ENV: 'test', SKS_UPDATE_MIGRATION_GATE_DISABLED: '1', SKS_SKIP_NPM_FRESHNESS_CHECK: '1' },
|
|
14
14
|
encoding: 'utf8',
|
|
@@ -20,19 +20,41 @@ const request = missionDir ? readJson(path.join(missionDir, 'image-ux-gpt-image-
|
|
|
20
20
|
const response = missionDir ? readJson(path.join(missionDir, 'image-ux-gpt-image-2-response.json')) : null;
|
|
21
21
|
const issues = missionDir ? readJson(path.join(missionDir, 'image-ux-issue-ledger.json')) : null;
|
|
22
22
|
const generated = missionDir ? readJson(path.join(missionDir, 'image-ux-generated-review-ledger.json')) : null;
|
|
23
|
+
const extraction = missionDir ? readJson(path.join(missionDir, 'image-ux-callout-extraction-report.json')) : null;
|
|
24
|
+
const uxReport = missionDir ? readJson(path.join(missionDir, 'image-ux-iteration-report.json')) : null;
|
|
23
25
|
const proof = missionDir ? readJson(path.join(missionDir, 'completion-proof.json')) : null;
|
|
24
26
|
const ok = Boolean(parsed?.mission_id)
|
|
25
27
|
&& [0, 1].includes(run.status)
|
|
26
28
|
&& ['blocked', 'verified_partial_reference'].includes(parsed?.status)
|
|
27
29
|
&& request?.validation?.ok === true
|
|
30
|
+
&& /senior Toss UI\/UX product designer/.test(request?.prompt || '')
|
|
31
|
+
&& /P0\/P1\/P2\/P3/.test(request?.prompt || '')
|
|
32
|
+
&& /visual hierarchy/.test(request?.prompt || '')
|
|
33
|
+
&& /contrast/.test(request?.prompt || '')
|
|
34
|
+
&& /density/.test(request?.prompt || '')
|
|
35
|
+
&& /affordance/.test(request?.prompt || '')
|
|
36
|
+
&& /eye-flow arrows/.test(request?.prompt || '')
|
|
37
|
+
&& /corrected mini-comp/.test(request?.prompt || '')
|
|
28
38
|
&& response?.evidence_class === 'mock_fixture'
|
|
29
39
|
&& generated?.generated_count === 1
|
|
30
40
|
&& generated?.real_generated_count === 0
|
|
31
41
|
&& generated?.non_real_generated_count === 1
|
|
32
42
|
&& generated?.generated_review_images?.[0]?.mock === true
|
|
43
|
+
&& generated?.generated_review_images?.[0]?.callout_extraction_status === 'succeeded'
|
|
33
44
|
&& Array.isArray(issues?.issues)
|
|
34
45
|
&& issues.issues.length > 0
|
|
35
46
|
&& issues.issues.every((issue) => issue.source === 'mock_fixture')
|
|
47
|
+
&& issues.issues.every((issue) => issue.generated_review_image_id === generated.generated_review_images[0].id)
|
|
48
|
+
&& issues.issues.every((issue) => issue.generated_image_sha256 === generated.generated_review_images[0].sha256)
|
|
49
|
+
&& extraction?.analysis_input === 'generated_annotated_review_image'
|
|
50
|
+
&& extraction?.source_screenshot_used_for_extraction === false
|
|
51
|
+
&& extraction?.generated_image_id === generated.generated_review_images[0].id
|
|
52
|
+
&& extraction?.generated_image_sha256 === generated.generated_review_images[0].sha256
|
|
53
|
+
&& response?.generated_review_image_id === generated.generated_review_images[0].id
|
|
54
|
+
&& uxReport?.report_type === 'ux_ui_change_report'
|
|
55
|
+
&& uxReport?.analysis_basis?.primary_evidence === 'generated_annotated_review_image'
|
|
56
|
+
&& uxReport?.analysis_basis?.based_on_generated_image === true
|
|
57
|
+
&& uxReport?.recommendations?.length === issues.issues.length
|
|
36
58
|
&& ['mock_only', 'verified_partial'].includes(proof?.status)
|
|
37
59
|
&& proof?.evidence?.image_ux_review?.reference_only === true
|
|
38
60
|
&& proof?.evidence?.image_ux_review?.generated_gpt_image_2_callout_images_count === 0;
|
|
@@ -48,6 +70,8 @@ console.log(JSON.stringify({
|
|
|
48
70
|
source_image: sourceImage,
|
|
49
71
|
request,
|
|
50
72
|
response,
|
|
73
|
+
extraction,
|
|
74
|
+
ux_report: uxReport,
|
|
51
75
|
issue_count: issues?.issues?.length || 0
|
|
52
76
|
}, null, 2));
|
|
53
77
|
if (!ok)
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { emitGate, requireContains } from './real-execution-check-lib.js';
|
|
3
3
|
requireContains('ux-review:run-wires-imagegen', 'src/core/commands/image-ux-review-command.ts', [
|
|
4
|
-
'const shouldGenerateCallouts =
|
|
4
|
+
'const shouldGenerateCallouts = !generatedImage',
|
|
5
5
|
'requireCodexImagegen',
|
|
6
|
+
'buildCalloutPrompt',
|
|
6
7
|
'generateGptImage2CalloutReview',
|
|
7
8
|
'evidence_class',
|
|
8
9
|
'output_sha256',
|
|
9
10
|
'imagegenEvidenceClassBlockers',
|
|
10
11
|
'isFullImagegenOutputSource',
|
|
11
12
|
'extractRealCallouts',
|
|
13
|
+
'extractAndWriteGeneratedReview',
|
|
14
|
+
'imageUxReviewCommandOutcome',
|
|
15
|
+
"allowReviewOnlyCompletion: !flag(args, '--fix')",
|
|
16
|
+
'allowReviewOnlyCompletion: false',
|
|
17
|
+
'generated_review_image_id',
|
|
18
|
+
'callout_extraction_status',
|
|
19
|
+
'captured_screenshot_path_required',
|
|
12
20
|
'buildImageUxCalloutExtractionReport'
|
|
13
21
|
]);
|
|
14
22
|
requireContains('ux-review:run-wires-imagegen', 'src/core/imagegen/imagegen-evidence.ts', [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sneakoscope",
|
|
3
3
|
"displayName": "ㅅㅋㅅ",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.6.0",
|
|
5
5
|
"description": "Proof-first Codex CLI and ChatGPT Desktop orchestration for AI coding agents, release verification, and macOS menu bar control.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
|
|
@@ -33,11 +33,15 @@
|
|
|
33
33
|
"!dist/**/*.tsbuildinfo",
|
|
34
34
|
"!dist/**/__tests__",
|
|
35
35
|
"!dist/**/*.test.js",
|
|
36
|
+
"!dist/cli/install-helpers-codex-lb-selftest.js",
|
|
37
|
+
"!dist/cli/install-helpers-codex-lb-selftest-chain.js",
|
|
36
38
|
"!dist/core/telegram/mini-app.js",
|
|
37
39
|
"!dist/scripts/**",
|
|
38
|
-
"dist/scripts/{agent-guidance-dedup-check.js,agent-message-bus-reader-check.js,all-feature-deep-completion-check.js,appshots-thread-attachment-discovery-check.js,architecture-guard-check.js,certificate-sla-check.js,check-runtime-schemas.js,cli-output-consistency-check.js,codex-0-134-runner-truth-check.js,codex-0-137-compat-check.js,codex-0138-capability-artifact-check.js,codex-0138-capability-check.js,codex-0138-doctor-check.js,codex-0138-feature-probes-check.js,codex-0144-app-server-v2-check.js,codex-0144-binary-identity-check.js,codex-0144-capability-check.js,codex-0144-core-real-probes-check.js,codex-0144-manifest-check.js,codex-0144-policy-check.js,codex-0144-thread-store-check.js,codex-agent-role-rich-content-check.js,codex-agent-role-sync-check.js,codex-agent-type-routing-check.js,codex-app-execution-profile-check.js,codex-app-fast-ui-preservation-check.js,codex-app-handoff-check.js,codex-app-handoff-launch-check.js,codex-config-load-probe.js,codex-control-all-pipelines-check.js,codex-control-event-stream-ledger-check.js,codex-control-tool-output-continuity-audit-check.js,codex-lb-fast-mode-truth-check.js,codex-lb-fast-ui-preservation-check.js,codex-lb-gpt56-fast-profile-check.js,codex-native-agent-role-content-check.js,codex-native-feature-broker-blackbox.js,codex-native-feature-broker-check.js,codex-native-harness-compat-check.js,codex-native-hook-lifecycle-proof-check.js,codex-native-runtime-e2e-fixture.js,codex-plugin-app-template-policy-check.js,codex-sdk-all-pipelines-check.js,codex-sdk-backend-router-check.js,codex-sdk-capability-check.js,codex-sdk-event-stream-ledger-check.js,codex-sdk-real-smoke-check.js,concurrent-session-collision-check.js,context7-evidence-dedupe-check.js,core-skill-card-schema-check.js,core-skill-deployment-snapshot-check.js,core-skill-heldout-validation-check.js,core-skill-no-inference-optimizer-check.js,core-skill-patch-check.js,core-skill-route-runtime-integration-check.js,current-command-surface-check.js,current-surface-update-e2e-check.js,current-upgrade-matrix-check.js,dfix-fixture-check.js,dfix-patch-handoff-check.js,dfix-verification-check.js,dfix-verification-recommendation-check.js,docs-truthfulness-check.js,doctor-codex-app-harness-check.js,doctor-fix-proves-codex-read-check.js,doctor-fixes-codex-app-fast-ui-check.js,evidence-flagship-coverage-check.js,fast-codex-service-tier-proof-check.js,fixtures/fake-codex-config-loader.js,gate-policy-audit-check.js,geo-claim-evidence-check.js,geo-cli-blackbox-check.js,geo-crawler-policy-check.js,git-worktree-checkpoint-check.js,git-worktree-cross-rebase-check.js,git-worktree-diff-envelope-check.js,git-worktree-dirty-lock-check.js,git-worktree-dirty-main-detection-check.js,git-worktree-integration-primary-check.js,git-worktree-manifest-append-check.js,git-worktree-untracked-diff-check.js,goal-artifact-compat-check.js,harness-benchmark-check.js,helper-dedup-check.js,hook-latency-budget-check.js,image-artifact-path-contract-check.js,imagegen-real-smoke-check.js,init-deep-backup-retention-check.js,installed-package-smoke-check.js,legacy-gate-inventory-check.js,legacy-gate-purge-check.js,legacy-strong-inventory-check.js,lib/codex-sdk-gate-lib.js,lib/ensure-dist-fresh.js,lib/git-worktree-fixture.js,lib/valid-png-fixture.js,local-collab-all-pipelines-final-gpt-check.js,loop-directive-check-lib.js,loop-integration-finalizer-check.js,loop-worker-fixture-child.js,mad-preflight-blocks-unreadable-config-check.js,mad-sks-app-ui-no-mutation-check.js}",
|
|
39
|
-
"dist/scripts/{mad-sks-launch-sql-plane-boundary-check.js,mad-sks-sql-plane-capability-check.js,mad-sks-sql-plane-lifecycle-hook-decision-check.js,mad-sks-sql-plane-result-lifecycle-check.js,managed-config-merge-check.js,mcp-plugin-inventory-check.js,model-call-concurrency-check.js,mutation-callsite-coverage-check.js,naruto-ssot-gate-aliases-check.js,naruto-ssot-pipeline-default-check.js,naruto-ssot-route-normalization-check.js,naruto-ssot-routing-check.js,naruto-worktree-coding-blackbox.js,native-capability-repair-matrix-check.js,native-image-generation-repair-check.js,official-subagent-workflow-check.js,package-published-contract-check.js,packlist-performance-check.js,pipeline-codex-native-doctor-mad-routing-check.js,pipeline-codex-native-doctor-mad-routing-real-blackbox.js,pipeline-codex-native-image-routing-check.js,pipeline-codex-native-image-routing-real-blackbox.js,pipeline-codex-native-loop-routing-check.js,pipeline-codex-native-loop-routing-real-blackbox.js,pipeline-codex-native-qa-routing-check.js,pipeline-codex-native-qa-routing-real-blackbox.js,pipeline-codex-native-research-routing-check.js,pipeline-codex-native-research-routing-real-blackbox.js,ppt-full-e2e-blackbox-check.js,ppt-real-export-adapter-check.js,ppt-real-imagegen-smoke-check.js,ppt-real-imagegen-wiring-check.js,ppt-reexport-rereview-check.js,prepublish-fast-check.js,prepublish-release-check-or-fast.js,probe-memoization-check.js,product-design-plugin-routing-check.js,prompt-placeholder-guard-check.js,proof-root-cause-policy-check.js,provider-badge-context-check.js,python-codex-sdk-all-pipelines-check.js,qa-loop-app-handoff-capability-check.js,qa-loop-app-handoff-check.js,qa-loop-app-handoff-cli-check.js,qa-loop-app-handoff-confirmation-check.js,qa-loop-app-handoff-gate-lifecycle-check.js,qa-loop-app-handoff-launch-check.js,qa-loop-app-handoff-status-lifecycle-check.js,qa-loop-budget-policy-check.js,qa-loop-effort-escalation-check.js,qa-loop-execution-profile-routing-check.js,qa-loop-image-path-exposure-check.js,qa-loop-image-path-prompt-injection-check.js,release-affected-selector-check.js,release-aggressive-resource-governor-check.js,release-cache-glob-hashing-check.js,release-cache-input-classifier-check.js,release-cache-neutralization-report-check.js,release-cache-version-neutral-fixture-check.js,release-check-stamp.js,release-dynamic-presets-check.js,release-full-parallelism-blackbox.js,release-gate-batch-runner-check.js,release-gate-budget-check.js,release-gate-dag-runner-check.js,release-gate-dag-runner.js,release-latency-slo-check.js,release-metadata-check.js,release-pack-receipt.js,release-parallel-speed-budget-check.js,release-proof-truth-check.js,release-provenance-check.js,release-real-check.js,release-runtime-truth-matrix-check.js,release-speed-summary.js,research-blueprint-densifier-check.js,research-claim-builder-check.js,research-complete-package-fixture-check.js,research-execution-profile-routing-check.js,research-final-reviewer-blackbox.js,responses-retry-policy-centralized-check.js,runtime-proof-summary-check.js,runtime-script-pack-closure-check.js,scheduler-batch-dispatch-check.js,scheduler-parallel-proof-consistency-check.js,scheduler-utilization-integral-check.js,search-visibility-gate-lib.js,secret-preservation-check.js,seo-audit-fixture-check.js,seo-cli-blackbox-check.js,seo-geo-geo-disambiguation-check.js,seo-geo-route-identity-check.js,seo-geo-skill-rich-content-check.js,seo-no-mutation-by-default-check.js,shared-memory-fixture-check.js,side-effect-runtime-report-check.js,skill-name-canonicalizer-check.js,skills-manifest-continuity-check.js,sks-cli-gate-lib.js}",
|
|
40
|
+
"dist/scripts/{agent-guidance-dedup-check.js,agent-message-bus-reader-check.js,all-feature-deep-completion-check.js,appshots-thread-attachment-discovery-check.js,architecture-guard-check.js,certificate-sla-check.js,check-runtime-schemas.js,cli-output-consistency-check.js,codex-0-134-runner-truth-check.js,codex-0-137-compat-check.js,codex-0138-capability-artifact-check.js,codex-0138-capability-check.js,codex-0138-doctor-check.js,codex-0138-feature-probes-check.js,codex-0144-app-server-v2-check.js,codex-0144-binary-identity-check.js,codex-0144-capability-check.js,codex-0144-core-real-probes-check.js,codex-0144-manifest-check.js,codex-0144-policy-check.js,codex-0144-thread-store-check.js,codex-agent-role-rich-content-check.js,codex-agent-role-sync-check.js,codex-agent-type-routing-check.js,codex-app-execution-profile-check.js,codex-app-fast-ui-preservation-check.js,codex-app-handoff-check.js,codex-app-handoff-launch-check.js,codex-config-load-probe.js,context-graph-check.js,codex-control-all-pipelines-check.js,codex-control-event-stream-ledger-check.js,codex-control-tool-output-continuity-audit-check.js,codex-lb-catalog-passthrough-check.js,codex-lb-desktop-auth-invariant-check.js,codex-lb-desktop-bridge-check.js,codex-lb-desktop-bridge-latency-check.js,codex-lb-desktop-capabilities-check.js,codex-lb-desktop-real-evidence-check.js,codex-lb-fast-mode-truth-check.js,codex-lb-fast-ui-preservation-check.js,codex-lb-gpt56-fast-profile-check.js,codex-native-agent-role-content-check.js,codex-native-feature-broker-blackbox.js,codex-native-feature-broker-check.js,codex-native-harness-compat-check.js,codex-native-hook-lifecycle-proof-check.js,codex-native-runtime-e2e-fixture.js,codex-plugin-app-template-policy-check.js,codex-sdk-all-pipelines-check.js,codex-sdk-backend-router-check.js,codex-sdk-capability-check.js,codex-sdk-event-stream-ledger-check.js,codex-sdk-real-smoke-check.js,concurrent-session-collision-check.js,context7-evidence-dedupe-check.js,core-skill-card-schema-check.js,core-skill-deployment-snapshot-check.js,core-skill-heldout-validation-check.js,core-skill-no-inference-optimizer-check.js,core-skill-patch-check.js,core-skill-route-runtime-integration-check.js,current-command-surface-check.js,current-surface-update-e2e-check.js,current-upgrade-matrix-check.js,dfix-fixture-check.js,dfix-patch-handoff-check.js,dfix-verification-check.js,dfix-verification-recommendation-check.js,docs-truthfulness-check.js,doctor-codex-app-harness-check.js,doctor-fix-proves-codex-read-check.js,doctor-fixes-codex-app-fast-ui-check.js,evidence-flagship-coverage-check.js,fast-codex-service-tier-proof-check.js,fixtures/fake-codex-config-loader.js,gate-policy-audit-check.js,geo-claim-evidence-check.js,geo-cli-blackbox-check.js,geo-crawler-policy-check.js,git-worktree-checkpoint-check.js,git-worktree-cross-rebase-check.js,git-worktree-diff-envelope-check.js,git-worktree-dirty-lock-check.js,git-worktree-dirty-main-detection-check.js,git-worktree-integration-primary-check.js,git-worktree-manifest-append-check.js,git-worktree-untracked-diff-check.js,goal-artifact-compat-check.js,harness-benchmark-check.js,helper-dedup-check.js,hook-latency-budget-check.js,image-artifact-path-contract-check.js,imagegen-real-smoke-check.js,init-deep-backup-retention-check.js,installed-package-smoke-check.js,legacy-gate-inventory-check.js,legacy-gate-purge-check.js,legacy-strong-inventory-check.js,lib/codex-sdk-gate-lib.js,lib/ensure-dist-fresh.js,lib/git-worktree-fixture.js,lib/valid-png-fixture.js,local-collab-all-pipelines-final-gpt-check.js,loop-directive-check-lib.js,loop-integration-finalizer-check.js,loop-worker-fixture-child.js,mad-preflight-blocks-unreadable-config-check.js,mad-sks-app-ui-no-mutation-check.js}",
|
|
41
|
+
"dist/scripts/{latest-version-guidance-check.js,mad-sks-launch-sql-plane-boundary-check.js,mad-sks-sql-plane-capability-check.js,mad-sks-sql-plane-lifecycle-hook-decision-check.js,mad-sks-sql-plane-result-lifecycle-check.js,managed-config-merge-check.js,mcp-plugin-inventory-check.js,model-call-concurrency-check.js,mutation-callsite-coverage-check.js,naruto-ssot-gate-aliases-check.js,naruto-ssot-pipeline-default-check.js,naruto-ssot-route-normalization-check.js,naruto-ssot-routing-check.js,naruto-worktree-coding-blackbox.js,native-capability-repair-matrix-check.js,native-image-generation-repair-check.js,official-subagent-workflow-check.js,package-published-contract-check.js,packlist-performance-check.js,pipeline-codex-native-doctor-mad-routing-check.js,pipeline-codex-native-doctor-mad-routing-real-blackbox.js,pipeline-codex-native-image-routing-check.js,pipeline-codex-native-image-routing-real-blackbox.js,pipeline-codex-native-loop-routing-check.js,pipeline-codex-native-loop-routing-real-blackbox.js,pipeline-codex-native-qa-routing-check.js,pipeline-codex-native-qa-routing-real-blackbox.js,pipeline-codex-native-research-routing-check.js,pipeline-codex-native-research-routing-real-blackbox.js,ppt-full-e2e-blackbox-check.js,ppt-real-export-adapter-check.js,ppt-real-imagegen-smoke-check.js,ppt-real-imagegen-wiring-check.js,ppt-reexport-rereview-check.js,prepublish-fast-check.js,prepublish-release-check-or-fast.js,probe-memoization-check.js,product-design-plugin-routing-check.js,prompt-placeholder-guard-check.js,proof-root-cause-policy-check.js,provider-badge-context-check.js,python-codex-sdk-all-pipelines-check.js,qa-loop-app-handoff-capability-check.js,qa-loop-app-handoff-check.js,qa-loop-app-handoff-cli-check.js,qa-loop-app-handoff-confirmation-check.js,qa-loop-app-handoff-gate-lifecycle-check.js,qa-loop-app-handoff-launch-check.js,qa-loop-app-handoff-status-lifecycle-check.js,qa-loop-budget-policy-check.js,qa-loop-effort-escalation-check.js,qa-loop-execution-profile-routing-check.js,qa-loop-image-path-exposure-check.js,qa-loop-image-path-prompt-injection-check.js,release-affected-selector-check.js,release-aggressive-resource-governor-check.js,release-cache-glob-hashing-check.js,release-cache-input-classifier-check.js,release-cache-neutralization-report-check.js,release-cache-version-neutral-fixture-check.js,release-check-stamp.js,release-dynamic-presets-check.js,release-full-parallelism-blackbox.js,release-gate-batch-runner-check.js,release-gate-budget-check.js,release-gate-dag-runner-check.js,release-gate-dag-runner.js,release-latency-slo-check.js,release-metadata-check.js,release-pack-receipt.js,release-parallel-speed-budget-check.js,release-proof-truth-check.js,release-provenance-check.js,release-real-check.js,release-runtime-truth-matrix-check.js,release-speed-summary.js,research-blueprint-densifier-check.js,research-claim-builder-check.js,research-complete-package-fixture-check.js,research-execution-profile-routing-check.js,research-final-reviewer-blackbox.js,responses-retry-policy-centralized-check.js,runtime-proof-summary-check.js,runtime-script-pack-closure-check.js,scheduler-batch-dispatch-check.js,scheduler-parallel-proof-consistency-check.js,scheduler-utilization-integral-check.js,search-visibility-gate-lib.js,secret-preservation-check.js,seo-audit-fixture-check.js,seo-cli-blackbox-check.js,seo-geo-geo-disambiguation-check.js,seo-geo-route-identity-check.js,seo-geo-skill-rich-content-check.js,seo-no-mutation-by-default-check.js,shared-memory-fixture-check.js,side-effect-runtime-report-check.js,skill-name-canonicalizer-check.js,skills-manifest-continuity-check.js,sks-cli-gate-lib.js}",
|
|
40
42
|
"dist/scripts/{real-execution-check-lib.js,gate-lib.js,runtime-domain-gate-lib.js,typed-routing-gate-lib.js,codex-native-gate-lib.js,skill-fixture-check-lib.js,sks-uninstall-regression-check.js,sksd-daemon-check.js,super-search-provider-interface-check.js,triwiki-cache-key-check.js,triwiki-proof-bank-blackbox.js,triwiki-proof-bank-check.js,triwiki-proof-card-check.js,trust-fixture-check.js,type-surface-codex-app-check.js,ultra-router-auto-router-check.js,uninstall-inventory-check.js,ux-review-extract-wires-real-extractor-check.js,ux-review-imagegen-blackbox-check.js,ux-review-patch-diff-recheck-check.js,ux-review-real-imagegen-smoke-check.js,ux-review-run-wires-imagegen-check.js,wrongness-fixture-check.js,zellij-pane-proof-check.js,zellij-real-session-cleanup-check.js,zellij-real-session-launch-check.js,zellij-screen-proof-check.js}",
|
|
43
|
+
"!dist/core/triwiki/context-graph/benchmark",
|
|
44
|
+
"!dist/core/triwiki/context-graph/optimizer",
|
|
41
45
|
"!dist/core/evidence/flagship-proof-graph-validator.js",
|
|
42
46
|
"!dist/core/agents/agent-ledger-schemas.js",
|
|
43
47
|
"!dist/core/agents/agent-cleanup-executor.js",
|
|
@@ -129,6 +133,7 @@
|
|
|
129
133
|
"skill:dedupe-blackbox": "node ./dist/scripts/project-skill-dedupe-blackbox.js",
|
|
130
134
|
"release:check:affected": "npm run release:ensure-build --silent && node ./dist/scripts/release-gate-dag-runner.js --preset affected --changed-since auto --sla 5m",
|
|
131
135
|
"release:real-check": "node ./dist/scripts/release-real-check.js",
|
|
136
|
+
"codex-lb:desktop-real-evidence": "node ./dist/scripts/codex-lb-desktop-real-evidence-check.js",
|
|
132
137
|
"release:check:fast": "npm run release:ensure-build --silent && node ./dist/scripts/release-gate-dag-runner.js --preset fast --changed-since auto --sla 5m",
|
|
133
138
|
"release:check:confidence": "npm run release:ensure-build --silent && node ./dist/scripts/release-gate-dag-runner.js --preset confidence --changed-since auto --sla 5m",
|
|
134
139
|
"release:check:full": "npm run build:clean --silent && npm test --silent && node ./dist/scripts/release-gate-dag-runner.js --preset release --full && node ./dist/scripts/release-real-check.js --skip-release-check && npm run release:dist-freshness --silent && node ./dist/scripts/release-check-stamp.js write --preset release --full",
|
package/release-gates.v2.json
CHANGED
|
@@ -3816,7 +3816,7 @@
|
|
|
3816
3816
|
},
|
|
3817
3817
|
{
|
|
3818
3818
|
"id": "codex-lb:comprehensive",
|
|
3819
|
-
"command": "node ./dist/scripts/codex-lb-fast-ui-preservation-check.js && node ./dist/scripts/codex-lb-fast-mode-truth-check.js && node --test --test-concurrency=1 dist/core/__tests__/codex-lb-tool-catalog.test.js dist/core/__tests__/codex-lb-transport-security.test.js && node ./dist/scripts/codex-lb-gpt56-fast-profile-check.js",
|
|
3819
|
+
"command": "node ./dist/scripts/codex-lb-desktop-auth-invariant-check.js && node ./dist/scripts/codex-lb-desktop-bridge-check.js && node ./dist/scripts/codex-lb-desktop-bridge-latency-check.js && node ./dist/scripts/codex-lb-catalog-passthrough-check.js && node ./dist/scripts/codex-lb-desktop-capabilities-check.js && node ./dist/scripts/codex-lb-fast-ui-preservation-check.js && node ./dist/scripts/codex-lb-fast-mode-truth-check.js && node --test --test-concurrency=1 dist/core/__tests__/codex-lb-tool-catalog.test.js dist/core/__tests__/codex-lb-transport-security.test.js && node ./dist/scripts/codex-lb-gpt56-fast-profile-check.js",
|
|
3820
3820
|
"deps": [
|
|
3821
3821
|
"codex-app:fast-ui-preservation"
|
|
3822
3822
|
],
|
|
@@ -3831,6 +3831,7 @@
|
|
|
3831
3831
|
"inputs": [
|
|
3832
3832
|
"package.json",
|
|
3833
3833
|
"release-gates.v2.json",
|
|
3834
|
+
"runtime-required-scripts.json",
|
|
3834
3835
|
"src/**",
|
|
3835
3836
|
"schemas/**"
|
|
3836
3837
|
]
|
|
@@ -4662,6 +4663,180 @@
|
|
|
4662
4663
|
"release"
|
|
4663
4664
|
],
|
|
4664
4665
|
"output_contract": "sks.gate-result.v1"
|
|
4666
|
+
},
|
|
4667
|
+
{
|
|
4668
|
+
"id": "context-graph:contract",
|
|
4669
|
+
"command": "node ./dist/scripts/context-graph-check.js --mode contract",
|
|
4670
|
+
"deps": [],
|
|
4671
|
+
"resource": [
|
|
4672
|
+
"cpu-light",
|
|
4673
|
+
"fs-read"
|
|
4674
|
+
],
|
|
4675
|
+
"side_effect": "hermetic",
|
|
4676
|
+
"timeout_ms": 120000,
|
|
4677
|
+
"cache": {
|
|
4678
|
+
"enabled": true,
|
|
4679
|
+
"inputs": [
|
|
4680
|
+
"package.json",
|
|
4681
|
+
"release-gates.v2.json",
|
|
4682
|
+
"schemas/triwiki/context-graph.schema.json",
|
|
4683
|
+
"src/core/triwiki/context-graph/contracts.ts",
|
|
4684
|
+
"src/core/triwiki/context-graph/ids.ts",
|
|
4685
|
+
"src/core/triwiki/context-graph/paths.ts",
|
|
4686
|
+
"src/core/triwiki/context-graph/profiles.ts",
|
|
4687
|
+
"src/core/triwiki/context-graph/query-types.ts",
|
|
4688
|
+
"src/core/triwiki/context-graph/graph-index.ts",
|
|
4689
|
+
"src/core/triwiki/context-graph/extractors/index.ts",
|
|
4690
|
+
"src/core/triwiki/context-graph/query/ranking-config.ts",
|
|
4691
|
+
"src/scripts/context-graph-check.ts"
|
|
4692
|
+
]
|
|
4693
|
+
},
|
|
4694
|
+
"isolation": {
|
|
4695
|
+
"home": "temp",
|
|
4696
|
+
"codex_home": "temp",
|
|
4697
|
+
"report_dir": "per-gate"
|
|
4698
|
+
},
|
|
4699
|
+
"preset": [
|
|
4700
|
+
"release"
|
|
4701
|
+
],
|
|
4702
|
+
"output_contract": "sks.gate-result.v1"
|
|
4703
|
+
},
|
|
4704
|
+
{
|
|
4705
|
+
"id": "context-graph:quality",
|
|
4706
|
+
"command": "node ./dist/scripts/context-graph-check.js --mode quality",
|
|
4707
|
+
"deps": [
|
|
4708
|
+
"context-graph:contract"
|
|
4709
|
+
],
|
|
4710
|
+
"resource": [
|
|
4711
|
+
"cpu-light",
|
|
4712
|
+
"fs-read"
|
|
4713
|
+
],
|
|
4714
|
+
"side_effect": "hermetic",
|
|
4715
|
+
"timeout_ms": 300000,
|
|
4716
|
+
"cache": {
|
|
4717
|
+
"enabled": true,
|
|
4718
|
+
"inputs": [
|
|
4719
|
+
"package.json",
|
|
4720
|
+
"release-gates.v2.json",
|
|
4721
|
+
"config/context-graph-benchmark.json",
|
|
4722
|
+
"src/core/triwiki/context-graph/**",
|
|
4723
|
+
"src/core/naruto/context-graph-advisor.ts",
|
|
4724
|
+
"src/core/naruto/context-graph-advisor-scope.ts",
|
|
4725
|
+
"src/core/search/files.ts",
|
|
4726
|
+
"src/core/search/text.ts",
|
|
4727
|
+
"src/scripts/context-graph-check.ts"
|
|
4728
|
+
]
|
|
4729
|
+
},
|
|
4730
|
+
"isolation": {
|
|
4731
|
+
"home": "temp",
|
|
4732
|
+
"codex_home": "temp",
|
|
4733
|
+
"report_dir": "per-gate"
|
|
4734
|
+
},
|
|
4735
|
+
"preset": [
|
|
4736
|
+
"release"
|
|
4737
|
+
],
|
|
4738
|
+
"output_contract": "sks.gate-result.v1"
|
|
4739
|
+
},
|
|
4740
|
+
{
|
|
4741
|
+
"id": "context-graph:performance",
|
|
4742
|
+
"command": "node ./dist/scripts/context-graph-check.js --mode performance",
|
|
4743
|
+
"deps": [
|
|
4744
|
+
"context-graph:contract"
|
|
4745
|
+
],
|
|
4746
|
+
"resource": [
|
|
4747
|
+
"cpu-light",
|
|
4748
|
+
"fs-read"
|
|
4749
|
+
],
|
|
4750
|
+
"side_effect": "hermetic",
|
|
4751
|
+
"timeout_ms": 300000,
|
|
4752
|
+
"cache": {
|
|
4753
|
+
"enabled": true,
|
|
4754
|
+
"inputs": [
|
|
4755
|
+
"package.json",
|
|
4756
|
+
"release-gates.v2.json",
|
|
4757
|
+
"config/context-graph-benchmark.json",
|
|
4758
|
+
"src/core/triwiki/context-graph/**",
|
|
4759
|
+
"src/core/naruto/context-graph-advisor.ts",
|
|
4760
|
+
"src/core/naruto/context-graph-advisor-scope.ts",
|
|
4761
|
+
"src/core/search/files.ts",
|
|
4762
|
+
"src/core/search/text.ts",
|
|
4763
|
+
"src/scripts/context-graph-check.ts"
|
|
4764
|
+
]
|
|
4765
|
+
},
|
|
4766
|
+
"isolation": {
|
|
4767
|
+
"home": "temp",
|
|
4768
|
+
"codex_home": "temp",
|
|
4769
|
+
"report_dir": "per-gate"
|
|
4770
|
+
},
|
|
4771
|
+
"preset": [
|
|
4772
|
+
"release"
|
|
4773
|
+
],
|
|
4774
|
+
"output_contract": "sks.gate-result.v1"
|
|
4775
|
+
},
|
|
4776
|
+
{
|
|
4777
|
+
"id": "context-graph:legacy-closure",
|
|
4778
|
+
"command": "node ./dist/scripts/context-graph-check.js --mode legacy-closure",
|
|
4779
|
+
"deps": [],
|
|
4780
|
+
"resource": [
|
|
4781
|
+
"cpu-light",
|
|
4782
|
+
"fs-read"
|
|
4783
|
+
],
|
|
4784
|
+
"side_effect": "hermetic",
|
|
4785
|
+
"timeout_ms": 120000,
|
|
4786
|
+
"cache": {
|
|
4787
|
+
"enabled": true,
|
|
4788
|
+
"inputs": [
|
|
4789
|
+
"package.json",
|
|
4790
|
+
"release-gates.v2.json",
|
|
4791
|
+
"src/core/search/context.ts",
|
|
4792
|
+
"src/core/search/context-graph-seeds.ts",
|
|
4793
|
+
"src/core/subagents/triwiki-attention.ts",
|
|
4794
|
+
"src/core/triwiki/code-pack.ts",
|
|
4795
|
+
"src/core/commands/wiki-command.ts",
|
|
4796
|
+
"src/scripts/context-graph-check.ts"
|
|
4797
|
+
]
|
|
4798
|
+
},
|
|
4799
|
+
"isolation": {
|
|
4800
|
+
"home": "temp",
|
|
4801
|
+
"codex_home": "temp",
|
|
4802
|
+
"report_dir": "per-gate"
|
|
4803
|
+
},
|
|
4804
|
+
"preset": [
|
|
4805
|
+
"release"
|
|
4806
|
+
],
|
|
4807
|
+
"output_contract": "sks.gate-result.v1"
|
|
4808
|
+
},
|
|
4809
|
+
{
|
|
4810
|
+
"id": "latest-version:guidance",
|
|
4811
|
+
"command": "node ./dist/scripts/latest-version-guidance-check.js",
|
|
4812
|
+
"deps": [],
|
|
4813
|
+
"resource": [
|
|
4814
|
+
"cpu-light",
|
|
4815
|
+
"fs-read"
|
|
4816
|
+
],
|
|
4817
|
+
"side_effect": "hermetic",
|
|
4818
|
+
"timeout_ms": 120000,
|
|
4819
|
+
"cache": {
|
|
4820
|
+
"enabled": true,
|
|
4821
|
+
"inputs": [
|
|
4822
|
+
"package.json",
|
|
4823
|
+
"release-gates.v2.json",
|
|
4824
|
+
"README.md",
|
|
4825
|
+
"docs/**",
|
|
4826
|
+
"src/**",
|
|
4827
|
+
"native/**",
|
|
4828
|
+
"src/scripts/latest-version-guidance-check.ts"
|
|
4829
|
+
]
|
|
4830
|
+
},
|
|
4831
|
+
"isolation": {
|
|
4832
|
+
"home": "temp",
|
|
4833
|
+
"codex_home": "temp",
|
|
4834
|
+
"report_dir": "per-gate"
|
|
4835
|
+
},
|
|
4836
|
+
"preset": [
|
|
4837
|
+
"release"
|
|
4838
|
+
],
|
|
4839
|
+
"output_contract": "sks.gate-result.v1"
|
|
4665
4840
|
}
|
|
4666
4841
|
]
|
|
4667
4842
|
}
|
|
@@ -7,6 +7,36 @@
|
|
|
7
7
|
"category": "installed_repair",
|
|
8
8
|
"reason": "installed doctor and repair paths probe whether Codex can load the managed project config"
|
|
9
9
|
},
|
|
10
|
+
{
|
|
11
|
+
"path": "dist/scripts/codex-lb-catalog-passthrough-check.js",
|
|
12
|
+
"category": "installed_runtime",
|
|
13
|
+
"reason": "the installed public release gate DAG verifies catalog v2 pass-through against the packaged runtime"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"path": "dist/scripts/codex-lb-desktop-auth-invariant-check.js",
|
|
17
|
+
"category": "installed_runtime",
|
|
18
|
+
"reason": "the installed public release gate DAG verifies Desktop OAuth byte preservation and guarded rollback behavior"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "dist/scripts/codex-lb-desktop-bridge-check.js",
|
|
22
|
+
"category": "installed_runtime",
|
|
23
|
+
"reason": "the installed public release gate DAG verifies the packaged localhost Desktop bridge transports and redaction"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "dist/scripts/codex-lb-desktop-bridge-latency-check.js",
|
|
27
|
+
"category": "installed_runtime",
|
|
28
|
+
"reason": "the installed public release gate DAG enforces localhost-only Desktop bridge HTTP and SSE latency budgets"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "dist/scripts/codex-lb-desktop-capabilities-check.js",
|
|
32
|
+
"category": "installed_runtime",
|
|
33
|
+
"reason": "the installed public release gate DAG verifies capability evidence state boundaries in the packaged runtime"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "dist/scripts/codex-lb-desktop-real-evidence-check.js",
|
|
37
|
+
"category": "installed_runtime",
|
|
38
|
+
"reason": "the installed full release proof fails closed unless trusted real Codex Desktop evidence covers native features, lifecycle recovery, and the remote other-Mac runtime"
|
|
39
|
+
},
|
|
10
40
|
{
|
|
11
41
|
"path": "dist/scripts/lib/ensure-dist-fresh.js",
|
|
12
42
|
"category": "installed_repair",
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://sneakoscope.dev/schemas/triwiki/context-graph.schema.json",
|
|
4
|
+
"title": "sks.context-graph.v1",
|
|
5
|
+
"description": "Compiled TriWiki Context Graph snapshot. This is a generated cache: every edge carries provenance back to repository truth. The v1 suffix is a machine schema revision, not a product version recommendation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema", "schemaRevision", "snapshotHash", "nodes", "edges", "cycles", "extractors", "nodeCount", "edgeCount"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": { "const": "sks.context-graph.v1" },
|
|
11
|
+
"schemaRevision": { "type": "string", "minLength": 1 },
|
|
12
|
+
"snapshotHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
13
|
+
"nodeCount": { "type": "integer", "minimum": 0 },
|
|
14
|
+
"edgeCount": { "type": "integer", "minimum": 0 },
|
|
15
|
+
"nodes": { "type": "array", "items": { "$ref": "#/definitions/node" } },
|
|
16
|
+
"edges": { "type": "array", "items": { "$ref": "#/definitions/edge" } },
|
|
17
|
+
"cycles": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["id", "nodes"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"id": { "type": "string", "minLength": 1 },
|
|
25
|
+
"nodes": { "type": "array", "minItems": 2, "items": { "type": "string", "minLength": 1 } }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"extractors": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["id", "revision", "nodeCount", "edgeCount", "issueCount", "skippedCount"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"id": { "type": "string", "minLength": 1 },
|
|
37
|
+
"revision": { "type": "string", "minLength": 1 },
|
|
38
|
+
"nodeCount": { "type": "integer", "minimum": 0 },
|
|
39
|
+
"edgeCount": { "type": "integer", "minimum": 0 },
|
|
40
|
+
"issueCount": { "type": "integer", "minimum": 0 },
|
|
41
|
+
"skippedCount": { "type": "integer", "minimum": 0 }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"definitions": {
|
|
47
|
+
"relativePosixPath": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"not": { "pattern": "^(?:/|~|[A-Za-z]:/)|(?:^|/)\\.\\.(?:/|$)|\\\\" }
|
|
51
|
+
},
|
|
52
|
+
"node": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["id", "kind", "label", "trust", "freshness", "risk", "tokenCost", "metadata"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"id": { "type": "string", "minLength": 1 },
|
|
58
|
+
"kind": {
|
|
59
|
+
"enum": ["file", "symbol", "module", "command", "route", "pipeline", "test", "gate", "schema", "config", "wiki_claim", "source", "proof", "risk_domain"]
|
|
60
|
+
},
|
|
61
|
+
"label": { "type": "string", "minLength": 1 },
|
|
62
|
+
"path": { "$ref": "#/definitions/relativePosixPath" },
|
|
63
|
+
"locator": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"properties": {
|
|
67
|
+
"line": { "type": "integer", "minimum": 1 },
|
|
68
|
+
"column": { "type": "integer", "minimum": 1 },
|
|
69
|
+
"endLine": { "type": "integer", "minimum": 1 },
|
|
70
|
+
"endColumn": { "type": "integer", "minimum": 1 }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"contentHash": { "type": "string", "pattern": "^[a-f0-9]{8,64}$" },
|
|
74
|
+
"trust": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
75
|
+
"freshness": { "enum": ["fresh", "stale", "unknown"] },
|
|
76
|
+
"risk": { "enum": ["low", "medium", "high", "protected"] },
|
|
77
|
+
"tokenCost": { "type": "integer", "minimum": 0 },
|
|
78
|
+
"metadata": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": {
|
|
81
|
+
"anyOf": [
|
|
82
|
+
{ "type": "string" },
|
|
83
|
+
{ "type": "number" },
|
|
84
|
+
{ "type": "boolean" },
|
|
85
|
+
{ "type": "null" },
|
|
86
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"edge": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"required": ["id", "from", "to", "type", "confidence", "provenance", "observedAt"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"id": { "type": "string", "minLength": 1 },
|
|
98
|
+
"from": { "type": "string", "minLength": 1 },
|
|
99
|
+
"to": { "type": "string", "minLength": 1 },
|
|
100
|
+
"type": {
|
|
101
|
+
"enum": ["contains", "defines", "imports", "reexports", "references", "calls", "depends_on", "routes_to", "owns", "tests", "verified_by", "gated_by", "affected_by", "cites", "derived_from", "supports", "contradicts", "supersedes", "invalidates", "cochanged_with", "conflicts_with"]
|
|
102
|
+
},
|
|
103
|
+
"confidence": { "enum": ["exact", "syntactic", "manifest", "observed", "derived"] },
|
|
104
|
+
"observedAt": { "type": "string", "minLength": 1 },
|
|
105
|
+
"provenance": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"required": ["path", "hash", "extractor"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"path": { "$ref": "#/definitions/relativePosixPath" },
|
|
111
|
+
"line": { "type": "integer", "minimum": 1 },
|
|
112
|
+
"hash": { "type": "string", "pattern": "^[a-f0-9]{8,64}$" },
|
|
113
|
+
"extractor": { "type": "string", "minLength": 1 }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { packageRoot, writeTextAtomic } from '../core/fsx.js';
|
|
3
|
-
import { hasCodexUnstableFeatureWarningSuppression, hasDeprecatedCodexHooksFeatureFlag, hasTopLevelCodexModeLock } from './install-tool-helpers.js';
|
|
4
|
-
import { maybePromptCodexLbSetupForLaunch } from './install-helpers.js';
|
|
5
|
-
import { checkCodexLbResponseChain } from './install-helpers-codex-lb-chain.js';
|
|
6
|
-
import { hasTopLevelCodexLbSelected } from './install-helpers-codex-lb-shared.js';
|
|
7
|
-
async function safeReadText(file, fallback = '') {
|
|
8
|
-
try {
|
|
9
|
-
return await import('node:fs/promises').then((fsp) => fsp.readFile(file, 'utf8'));
|
|
10
|
-
}
|
|
11
|
-
catch {
|
|
12
|
-
return fallback;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export async function runCodexLbLaunchChainSelftest(input) {
|
|
16
|
-
const { tmp, codexLbHome, codexLbFakeBin, codexLbConfig } = input;
|
|
17
|
-
process.env.SKS_CODEX_LB_AUTOBYPASS = '1';
|
|
18
|
-
let autobypassLaunch;
|
|
19
|
-
try {
|
|
20
|
-
autobypassLaunch = (await maybePromptCodexLbSetupForLaunch([], {
|
|
21
|
-
home: codexLbHome,
|
|
22
|
-
apiKey: 'sk-test',
|
|
23
|
-
codexBin: path.join(codexLbFakeBin, 'codex'),
|
|
24
|
-
syncLaunchEnv: false,
|
|
25
|
-
timeoutMs: 1000,
|
|
26
|
-
fetch: async (_url, init) => {
|
|
27
|
-
const body = JSON.parse(init.body);
|
|
28
|
-
if (!body.previous_response_id)
|
|
29
|
-
return new Response(JSON.stringify({ id: 'resp_autobypass_first' }), { status: 200, headers: { 'content-type': 'application/json' } });
|
|
30
|
-
return new Response(JSON.stringify({ error: { type: 'server_error', code: 'internal_error', message: 'simulated upstream failure' } }), { status: 500, headers: { 'content-type': 'application/json' } });
|
|
31
|
-
}
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
finally {
|
|
35
|
-
delete process.env.SKS_CODEX_LB_AUTOBYPASS;
|
|
36
|
-
}
|
|
37
|
-
if (autobypassLaunch.status !== 'chain_unhealthy' || autobypassLaunch.bypass_codex_lb !== true || autobypassLaunch.chain_health?.status !== 'second_request_failed')
|
|
38
|
-
throw new Error('selftest: SKS_CODEX_LB_AUTOBYPASS=1 should bypass codex-lb on hard chain failure');
|
|
39
|
-
await writeTextAtomic(path.join(codexLbHome, '.codex', 'config.toml'), 'service_tier = "fast"\n');
|
|
40
|
-
await writeTextAtomic(path.join(codexLbHome, '.codex', 'sks-codex-lb.env'), "export CODEX_LB_BASE_URL='https://lb.example.test/backend-api/codex'\nexport CODEX_LB_API_KEY='sk-test'\n");
|
|
41
|
-
const missingProviderLaunchCalls = [];
|
|
42
|
-
const missingProviderLaunch = await maybePromptCodexLbSetupForLaunch([], {
|
|
43
|
-
home: codexLbHome,
|
|
44
|
-
apiKey: 'sk-test',
|
|
45
|
-
codexBin: path.join(codexLbFakeBin, 'codex'),
|
|
46
|
-
syncLaunchEnv: false,
|
|
47
|
-
timeoutMs: 1000,
|
|
48
|
-
fetch: async (url, init) => {
|
|
49
|
-
missingProviderLaunchCalls.push({ url, body: JSON.parse(init.body) });
|
|
50
|
-
return new Response(JSON.stringify({ id: missingProviderLaunchCalls.length === 1 ? 'resp_missing_provider_1' : 'resp_missing_provider_2' }), { status: 200, headers: { 'content-type': 'application/json' } });
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
const missingProviderRepairedConfig = await safeReadText(path.join(codexLbHome, '.codex', 'config.toml'));
|
|
54
|
-
if (!missingProviderLaunch.ok || missingProviderLaunch.status !== 'present' || missingProviderLaunch.chain_health?.status !== 'chain_ok' || missingProviderLaunchCalls.length !== 2 || !hasTopLevelCodexLbSelected(missingProviderRepairedConfig) || !missingProviderRepairedConfig.includes('[model_providers.codex-lb]') || !missingProviderRepairedConfig.includes('env_key = "CODEX_LB_API_KEY"') || !missingProviderRepairedConfig.includes('supports_websockets = true') || !missingProviderRepairedConfig.includes('requires_openai_auth = true') || !missingProviderRepairedConfig.includes('name = "openai"'))
|
|
55
|
-
throw new Error('selftest: bare sks launch did not restore codex-lb provider block to current App contract');
|
|
56
|
-
const chainCalls = [];
|
|
57
|
-
const okChain = await checkCodexLbResponseChain({ base_url: 'https://lb.example.test/backend-api/codex', env_path: path.join(codexLbHome, '.codex', 'sks-codex-lb.env') }, {
|
|
58
|
-
apiKey: 'sk-test',
|
|
59
|
-
timeoutMs: 1000,
|
|
60
|
-
fetch: async (url, init) => {
|
|
61
|
-
chainCalls.push({ url, body: JSON.parse(init.body) });
|
|
62
|
-
return new Response(JSON.stringify({ id: chainCalls.length === 1 ? 'resp_selftest_1' : 'resp_selftest_2' }), { status: 200, headers: { 'content-type': 'application/json' } });
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
if (!okChain.ok || okChain.status !== 'chain_ok' || chainCalls.length !== 2 || !String(chainCalls[0].url).endsWith('/backend-api/codex/responses') || chainCalls[1].body.previous_response_id !== 'resp_selftest_1')
|
|
66
|
-
throw new Error('selftest: codex-lb response chain health check did not verify previous_response_id continuity');
|
|
67
|
-
const previousGlobalFetch = globalThis.fetch;
|
|
68
|
-
const cacheCalls = [];
|
|
69
|
-
const cachePath = path.join(codexLbHome, '.codex', 'chain-cache-selftest.json');
|
|
70
|
-
try {
|
|
71
|
-
globalThis.fetch = async (url, init) => {
|
|
72
|
-
cacheCalls.push({ url, body: JSON.parse(init.body) });
|
|
73
|
-
return new Response(JSON.stringify({ id: cacheCalls.length === 1 ? 'resp_cache_1' : 'resp_cache_2' }), { status: 200, headers: { 'content-type': 'application/json' } });
|
|
74
|
-
};
|
|
75
|
-
const cacheStatus = { base_url: 'https://cache.example.test/backend-api/codex', env_path: path.join(codexLbHome, '.codex', 'sks-codex-lb.env') };
|
|
76
|
-
const firstCache = await checkCodexLbResponseChain(cacheStatus, { home: codexLbHome, apiKey: 'sk-test', timeoutMs: 1000, cachePath, now: () => 1000 });
|
|
77
|
-
const secondCache = await checkCodexLbResponseChain(cacheStatus, { home: codexLbHome, apiKey: 'sk-test', timeoutMs: 1000, cachePath, now: () => 2000 });
|
|
78
|
-
if (!firstCache.ok || firstCache.status !== 'chain_ok' || secondCache.cached !== true || secondCache.status !== 'chain_ok' || cacheCalls.length !== 2)
|
|
79
|
-
throw new Error('selftest: codex-lb response chain cache did not avoid repeated launch preflight calls');
|
|
80
|
-
}
|
|
81
|
-
finally {
|
|
82
|
-
globalThis.fetch = previousGlobalFetch;
|
|
83
|
-
}
|
|
84
|
-
const brokenChain = await checkCodexLbResponseChain({ base_url: 'https://lb.example.test/backend-api/codex', env_path: path.join(codexLbHome, '.codex', 'sks-codex-lb.env') }, {
|
|
85
|
-
apiKey: 'sk-test',
|
|
86
|
-
timeoutMs: 1000,
|
|
87
|
-
fetch: async (_url, init) => {
|
|
88
|
-
const body = JSON.parse(init.body);
|
|
89
|
-
if (!body.previous_response_id)
|
|
90
|
-
return new Response(JSON.stringify({ id: 'resp_missing_selftest' }), { status: 200, headers: { 'content-type': 'application/json' } });
|
|
91
|
-
return new Response(JSON.stringify({ error: { type: 'invalid_request_error', code: 'previous_response_not_found', message: 'Previous response not found.', param: 'previous_response_id' } }), { status: 400, headers: { 'content-type': 'application/json' } });
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
if (brokenChain.ok || brokenChain.status !== 'previous_response_not_found' || brokenChain.chain_unhealthy !== true)
|
|
95
|
-
throw new Error('selftest: codex-lb response chain health check did not detect previous_response_not_found');
|
|
96
|
-
const legacyStamps = ['remote_control = true', 'fast_mode_ui = true', 'codex_git_commit = true', '[user.fast_mode]', '[profiles.sks-fast-high]', 'fast_default_opt_out = true'];
|
|
97
|
-
const survivingLegacy = legacyStamps.filter((stamp) => codexLbConfig.includes(stamp));
|
|
98
|
-
const stableCapabilityStamps = ['computer_use = true', 'browser_use = true', 'browser_use_external = true', 'image_generation = true', 'in_app_browser = true', 'guardian_approval = true', 'tool_suggest = true', 'plugins = true'];
|
|
99
|
-
const missingStableCapabilities = stableCapabilityStamps.filter((stamp) => !codexLbConfig.includes(stamp));
|
|
100
|
-
if (!codexLbConfig.includes('hooks = true') || hasDeprecatedCodexHooksFeatureFlag(codexLbConfig) || /(?:^|\n)\s*multi_agent\s*=/.test(codexLbConfig) || !codexLbConfig.includes('fast_mode = true') || !codexLbConfig.includes('apps = true') || survivingLegacy.length || missingStableCapabilities.length || !/\[profiles\.custom\][\s\S]*?model_reasoning_effort = "low"/.test(codexLbConfig) || hasTopLevelCodexModeLock(codexLbConfig))
|
|
101
|
-
throw new Error(`selftest: codex-lb setup did not enforce the current feature-flag contract${survivingLegacy.length ? ` — surviving legacy stamps: ${survivingLegacy.join(', ')}` : ''}${missingStableCapabilities.length ? ` — missing stable capabilities: ${missingStableCapabilities.join(', ')}` : ''}`);
|
|
102
|
-
if (!hasCodexUnstableFeatureWarningSuppression(codexLbConfig))
|
|
103
|
-
throw new Error('selftest: codex-lb setup did not suppress Codex unstable feature warning');
|
|
104
|
-
const codexLbLaunch = `source ${path.join(tmp, '.codex', 'sks-codex-lb.env')} && codex`;
|
|
105
|
-
if (!codexLbLaunch.includes('sks-codex-lb.env'))
|
|
106
|
-
throw new Error('selftest: Zellij launch command does not source codex-lb env file');
|
|
107
|
-
if (codexLbLaunch.includes('--model'))
|
|
108
|
-
throw new Error('selftest: Zellij launch command without an explicit model must inherit the Codex selection');
|
|
109
|
-
const madLaunchSource = await safeReadText(path.join(packageRoot(), 'src', 'core', 'commands', 'mad-sks-command.js'));
|
|
110
|
-
if (!madLaunchSource.includes('const lb = await deps.maybePromptCodexLbSetupForLaunch(args)') || !madLaunchSource.includes("const launchLb = lb.status === 'present'") || !madLaunchSource.includes('codexLbImmediateLaunchOpts(cleanArgs, launchLb') || !madLaunchSource.includes('bypass_codex_lb') || !madLaunchSource.includes('model_provider="openai"') || !madLaunchSource.includes('codexLbFreshSession: true'))
|
|
111
|
-
throw new Error('selftest: MAD launch does not sync codex-lb auth and fresh-session launch options');
|
|
112
|
-
}
|