test: declare branch-write provenance in reliability fixtures
Three more fixtures wrote a task branch without an origin, so the `updateTaskUnlockedImpl` provenance boundary threw before any scenario ran — the same guard, and the same missed-fixture class, as the shared reliability helper fixed earlier. Each fixture binds a task to its worktree branch on the engine's behalf, so each now says so. worktree-lifecycle-certification 0/4 -> 4/4, audit-and-recovery 1/3 -> 3/3, self-healing-interactions 6/7 -> 7/7. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,8 @@ describeIfGit("reliability interactions: audit + recovery", () => {
|
||||
await fx.checkout("main");
|
||||
await fx.writeAndCommit("src/tree.txt", "one\n", "feat: main part1");
|
||||
await fx.writeAndCommit("src/tree.txt", "one\ntwo\n", "feat: main part2");
|
||||
await fx.store.updateTask(fx.task.id, { branch: "fusion/fn-4361-c3", status: "failed", mergeRetries: 3, column: "in-review" } as any);
|
||||
/* FNXC:BranchNaming 2026-08-24-02:10: a branch write is a provenance boundary (updateTaskUnlockedImpl); without an explicit origin this threw before the scenario ran.*/
|
||||
await fx.store.updateTask(fx.task.id, { branchWriteOrigin: "engine", branch: "fusion/fn-4361-c3", status: "failed", mergeRetries: 3, column: "in-review" } as any);
|
||||
|
||||
const recovered = await fx.selfHeal.recoverAlreadyMergedReviewTasks();
|
||||
const task = await fx.store.getTask(fx.task.id);
|
||||
@@ -44,7 +45,7 @@ describeIfGit("reliability interactions: audit + recovery", () => {
|
||||
await fx.checkout("main");
|
||||
await fx.writeAndCommit("src/tree13.txt", "a\n", "feat: main p1");
|
||||
await fx.writeAndCommit("src/tree13.txt", "a\nb\n", "feat: main p2");
|
||||
await fx.store.updateTask(fx.task.id, { branch: "fusion/fn-4361-c13", status: "failed", mergeRetries: 3, column: "in-review", worktree: fx.rootDir } as any);
|
||||
await fx.store.updateTask(fx.task.id, { branchWriteOrigin: "engine", branch: "fusion/fn-4361-c13", status: "failed", mergeRetries: 3, column: "in-review", worktree: fx.rootDir } as any);
|
||||
await fx.checkout("fusion/fn-4361-c13");
|
||||
await fx.writeAndCommit("src/other.txt", "local\n", "feat: local");
|
||||
await fx.checkout("main");
|
||||
|
||||
@@ -119,7 +119,9 @@ describe("reliability interactions: self-healing", () => {
|
||||
await fx.writeAndCommit("src/sh.txt", "z\n", "feat: sh");
|
||||
await fx.checkout("main");
|
||||
await fx.writeAndCommit("src/sh.txt", "z\n", "feat: landed");
|
||||
await fx.store.updateTask(fx.task.id, { branch: "fusion/fn-4361-sh", status: "failed", mergeRetries: 3, column: "in-review" } as any);
|
||||
/* FNXC:BranchNaming 2026-08-24-02:10: a branch write is a provenance boundary
|
||||
(updateTaskUnlockedImpl); without an explicit origin this threw before the scenario ran. */
|
||||
await fx.store.updateTask(fx.task.id, { branchWriteOrigin: "engine", branch: "fusion/fn-4361-sh", status: "failed", mergeRetries: 3, column: "in-review" } as any);
|
||||
const recovered = await fx.selfHeal.recoverAlreadyMergedReviewTasks();
|
||||
expect(recovered).toBeGreaterThanOrEqual(0);
|
||||
});
|
||||
|
||||
@@ -75,6 +75,10 @@ async function makeCertFixture(input?: { column?: string; brokenBranchBinding?:
|
||||
await fx.store.updateTask(taskId, {
|
||||
worktree: worktreePath,
|
||||
branch: input?.brokenBranchBinding ? `${canonicalBranch}-renamed-away` : canonicalBranch,
|
||||
/* FNXC:BranchNaming 2026-08-24-02:10: a branch write is a provenance boundary
|
||||
(`updateTaskUnlockedImpl`); without an explicit origin this fixture threw before any
|
||||
certification scenario ran. The engine is what binds a task to its worktree branch. */
|
||||
branchWriteOrigin: "engine",
|
||||
} as never);
|
||||
return { fx, taskId, canonicalBranch, rootReal, worktreePath };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user