Skip to content

artifact-patch-git-apply-smoke expects a worktree prefix Git does not emit #2064

Description

@chubes4

Problem

The unchanged artifact-patch-git-apply-smoke fails on main because it expects the patch header to retain the fixture's workspace/plugin/ prefix, while git diff --binary --no-ext-diff --src-prefix=a/ --dst-prefix=b/ runs with the fixture root as its working tree and emits a repository-relative path.

Observed failure:

AssertionError: The input did not match /^diff --git a\/workspace\/plugin\/added\.txt b\/workspace\/plugin\/added\.txt/m

Actual:
diff --git a/added.txt b/added.txt

Command:

npm run smoke -- --group=artifact

Expected

The smoke fixture should assert the repository-relative patch contract Git actually produces, or construct a parent repository when the workspace/plugin/ prefix is load-bearing. The assertion should be deterministic across supported Git versions.

Notes

This was found while testing #2023. The accessibility/focus oracle diff does not touch scripts/artifact-patch-git-apply-smoke.ts or its patch implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions