aura new: skip git init inside an existing git work tree (embedded-gitlink friction) #182

Closed
opened 2026-07-02 22:25:13 +02:00 by Brummel · 1 comment
Owner

The aura new scaffolder runs a best-effort git init in the new project directory. When the project is created inside an existing git work tree — the explicitly supported authoring case (the emitted Cargo.toml carries an empty [workspace] table precisely so a project builds under the engine tree) — the nested .git makes the parent repository see the project as an embedded gitlink, which git add warns about and which does not round-trip through clone/push.

Observed by the milestone fieldtest (finding F1, fieldtests/milestone-project-environment/FINDINGS.md, 2026-07-02): the scaffolded momentum-lab/ project had to have its nested .git removed by hand before the fieldtest corpus was committable.

Likely shape (derivable, small): detect an enclosing git work tree (git rev-parse --is-inside-work-tree semantics) and skip the git init with a one-line note, keeping the init for the standalone case. A --no-git flag is the heavier alternative; the auto-detect matches the best-effort spirit the scaffolder already has (init failure is non-fatal today).

  • depends on: nothing
  • context: post-milestone polish from the green project-environment fieldtest; fails annoying, not wrong.
The `aura new` scaffolder runs a best-effort `git init` in the new project directory. When the project is created inside an existing git work tree — the explicitly supported authoring case (the emitted `Cargo.toml` carries an empty `[workspace]` table precisely so a project builds under the engine tree) — the nested `.git` makes the parent repository see the project as an embedded gitlink, which `git add` warns about and which does not round-trip through clone/push. Observed by the milestone fieldtest (finding F1, `fieldtests/milestone-project-environment/FINDINGS.md`, 2026-07-02): the scaffolded `momentum-lab/` project had to have its nested `.git` removed by hand before the fieldtest corpus was committable. Likely shape (derivable, small): detect an enclosing git work tree (`git rev-parse --is-inside-work-tree` semantics) and skip the `git init` with a one-line note, keeping the init for the standalone case. A `--no-git` flag is the heavier alternative; the auto-detect matches the best-effort spirit the scaffolder already has (init failure is non-fatal today). - depends on: nothing - context: post-milestone polish from the green project-environment fieldtest; fails annoying, not wrong.
Author
Owner

Resolved — shipped as the #204 fix

This issue is a duplicate of #204 (filed independently by the cycle-0107
fieldtest against the same scaffolder behaviour). The fix shipped in commit
4da47cb (pushed to main 2026-07-04) and matches the "likely shape" this
issue proposed: aura new now detects an enclosing git work tree
(git rev-parse --is-inside-work-tree, crates/aura-cli/src/scaffold.rs,
inside_git_work_tree) and skips the git init with a one-line note,
keeping the init for the standalone case. No --no-git flag was needed.

Verified against the tree at 6f2cf44: the skip is in place and covered by
the scaffold tests; the milestone fieldtest (fieldtests/milestone-research-
artifacts/) scaffolded its project inside the engine work tree without the
embedded-gitlink friction.

## Resolved — shipped as the #204 fix This issue is a duplicate of #204 (filed independently by the cycle-0107 fieldtest against the same scaffolder behaviour). The fix shipped in commit `4da47cb` (pushed to main 2026-07-04) and matches the "likely shape" this issue proposed: `aura new` now detects an enclosing git work tree (`git rev-parse --is-inside-work-tree`, `crates/aura-cli/src/scaffold.rs`, `inside_git_work_tree`) and skips the `git init` with a one-line note, keeping the init for the standalone case. No `--no-git` flag was needed. Verified against the tree at `6f2cf44`: the skip is in place and covered by the scaffold tests; the milestone fieldtest (fieldtests/milestone-research- artifacts/) scaffolded its project inside the engine work tree without the embedded-gitlink friction.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#182