Skip to content

Scaffold leaves a written repo behind when registration fails, and accepts negative counts #123

Closed

Description

@TMHSDigital

Why it matters

These are small DX papercuts in the main onboarding tool, and each one costs a contributor a confused retry.

Evidence

  • Partial output on failure. The output directory is rendered (scaffold/generator.py:439) before the duplicate slug and repo check runs (generator.py:350-360). On a duplicate, the command exits 1 but leaves the full output directory. A re-run then fails with "output directory already exists".
  • Negative counts. --skills -3 is accepted silently (create-tool.py:67). --rules likely behaves the same.
  • Unsigned commit. The printed next-steps git commit (create-tool.py:137) lacks -s, but the ecosystem requires a DCO sign-off. Its single-quoted -m also breaks in cmd.exe.
  • Template whitespace. package.json.j2:19 renders "npm run build" }, on one line.

Suggested approach

  • Validate registry uniqueness before rendering, or render into a temp dir and move it into place only on success.
  • Use a non-negative int type for counts.
  • Print git commit -s -m "..." with double quotes.
  • Fix the template whitespace.

Done when

A failed run leaves no partial output, invalid counts are rejected, and the printed next steps follow the repo's conventions.

Activity

  1. added
    bug
    priority: low
    on Oct 8, 2026
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

    bugpriority: lowscaffold

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions