Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions test/install.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ function initRepo() {
let result = runCmd('git', ['init', '-b', 'dev'], repoDir);
assert.equal(result.status, 0, result.stderr);

result = runCmd('git', ['config', 'user.email', 'bot@example.com'], repoDir);
assert.equal(result.status, 0, result.stderr);
result = runCmd('git', ['config', 'user.name', 'Bot'], repoDir);
assert.equal(result.status, 0, result.stderr);
configureGitIdentity(repoDir);

if (withPackageJson) {
fs.writeFileSync(
Expand Down Expand Up @@ -174,7 +171,15 @@ function createGuardexCompanionHome({ cavekit = false, caveman = false } = {}) {
return homeDir;
}

function configureGitIdentity(repoDir) {
let result = runCmd('git', ['config', 'user.email', 'bot@example.com'], repoDir);
assert.equal(result.status, 0, result.stderr || result.stdout);
result = runCmd('git', ['config', 'user.name', 'Bot'], repoDir);
assert.equal(result.status, 0, result.stderr || result.stdout);
}

function seedCommit(repoDir) {
configureGitIdentity(repoDir);
let result = runCmd('git', ['add', '.'], repoDir);
assert.equal(result.status, 0, result.stderr);
result = runCmd('git', ['commit', '-m', 'seed'], repoDir);
Expand Down Expand Up @@ -3417,7 +3422,7 @@ exit 1
assert.equal(launch.status, 0, launch.stderr || launch.stdout);
const combinedOutput = `${launch.stdout}\n${launch.stderr}`;
assert.match(combinedOutput, /\[codex-agent\] Auto-finish enabled: commit -> push\/PR -> wait for merge -> cleanup\./);
assert.match(combinedOutput, /\[codex-agent\] Auto-finish skipped for 'agent\/codex\/autofinish-task-/);
assert.match(combinedOutput, /\[codex-agent\] Auto-finish skipped for 'agent\/[^/]+\/autofinish-task-/);
assert.equal(fs.existsSync(ghMergeState), false, 'merge should not be attempted without a mergeable remote context');

const launchedCwd = fs.readFileSync(cwdMarker, 'utf8').trim();
Expand Down
2 changes: 1 addition & 1 deletion test/metadata.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test('active doctor command remains single-source and runs the repair-first path
const cliSource = fs.readFileSync(cliPath, 'utf8');
const doctorDefs = cliSource.match(/function doctor\(rawArgs\)/g) || [];
assert.equal(doctorDefs.length, 1, 'doctor() must not be duplicated');
assert.match(cliSource, /printOperations\('Doctor\/fix', fixPayload, singleRepoOptions\.dryRun\);/);
assert.match(cliSource, /printOperations\('Doctor\/fix', fixPayload, (?:singleRepoOptions|options)\.dryRun\);/);
});

test('worktree-change detection uses normal untracked-file mode', () => {
Expand Down