Skip to content

Refuse case-folding collisions when scaffolding blueprint paths #62

Description

@Deicyde

On a case-insensitive filesystem, a project may legitimately contain a Lean
library directory named Blueprint/. scaffold_project currently checks and
writes lowercase managed paths through ordinary Path.exists()/path joins, so
blueprint/roadmap can resolve into that unrelated Lean library.

PR #14 correctly makes read-only project inspection recognize optional
Autoform scaffold paths only at their exact portable spellings. The write path
needs its own fail-closed collision check; making inspection reject every
near-case name caused real formal-math inspection to fail.

Acceptance criteria:

  • Before writing a managed scaffold path, enumerate the exact parent directory
    entry and reject any distinct casefold/NFC collision.
  • Cover at least blueprint, mkdocs.yml, .github, workflows, and the two
    managed workflow filenames.
  • Return a clear ScaffoldError and leave the project byte-for-byte unchanged.
  • Add a platform-independent regression harness plus a real case-insensitive
    filesystem test when available.

Activity

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions