sneakoscope 5.1.2 → 5.5.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.
Files changed (97) hide show
  1. package/README.md +5 -1
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/crates/sks-core/src/main.rs +1 -1
  5. package/dist/bin/sks.js +1 -1
  6. package/dist/commands/doctor.js +32 -3
  7. package/dist/config/skills-manifest.json +58 -58
  8. package/dist/core/agents/agent-lifecycle.js +5 -3
  9. package/dist/core/agents/agent-orchestrator.js +14 -2
  10. package/dist/core/agents/agent-proof-evidence.js +16 -0
  11. package/dist/core/agents/native-cli-worker.js +0 -1
  12. package/dist/core/bench.js +24 -2
  13. package/dist/core/codex-app/sks-menubar.js +526 -133
  14. package/dist/core/commands/agent-command.js +35 -1
  15. package/dist/core/commands/basic-cli.js +61 -4
  16. package/dist/core/commands/command-utils.js +14 -4
  17. package/dist/core/commands/goal-command.js +3 -0
  18. package/dist/core/commands/image-ux-review-command.js +4 -1
  19. package/dist/core/commands/mad-sks-command.js +10 -1
  20. package/dist/core/commands/menubar-command.js +2 -1
  21. package/dist/core/commands/naruto-command.js +12 -7
  22. package/dist/core/commands/ppt-command.js +40 -1
  23. package/dist/core/commands/qa-loop-command.js +4 -1
  24. package/dist/core/commands/release-command.js +3 -3
  25. package/dist/core/commands/research-command.js +4 -0
  26. package/dist/core/commands/route-success-helpers.js +2 -0
  27. package/dist/core/commands/run-command.js +22 -5
  28. package/dist/core/commands/seo-command.js +31 -4
  29. package/dist/core/db-safety.js +8 -1
  30. package/dist/core/doctor/doctor-dirty-planner.js +51 -7
  31. package/dist/core/feature-fixture-executor.js +262 -0
  32. package/dist/core/feature-fixtures.js +95 -52
  33. package/dist/core/fsx.js +1 -1
  34. package/dist/core/loops/loop-decomposer.js +4 -3
  35. package/dist/core/loops/loop-planner.js +7 -3
  36. package/dist/core/loops/loop-worker-runtime.js +6 -0
  37. package/dist/core/naruto/naruto-real-worker-child.js +1 -1
  38. package/dist/core/pipeline-internals/runtime-gates.js +39 -3
  39. package/dist/core/proof/selftest-proof-fixtures.js +8 -0
  40. package/dist/core/providers/glm/naruto/glm-naruto-requirement-coverage.js +18 -1
  41. package/dist/core/providers/glm/naruto/glm-naruto-requirement-ledger.js +28 -12
  42. package/dist/core/questions.js +12 -10
  43. package/dist/core/release/release-gate-node.js +2 -0
  44. package/dist/core/routes.js +11 -0
  45. package/dist/core/stop-gate/stop-gate-check.js +4 -0
  46. package/dist/core/stop-gate/stop-gate-writer.js +4 -0
  47. package/dist/core/trust-kernel/trust-report.js +10 -1
  48. package/dist/core/update/update-migration-state.js +23 -3
  49. package/dist/core/version.js +1 -1
  50. package/dist/core/work-order-ledger.js +60 -0
  51. package/dist/core/zellij/zellij-slot-telemetry.js +1 -1
  52. package/dist/scripts/doctor-context7-mcp-repair-blackbox.js +16 -0
  53. package/dist/scripts/doctor-fix-production-blackbox.js +26 -0
  54. package/dist/scripts/doctor-startup-config-repair-blackbox.js +13 -0
  55. package/dist/scripts/doctor-supabase-mcp-repair-blackbox.js +14 -0
  56. package/dist/scripts/gate-policy-audit-check.js +2 -2
  57. package/dist/scripts/naruto-real-active-pool-runtime-check.js +26 -1
  58. package/dist/scripts/packlist-performance-check.js +7 -1
  59. package/dist/scripts/project-skill-dedupe-blackbox.js +36 -0
  60. package/dist/scripts/release-dag-full-coverage-check.js +1 -1
  61. package/dist/scripts/release-gate-existence-audit.js +1 -1
  62. package/dist/scripts/release-gate-planner.js +1 -1
  63. package/dist/scripts/release-gate-script-parity-check.js +44 -16
  64. package/dist/scripts/release-metadata-1-19-check.js +2 -2
  65. package/dist/scripts/sks-menubar-install-check.js +57 -20
  66. package/dist/scripts/supabase-secret-preservation-blackbox.js +29 -0
  67. package/dist/scripts/update-preserves-supabase-keys-blackbox.js +27 -0
  68. package/dist/scripts/zellij-slot-telemetry-runtime-check.js +1 -0
  69. package/package.json +12 -65
  70. package/schemas/release/release-gate-node.schema.json +1 -0
  71. package/bench/tasks/t01-off-by-one/repo/package.json +0 -9
  72. package/bench/tasks/t01-off-by-one/repo/src/pagination.js +0 -5
  73. package/bench/tasks/t01-off-by-one/repo/test.js +0 -5
  74. package/bench/tasks/t01-off-by-one/task.json +0 -13
  75. package/bench/tasks/t02-signature-cochange/repo/package.json +0 -9
  76. package/bench/tasks/t02-signature-cochange/repo/src/admin.js +0 -5
  77. package/bench/tasks/t02-signature-cochange/repo/src/audit.js +0 -5
  78. package/bench/tasks/t02-signature-cochange/repo/src/labels.js +0 -3
  79. package/bench/tasks/t02-signature-cochange/repo/src/profile.js +0 -5
  80. package/bench/tasks/t02-signature-cochange/repo/test.js +0 -9
  81. package/bench/tasks/t02-signature-cochange/task.json +0 -12
  82. package/bench/tasks/t03-type-puzzle/repo/package.json +0 -9
  83. package/bench/tasks/t03-type-puzzle/repo/src/config.js +0 -4
  84. package/bench/tasks/t03-type-puzzle/repo/test.js +0 -6
  85. package/bench/tasks/t03-type-puzzle/task.json +0 -13
  86. package/bench/tasks/t04-refactor-preserve/repo/package.json +0 -9
  87. package/bench/tasks/t04-refactor-preserve/repo/src/cart.js +0 -8
  88. package/bench/tasks/t04-refactor-preserve/repo/test.js +0 -4
  89. package/bench/tasks/t04-refactor-preserve/task.json +0 -12
  90. package/bench/tasks/t05-performance/repo/package.json +0 -9
  91. package/bench/tasks/t05-performance/repo/src/pairs.js +0 -9
  92. package/bench/tasks/t05-performance/repo/test.js +0 -11
  93. package/bench/tasks/t05-performance/task.json +0 -12
  94. package/bench/tasks/t06-mistake-rule/repo/package.json +0 -9
  95. package/bench/tasks/t06-mistake-rule/repo/src/loader.js +0 -6
  96. package/bench/tasks/t06-mistake-rule/repo/test.js +0 -7
  97. package/bench/tasks/t06-mistake-rule/task.json +0 -12
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import os from 'node:os';
3
3
  import path from 'node:path';
4
- import { PACKAGE_VERSION } from '../core/fsx.js';
4
+ import { PACKAGE_VERSION, runProcess, which } from '../core/fsx.js';
5
5
  import { installSksMenuBar } from '../core/codex-app/sks-menubar.js';
6
6
  const temp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-menubar-check-'));
7
7
  const envHomeTemp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-menubar-env-home-check-'));
@@ -44,22 +44,30 @@ const actionScript = result.action_script_path ? await fs.readFile(result.action
44
44
  const launchAgentSource = result.launch_agent_path ? await fs.readFile(result.launch_agent_path, 'utf8').catch(() => '') : '';
45
45
  const infoPlistPath = result.app_path ? path.join(result.app_path, 'Contents', 'Info.plist') : null;
46
46
  const infoPlist = infoPlistPath ? await fs.readFile(infoPlistPath, 'utf8').catch(() => '') : '';
47
+ const swiftParse = await swiftParseSmoke(generatedSourcePath);
47
48
  const commandRegistry = await fs.readFile(path.join(process.cwd(), 'src', 'cli', 'command-registry.ts'), 'utf8');
48
49
  const installHelpers = await fs.readFile(path.join(process.cwd(), 'src', 'cli', 'install-helpers.ts'), 'utf8');
50
+ const cltMissing = process.platform === 'darwin' && result.blockers.includes('xcode_clt_missing');
49
51
  const hasVisibleStatusSource = generatedSource.includes('NSStatusItem.variableLength')
50
52
  && generatedSource.includes('configureStatusButton(button, title: state.title)')
51
53
  && generatedSource.includes('SKS ⚠')
52
54
  && generatedSource.includes('SKS ↑')
55
+ && generatedSource.includes('SKS ⋯')
53
56
  && generatedSource.includes('Timer.scheduledTimer(withTimeInterval: 30.0');
54
57
  const hasBackgroundReadonlyActions = generatedSource.includes('runSksBackground(["codex-lb", "fast-check"]')
55
58
  && generatedSource.includes('runSksBackground(["update", "check"]')
56
59
  && generatedSource.includes('display notification')
57
- && !generatedSource.includes('@objc func fastCheck() {\n runSksInTerminal');
58
- const hasTerminalFailureAlert = generatedSource.includes('output.contains("-1743")')
59
- && generatedSource.includes('Privacy & Security > Automation');
60
- const hasTerminalExit = generatedSource.includes('; exit');
60
+ && !generatedSource.includes('runSksInTerminal')
61
+ && !generatedSource.includes('runInTerminal');
62
+ const hasNativeModalSource = generatedSource.includes('func promptText(title: String, message: String')
63
+ && generatedSource.includes('NSSecureTextField')
64
+ && generatedSource.includes('stdinText: key + "\\n"');
65
+ const hasActionLogSource = generatedSource.includes('lastActionLogPath')
66
+ && generatedSource.includes('.posixPermissions: 0o600')
67
+ && generatedSource.includes('redactSecrets');
61
68
  const hasAutosaveNameSource = generatedSource.includes('statusItem.autosaveName = "com.sneakoscope.sks-menubar"');
62
- const hasExplicitVisibleSource = generatedSource.includes('statusItem.isVisible = true');
69
+ const hasCodexLifecycleSource = generatedSource.includes('Codex app not detected — sync disabled')
70
+ || (generatedSource.includes('NSWorkspace.didLaunchApplicationNotification') && generatedSource.includes('NSWorkspace.didTerminateApplicationNotification'));
63
71
  const hasNoUnconditionalKeepAlive = !launchAgentSource.includes('<key>KeepAlive</key>');
64
72
  const hasNoLaunchAgentSecrets = !launchAgentSource.includes('EnvironmentVariables')
65
73
  && !launchAgentSource.includes('CODEX_LB_API_KEY')
@@ -69,11 +77,13 @@ const hasInteractiveProcessType = launchAgentSource.includes('<key>ProcessType</
69
77
  const hasPackagePlistVersion = infoPlist.includes(`<string>${PACKAGE_VERSION}</string>`)
70
78
  && infoPlist.includes('<key>CFBundleShortVersionString</key>')
71
79
  && infoPlist.includes('<key>CFBundleVersion</key>');
72
- const hasActionFallbacks = actionScript.includes('.nvm/versions/node/*/bin/node(Nn[-1])')
80
+ const hasActionFallbacks = actionScript.includes('command -v sks')
81
+ && actionScript.includes('npm root -g')
82
+ && actionScript.includes('.nvm/versions/node/*/lib/node_modules/sneakoscope/dist/bin/sks.js')
73
83
  && actionScript.includes('/bin/zsh -lc')
74
- && actionScript.includes('command -v sks');
75
- const hasEntryWarning = result.warnings.includes('sks_entry_project_local_ignored_global_package_used')
76
- || result.warnings.includes('sks_entry_resolved_under_project_root');
84
+ && actionScript.includes('exit 127')
85
+ && actionScript.includes('display notification');
86
+ const hasEntryWarning = result.warnings.includes('sks_entry_project_local');
77
87
  const hasBuildStamp = buildStampExists
78
88
  && result.build_stamp?.package_version === PACKAGE_VERSION
79
89
  && result.build_stamp?.codesign_identifier === 'com.sneakoscope.sks-menubar';
@@ -94,7 +104,8 @@ const expectedMenuItems = [
94
104
  'Set OpenRouter Key and GLM Profiles',
95
105
  'Fast Check',
96
106
  'SKS Version Check',
97
- 'Update SKS Now'
107
+ 'Update SKS Now',
108
+ 'View Last Log'
98
109
  ];
99
110
  const missingExpectedItems = expectedMenuItems.filter((item) => !result.menu_items.includes(item));
100
111
  const hasExpectedItems = missingExpectedItems.length === 0;
@@ -110,8 +121,9 @@ const launchSkippedForTempInstall = result.launch?.requested === false
110
121
  && envHomeResult.warnings.includes('launch_skipped_temp_install');
111
122
  const preferredPositionSkippedForTempInstall = !result.actions.includes('seeded SKS menu bar preferred position')
112
123
  && !envHomeResult.actions.includes('seeded SKS menu bar preferred position');
113
- const ok = process.platform === 'darwin'
114
- ? result.ok === true
124
+ const darwinOk = cltMissing
125
+ ? swiftParse.status === 'skipped' && swiftParse.reason === 'xcode_clt_missing'
126
+ : result.ok === true
115
127
  && result.status === 'installed_launch_skipped'
116
128
  && secondResult.ok === true
117
129
  && envHomeResult.ok === true
@@ -122,10 +134,10 @@ const ok = process.platform === 'darwin'
122
134
  && hasExpectedItems
123
135
  && hasVisibleStatusSource
124
136
  && hasBackgroundReadonlyActions
125
- && hasTerminalFailureAlert
126
- && hasTerminalExit
137
+ && hasNativeModalSource
138
+ && hasActionLogSource
127
139
  && hasAutosaveNameSource
128
- && hasExplicitVisibleSource
140
+ && hasCodexLifecycleSource
129
141
  && hasNoUnconditionalKeepAlive
130
142
  && hasNoLaunchAgentSecrets
131
143
  && hasInteractiveProcessType
@@ -133,6 +145,7 @@ const ok = process.platform === 'darwin'
133
145
  && hasActionFallbacks
134
146
  && hasEntryWarning
135
147
  && hasBuildStamp
148
+ && swiftParse.ok === true
136
149
  && isIdempotent
137
150
  && hasCommandRegistry
138
151
  && noLaunchctlSecretSetenv
@@ -140,7 +153,9 @@ const ok = process.platform === 'darwin'
140
153
  && launchSkippedForTempHome
141
154
  && launchSkippedForEnvHome
142
155
  && launchSkippedForTempInstall
143
- && preferredPositionSkippedForTempInstall
156
+ && preferredPositionSkippedForTempInstall;
157
+ const ok = process.platform === 'darwin'
158
+ ? darwinOk
144
159
  : result.ok === true && result.status === 'unsupported_platform';
145
160
  const report = {
146
161
  schema: 'sks.sks-menubar-install-check.v1',
@@ -157,10 +172,10 @@ const report = {
157
172
  generated_source_path: generatedSourcePath,
158
173
  has_visible_status_source: hasVisibleStatusSource,
159
174
  has_background_readonly_actions: hasBackgroundReadonlyActions,
160
- has_terminal_failure_alert: hasTerminalFailureAlert,
161
- has_terminal_exit: hasTerminalExit,
175
+ has_native_modal_source: hasNativeModalSource,
176
+ has_action_log_source: hasActionLogSource,
162
177
  has_autosave_name_source: hasAutosaveNameSource,
163
- has_explicit_visible_source: hasExplicitVisibleSource,
178
+ has_codex_lifecycle_source: hasCodexLifecycleSource,
164
179
  has_no_unconditional_keepalive: hasNoUnconditionalKeepAlive,
165
180
  has_no_launch_agent_secrets: hasNoLaunchAgentSecrets,
166
181
  has_interactive_process_type: hasInteractiveProcessType,
@@ -168,6 +183,7 @@ const report = {
168
183
  has_action_fallbacks: hasActionFallbacks,
169
184
  has_entry_warning: hasEntryWarning,
170
185
  has_build_stamp: hasBuildStamp,
186
+ swift_parse: swiftParse,
171
187
  is_idempotent: isIdempotent,
172
188
  has_command_registry: hasCommandRegistry,
173
189
  no_launchctl_secret_setenv: noLaunchctlSecretSetenv,
@@ -193,4 +209,25 @@ async function exists(file) {
193
209
  return false;
194
210
  }
195
211
  }
212
+ async function swiftParseSmoke(sourcePath) {
213
+ if (process.platform !== 'darwin')
214
+ return { ok: true, status: 'skipped', reason: 'not_macos' };
215
+ const xcodeSelect = await which('xcode-select').catch(() => null) || '/usr/bin/xcode-select';
216
+ const clt = await runProcess(xcodeSelect, ['-p'], { timeoutMs: 5_000, maxOutputBytes: 8 * 1024 })
217
+ .catch((err) => ({ code: 1, stdout: '', stderr: err?.message || String(err) }));
218
+ if (clt.code !== 0)
219
+ return { ok: true, status: 'skipped', reason: 'xcode_clt_missing', code: clt.code, error: String(clt.stderr || clt.stdout || '').trim() };
220
+ if (!sourcePath)
221
+ return { ok: false, status: 'failed', reason: 'source_missing' };
222
+ const swiftc = await which('swiftc').catch(() => null) || '/usr/bin/swiftc';
223
+ const parsed = await runProcess(swiftc, ['-parse', sourcePath], { timeoutMs: 30_000, maxOutputBytes: 32 * 1024 })
224
+ .catch((err) => ({ code: 1, stdout: '', stderr: err?.message || String(err) }));
225
+ return {
226
+ ok: parsed.code === 0,
227
+ status: parsed.code === 0 ? 'parsed' : 'failed',
228
+ reason: parsed.code === 0 ? null : 'swift_parse_failed',
229
+ code: parsed.code,
230
+ error: parsed.code === 0 ? null : String(parsed.stderr || parsed.stdout || '').trim()
231
+ };
232
+ }
196
233
  //# sourceMappingURL=sks-menubar-install-check.js.map
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { assertGate, emitGate, makeTempRoot, writeText } from './sks-3-1-8-check-lib.js';
5
+ import { captureSecretPreservationSnapshot, withSecretPreservationGuard } from '../core/config/secret-preservation.js';
6
+ const root = await makeTempRoot('sks-supabase-blackbox-');
7
+ const envFile = path.join(root, '.env.local');
8
+ await writeText(envFile, 'NEXT_PUBLIC_SUPABASE_URL=https://example.supabase.co\nNEXT_PUBLIC_SUPABASE_ANON_KEY=super-secret-anon\n');
9
+ const before = await captureSecretPreservationSnapshot({ root });
10
+ await withSecretPreservationGuard(root, 'blackbox-preserve', async () => {
11
+ await fs.appendFile(envFile, 'SKS_MANAGED=true\n', 'utf8');
12
+ });
13
+ const after = await captureSecretPreservationSnapshot({ root });
14
+ assertGate(JSON.stringify(before.fingerprints.map((fp) => fp.value_sha256).sort()) === JSON.stringify(after.fingerprints.map((fp) => fp.value_sha256).sort()), 'Supabase secret fingerprints must remain stable across guarded update', { before, after });
15
+ assertGate(!JSON.stringify(after).includes('super-secret-anon'), 'reports must not include raw Supabase values', after);
16
+ let blocked = false;
17
+ try {
18
+ await withSecretPreservationGuard(root, 'blackbox-change', async () => {
19
+ await fs.writeFile(envFile, 'NEXT_PUBLIC_SUPABASE_URL=https://example.supabase.co\nNEXT_PUBLIC_SUPABASE_ANON_KEY=mutated-secret\n', 'utf8');
20
+ });
21
+ }
22
+ catch {
23
+ blocked = true;
24
+ }
25
+ const restored = await fs.readFile(envFile, 'utf8');
26
+ assertGate(blocked, 'Supabase value mutation must be blocked after rollback');
27
+ assertGate(restored.includes('super-secret-anon') && !restored.includes('mutated-secret'), 'Supabase value mutation must be rolled back');
28
+ emitGate('secret:supabase-preservation-blackbox');
29
+ //# sourceMappingURL=supabase-secret-preservation-blackbox.js.map
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { assertGate, emitGate, makeTempRoot, writeText } from './sks-3-1-8-check-lib.js';
5
+ import { withSecretPreservationGuard } from '../core/config/config-migration-journal.js';
6
+ const root = await makeTempRoot('sks-update-supabase-');
7
+ const envFile = path.join(root, '.env.local');
8
+ await writeText(envFile, 'NEXT_PUBLIC_SUPABASE_URL=https://example.supabase.co\nNEXT_PUBLIC_SUPABASE_ANON_KEY=update-secret\n');
9
+ await withSecretPreservationGuard(root, 'update-fixture', async () => {
10
+ await fs.appendFile(envFile, 'SKS_UPDATE_MARKER=1\n', 'utf8');
11
+ });
12
+ const text = await fs.readFile(envFile, 'utf8');
13
+ assertGate(text.includes('update-secret'), 'update fixture must preserve Supabase key value in source file');
14
+ let blocked = false;
15
+ try {
16
+ await withSecretPreservationGuard(root, 'update-fixture-mutates-secret', async () => {
17
+ await fs.writeFile(envFile, 'NEXT_PUBLIC_SUPABASE_URL=https://example.supabase.co\nNEXT_PUBLIC_SUPABASE_ANON_KEY=mutated-update-secret\n', 'utf8');
18
+ });
19
+ }
20
+ catch {
21
+ blocked = true;
22
+ }
23
+ const restored = await fs.readFile(envFile, 'utf8');
24
+ assertGate(blocked, 'update guard must block Supabase key value mutation');
25
+ assertGate(restored.includes('update-secret') && !restored.includes('mutated-update-secret'), 'update guard must restore Supabase key value after mutation');
26
+ emitGate('update:preserves-supabase-keys');
27
+ //# sourceMappingURL=update-preserves-supabase-keys-blackbox.js.map
@@ -19,5 +19,6 @@ for (const event of requiredEvents) {
19
19
  assertGate(swarm.includes('appendZellijSlotTelemetry'), 'session swarm must append Zellij slot telemetry');
20
20
  assertGate(worker.includes('appendZellijSlotTelemetry'), 'native worker must append Zellij slot telemetry');
21
21
  assertGate(worker.includes('startWorkerProgressTelemetry'), 'native worker must emit progress telemetry during backend runtime');
22
+ assertGate(!/progress:\s*\{\s*done:\s*tick,\s*total:\s*0/.test(worker), 'heartbeat ticks must not be reported as progress done/total counters');
22
23
  emitGate('zellij:slot-telemetry-runtime', { lifecycle_events: requiredEvents.length, progress_pump: true });
23
24
  //# sourceMappingURL=zellij-slot-telemetry-runtime-check.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "ㅅㅋㅅ",
4
- "version": "5.1.2",
4
+ "version": "5.5.0",
5
5
  "description": "Sneakoscope Codex: fast proof-first Codex trust layer with image-based Voxel TriWiki.",
6
6
  "type": "module",
7
7
  "homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
@@ -34,10 +34,16 @@
34
34
  "!dist/**/__tests__",
35
35
  "!dist/**/*.test.js",
36
36
  "!dist/scripts/*blackbox*.js",
37
+ "dist/scripts/doctor-context7-mcp-repair-blackbox.js",
38
+ "dist/scripts/doctor-fix-production-blackbox.js",
39
+ "dist/scripts/doctor-startup-config-repair-blackbox.js",
40
+ "dist/scripts/doctor-supabase-mcp-repair-blackbox.js",
41
+ "dist/scripts/project-skill-dedupe-blackbox.js",
42
+ "dist/scripts/supabase-secret-preservation-blackbox.js",
43
+ "dist/scripts/update-preserves-supabase-keys-blackbox.js",
37
44
  "!dist/vendor/openai-codex/rust-v0.131.0",
38
45
  "config/codex-releases/rust-v0.142.0.json",
39
46
  "config/bench-baseline.json",
40
- "bench/tasks",
41
47
  "schemas",
42
48
  "!schemas/codex/app-server-0.142/**",
43
49
  "schemas/codex/app-server-0.142/codex_app_server_protocol.v2.schemas.json",
@@ -57,6 +63,8 @@
57
63
  "build": "npm run build:clean",
58
64
  "build:clean": "node -e \"const fs=require('fs'); fs.rmSync('dist',{recursive:true,force:true}); fs.rmSync('.sneakoscope/cache/tsbuildinfo',{recursive:true,force:true})\" && tsc -p tsconfig.json && node ./dist/scripts/ensure-bin-executable.js && node ./dist/scripts/build-dist.js",
59
65
  "build:incremental": "tsc -p tsconfig.json && node ./dist/scripts/ensure-bin-executable.js && node ./dist/scripts/build-dist.js",
66
+ "test": "node --test --test-concurrency=1 dist/core/__tests__/*.test.js dist/core/proof/__tests__/*.test.js dist/core/stop-gate/__tests__/*.test.js dist/core/commands/__tests__/*.test.js dist/core/dfix/__tests__/*.test.js dist/core/ppt/__tests__/*.test.js dist/core/mad-sks/__tests__/*.test.js dist/core/codex-app/__tests__/*.test.js dist/core/doctor/__tests__/*.test.js dist/cli/__tests__/*.test.js",
67
+ "selftest:real": "node ./dist/bin/sks.js selftest --real --json",
60
68
  "check": "npm run release:check:affected",
61
69
  "dev:sks": "npm run build:incremental --silent && node ./dist/bin/sks.js",
62
70
  "prepublishOnly": "npm run release:check:affected",
@@ -67,6 +75,8 @@
67
75
  "release:check": "npm run release:check:affected --silent",
68
76
  "release:metadata": "node ./dist/scripts/release-metadata-check.js",
69
77
  "release:gate-script-parity": "node ./dist/scripts/release-gate-script-parity-check.js",
78
+ "ppt:real-imagegen-wiring": "node ./dist/scripts/ppt-real-imagegen-wiring-check.js",
79
+ "ux-review:run-wires-imagegen": "node ./dist/scripts/ux-review-run-wires-imagegen-check.js",
70
80
  "release:check:parallel": "npm run build --silent && node ./dist/scripts/release-parallel-check.js && node ./dist/scripts/release-check-stamp.js write",
71
81
  "release:check:legacy": "npm run release:check:parallel --silent",
72
82
  "release:dag-full-coverage": "node ./dist/scripts/release-dag-full-coverage-check.js",
@@ -116,60 +126,6 @@
116
126
  "feature:check": "node ./dist/bin/sks.js features check --json",
117
127
  "feature-quality:check": "node ./dist/scripts/check-feature-quality.js --release",
118
128
  "all-features:selftest": "node ./dist/bin/sks.js all-features selftest --mock --json",
119
- "doctor:imagegen-repair": "node ./dist/scripts/doctor-imagegen-repair-check.js",
120
- "image-fidelity:check": "node ./dist/scripts/image-fidelity-fixture-check.js",
121
- "imagegen:capability": "node ./dist/scripts/imagegen-capability-check.js",
122
- "imagegen:gpt-image-2-request-validator": "node ./dist/scripts/gpt-image-2-request-validator-check.js",
123
- "ux-review:run-wires-imagegen": "node ./dist/scripts/ux-review-run-wires-imagegen-check.js",
124
- "ux-review:extract-wires-real-extractor": "node ./dist/scripts/ux-review-extract-wires-real-extractor-check.js",
125
- "ux-review:patch-diff-recheck": "node ./dist/scripts/ux-review-patch-diff-recheck-check.js",
126
- "ux-review:imagegen-blackbox": "node ./dist/scripts/ux-review-imagegen-blackbox-check.js",
127
- "ux-review:real-loop-fixture": "node ./dist/scripts/ux-review-real-loop-fixture-check.js",
128
- "ppt:real-export-adapter": "node ./dist/scripts/ppt-real-export-adapter-check.js",
129
- "ppt:real-imagegen-wiring": "node ./dist/scripts/ppt-real-imagegen-wiring-check.js",
130
- "ppt:reexport-rereview": "node ./dist/scripts/ppt-reexport-rereview-check.js",
131
- "ppt:full-e2e-blackbox": "node ./dist/scripts/ppt-full-e2e-blackbox-check.js",
132
- "ppt:full-e2e-artifact-graph": "node ./dist/scripts/ppt-full-e2e-artifact-graph-check.js",
133
- "ppt:imagegen-blackbox": "node ./dist/scripts/ppt-imagegen-blackbox-check.js",
134
- "ux-ppt:structured-extraction": "node ./dist/scripts/ux-ppt-structured-extraction-check.js",
135
- "dfix:patch-handoff": "node ./dist/scripts/dfix-patch-handoff-check.js",
136
- "dfix:verification-recommendation": "node ./dist/scripts/dfix-verification-recommendation-check.js",
137
- "dfix:fast-kernel": "node ./dist/scripts/dfix-fast-kernel-check.js",
138
- "dfix:blackbox-fast": "node ./dist/scripts/dfix-fast-blackbox-check.js",
139
- "dfix:performance": "node ./dist/scripts/dfix-performance-check.js",
140
- "dfix:parallel-write-blackbox": "node ./dist/scripts/dfix-parallel-write-blackbox.js",
141
- "all-features:deep-completion": "node ./dist/scripts/all-feature-deep-completion-check.js",
142
- "evidence:flagship-coverage": "node ./dist/scripts/evidence-flagship-coverage-check.js",
143
- "ux-review:generate-callouts-fixture": "node ./dist/scripts/ux-review-generate-callouts-fixture-check.js",
144
- "ux-review:extract-real-callouts-fixture": "node ./dist/scripts/ux-review-extract-real-callouts-fixture-check.js",
145
- "ux-review:patch-handoff-fixture": "node ./dist/scripts/ux-review-patch-handoff-fixture-check.js",
146
- "ux-review:recapture-recheck-fixture": "node ./dist/scripts/ux-review-recapture-recheck-fixture-check.js",
147
- "ux-review:no-text-fallback": "node ./dist/scripts/ux-review-no-text-fallback-check.js",
148
- "ux-review:no-fake-callouts": "node ./dist/scripts/ux-review-no-fake-callouts-check.js",
149
- "ux-review:image-voxel-relations": "node ./dist/scripts/ux-review-image-voxel-relations-check.js",
150
- "ppt:imagegen-review-fixture": "node ./dist/scripts/ppt-imagegen-review-fixture-check.js",
151
- "ppt:slide-export-fixture": "node ./dist/scripts/ppt-slide-export-fixture-check.js",
152
- "ppt:no-text-fallback": "node ./dist/scripts/ppt-no-text-fallback-check.js",
153
- "ppt:no-mock-as-real": "node ./dist/scripts/ppt-no-mock-as-real-check.js",
154
- "ppt:issue-extraction-fixture": "node ./dist/scripts/ppt-issue-extraction-fixture-check.js",
155
- "ppt:image-voxel-relations": "node ./dist/scripts/ppt-image-voxel-relations-check.js",
156
- "ppt:proof-trust-fixture": "node ./dist/scripts/ppt-proof-trust-fixture-check.js",
157
- "dfix:fixture": "node ./dist/scripts/dfix-fixture-check.js",
158
- "dfix:verification": "node ./dist/scripts/dfix-verification-check.js",
159
- "all-features:completion": "node ./dist/bin/sks.js all-features complete --json",
160
- "json-schema:recursive-check": "node ./dist/scripts/json-schema-recursive-check.js",
161
- "trust:check": "node ./dist/bin/sks.js trust validate latest --json || node ./dist/scripts/trust-fixture-check.js",
162
- "wrongness:check": "node ./dist/bin/sks.js wrongness validate project --json && node ./dist/scripts/wrongness-fixture-check.js",
163
- "git-hygiene:check": "node ./dist/bin/sks.js git doctor --json",
164
- "shared-memory:check": "node ./dist/bin/sks.js wiki validate-shared --json || node ./dist/scripts/shared-memory-fixture-check.js",
165
- "evidence:check": "node ./dist/scripts/evidence-fixture-check.js",
166
- "codex-app:handoff": "node ./dist/scripts/codex-app-handoff-check.js",
167
- "qa-loop:app-handoff": "node ./dist/scripts/qa-loop-app-handoff-check.js",
168
- "qa-loop:app-handoff-capability": "node ./dist/scripts/qa-loop-app-handoff-capability-check.js",
169
- "qa-loop:app-handoff-cli": "node ./dist/scripts/qa-loop-app-handoff-cli-check.js",
170
- "qa-loop:image-path-exposure": "node ./dist/scripts/qa-loop-image-path-exposure-check.js",
171
- "qa-loop:effort-escalation": "node ./dist/scripts/qa-loop-effort-escalation-check.js",
172
- "qa-loop:budget-policy": "node ./dist/scripts/qa-loop-budget-policy-check.js",
173
129
  "naruto:real-active-pool-runtime": "node ./dist/scripts/naruto-real-active-pool-runtime-check.js",
174
130
  "bench": "node ./dist/scripts/coding-bench-check.js",
175
131
  "release:check:bench": "npm run build:incremental --silent && npm run bench --silent",
@@ -179,15 +135,6 @@
179
135
  "release:check:full": "npm run build:clean --silent && node ./dist/scripts/release-gate-dag-runner.js --preset release --full && node ./dist/scripts/release-gate-dag-runner.js --preset bench --full && node ./dist/scripts/release-check-stamp.js write",
180
136
  "publish:prep-ignore-scripts": "npm run prepublishOnly",
181
137
  "publish:ignore-scripts": "npm run publish:prep-ignore-scripts && npm publish --ignore-scripts",
182
- "naruto:ssot-gate-aliases": "node ./dist/scripts/naruto-ssot-gate-aliases-check.js",
183
- "codex-app:handoff-launch": "node ./dist/scripts/codex-app-handoff-launch-check.js",
184
- "qa-loop:app-handoff-launch": "node ./dist/scripts/qa-loop-app-handoff-launch-check.js",
185
- "qa-loop:app-handoff-confirmation": "node ./dist/scripts/qa-loop-app-handoff-confirmation-check.js",
186
- "qa-loop:app-handoff-status-lifecycle": "node ./dist/scripts/qa-loop-app-handoff-status-lifecycle-check.js",
187
- "qa-loop:app-handoff-gate-lifecycle": "node ./dist/scripts/qa-loop-app-handoff-gate-lifecycle-check.js",
188
- "qa-loop:image-path-prompt-injection": "node ./dist/scripts/qa-loop-image-path-prompt-injection-check.js",
189
- "loop:integration-finalizer": "node ./dist/scripts/loop-integration-finalizer-check.js",
190
- "qa-loop:execution-profile-routing": "node ./dist/scripts/qa-loop-execution-profile-routing-check.js",
191
138
  "gates:run": "node ./dist/scripts/release-gate-dag-runner.js",
192
139
  "policy:gate-audit": "node ./dist/scripts/gate-policy-audit-check.js"
193
140
  },
@@ -24,6 +24,7 @@
24
24
  "side_effect": { "enum": ["hermetic", "real-env"] },
25
25
  "timeout_ms": { "type": "integer", "minimum": 1 },
26
26
  "output_contract": { "const": "sks.gate-result.v1" },
27
+ "contract_note": { "type": "string", "minLength": 1 },
27
28
  "cache": {
28
29
  "type": "object",
29
30
  "required": ["enabled", "inputs"],
@@ -1,9 +0,0 @@
1
- {
2
- "name": "bench-t01-off-by-one",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "test": "node test.js"
8
- }
9
- }
@@ -1,5 +0,0 @@
1
- export function paginate(items, page, pageSize) {
2
- const start = Math.max(0, (page - 1) * pageSize);
3
- const end = Math.min(items.length - 1, start + pageSize);
4
- return items.slice(start, end);
5
- }
@@ -1,5 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import { paginate } from './src/pagination.js';
3
-
4
- assert.deepEqual(paginate([1, 2, 3, 4, 5], 3, 2), [5]);
5
- assert.deepEqual(paginate([1, 2, 3, 4], 2, 2), [3, 4]);
@@ -1,13 +0,0 @@
1
- {
2
- "schema": "sks.bench-task.v1",
3
- "id": "t01-off-by-one",
4
- "kind": "bugfix",
5
- "prompt": "pagination이 마지막 페이지 항목 1개를 누락한다. 재현 테스트를 먼저 추가하고 고쳐라.",
6
- "success": {
7
- "command": "npm test --silent",
8
- "must_pass": true,
9
- "must_contain_new_test": true,
10
- "max_diff_lines": 60,
11
- "forbidden_patterns": ["catch \\{\\s*\\}"]
12
- }
13
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "bench-t02-signature-cochange",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "test": "node test.js"
8
- }
9
- }
@@ -1,5 +0,0 @@
1
- import { formatUserLabel } from './labels.js';
2
-
3
- export function adminLabel(user) {
4
- return formatUserLabel(user.name);
5
- }
@@ -1,5 +0,0 @@
1
- import { formatUserLabel } from './labels.js';
2
-
3
- export function auditLabel(user) {
4
- return formatUserLabel(user.name);
5
- }
@@ -1,3 +0,0 @@
1
- export function formatUserLabel(name) {
2
- return name.trim();
3
- }
@@ -1,5 +0,0 @@
1
- import { formatUserLabel } from './labels.js';
2
-
3
- export function profileLabel(user) {
4
- return formatUserLabel(user.name);
5
- }
@@ -1,9 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import { adminLabel } from './src/admin.js';
3
- import { auditLabel } from './src/audit.js';
4
- import { profileLabel } from './src/profile.js';
5
-
6
- const user = { name: ' Mina ', role: 'admin' };
7
- assert.equal(adminLabel(user), 'Mina (admin)');
8
- assert.equal(auditLabel(user), 'Mina (admin)');
9
- assert.equal(profileLabel(user), 'Mina (admin)');
@@ -1,12 +0,0 @@
1
- {
2
- "schema": "sks.bench-task.v1",
3
- "id": "t02-signature-cochange",
4
- "kind": "feature",
5
- "prompt": "formatUserLabel이 role을 받도록 시그니처를 바꾸고 참조 3곳을 함께 수정하라.",
6
- "success": {
7
- "command": "npm test --silent",
8
- "must_pass": true,
9
- "max_diff_lines": 90,
10
- "forbidden_patterns": ["catch \\{\\s*\\}"]
11
- }
12
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "bench-t03-type-puzzle",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "test": "node test.js"
8
- }
9
- }
@@ -1,4 +0,0 @@
1
- export function parsePort(value, fallback = 3000) {
2
- const parsed = Number(value);
3
- return parsed || fallback;
4
- }
@@ -1,6 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import { parsePort } from './src/config.js';
3
-
4
- assert.equal(parsePort('0'), 0);
5
- assert.equal(parsePort('8080'), 8080);
6
- assert.equal(parsePort(''), 3000);
@@ -1,13 +0,0 @@
1
- {
2
- "schema": "sks.bench-task.v1",
3
- "id": "t03-type-puzzle",
4
- "kind": "bugfix",
5
- "prompt": "parsePort가 숫자 0을 유효한 값으로 처리하지 못한다. 회귀 테스트를 추가하고 고쳐라.",
6
- "success": {
7
- "command": "npm test --silent",
8
- "must_pass": true,
9
- "must_contain_new_test": true,
10
- "max_diff_lines": 60,
11
- "forbidden_patterns": ["Number\\([^)]*\\) \\|\\|"]
12
- }
13
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "bench-t04-refactor-preserve",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "test": "node test.js"
8
- }
9
- }
@@ -1,8 +0,0 @@
1
- export function totalCart(lines) {
2
- let total = 0;
3
- for (const line of lines) {
4
- total += line.price * line.qty;
5
- if (line.discount) total -= line.price * line.qty * line.discount;
6
- }
7
- return Math.round(total * 100) / 100;
8
- }
@@ -1,4 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import { totalCart } from './src/cart.js';
3
-
4
- assert.equal(totalCart([{ price: 10, qty: 2 }, { price: 5, qty: 1, discount: 0.2 }]), 24);
@@ -1,12 +0,0 @@
1
- {
2
- "schema": "sks.bench-task.v1",
3
- "id": "t04-refactor-preserve",
4
- "kind": "refactor",
5
- "prompt": "cart total 계산을 더 읽기 쉽게 리팩터하되 동작은 보존하라.",
6
- "success": {
7
- "command": "npm test --silent",
8
- "must_pass": true,
9
- "max_diff_lines": 80,
10
- "forbidden_patterns": ["TODO", "console\\.log"]
11
- }
12
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "bench-t05-performance",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "test": "node test.js"
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- export function countPairs(values, target) {
2
- let count = 0;
3
- for (let i = 0; i < values.length; i += 1) {
4
- for (let j = i + 1; j < values.length; j += 1) {
5
- if (values[i] + values[j] === target) count += 1;
6
- }
7
- }
8
- return count;
9
- }
@@ -1,11 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import { performance } from 'node:perf_hooks';
3
- import { countPairs } from './src/pairs.js';
4
-
5
- assert.equal(countPairs([1, 2, 3, 4], 5), 2);
6
- const values = Array.from({ length: 6000 }, (_, index) => index % 200);
7
- const started = performance.now();
8
- const count = countPairs(values, 199);
9
- const elapsed = performance.now() - started;
10
- assert.equal(count, 90000);
11
- assert.ok(elapsed < 250, `too slow: ${elapsed}ms`);
@@ -1,12 +0,0 @@
1
- {
2
- "schema": "sks.bench-task.v1",
3
- "id": "t05-performance",
4
- "kind": "bugfix",
5
- "prompt": "countPairs가 큰 입력에서 시간 초과된다. 동작을 유지하면서 기준 시간 안에 들어오게 고쳐라.",
6
- "success": {
7
- "command": "npm test --silent",
8
- "must_pass": true,
9
- "max_diff_lines": 80,
10
- "forbidden_patterns": ["setTimeout", "catch \\{\\s*\\}"]
11
- }
12
- }
@@ -1,9 +0,0 @@
1
- {
2
- "name": "bench-t06-mistake-rule",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "test": "node test.js"
8
- }
9
- }
@@ -1,6 +0,0 @@
1
- export async function loadJson(readText) {
2
- try {
3
- return JSON.parse(await readText());
4
- } catch (err) {}
5
- return null;
6
- }
@@ -1,7 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import fs from 'node:fs/promises';
3
- import { loadJson } from './src/loader.js';
4
-
5
- const source = await fs.readFile(new URL('./src/loader.js', import.meta.url), 'utf8');
6
- assert.ok(!/catch\s*\([^)]*\)\s*\{\s*\}/.test(source), 'empty catch must be removed');
7
- await assert.rejects(() => loadJson(async () => '{bad json'));