Adds previews for 044.
Browse files- CLAUDE.md +14 -18
- data/ticks/044.parquet +2 -2
- data/ticks/046.parquet +3 -0
- previews/044/chamber.mp4 +3 -0
CLAUDE.md
CHANGED
|
@@ -275,7 +275,7 @@ scripts/
|
|
| 275 |
_lib.py # sibling-repo paths + JSONL streaming
|
| 276 |
ticks/
|
| 277 |
00_recover_spool41.py # one-off: recover build 41 from NVMe spool (DB was wiped)
|
| 278 |
-
00_export_new_db.py # one-off: export
|
| 279 |
01_extract.py # the single ETL — wide-pivot + asof + burst + embed
|
| 280 |
previews/
|
| 281 |
01_render.py # per-build MP4 previews from data/ticks/
|
|
@@ -384,32 +384,28 @@ If `expand()` in the recorder ever changes, all of those column names change wit
|
|
| 384 |
|
| 385 |
## Current state
|
| 386 |
|
| 387 |
-
- `ticks` config:
|
| 388 |
- `print_profile_name` is preserved on every row; the `print_profile_id` UUID is *not* materialized here (see the architectural decision above).
|
| 389 |
- `events` and `plotter_commands` not surfaced as configs.
|
| 390 |
- **Forward-fill semantics deferred.** Current attach is "fresh frame within 100 ms of tick or null." Carrying the latest captured frame forward to fill null rows is left to consumers (one-line groupby + ffill); baking it into the dataset would destroy the fresh-vs-stale signal that's the whole point of keeping nulls.
|
| 391 |
-
- `previews/` MP4s and timelapse GIFs:
|
| 392 |
|
| 393 |
-
## Build ID
|
| 394 |
|
| 395 |
-
The recorder's Postgres DB was wiped between build 040 and the next print (2026-07-09). The new DB restarted its `builds_id_seq` at 1
|
| 396 |
|
| 397 |
-
|
| 398 |
-
|---|---|---|
|
| 399 |
-
| — (spool only) | 041 | Unknown 2026_07_09 (~3h45m; DB wiped before import) |
|
| 400 |
-
| 1 | 042 | Nameplates 2026_07_09 (~5h40m) |
|
| 401 |
-
| 2 | 043 | D790 and D638 and Nameplate 2026_07_10 (~10h30m) |
|
| 402 |
-
| 3 | 044 | D790 and D638 and Other 2026_07_11 (in progress at time of writing) |
|
| 403 |
|
| 404 |
-
**To add a new build
|
| 405 |
```sh
|
| 406 |
-
uv run --with psycopg2-binary scripts/ticks/00_export_new_db.py
|
| 407 |
-
uv run scripts/ticks/01_extract.py
|
| 408 |
-
uv run scripts/previews/01_render.py
|
| 409 |
-
uv run scripts/previews/02_timelapse.py
|
| 410 |
```
|
|
|
|
| 411 |
|
| 412 |
-
|
| 413 |
|
| 414 |
## Adding a build — recipe
|
| 415 |
|
|
@@ -422,7 +418,7 @@ The long-term fix (resetting the DB sequence or adding a global build registry)
|
|
| 422 |
6. `uv run scripts/previews/02_timelapse.py N` → four timelapse GIFs under `previews/NNN/`
|
| 423 |
7. `git add data/ticks/NNN.parquet previews/NNN/` (LFS) and commit.
|
| 424 |
|
| 425 |
-
**If the
|
| 426 |
|
| 427 |
## Regenerate everything
|
| 428 |
|
|
|
|
| 275 |
_lib.py # sibling-repo paths + JSONL streaming
|
| 276 |
ticks/
|
| 277 |
00_recover_spool41.py # one-off: recover build 41 from NVMe spool (DB was wiped)
|
| 278 |
+
00_export_new_db.py # one-off: export DB builds with ID remap (old_id:new_id; identity N:N since 2026-07-13)
|
| 279 |
01_extract.py # the single ETL — wide-pivot + asof + burst + embed
|
| 280 |
previews/
|
| 281 |
01_render.py # per-build MP4 previews from data/ticks/
|
|
|
|
| 384 |
|
| 385 |
## Current state
|
| 386 |
|
| 387 |
+
- `ticks` config: 26 parquet files across builds 001–046 (with gaps; 045 is an empty/aborted build with no telemetry, so no file). Build 041 was recovered from the NVMe spool after the Postgres DB was wiped. Builds 042–043 were added under the old offset scheme; builds 044 and 046 were added 2026-07-13 via **identity mapping** now that the DB realigned to 1:1 — see "Build ID mapping" below.
|
| 388 |
- `print_profile_name` is preserved on every row; the `print_profile_id` UUID is *not* materialized here (see the architectural decision above).
|
| 389 |
- `events` and `plotter_commands` not surfaced as configs.
|
| 390 |
- **Forward-fill semantics deferred.** Current attach is "fresh frame within 100 ms of tick or null." Carrying the latest captured frame forward to fill null rows is left to consumers (one-line groupby + ffill); baking it into the dataset would destroy the fresh-vs-stale signal that's the whole point of keeping nulls.
|
| 391 |
+
- `previews/` MP4s and timelapse GIFs: rendered through 046. Timelapse GIFs re-rendered 2026-07-13 with `CHAMBER_BRIGHTNESS_RATIO` raised 0.25 → 0.5 to drop dim-frame flashes.
|
| 392 |
|
| 393 |
+
## Build ID mapping
|
| 394 |
|
| 395 |
+
**History.** The recorder's Postgres DB was wiped between build 040 and the next print (2026-07-09). The new DB briefly restarted its `builds_id_seq` at 1, so builds 042–043 were added under an **offset** (DB id 1→042, 2→043) to avoid colliding with the existing dataset files.
|
| 396 |
|
| 397 |
+
**Current state (verified 2026-07-13).** The DB has since realigned: it now holds builds 1–46 carrying the original job names, and **`build_id` matches the dataset id 1:1** — no offset needed. Builds carrying telemetry: `42, 43, 44, 46`. Build 45 is empty (aborted: no `ended_at`, 0 telemetry rows, `None` job name) and produces no dataset file. The exact mechanism of the realignment (restore from backup vs. re-import) is unconfirmed; treat the DB as a moving target and re-verify IDs before each import.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
|
| 399 |
+
**To add a new build**, use `00_export_new_db.py` with an **identity mapping** (`N:N`) — it scopes the export to one build and appends only that build's rows to the shared JSONL files (safer than re-running the recorder's `export.py`):
|
| 400 |
```sh
|
| 401 |
+
uv run --with psycopg2-binary scripts/ticks/00_export_new_db.py 46:46
|
| 402 |
+
uv run scripts/ticks/01_extract.py 46
|
| 403 |
+
uv run scripts/previews/01_render.py 46
|
| 404 |
+
uv run scripts/previews/02_timelapse.py 46
|
| 405 |
```
|
| 406 |
+
Before running, query the DB to confirm the target build has `ended_at` set and non-zero telemetry, and that its id doesn't already have a `data/ticks/{id:03d}.parquet`. **Don't run two `00_export_new_db.py` invocations concurrently** — they all append to the same `builds.jsonl`/`frames.jsonl`/`events.jsonl`, so parallel appends interleave and corrupt them. Run builds one at a time.
|
| 407 |
|
| 408 |
+
Frame files live in `data/frames/{build_id}/` and the paths stored in `frames.jsonl` reference those same ids, so the ETL reads them without renaming.
|
| 409 |
|
| 410 |
## Adding a build — recipe
|
| 411 |
|
|
|
|
| 418 |
6. `uv run scripts/previews/02_timelapse.py N` → four timelapse GIFs under `previews/NNN/`
|
| 419 |
7. `git add data/ticks/NNN.parquet previews/NNN/` (LFS) and commit.
|
| 420 |
|
| 421 |
+
**If the DB IDs don't line up with the recorder's `export.py` expectations** (e.g. after a reset/realignment): use `00_export_new_db.py` with an `old_id:new_id` mapping instead of step 2 — currently an identity mapping (`N:N`). See "Build ID mapping" above.
|
| 422 |
|
| 423 |
## Regenerate everything
|
| 424 |
|
data/ticks/044.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:99fbbd84b6865b68c91c65f4435eb620b35d34b9c4803a60e58abe909bf9caf4
|
| 3 |
+
size 12351398426
|
data/ticks/046.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9efcdbf9f8d7e4e1cd42c39c94c38ac16e3ded0664a67d65f784725c5475748e
|
| 3 |
+
size 2419355472
|
previews/044/chamber.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2871a0636456bb4897f59a2d5e25a7b4e17c8033001d3194dc68d19a48eb35b7
|
| 3 |
+
size 953417776
|