100x is a skill by a former Cursor engineer that turns prompts into formally verified, production-ready code
Print solo paths with forward slashes, and let the judge finish before its test folder goes
Dead Internet0d2f39120418
diff --git a/lib/commands/solo.mjs b/lib/commands/solo.mjsindex cc6a12e..2c65428 100644--- a/lib/commands/solo.mjs+++ b/lib/commands/solo.mjs@@ -2,6 +2,7 @@ import fs from 'node:fs';import path from 'node:path';import { parseArgs } from 'node:util';import { CliError } from '../errors.mjs';+import { posix } from '../paths.mjs';import { readRun, requireRoot } from '../project.mjs';import { challengeFile, challengeStatus, neededChallenges } from '../solo-check.mjs';import { CHALLENGES, CHALLENGE_NAMES, QUESTION, challengeTemplate, isSolo } from '../solo.mjs';@@ -44,10 +45,10 @@ function check(root, json) {function write(root, name) {if (!CHALLENGE_NAMES.includes(name ?? '')) throw new CliError(`100x solo new takes ${CHALLENGE_NAMES.join(', ')}. Got "${name ?? ''}".`);const file = challengeFile(root, name);- if (fs.existsSync(file)) throw new CliError(`${path.relative(root, file)} already exists. Open it and add to it. A second look from another seat goes under "## Recheck". Nothing was overwritten.`);+ if (fs.existsSync(file)) throw new CliError(`${posix(path.relative(root, file))} already exists. Open it and add to it. A second look from another seat goes under "## Recheck". Nothing was overwritten.`);fs.mkdirSync(path.dirname(file), { recursive: true });fs.writeFileSync(file, challengeTemplate(name));- console.log(`Wrote ${path.relative(root, file)}. ${CHALLENGES[name].stage}.`);+ console.log(`Wrote ${posix(path.relative(root, file))}. ${CHALLENGES[name].stage}.`);console.log(`Seat: ${CHALLENGES[name].seat}.`);console.log(`Read only: ${CHALLENGES[name].read}.`);console.log(QUESTION);diff --git a/test/delegate.test.mjs b/test/delegate.test.mjsindex 39d52c2..84c5e5f 100644--- a/test/delegate.test.mjs+++ b/test/delegate.test.mjs@@ -102,7 +102,7 @@ test('the SDK line never prints a 1m window, and the JSON carries it next to thebox.cleanup();});-test('review-call, review-run and night next refuse a target outside the lock or on 1m, and review-run spawns nothing', () => {+test('review-call, review-run and night next refuse a target outside the lock or on 1m, and review-run spawns nothing', async () => {const box = sandbox();makeProject(box);const run = (...args) => cli(args, { cwd: box.project, env: box.env });@@ -153,6 +153,10 @@ test('review-call, review-run and night next refuse a target outside the lock orassert.equal(run('config', 'set', 'review.command', JSON.stringify(plain), '--global').code, 0);// and the locked selection starts the judgeassert.equal(run('review-run').code, 0);+ // the judge runs on its own after the call returns: let it finish before its folder is deleted from under it+ const end = Date.now() + 15000;+ while (JSON.parse(run('review-run', '--status', '--json').out).state === 'running' && Date.now() < end) await new Promise((resolve) => setTimeout(resolve, 100));+ assert.equal(fs.existsSync(spawned), true, 'the locked selection started the judge');box.cleanup();});