Skip to content

farm: git stderr (CRLF warning) pollutes drift detection → false 'drift:' escalation on Windows #91

Closed

Description

@SUaDtL

Found during the docs-site-mvp /ca:sprint --farm run (2026-06-18, Windows).

checkDrift() runs git diff --name-only HEAD via the shared run() helper, which merges stdout+stderr into one string. On Windows with core.safecrlf warnings enabled, git prints warning: in the working copy of '<file>', LF will be replaced by CRLF the next time Git touches it to stderr. That line is then parsed as a changed file path, judged out-of-scope, and the task escalates as drift: even though the worker only touched its in-scope file.

Observed: a fully-correct worker output for split-frontmatter was escalated with note drift: warning: in the working copy of 'site/scripts/generator/split-frontmatter.ts', LF will be replaced by CRLF ....

Workaround used: git config core.autocrlf false && git config core.safecrlf false on the repo.

Perma-fix candidates:

  • In parsing contexts (drift, diff --name-only, status), capture stdout and stderr separately and parse only stdout.
  • Or filter lines matching ^warning: / non-path noise before treating them as file paths.
  • Consider the dispatcher writing a .gitattributes-style normalization or -c core.safecrlf=false on its own git invocations so it is robust regardless of user git config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeature-forgePreview-feature feedback (Feature Forge)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions