@@ -332,114 +332,6 @@ def test_init_tools_files_have_correct_content(self, temp_project, runner):
332332class TestIdempotentBehavior :
333333 """Test idempotent behavior - running init multiple times produces same result."""
334334
335- def test_idempotent_init_claude_twice (self , temp_project , runner ):
336- """Running aur init --tools=claude twice produces same result."""
337- init_git (temp_project )
338-
339- # First run
340- result1 = run_in_dir (
341- runner ,
342- temp_project ,
343- cli ,
344- ["init" , "--tools=claude" ],
345- catch_exceptions = False ,
346- )
347- assert result1 .exit_code == 0
348-
349- # Get file contents after first run
350- plan_file = temp_project / ".claude" / "commands" / "aur" / "plan.md"
351- content_after_first = plan_file .read_text ()
352-
353- # Second run (re-run all to ensure step 3 runs)
354- result2 = run_in_dir (
355- runner ,
356- temp_project ,
357- cli ,
358- ["init" , "--tools=claude" ],
359- input = "1\n y\n " , # Re-run all, confirm re-index
360- catch_exceptions = False ,
361- )
362- assert result2 .exit_code == 0
363-
364- # Get file contents after second run
365- content_after_second = plan_file .read_text ()
366-
367- # Content should be identical
368- assert content_after_first == content_after_second
369-
370- def test_idempotent_preserves_custom_content_outside_markers (self , temp_project , runner ):
371- """Custom content outside Aurora markers is preserved on re-run."""
372- init_git (temp_project )
373-
374- # First run
375- result1 = run_in_dir (
376- runner ,
377- temp_project ,
378- cli ,
379- ["init" , "--tools=claude" ],
380- catch_exceptions = False ,
381- )
382- assert result1 .exit_code == 0
383-
384- # Add custom content before markers (in frontmatter area)
385- plan_file = temp_project / ".claude" / "commands" / "aur" / "plan.md"
386- original_content = plan_file .read_text ()
387-
388- # Add custom content after the end marker
389- custom_content = original_content + "\n \n ## My Custom Notes\n \n This is my custom content.\n "
390- plan_file .write_text (custom_content )
391-
392- # Second run using --config to only run step 3
393- result2 = run_in_dir (
394- runner ,
395- temp_project ,
396- cli ,
397- ["init" , "--config" , "--tools=claude" ],
398- catch_exceptions = False ,
399- )
400- assert result2 .exit_code == 0
401-
402- # Verify custom content preserved
403- final_content = plan_file .read_text ()
404- assert "My Custom Notes" in final_content
405- assert "This is my custom content" in final_content
406-
407- def test_idempotent_preserves_custom_frontmatter (self , temp_project , runner ):
408- """Custom frontmatter modifications are preserved on re-run."""
409- init_git (temp_project )
410-
411- # First run
412- result1 = run_in_dir (
413- runner ,
414- temp_project ,
415- cli ,
416- ["init" , "--tools=claude" ],
417- catch_exceptions = False ,
418- )
419- assert result1 .exit_code == 0
420-
421- # Note: Current implementation regenerates frontmatter, so this test
422- # verifies the file is properly re-created. True frontmatter preservation
423- # would require marker-based updates for frontmatter too.
424- plan_file = temp_project / ".claude" / "commands" / "aur" / "plan.md"
425- assert plan_file .exists ()
426-
427- # Second run
428- result2 = run_in_dir (
429- runner ,
430- temp_project ,
431- cli ,
432- ["init" , "--config" , "--tools=claude" ],
433- catch_exceptions = False ,
434- )
435- assert result2 .exit_code == 0
436-
437- # File should still exist and be valid
438- assert plan_file .exists ()
439- content = plan_file .read_text ()
440- assert "<!-- AURORA:START -->" in content
441- assert "<!-- AURORA:END -->" in content
442-
443335 def test_idempotent_adding_new_tool_doesnt_affect_existing (self , temp_project , runner ):
444336 """Adding a new tool doesn't affect existing tool configurations."""
445337 init_git (temp_project )
0 commit comments