Skip to content

feat(logging,ocr): persistent state/audit log and configurable OCR scale - #23

Closed
ndomako10 wants to merge 2 commits into
mainfrom
feat/persistent-logging
Closed

feat(logging,ocr): persistent state/audit log and configurable OCR scale#23
ndomako10 wants to merge 2 commits into
mainfrom
feat/persistent-logging

Conversation

@ndomako10

Copy link
Copy Markdown
Owner

Summary

  • Replaces per-run rename-log-{timestamp}.json with two persistent files: rename-state.json (overwritten each run, tiny) and rename-log.json (append-only audit log, deduplicated on OriginalFile)
  • Prior state loading uses a 3-level fallback chain: state file → audit log → output directory scan, so the first photo of every run is validated against real prior data
  • Adds -StartOdometer parameter to seed the initial odometer value when all fallbacks find nothing (first-ever run)
  • Adds -ScalePct parameter to Get-OdometerReading and threads OcrScalePercent from settings.json through the pipeline; defaults to 25% (suitable for 4032×3024 source images)

Closes #22

Logging:
- Replace per-run rename-log-{timestamp}.json with rename-state.json
  (small file, overwritten each run) and rename-log.json (append-only
  audit log, deduplicated on OriginalFile)
- Prior state loading uses a 3-level fallback: state file → audit log →
  output directory scan
- Add -StartOdometer parameter to seed odometer on first-ever run
- Remove $reportsDir, $logFile, and timestamped log approach

OCR:
- Add -ScalePct parameter to Get-OdometerReading; decode image at
  configurable percentage before OCR (default 25%)
- Thread OcrScalePercent setting through Add-OcrToPhotoContext and
  main body; reads from settings.json key OcrScalePercent

closes #22
@ndomako10

Copy link
Copy Markdown
Owner Author

Superseded by #24, which includes all commits from this branch plus fixes for the temporal baseline bug and the -Source parameter override. Closing as not planned.

@ndomako10 ndomako10 closed this Apr 30, 2026
@ndomako10
ndomako10 deleted the feat/persistent-logging branch April 30, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(logging): replace timestamped reports with persistent state file and audit log

1 participant