Skip to content

fix(scripts): overnight.sh ran in the wrong directory and could snaps… - #24

Merged
parthchvn merged 1 commit into
mainfrom
agent/overnight-fixes
Aug 5, 2026
Merged

fix(scripts): overnight.sh ran in the wrong directory and could snaps…#24
parthchvn merged 1 commit into
mainfrom
agent/overnight-fixes

Conversation

@parthchvn

Copy link
Copy Markdown
Owner

…hot a phantom database

Two production bugs from the first committed version, observed live:

  • cd "$(dirname $0)" landed in scripts/, not the repo root, so every relative path resolved under scripts/runs/. Fixed to dirname/.. (grind-news.sh already did this correctly).
  • sqlite3.connect on the resulting missing forward.sqlite silently CREATED an empty database, which was then snapshotted and seeded into work.sqlite — producing an all-zero cycle and a 'no such table: raw_responses' crash in normalize. The snapshot step now refuses loudly if forward.sqlite is absent or has no raw_responses table: an empty database must never masquerade as the collector's.

Cleanup for anyone bitten: a phantom scripts/runs/ tree may exist and can be deleted; the real collector database was never touched.

…hot a phantom database

Two production bugs from the first committed version, observed live:

- cd "$(dirname $0)" landed in scripts/, not the repo root, so every
  relative path resolved under scripts/runs/. Fixed to dirname/..
  (grind-news.sh already did this correctly).
- sqlite3.connect on the resulting missing forward.sqlite silently
  CREATED an empty database, which was then snapshotted and seeded
  into work.sqlite — producing an all-zero cycle and a
  'no such table: raw_responses' crash in normalize. The snapshot
  step now refuses loudly if forward.sqlite is absent or has no
  raw_responses table: an empty database must never masquerade as
  the collector's.

Cleanup for anyone bitten: a phantom scripts/runs/ tree may exist
and can be deleted; the real collector database was never touched.
@parthchvn
parthchvn merged commit 50dd901 into main Aug 5, 2026
2 checks passed
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.

2 participants