Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(tests): refuse discovery with damaged git metadata [C7]
Corey Olson1c85a1ad049c
diff --git a/bin/run-tests.js b/bin/run-tests.jsindex aa4b1be0..a5a430ac 100644--- a/bin/run-tests.js+++ b/bin/run-tests.js@@ -317,7 +317,7 @@ function isGitWorkTree(cwd, env) {});if (result.error) throw result.error;if (result.status === 0) return result.stdout.trim() === 'true';- if (result.status === 128 && /fatal: not a git repository\b/u.test(result.stderr)) return false;+ if (result.status === 128 && /^fatal: not a git repository \(or any /u.test(result.stderr)) return false;throw new Error(result.stderr.trim() || `git rev-parse failed (status ${result.status})`);}diff --git a/test/run-tests.test.js b/test/run-tests.test.jsindex 00e8e913..d7a72ad6 100644--- a/test/run-tests.test.js+++ b/test/run-tests.test.js@@ -205,6 +205,18 @@ function outsideGitDiscoveryTest(t) {const selected = runShardFixture(fixture, null);assert.deepEqual([...selected].sort(), fixture.expected,'without a Git work tree Node still discovers and executes every fixture test');++ writeFileSync(fixture.capture, '');+ writeFileSync(join(fixture.root, '.git'), 'gitdir: missing-git-directory\n');+ const broken = runFixtureChild(process.execPath, [fixture.runner], {+ cwd: fixture.root,+ encoding: 'utf8',+ env: { ...process.env, PULLBOARD_SHARD_CAPTURE: fixture.capture },+ });+ assert.equal(broken.status, 1, broken.context);+ assert.match(broken.stderr, /could not list tracked test files/u,+ 'a damaged checkout is refused rather than mistaken for an ordinary non-Git folder');+ assert.equal(readFileSync(fixture.capture, 'utf8'), '', 'no filesystem tests run after Git metadata fails');}test('the runner keeps native discovery outside a Git work tree [C7]', outsideGitDiscoveryTest);