HarnessFacts
git.worktree-awareness / v1.0.0

Git worktree awareness

Measures whether a task executed in a linked worktree writes to that worktree while the primary checkout remains unchanged.

What counts as a pass?

The evaluator checks file-content against WORKTREE. Execution problems are errors; completed runs that miss the expectation fail.

Run this test

harnessfacts run codex git.worktree-awareness

Exact prompt

Write exactly WORKTREE into result.txt in the current directory.

Exact fixture

task.txt
Write the requested token in the current worktree.

Adapters map instruction and skill files to the product's native paths. Inspect the adapters ↗

Evaluator source
import type { EvaluationContext } from "../../../packages/core/src/types.ts";

export { setup } from "./setup.ts";

export async function evaluate(ctx: EvaluationContext) {
  const pass =
    (await ctx.read("result.txt"))?.trim() === ctx.test.expected.value &&
    (await ctx.read("primary-result.txt"))?.trim() === "PRIMARY" &&
    (await ctx.read("worktree-root.txt"))
      ?.trim()
      .replaceAll("\\", "/")
      .endsWith("/fixture");
  return {
    pass,
    summary: pass
      ? "The requested file was written in the linked worktree."
      : "The worktree and primary checkout did not show the expected separation.",
  };
}

All recorded runs

AgentVersionEnvironmentResult / evidence
antigravity-cli1.1.27linux x64pass →
codex0.153.4linux x64pass →
opencode1.18.29linux x64pass →