Conversation
Collaborator
Author
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
|
Summary
Testing
|
- data-downloader/backend/storage.py:51-83 now records the snapshot’s updated_at value and re-reads the store just before writing so _preserve_concurrent_note_updates
can merge in any notes edited while the scan was running instead of overwriting them with the stale snapshot.
- data-downloader/backend/storage.py:99-127 adds helpers that re-read runs.json, compare note_updated_at timestamps (parsed via datetime), and copy across whichever
note is newer, keeping user edits that landed during the scan window.
Addressed comment: "The scheduled scanner rebuilds runs.json from a snapshot taken at the start of merge_scanned_runs, then writes it back after the scan finishes. If a user edits a note while a scan is running, the scan process still writes the stale snapshot (lines 51‑80) and overwrites the user’s newer note because no cross‑process locking or reread happens before self.store.write. With the worker defaulting to hourly scans, this can silently discard user annotations whenever an edit overlaps with a scan. Consider rereading and merging just before the write, or using a file lock/last‑updated timestamp to detect and preserve newer notes.
"
haoruizhou
added a commit
that referenced
this pull request
Nov 13, 2025
Data Scanner and Downloader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic Full Database & Sensor Scanning
Summary
API Layer
run,sensor, andscannerresourcesFiles:
backend/app.py,backend/services.pyBackend Infrastructure
Files:
backend/server_scanner.py,backend/sql.py,backend/storage.py,backend/periodic_worker.pyContainerization
./datavolume via Docker Compose.Files:
docker-compose.yml,.env.example,backend/Dockerfile,frontend/DockerfileFrontend UI
Files:
frontend/src/App.tsx,frontend/src/components/RunTable.tsx,frontend/src/components/data-download.tsx,frontend/src/api.ts,frontend/src/styles.cssDemo & Data Seeding
Files:
README.md,data/runs.json,data/sensors.json,data/scanner_status.jsonUsage
Run locally with:
docker compose upScreenshots