Skip to content

Fix pending document processing - #12

Merged
JayRHa merged 1 commit into
mainfrom
agent/fix-staging-processing
Jul 26, 2026
Merged

JayRHa merged 1 commit into
mainfrom
agent/fix-staging-processing

Conversation

@JayRHa

@JayRHa JayRHa commented Jul 26, 2026

Copy link
Copy Markdown
Owner

What changed

  • start the existing FileWatcher lifecycle instead of a raw observer
  • recover files that reached staging before the observer was ready
  • run the initial recovery scan outside FastAPI's event loop
  • create each DocumentProcessor with the live SQLAlchemy session for that job
  • add regression tests for active-session processing and startup recovery

Root cause

The application bypassed FileWatcher.start(), so pre-existing staging files were never scanned. The event handler also retained a processor initialized with a database session that startup immediately closed.

Validation

  • 5 focused tests pass
  • PowerShell parser and diff checks pass

Closes #1.

@JayRHa
JayRHa marked this pull request as ready for review July 26, 2026 14:35
@JayRHa
JayRHa merged commit e385a71 into main Jul 26, 2026
1 check passed
@JayRHa
JayRHa deleted the agent/fix-staging-processing branch July 26, 2026 14:35
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.

Docker container not starting

2 participants