Skip to content

Add repo validation workflow, conflict-fixer script, and UI/config improvements#9

Merged
VHugoDevIA merged 2 commits into
mainfrom
codex/review-repository-code-hpjdax
Mar 14, 2026
Merged

Add repo validation workflow, conflict-fixer script, and UI/config improvements#9
VHugoDevIA merged 2 commits into
mainfrom
codex/review-repository-code-hpjdax

Conversation

@VHugoDevIA
Copy link
Copy Markdown
Owner

Motivation

  • Add automated repository validation to catch merge artifacts and Python compile errors early via CI.
  • Provide a small tool to quickly remove common merge/branch artefacts that cause IndentationError and similar issues.
  • Improve configuration handling and UI robustness to avoid conflicts and make results sorting/interaction more reliable.

Description

  • Add GitHub Actions workflow /.github/workflows/validate.yml that runs python scripts/validate_repo.py on pull requests and pushes to main.
  • Add scripts/validate_repo.py which scans main.py and src/*.py for conflict markers and branch artefacts and runs compileall on main.py and src.
  • Add scripts/fix_conflict_artifacts.py which can sanitize files by removing conflict tokens and common branch artefacts and creates a .bak backup when run with --write.
  • Modify src/app.py to migrate config to a per-user folder (~/.duplicate-file-cleaner/config.json), add robust JSON read/write helpers, and fallback to legacy config.json; also improve UI layout (splitters), add a toggleable filters panel, numeric sorting via SortableTreeWidgetItem, group expand/collapse actions, and selection-load guard (_selection_loaded).
  • Update README.md with a quick resolution section describing how to use the conflict-fixer script, update .gitignore to include config.json, and replace the root config.json content with {}; remove several stray placeholder files.

Testing

  • Ran python scripts/validate_repo.py locally which checks for conflict markers and attempts to compile main.py and src, and it completed successfully.
  • Added CI workflow validate.yml to run the same validation on PRs and pushes to main, ensuring automated checks will run for future changes.

Codex Task

@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

targets = [ROOT / "main.py", *(ROOT / "src").rglob("*.py")]

P2 Badge Include scripts in repository validation

The validation script currently limits conflict-marker scanning to main.py and src/**/*.py, so CI can still pass when a Python file under scripts/ is broken or contains merge artifacts. In this commit that means scripts/fix_conflict_artifacts.py is not validated at all, which undermines the new “repo validation” workflow and allows regressions in maintenance tooling to ship undetected; expand the target set (and compile step) to cover scripts/**/*.py as well.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@VHugoDevIA VHugoDevIA merged commit ec6dfa4 into main Mar 14, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant