Files
dl-organizer/CHANGELOG.md
T
windyboy dfa18ed405 refactor: consolidate skill docs, add anti-drift tests, and apply audit fixes
DLO-13: Restructure vlm-library-workflow skill as safety contract layer.
- Rewrite SKILL.md (69 lines): safety contract, execution threshold semantics,
  six-step high-risk loop, decision rules, phase skeleton
- Delete redundant references (cli-reference, workflow, command-recipes, dev-guide)
- Add triage.md (failure mapping + preflight) and dev-map.md (module→test mapping)
- Add tests/test_docs_consistency.py: 78 parametrized tests verifying documented
  vlm commands exist in CLI registry
- Add CSV path mismatch test to test_plan_review.py (4th safety gate path)
- Delete vlm-expert.skill (Gemini package, 7 months stale) and README Gemini section

DLO-2 audit fixes: rate limiter injection, symmetric quarantine categories,
review-plan safety gates, parser improvements, planner validation.

CLI modularization: commands/ directory with one module per command group.
2026-09-25 13:50:09 +08:00

129 lines
7.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Changelog
## 0.2.0 — 2026-06-01
### Repository hygiene and release discipline
- Stopped tracking personal workflow artifacts at repository root (~34 MB); expanded `.gitignore` for legacy root CSV/JSON patterns.
- Added GitHub Actions workflow running `uv run pytest -q` on Python 3.10–3.12.
- Added MIT `LICENSE`, `CONTRIBUTING.md` (semver policy), and packaging metadata in `pyproject.toml` (version `0.2.0`).
- Synced README and `skills/vlm-library-workflow/` to `artifacts/` defaults and the full `review-plan` → `apply-review` cycle.
- Standardized `executor.py` imports to `vlm.*`; added Ruff and `pytest-cov` to `[dev]` optional dependencies.
- Verification: `uv run pytest -q` → **517 passed**.
## 2026-05-21
### CLI line-count reduction (phase 2)
- Shrunk `cli.py` to a thin registrar (~70 lines); Click definitions live beside command implementations in `commands/`.
- Deduplicated report commands via `reports.duplicate_groups_from_analysis` / `completeness_from_analysis` and shared `cli_helpers.run_command` / `emit_report`.
- Archived the completed simplification plan under `docs/archive/2026-pre-baseline/`.
### Functional code simplification
- Removed unused `src/vlm/exceptions.py` and consolidated plan summary helpers (`preferred_plan_summary` everywhere).
- Extracted CLI implementations to `cli_helpers.py` and `commands/` (`review_plan`, `report`, `quarantine_cmd`, `state_cmd`, `config_cmd`); `cli.py` is now Click registration and thin delegation.
- Moved `textual` out of `[dev]` optional deps (install via `[tui]` or `[dev,tui]`).
- Archived superseded review/audit markdown under `docs/archive/2026-pre-baseline/`.
- Fixed series parser empty title when the only title token is a quality tag (e.g. `UHD S01E01.mp4`).
- Verification: `pytest -q` → **517 passed**.
### Documentation sync
- Resynchronized `README.md`, `CLAUDE.md`, `AGENTS.md`, and `skills/vlm-library-workflow/` docs to the CLI-modularization baseline; refreshed validation baseline (`pytest -q` → **529 passed**).
- Fixed the archive index pointer to the completed simplification plan (now inside `docs/archive/2026-pre-baseline/`).
## 2026-04-07
### Review-plan Safety & Validation Hardening
- Made `vlm review-plan --tui` a true optional runtime boundary by lazy-loading the Textual UI and guarding Textual imports.
- Hardened execution safety so move/rename operations validate both source and destination against `library_root`, while unsupported quarantine operations fail per-operation without aborting later work.
- Removed silent duplicate-resolution fallback: unresolved `by_quality` groups and unsupported strategies now surface as explicit manual-review outcomes.
- Canonicalized duplicate path matching so duplicate analysis joins stay stable across path-format differences.
- Defined scanner behavior for non-zero `find` exits: keep partial stdout with a warning, or return an empty deterministic result if no paths were emitted.
- Moved plan loading onto a validated typed `ExecutionPlan` boundary in the I/O layer.
- Updated repository review artifacts and documentation to reflect the new baseline.
- Verification: `pytest -q` → `507 passed`.
## 2026-04-02
### Schema Validation & Deterministic Planning
- Added runtime validation for `identities.json`, `analysis.json`, and `plan.json` on load/save.
- Plan generation now records environment-derived checks in `validation_snapshot` metadata, keeping logical plan output reproducible.
- Added targeted regression tests for plan round-trip validation and invalid-schema rejection.
- Verified the affected workflows with `uv run pytest tests/test_io.py tests/test_planner.py`.
### Logic Optimization & Human-in-the-Loop
- **Human-in-the-Loop Workflow Completion**:
- Added `vlm apply-review` command to sync modifications from `plan_manual_review.csv` back to `plan.json`.
- Implemented `apply_review_to_plan` in `src/vlm/planner.py` to allow manual rejection/modification of high-risk operations via CSV.
- **Scanner Robustness & Environment Awareness**:
- Added proactive `ffprobe` availability check at the start of `vlm scan`.
- Implemented graceful degradation: if `ffprobe` is missing, the scanner automatically falls back to file-only metadata mode with a clear warning, instead of failing per-file.
- **Parser Enhancements**:
- Improved `src/vlm/parser.py` to better handle release group tags (`[Group]`, `(Group)`, `Group_Subs`).
- Added support for hyphenated episode numbering (e.g., `Name - 01`) common in Anime, defaulting to Season 1 with reduced confidence.
- Refined release group removal to be more robust against various bracket styles.
- **CLI & UX**:
- `vlm review-plan` now prints a plan overview plus a structured high-risk operation preview in terminal output.
- Added `--preview-limit` and `--show-all` to control review-plan preview verbosity.
- Added shared plan rendering helpers so `review-plan` and `execute` reuse the same summary fallback behavior.
- Added `vlm apply-review` to the main CLI group.
## 2026-02-16
### Artifact Path Governance
- Changed default workflow artifact outputs from repository root to `artifacts/`:
- `artifacts/inventory.csv`
- `artifacts/identities.json`
- `artifacts/analysis.json`
- `artifacts/plan.json`
- `artifacts/plan_manual_review.csv`
- Added `workspace_dir` to configuration (`~/.vlm/config.yaml`) to customize default artifact directory.
- Stage-A compatibility: when a command uses default input path and only legacy root artifact exists, CLI now prints a migration warning and falls back to the legacy file.
- Added ignore rules for generated artifact directories in `.gitignore` (`artifacts/`, `runs/`).
- Removed temporary process document `ARTIFACTS_REFACTOR_PLAN_2026-02-16.md`; `CHANGELOG.md` remains the canonical change record.
### Refactor Results
- Modularized CLI command implementations:
- Added `src/vlm/commands/parse.py`
- Added `src/vlm/commands/enrich.py`
- Added `src/vlm/commands/execute.py`
- Refactored `src/vlm/cli.py` to delegate `parse`, `enrich`, `execute`, and `rollback` to command modules
- Unified I/O layer for JSON handling:
- Added `load_json_file`, `save_json_file`, `save_analysis_json` in `src/vlm/io.py`
- Updated analyze/enrich paths to use unified I/O entry points
- Parser/config consistency improvements:
- Added shared `DEFAULT_VIDEO_EXTENSIONS` in `src/vlm/config.py`
- Updated `src/vlm/parser.py` to use the shared config constant instead of local hardcoded defaults
- Execution reliability hardening:
- Updated `src/vlm/executor.py` transaction logging to fail gracefully when `~/.vlm` is not writable (warn + continue)
- Test stability improvements:
- Standardized test timestamps to timezone-aware UTC (`datetime.now(timezone.utc)`)
- Added missing `timezone` imports where required
### Verification
- Full test suite passed after refactor:
- `477 passed`
### Documentation Sync
- Updated repository documentation set to match the refactor baseline:
- Core docs: `README.md`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`
- Skill docs: `skills/vlm-library-workflow/SKILL.md` and all references under `skills/vlm-library-workflow/references/`
- Legacy review/plan docs now explicitly marked as historical snapshots and redirected to `CHANGELOG.md` as the current source of truth