Skip to content

Init: preserve repository config in easy mode - #1057

Merged
jeffhuber merged 2 commits into
mainfrom
codex/1054-safe-init
Sep 20, 2026
Merged

jeffhuber merged 2 commits into
mainfrom
codex/1054-safe-init

Conversation

@jeffhuber

Copy link
Copy Markdown
Contributor

Problem and behavior

In a configured repository, code-mower init --easy previously selected packaged starter defaults and could stage them beside the repository's own code-mower.yml. It now detects and uses the root config for both preview and apply. An implicit packaged-starter apply beside a root config fails with exact safe commands; --packaged-starter remains the explicit opt-in.

The generated plan also emits each selected lane config once. Claude and Codex lane configs now use the same package-backed selected-lane path as other local lanes, eliminating the duplicate-path collision while keeping setup-drift source/target naming unchanged.

Closes #1054.

Validation

  • PYTHONPATH=src /private/tmp/code-mower-v151-venv/bin/python -m pytest -q tests/test_safe_init_1054.py tests/test_adoption_diagnostics.py tests/test_init_builders_cold_start.py tests/test_adoption_polish_1015.py tests/test_init_actionlint.py tests/test_init_build_loop.py — 134 passed, 76 subtests passed
  • PYTHONPATH=src /private/tmp/code-mower-v151-venv/bin/python -m pytest -q tests/test_release_hygiene.py — 363 passed, 945 subtests passed
  • PYTHONPATH=src /private/tmp/code-mower-v151-venv/bin/python scripts/smoke_easy_mode.py — passed
  • ruff check src/code_mower/init.py tests/test_safe_init_1054.py — passed
  • ruff format --check tests/test_safe_init_1054.py — passed
  • git diff --check — passed

@jeffhuber jeffhuber added needs-claude-audit builder:codex Code Mower generated label labels Sep 20, 2026
@gitar-bot

gitar-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown

Note

Automatic reviews are paused because your team has used its included automatic processing for this billing period (headroom scales with your seat count). You can still comment "Gitar review" to run one anytime, and automatic reviews resume on their own by October 1. Add seats for more headroom.
Learn more

Code Review ✅ Approved

🟡 Medium risk

Preserves repository config in easy mode by detecting and using the root code-mower.yml for both preview and apply, eliminating duplicate lane config paths while maintaining setup-drift naming. All tests pass and no issues found.

Review coverage

Rules No rules evaluated

Functional validation Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude audit (merge-authority lane)

Head SHA: cb823d9c61278ae1fd9d7631b6485dbb3544b304
Verdict: BLOCKED
Review details remain in the local audit artifact.
Publication workflow: .github/workflows/local-audit-publication.yml at ba72ac986ab3d24e1c5ace2fbcdcc9e4aed97aaa

@jeffhuber

Copy link
Copy Markdown
Contributor Author

Resolved the exact-head Claude P2 on the same branch at 8006a7614f2943774a084a4eef94c7bb61e8f134.

The real-file lane-config de-duplication is now limited to Claude and Codex, the only modules previously duplicated through PRODUCT_SUPPORT_FILES. Other local/research lanes retain their established placeholder behavior. A new cli_research regression applies the generated plan and proves every selected research lane remains a placeholder.

Validation after the fix: 8 focused #1054 tests, 127 related init/adoption tests plus 76 subtests, Ruff, and diff check passed. A fresh exact-head Claude audit is requested; prior evidence remains bound to the old head.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Claude audit (merge-authority lane)

Head SHA: ef981e63d6ea4a17b6b1da29acc55c7699dcb45c
Verdict: PASS
Review details remain in the local audit artifact.
Publication workflow: .github/workflows/local-audit-publication.yml at e070308b4affce566ef3adb8c8b7a706286994da

@jeffhuber
jeffhuber enabled auto-merge (squash) September 20, 2026 07:49
@jeffhuber
jeffhuber merged commit 7b7d748 into main Sep 20, 2026
18 checks passed
@jeffhuber
jeffhuber deleted the codex/1054-safe-init branch September 20, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builder:codex Code Mower generated label claude-audit-done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1.5.1: make easy init and generated output safe

1 participant