Commit ·
742ea73
1
Parent(s): b4b58f0
Add exploratory recording timing sidecar (#51)
Browse files- Add exploratory recording timing sidecar (b2cdda32e53c17c45f3d96987c27bbf23ec1fa11)
Files changed (17)
- Archive_Specifications.md+31-11
- CHANGELOG.md+16
- README.md+36-16
- SCHEMA.md+36-2
- Standard_Time_Lapses/Provenance/README.md+13-4
- Standard_Time_Lapses/Provenance/Recording_Timing/README.mdAdded+85
- Standard_Time_Lapses/Provenance/Recording_Timing/SCHEMA.mdAdded+88
- Standard_Time_Lapses/Provenance/Recording_Timing/bundle.sha256Added+8
- Standard_Time_Lapses/Provenance/Recording_Timing/calibration_model.jsonAdded+67
- Standard_Time_Lapses/Provenance/Recording_Timing/calibration_observations.csvAdded+23
- Standard_Time_Lapses/Provenance/Recording_Timing/group_timing_summary.csvAdded+26
- Standard_Time_Lapses/Provenance/Recording_Timing/recording_timing.csvAdded
- Standard_Time_Lapses/Provenance/Recording_Timing/source_manifest.jsonAdded+168
- Standard_Time_Lapses/Provenance/Recording_Timing/validation_summary.jsonAdded+72
- VALIDATION.md+49-1
- tools/test_recording_timing.pyAdded+151
- tools/validate_recording_timing.pyAdded+1353
36 unmodified lines37383940414243444535 unmodified lines81828384858687888990914 unmodified lines9697989910010110210310436 unmodified lines- Capture resolution class: 2160p UHD (4K)- Still-image size: 4000 × 3000The 0.2-second interval is a protocol-level nominal setting, not a confirmedmeasurement for every Standard recording. It does not by itself establish acalibrated real-time basis for any record.AE/WB lock, autofocus, and stabilization are owner-reported for certainly themajority of this period, not confirmed as universal per-record facts. Deviations35 unmodified lines## Timing and Calibration StatusThe current protocol documentation does not provide a complete calibrated timebase for motor-control or physical-trajectory measurement. The nominal0.2-second setting records the intended protocol; the interval actually usedfor an individual recording remains unconfirmed unless separately documented.In particular, the following may be unknown for a recording:- confirmed per-record frame-capture interval- real drawing-session duration4 unmodified lines- camera model, lens, and mount geometry- pixel-to-physical coordinate mapping or homography`encoded_frame_rate` is playback rate only. It must not be treated as originaldrawing-time sampling or used to infer real drawing time unless separatelydocumented.## Drawing Surfaces36 unmodified lines37383940414243444546474835 unmodified lines848586878889909192939495969798991001011021031041054 unmodified lines11011111211311411511611711811912012112212312436 unmodified lines- Capture resolution class: 2160p UHD (4K)- Still-image size: 4000 × 3000The 0.2-second interval is a protocol-level nominal setting, not a confirmedmeasurement for every Standard recording. It does not by itself establish acalibrated real-time basis for any record. The separate exploratory[recording-timing sidecar](Standard_Time_Lapses/Provenance/Recording_Timing/README.md)documents a narrower empirical calibration for one observable recordingprofile.AE/WB lock, autofocus, and stabilization are owner-reported for certainly themajority of this period, not confirmed as universal per-record facts. Deviations35 unmodified lines## Timing and Calibration StatusThe current protocol documentation does not provide a complete calibrated timebase for motor-control or physical-trajectory measurement. The nominal0.2-second setting records the intended protocol; the interval actually usedfor an individual recording remains unconfirmed unless separately documented.At source revision`b4b58f0ce0effb31ebf7671fbb0bd9c11765db4e`, the exploratory recording-timingsidecar interprets 22 retained device-filename timestamps as recording startsand their matching MP4 creation tags as finalization boundaries. Those directobservations fit a profile-specific elapsed-time model that is applied to 164additional observable-profile-matched fragments. The model is in-sample, hasno independent holdout, and does not identify its empirical intercept as aphysical capture constant. Its two-second start allowance is an operationalreview threshold rather than a proven semantic error bound.In particular, the following may still be unknown for a recording:- confirmed per-record frame-capture interval- real drawing-session duration4 unmodified lines- camera model, lens, and mount geometry- pixel-to-physical coordinate mapping or homography`encoded_frame_rate` is playback rate only. It must not be treated as originaldrawing-time sampling. The timing sidecar uses decoded frame count only insideits separately documented empirical model; it does not recover source-frametimestamps, uninterrupted drawing duration, or drawing-active time.Canonical `duration_seconds` remains encoded playback duration. The timingmodel uses separate timestamp-boundary evidence and probed frame counts; itdoes not reinterpret encoded duration or `encoded_frame_rate` as wall-clocktime.## Drawing Surfaces
12345# Changelog## v0.4.0 — Release candidate (2026-09-03)This release candidate consolidates every reviewed post-v0.3 change into one123456789101112131415161718192021# Changelog## Unreleased### Exploratory recording-timing sidecar- Added a revision-pinned, noncanonical timing layer for the 186 canonicalFramelapse fragments in the six dated relationship sidecars.- Recorded 22 retained device-filename start observations and matching MP4finalization boundaries; used them to fit one profile-specific empiricalelapsed-time model for 164 additional observable-profile-matched fragments.- Preserved one 43,221-second documented-finish conflict without silentlycorrecting the existing finish label. The calibration has no independentholdout and does not claim drawing-active time or source-frame timestamps.- Added deterministic sidecar validation and SHA-256 inventory. No MP4,canonical metadata row or field, relationship sidecar, Viewer configuration,or root `SHA256SUMS` payload entry changed.## v0.4.0 — Release candidate (2026-09-03)This release candidate consolidates every reviewed post-v0.3 change into one
402 unmodified lines40340440540640740840941041141241346 unmodified lines460461462463464465466467468469470108 unmodified lines579580581582583584585586587588194 unmodified lines783784785786787788789790402 unmodified linesThis subtree contains supporting historical records and retained exceptions.It is not part of the canonical record set.`2026-07-31/` preserves the completed provenance release, including mappingsbetween historical `Series_9x12` filenames and canonical records. The formerfull duplicate video snapshot is not retained. Relationships are preservedthrough mappings, hashes, metadata, and repository history. See the[provenance navigation index](Standard_Time_Lapses/Provenance/README.md).### `Pre_Standard_Time_Lapses/`46 unmodified linesobserved-value lists; equal list lengths and positional pairing are notguaranteed. See `SCHEMA.md`.The Standard protocol documents a nominal 0.2-second capture interval. This isa protocol-level default, not a confirmed per-record measurement, and it doesnot establish a calibrated real-time basis. `encoded_frame_rate` remainsencoded playback rate, not original drawing-time sampling, and must not be usedto infer real drawing time unless separately documented.### Physical-reference relationship layer108 unmodified lines- temporal behavior analysis- real-world trajectory, velocity, acceleration, or motor-control measurementThe release does not provide confirmed per-record capture intervals,acceleration factors, source-frame timestamps, camera calibration, orpixel-to-physical coordinate mapping. The nominal Standard interval alone isnot calibrated real-time evidence.### Not validated194 unmodified linesdoes not describe the current snapshot or provide video-payload checksums- `tools/` — inventory capture, verified download, checksum, enrichment, andvalidation helpers- `Standard_Time_Lapses/Provenance/` — historical evidence and datedfragment-sequence relationships- `Physical_References/` — physical-reference relationship schema, manifest,and sidecar402 unmodified lines40340440540640740840941041141241341441541641741841942046 unmodified lines467468469470471472473474475476477478479480481482483484485486108 unmodified lines595596597598599600601602603604605606607194 unmodified lines802803804805806807808809810402 unmodified linesThis subtree contains supporting historical records and retained exceptions.It is not part of the canonical record set.`2026-07-31/` preserves the completed provenance release, including mappingsbetween historical `Series_9x12` filenames and canonical records. The formerfull duplicate video snapshot is not retained. Relationships are preservedthrough mappings, hashes, metadata, and repository history. See the[provenance navigation index](Standard_Time_Lapses/Provenance/README.md).[`Recording_Timing/`](Standard_Time_Lapses/Provenance/Recording_Timing/README.md)is a separate revision-pinned exploratory timing layer for the 186 canonicalfragments in the six dated relationship sidecars. It contains 22 directfilename-to-MP4-boundary observations and 164 profile-matched calibratedestimates. It does not change the canonical index or establish drawing-activetime, per-frame timestamps, or a universal capture interval.### `Pre_Standard_Time_Lapses/`46 unmodified linesobserved-value lists; equal list lengths and positional pairing are notguaranteed. See `SCHEMA.md`.The Standard protocol documents a nominal 0.2-second capture interval. Itremains a protocol-level default, not a confirmed per-record measurement acrossthe Standard collection. A separate, revision-pinned[recording-timing sidecar](Standard_Time_Lapses/Provenance/Recording_Timing/README.md)covers the 186 canonical Framelapse fragments in the six dated relationshiplayers. It keeps 22 device-filename timestamp observations separate from 164profile-matched estimates produced by a versioned, in-sample frame-count model.The resulting values describe fragment start-to-MP4-finalization wall-clockelapsed time; they do not confirm the nominal interval, supply source-frametimestamps, or establish drawing-active time.`duration_seconds` and `encoded_frame_rate` remain encoded-playback properties.Neither supplies wall-clock or drawing-time calibration by itself, and thederived sidecar does not reinterpret them.### Physical-reference relationship layer108 unmodified lines- temporal behavior analysis- real-world trajectory, velocity, acceleration, or motor-control measurementThe release does not provide confirmed per-record capture intervals,acceleration factors, source-frame timestamps, camera calibration, orpixel-to-physical coordinate mapping. The nominal Standard interval alone isnot calibrated real-time evidence. The exploratory recording-timing sidecaradds fragment-level start-to-finalization observations or estimates for 186prospective fragments only; it does not close these frame-level or physicalcalibration gaps.### Not validated194 unmodified linesdoes not describe the current snapshot or provide video-payload checksums- `tools/` — inventory capture, verified download, checksum, enrichment, andvalidation helpers- `Standard_Time_Lapses/Provenance/` — historical evidence and datedfragment-sequence relationships, plus the exploratory revision-pinnedrecording-timing sidecar- `Physical_References/` — physical-reference relationship schema, manifest,and sidecar
12345678283 unmodified lines29229329429529629753 unmodified lines3513523533543553567 unmodified lines364365366367# SchemaThis document defines canonical filenames, the active video-object indexes,and their relationship sidecars. Filenames are human-readable descriptions;`record_id` is the persistent identity of one published video object.## Canonical Filename Format283 unmodified lines`RecNN` row absent from these dated sidecars retains`standard-2025-07-13`; absence does not establish that no relationship exists.## Physical-reference sidecar`Physical_References/endpoint_references.csv` is an optional derived53 unmodified linesViewer configurations- relationship paths, Xet identities, sizes, and canonical `record_id` joinsresolve at the exact declared `source_hub_revision`- `SHA256SUMS` exactly covers every published MP4 and ZIP at the reviewedrevision, with no missing, extra, duplicate, or mismatched entries7 unmodified linespython tools/validate_sha256sums.py SHA256SUMS \--repo-json repo_api_blobs.json \--revision "<40-hex-commit>"```123456789283 unmodified lines29329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532653 unmodified lines3803813823833843853863873887 unmodified lines396397398399400401# SchemaThis document defines canonical filenames, the active video-object indexes,and their relationship and timing sidecars. Filenames are human-readabledescriptions; `record_id` is the persistent identity of one published videoobject.## Canonical Filename Format283 unmodified lines`RecNN` row absent from these dated sidecars retains`standard-2025-07-13`; absence does not establish that no relationship exists.## Recording-timing sidecar`Standard_Time_Lapses/Provenance/Recording_Timing/recording_timing.csv` is anexploratory derived table for the 186 canonical fragments in those six datedrelationship sidecars. It joins to the canonical Standard index on `record_id`and declares the exact source Hub revision. It is outside both active videoindexes and does not add or replace canonical metadata fields.The sidecar keeps three timing concepts separate:- `device_filename_start_local` is present only when a retained`VID_YYYYMMDD_HHMMSS.mp4` source name supplies a whole-second timestampinterpreted as recording start.- `format_creation_time_utc` and `video_creation_time_utc` preserve literal MP4tags treated as the best-supported file-finalization boundary, not auniversally guaranteed stop time.- `capture_start_time_utc` and `recording_elapsed_seconds` are direct for 22rows and profile-specific model estimates for 164 rows, as declared by`timing_basis`, `calibration_profile_status`, and `timing_model_id`.Canonical `date` and `time` remain documented group-finish labels. They are notoverwritten by sidecar starts or MP4 boundaries. The model has no independentholdout; its allowances are operational review thresholds, not proven errorbounds. The sidecar does not establish drawing-active time, continuous work,source-frame timestamps, pen contact, or physical motion. Its complete fieldand auxiliary-file contracts are defined in[`Recording_Timing/SCHEMA.md`](Standard_Time_Lapses/Provenance/Recording_Timing/SCHEMA.md).## Physical-reference sidecar`Physical_References/endpoint_references.csv` is an optional derived53 unmodified linesViewer configurations- relationship paths, Xet identities, sizes, and canonical `record_id` joinsresolve at the exact declared `source_hub_revision`- recording-timing identities, direct timestamp arithmetic, calibrationformulas, sequence chronology, retained conflicts, and bundle hashes resolveat the exact declared source revision- `SHA256SUMS` exactly covers every published MP4 and ZIP at the reviewedrevision, with no missing, extra, duplicate, or mismatched entries7 unmodified linespython tools/validate_sha256sums.py SHA256SUMS \--repo-json repo_api_blobs.json \--revision "<40-hex-commit>"python tools/validate_recording_timing.py --root .```
4 unmodified lines5678910111213144 unmodified linesplacement does not make a media object canonical.Each active metadata row continues to identify one published video object.Relationship sidecars can group those objects without merging their persistent`record_id` values or asserting undocumented drawing- or session-level facts.## Dated layers- [`2026-07-31/`](2026-07-31/) preserves historical filename-to-record mappingsand the pre-rebuild metadata snapshot without retaining the former duplicate4 unmodified lines5678910111213141516171819202122234 unmodified linesplacement does not make a media object canonical.Each active metadata row continues to identify one published video object.Relationship sidecars can group those objects without merging their persistent`record_id` values or asserting undocumented drawing- or session-level facts.## Cross-date derived layers- [`Recording_Timing/`](Recording_Timing/README.md) is an exploratoryrevision-pinned timing layer for the 186 canonical fragments in the six datedrelationship sidecars. It uses 22 retained device-filename start observationsto calibrate 164 profile-matched elapsed estimates, preserves one unresolved43,221-second (12:00:21) finish-label conflict, and does not alter canonicalmetadata or claim drawing-active time.## Dated layers- [`2026-07-31/`](2026-07-31/) preserves historical filename-to-record mappingsand the pre-rebuild metadata snapshot without retaining the former duplicate
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485# Recording timing sidecar
This directory publishes an exploratory derived timing layer for the 186canonical Framelapse source fragments covered by the six dated relationshipsidecars. The source archive is pinned to Hub revision`b4b58f0ce0effb31ebf7671fbb0bd9c11765db4e`.
This layer does not alter the canonical 29-field `metadata.csv`, create a newcanonical media index, or establish an official benchmark or dataset split.
## What the evidence supports
For 22 fragments, retained source-device filenames of the form`VID_YYYYMMDD_HHMMSS.mp4` provide whole-second local timestamps interpreted asrecording starts. Their matching MP4 format and video-stream `creation_time`tags provide the best-supported finalization boundaries. Those 22 observationssupport the profile-specific empirical model:
`estimated_elapsed_seconds = 0.8 + video_frame_count * 7 / 30`
The largest absolute in-sample residual is 0.833 seconds. The 0.8-second termis an empirical intercept, not a physical capture constant; it may combinetimestamp quantization with stable file-opening or finalization overhead.
The remaining 164 fragments lack retained device start names. Their observabletechnical profile matches the calibration cohort, so the model is applied witha conservative two-second operational review allowance. Device identity andFramelapse version are not independently retained for each application row,and the calibration has no independent holdout.
The literal container tag `com.android.capture.fps=5.000000` is preserved assource metadata but is not used as a real-time divisor. Across the 22 directobservations, dividing frame count by five understates elapsed wall time by59.6 to 314.8 seconds per fragment.
## Results and retained conflicts
- 22 filename-timestamp observations and 164 calibrated estimates- 25 owner-confirmed complete fragment sequences- 161 within-sequence transitions: 159 positive beyond uncertainty, two indistinguishable from zero within uncertainty, and none negative beyond uncertainty- 24 of 25 final MP4 boundaries within 83 seconds of the documented group finish minute- one unresolved finish-label conflict for `2026-09-01.0213...`: the final MP4 boundary is 43,221 seconds, or 12:00:21, after the documented finish minute; no timestamp is silently corrected
The selected fragment intervals total approximately 30.548 hours. This mixes22 observed filename-to-boundary intervals with 164 calibrated estimates; itis not drawing-active time or corpus calendar span.
## Files
- `recording_timing.csv` — 186 fragment-level timing rows- `calibration_observations.csv` — the 22 direct calibration observations- `calibration_model.json` — constants, fit diagnostics, applicability, and exclusions- `group_timing_summary.csv` — 25 sequence-level QA summaries- `SCHEMA.md` — field definitions and evidence boundaries- `source_manifest.json` — pinned source, hash, size, and audit receipts- `validation_summary.json` — deterministic validation results- `bundle.sha256` — SHA-256 inventory of every other file in this directory
From a repository checkout, validate the layer with:
```shellpython tools/validate_recording_timing.py --root .```
That command verifies repository-packet self-consistency: identities andreceipts, formulas, chronology, summaries, and bundle hashes. It does notre-probe the 186 source videos, recompute their ordinary SHA-256 values, verifythe retained local audit bytes, or re-observe NTFS timestamps. Those limits areexplicit in `validation_summary.json`; the NTFS cross-check remains local andis not part of this publication layer.
## Interpretation boundaries
`recording_elapsed_seconds` describes observed or estimated wall-clock timefrom a filename-interpreted or modeled fragment start to the MP4 finalizationboundary. It does not establish continuous drawing, pen contact, active work,source-frame timestamps, intent, attention, or mental state. A positiveinter-fragment gap marks time between file boundaries; it does not prove theartist stopped drawing. A gap within uncertainty is not a proven pause.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788# Recording timing sidecar schema
This schema describes an exploratory derived layer over`maxwellinked/time-lapse-artifacts` at revision`b4b58f0ce0effb31ebf7671fbb0bd9c11765db4e`. It does not alter the canonical29-field `metadata.csv`.
## Primary table
| Field | Type | Meaning || --- | --- | --- || `record_id` | string | Stable canonical record identifier; direct identity join. || `file_path` | string | Canonical repository-relative media path; direct identity join. || `sha256` | string | Ordinary SHA-256 of the source media bytes; direct audit value. || `hub_xet_hash` | string | Hugging Face Xet object identity; kept distinct from ordinary SHA-256. || `fragment_set_label` | string | Owner-reviewed fragment grouping label; not a corpus-wide work_id. || `sequence_position` | integer | One-based chronological fragment position from the relationship sidecar. || `sequence_count` | integer | Fragment count for the owner-confirmed complete sequence. || `source_hub_revision` | string | Pinned Hub revision recorded by the dated relationship sidecar. || `source_audit_id` | string | Logical identifier of the retained local media-probe audit. || `source_filename` | string | Filename recorded in the source audit. Twenty-two retain VID device names; later files use canonical names. || `format_creation_time_utc` | UTC ISO-8601 string | Literal MP4 format-level creation_time tag; best-supported finalization boundary, not universally guaranteed stop time. || `video_creation_time_utc` | UTC ISO-8601 string | Literal video-stream creation_time tag. It equals the format tag for all 186 rows. || `capture_fps_tag_literal` | string | Literal com.android.capture.fps value. Preserved as 5.000000 and explicitly not used as elapsed-time fps. || `video_frame_count` | integer | Direct decoded/probed video frame count. || `local_time_zone` | string | IANA time zone used for local rendering and filename interpretation: America/New_York. || `device_filename_start_local` | ISO-8601 string or blank | Whole-second device-filename timestamp, interpreted as a recording start, parsed only from a retained VID_YYYYMMDD_HHMMSS.mp4 filename. || `format_creation_time_local` | ISO-8601 string | Local rendering of the literal MP4 creation boundary. || `capture_start_time_utc` | UTC ISO-8601 string | Device-filename timestamp interpreted as start for 22 rows; model-derived start for 164 rows. || `capture_start_time_local` | ISO-8601 string | Local rendering of capture_start_time_utc. || `timing_basis` | enum | direct_device_filename_start or calibrated_frame_model. || `recording_elapsed_seconds` | number | Filename-start-to-boundary elapsed for 22 rows; calibrated start-to-boundary estimate for 164 rows. Not drawing-active time. || `start_uncertainty_seconds` | number | Operational timestamp-resolution allowance: 1 second for whole-second device filenames; conservative 2 seconds for calibrated starts. It is not a proven semantic error bound. || `timing_model_id` | string | Versioned calibration method identifier. || `calibration_profile_status` | enum | calibration_observation for 22 direct rows; observable_profile_match_only for 164 applications. || `previous_record_id` | string or blank | Previous member of the same sequence; blank for position 1. || `inter_fragment_gap_seconds` | number or blank | Selected next start minus previous MP4 creation boundary; blank for position 1. || `gap_uncertainty_seconds` | number or blank | Operational uncertainty: 2 seconds when next start is direct, 3 seconds when calibrated. || `gap_status` | enum | blank_for_first, positive_above_uncertainty, within_uncertainty_of_zero, or negative_beyond_uncertainty. || `documented_group_finish_date` | YYYY-MM-DD | Existing group-level documented finish date from canonical metadata; not an individual fragment date. || `documented_group_finish_time` | HH:MM | Existing group-level documented finish minute from canonical metadata; not an individual fragment time. || `group_finish_delta_seconds` | number | Final fragment MP4 creation boundary minus the documented group finish minute. || `group_finish_crosscheck_status` | enum | near_documented_finish_minute when absolute delta is at most 120 seconds; otherwise documented_finish_conflict. || `timing_evidence_state` | semicolon list | Compact direct-versus-derived evidence ledger for the row. || `notes` | string or blank | Only material unresolved timing conflicts; no silent correction. |
## Timing model
For the 22 rows with retained `VID_YYYYMMDD_HHMMSS.mp4` source names, the filename supplies a whole-second timestamp interpreted as the recording start and the matching MP4 `creation_time` supplies the best-supported finalization boundary. Those observations calibrate:
`estimated_elapsed_seconds = 0.8 + video_frame_count * 7 / 30`
The 0.8-second empirical intercept improves the in-sample fit but is not identified as a physical capture constant; it may combine timestamp quantization and stable open/finalization overhead. The 164 rows without retained device filenames use the model because their observable technical profile matches the calibration cohort. This is an application assumption, not a per-file direct measurement. See `calibration_model.json` and `calibration_observations.csv`.
The literal `com.android.capture.fps=5.000000` tag is preserved as source metadata. It is contradicted as an elapsed-time divisor by all 22 direct observations and is not used in the model.
## Auxiliary files
- `calibration_observations.csv` contains exactly the 22 primary-table rows with direct device-filename starts. It records the start and boundary timestamps, frame count, observed and modeled elapsed values, residuals, the rejected nominal-five-fps calculation, and video frames per observed wall second. The last quantity is a calibration diagnostic, not encoded FPS or capture cadence.- `group_timing_summary.csv` contains one row for each of the 25 fragment sets. It reports direct and calibrated row counts, first start and last boundary, the sum of selected fragment intervals, observed calendar span, gap counts, documented finish cross-check, and any retained conflict note.- `calibration_model.json` is the versioned model contract. It declares the pinned dataset revision, exact rational formula constants, 22-row in-sample fit diagnostics, zero holdout rows, application profile, operational allowances, and exclusions.- `source_manifest.json` binds the pinned canonical metadata and six relationship sidecars by path, size, hash, row count, and source revision. Retained local audit receipts are identified by logical ID and hash but are not bundled.- `validation_summary.json` is the deterministic result summary; it records identity, source, calibration, chronology, finish-crosscheck, aggregate, and immutability checks without replacing the executable validator.- `bundle.sha256` contains the ordinary SHA-256 of every other file in this directory. It deliberately does not inventory itself.
## Boundaries
The elapsed values describe observed or estimated fragmentstart-to-finalization wall-clock intervals. They do not establish continuousdrawing, pen contact, drawing-active time, source-frame timestamps, intent,attention, or mental state. A positive inter-fragment gap marks time betweentwo file boundaries, not necessarily a break from drawing. A gap withinuncertainty is not a proven pause.123456783ab0e8c42716272222fc791ebd19fa70a8847cb1aaa4214089dcd822acd6be21 calibration_model.json3b73b35841363e4cb45f7991a4981b92673fcc6a28d1335dfc37363b42489a7f calibration_observations.csv0c6a904c1f3e653683ee32992f43024f9cb94410bff79d4404d9486c144cba44 group_timing_summary.csv959667ea3d64cd9e5320e33ceda8531c3b1159d8297f310af0f4517789e2c2a6 README.md97e5309502668056e5c4367ae7684597c9ca98a8f7fd12a4d85792a3b783d1cf recording_timing.csv0d34f10e1b410bb8b420b01e9cdfed14be8da3e6a3ec42fe1f4270d9f78c49ab SCHEMA.md7452018578a638c4c3d6d419756c26db3ddcac5d93659ba3fa98c835935e5af2 source_manifest.jsonc0b72660f1c65a7100870b78c40478af3fa4aabab4304d86f5753b26e36c71af validation_summary.json12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667{ "model_id": "tla-framelapse-android14-tag5-empirical-v1", "status": "revision_pinned_exploratory_in_sample_calibration", "source_dataset_revision": "b4b58f0ce0effb31ebf7671fbb0bd9c11765db4e", "target_quantity": "fragment start-to-MP4-finalization-boundary wall-clock elapsed time", "formula": "estimated_elapsed_seconds = 0.8 + video_frame_count * 7 / 30", "constants": { "empirical_intercept_seconds": 0.8, "seconds_per_frame_numerator": 7, "seconds_per_frame_denominator": 30 }, "calibration": { "sample_count": 22, "group_count": 5, "holdout_count": 0, "start_reference": "VID_YYYYMMDD_HHMMSS.mp4 source-device filename timestamp, interpreted as a recording start in America/New_York local time", "end_reference": "matching format/video MP4 creation_time UTC tag; treated as best-supported finalization boundary", "model_residual_seconds_observed_minus_estimated": { "minimum": -0.833333, "maximum": 0.466667, "mean": 0.012121, "standard_deviation_population": 0.356405, "root_mean_square": 0.356611, "maximum_absolute": 0.833333 }, "no_offset_seven_thirtieths_residual_seconds": { "minimum": -0.033333, "maximum": 1.266667, "mean": 0.812121 }, "video_frames_per_observed_wall_second": { "minimum": 4.2731707, "maximum": 4.2859425, "mean": 4.2815612, "standard_deviation_population": 0.0030955 }, "nominal_five_fps_error_seconds_observed_minus_n_over_5": { "minimum": 59.6, "maximum": 314.8, "mean": 154.982 } }, "application": { "direct_start_rows": 22, "calibrated_estimate_rows": 164, "profile_match_fields": [ "Android version tag 14", "MP4 major brand mp42", "3840x2160 stored dimensions", "HEVC/yuvj420p", "-90 degree display rotation", "no audio", "literal com.android.capture.fps=5.000000", "encoded frame rate near 30 fps" ], "limitation": "Device identity and Framelapse app version are not independently retained for the 164 application rows; applicability is an observable-profile match, not a per-file direct calibration.", "direct_filename_timestamp_resolution_allowance_seconds": 1, "estimated_start_uncertainty_seconds": 2, "calibrated_gap_uncertainty_seconds": 3, "uncertainty_note": "These are operational timestamp-resolution allowances for review and flagging, not proven semantic error bounds." }, "exclusions": [ "The literal capture tag 5.000000 is not used as a real-time divisor.", "The model does not measure drawing activity, pen contact, uninterrupted work, source-frame timestamps, or mental state.", "The calibration is in-sample and has no independent holdout." ]}1234567891011121314151617181920212223record_id,file_path,source_filename,direct_start_local,direct_start_utc,creation_boundary_local,creation_boundary_utc,video_frame_count,observed_elapsed_seconds,nominal_five_fps_elapsed_seconds,nominal_five_fps_error_seconds,model_elapsed_seconds,model_residual_seconds,video_frames_per_observed_wall_secondtla-46790887b96058b1,Standard_Time_Lapses/2026-08-24.0157.BallpointPen.Ink.Paper.9x12.Rec01.mp4,VID_20260823_233143.mp4,2026-08-23T23:31:43-04:00,2026-08-24T03:31:43.000Z,2026-08-24T00:05:33-04:00,2026-08-24T04:05:33.000000Z,8695,2030,1739,291,2029.633,0.367,4.283251
tla-ebbce867454d61ea,Standard_Time_Lapses/2026-08-24.0157.BallpointPen.Ink.Paper.9x12.Rec02.mp4,VID_20260824_013639.mp4,2026-08-24T01:36:39-04:00,2026-08-24T05:36:39.000Z,2026-08-24T01:58:23-04:00,2026-08-24T05:58:23.000000Z,5585,1304,1117,187,1303.967,0.033,4.282975
tla-e31f5059a75da52c,Standard_Time_Lapses/2026-08-24.0638.BallpointPen.Ink.Paper.12x9.Rec01.mp4,VID_20260824_044026.mp4,2026-08-24T04:40:26-04:00,2026-08-24T08:40:26.000Z,2026-08-24T05:00:36-04:00,2026-08-24T09:00:36.000000Z,5182,1210,1036.4,173.6,1209.933,0.067,4.282645
tla-e6314ca067353edc,Standard_Time_Lapses/2026-08-24.0638.BallpointPen.Ink.Paper.12x9.Rec02.mp4,VID_20260824_061839.mp4,2026-08-24T06:18:39-04:00,2026-08-24T10:18:39.000Z,2026-08-24T06:39:03-04:00,2026-08-24T10:39:03.000000Z,5244,1224,1048.8,175.2,1224.4,-0.4,4.284314
tla-2b3cc71f11ea0151,Standard_Time_Lapses/2026-08-25.1941.BallpointPen.Ink.Paper.9x12.Rec01.mp4,VID_20260824_074143.mp4,2026-08-24T07:41:43-04:00,2026-08-24T11:41:43.000Z,2026-08-24T07:51:52-04:00,2026-08-24T11:51:52.000000Z,2607,609,521.4,87.6,609.1,-0.1,4.280788
tla-3a4ed6625d6aae32,Standard_Time_Lapses/2026-08-25.1941.BallpointPen.Ink.Paper.9x12.Rec02.mp4,VID_20260824_090248.mp4,2026-08-24T09:02:48-04:00,2026-08-24T13:02:48.000Z,2026-08-24T09:24:30-04:00,2026-08-24T13:24:30.000000Z,5576,1302,1115.2,186.8,1301.867,0.133,4.282642
tla-08603b7d034d579a,Standard_Time_Lapses/2026-08-25.1941.BallpointPen.Ink.Paper.9x12.Rec03.mp4,VID_20260825_145801.mp4,2026-08-25T14:58:01-04:00,2026-08-25T18:58:01.000Z,2026-08-25T15:34:42-04:00,2026-08-25T19:34:42.000000Z,9431,2201,1886.2,314.8,2201.367,-0.367,4.284871
tla-d743accc0cc418b4,Standard_Time_Lapses/2026-08-25.1941.BallpointPen.Ink.Paper.9x12.Rec04.mp4,VID_20260825_160133.mp4,2026-08-25T16:01:33-04:00,2026-08-25T20:01:33.000Z,2026-08-25T16:08:46-04:00,2026-08-25T20:08:46.000000Z,1851,433,370.2,62.8,432.7,0.3,4.274827
tla-dab77d429267838b,Standard_Time_Lapses/2026-08-25.1941.BallpointPen.Ink.Paper.9x12.Rec05.mp4,VID_20260825_162129.mp4,2026-08-25T16:21:29-04:00,2026-08-25T20:21:29.000Z,2026-08-25T16:37:54-04:00,2026-08-25T20:37:54.000000Z,4216,985,843.2,141.8,984.533,0.467,4.280203
tla-d611b60118251c73,Standard_Time_Lapses/2026-08-25.1941.BallpointPen.Ink.Paper.9x12.Rec06.mp4,VID_20260825_191231.mp4,2026-08-25T19:12:31-04:00,2026-08-25T23:12:31.000Z,2026-08-25T19:41:28-04:00,2026-08-25T23:41:28.000000Z,7443,1737,1488.6,248.4,1737.5,-0.5,4.284974
tla-bbb65ede9e37e03c,Standard_Time_Lapses/2026-08-26.1229.BallpointPen.Ink.Paper.9x12.Rec01.mp4,VID_20260826_113641.mp4,2026-08-26T11:36:41-04:00,2026-08-26T15:36:41.000Z,2026-08-26T11:59:19-04:00,2026-08-26T15:59:19.000000Z,5815,1358,1163,195,1357.633,0.367,4.282032
tla-3adf012f9f23d1d4,Standard_Time_Lapses/2026-08-26.1229.BallpointPen.Ink.Paper.9x12.Rec02.mp4,VID_20260826_122231.mp4,2026-08-26T12:22:31-04:00,2026-08-26T16:22:31.000Z,2026-08-26T12:29:21-04:00,2026-08-26T16:29:21.000000Z,1752,410,350.4,59.6,409.6,0.4,4.273171
tla-db8e5247b8ffbfcd,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec01.mp4,VID_20260826_124754.mp4,2026-08-26T12:47:54-04:00,2026-08-26T16:47:54.000Z,2026-08-26T12:56:27-04:00,2026-08-26T16:56:27.000000Z,2196,513,439.2,73.8,513.2,-0.2,4.280702
tla-f4659f0da42cf8e6,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec02.mp4,VID_20260826_130112.mp4,2026-08-26T13:01:12-04:00,2026-08-26T17:01:12.000Z,2026-08-26T13:11:38-04:00,2026-08-26T17:11:38.000000Z,2683,626,536.6,89.4,626.833,-0.833,4.285942
tla-d985c298e56b626b,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec03.mp4,VID_20260826_135332.mp4,2026-08-26T13:53:32-04:00,2026-08-26T17:53:32.000Z,2026-08-26T14:04:36-04:00,2026-08-26T18:04:36.000000Z,2841,664,568.2,95.8,663.7,0.3,4.278614
tla-8d4e89f78b6cfb9d,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec04.mp4,VID_20260826_152231.mp4,2026-08-26T15:22:31-04:00,2026-08-26T19:22:31.000Z,2026-08-26T15:37:53-04:00,2026-08-26T19:37:53.000000Z,3946,922,789.2,132.8,921.533,0.467,4.279826
tla-06b42c49789802b4,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec05.mp4,VID_20260827_044715.mp4,2026-08-27T04:47:15-04:00,2026-08-27T08:47:15.000Z,2026-08-27T05:01:16-04:00,2026-08-27T09:01:16.000000Z,3601,841,720.2,120.8,841.033,-0.033,4.281807
tla-10c744cb86d89256,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec06.mp4,VID_20260827_053657.mp4,2026-08-27T05:36:57-04:00,2026-08-27T09:36:57.000Z,2026-08-27T05:58:58-04:00,2026-08-27T09:58:58.000000Z,5658,1321,1131.6,189.4,1321,0,4.283119
tla-56d81a0cc1a81233,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec07.mp4,VID_20260827_063456.mp4,2026-08-27T06:34:56-04:00,2026-08-27T10:34:56.000Z,2026-08-27T07:06:24-04:00,2026-08-27T11:06:24.000000Z,8086,1888,1617.2,270.8,1887.533,0.467,4.282839
tla-dfeb6702936333a5,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec08.mp4,VID_20260827_073057.mp4,2026-08-27T07:30:57-04:00,2026-08-27T11:30:57.000Z,2026-08-27T07:46:49-04:00,2026-08-27T11:46:49.000000Z,4078,952,815.6,136.4,952.333,-0.333,4.283613
tla-3e01cce98d9d3ff3,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec09.mp4,VID_20260827_080100.mp4,2026-08-27T08:01:00-04:00,2026-08-27T12:01:00.000Z,2026-08-27T08:14:04-04:00,2026-08-27T12:14:04.000000Z,3358,784,671.6,112.4,784.333,-0.333,4.283163
tla-e1c799958f3cf010,Standard_Time_Lapses/2026-08-27.0856.BallpointPen.Ink.Paper.9x12.Rec10.mp4,VID_20260827_084919.mp4,2026-08-27T08:49:19-04:00,2026-08-27T12:49:19.000Z,2026-08-27T08:56:45-04:00,2026-08-27T12:56:45.000000Z,1908,446,381.6,64.4,446,0,4.2780271234567891011121314151617181920212223242526fragment_set_label,fragment_count,direct_start_count,calibrated_start_count,first_capture_start_utc,last_creation_boundary_utc,recording_elapsed_seconds_sum,group_wall_span_seconds,within_group_gap_seconds_sum,within_uncertainty_gap_count,documented_group_finish_date,documented_group_finish_time,group_finish_delta_seconds,group_finish_crosscheck_status,source_hub_revision,notes
2026-08-24.0157.BallpointPen.Ink.Paper.9x12,2,2,0,2026-08-24T03:31:43.000Z,2026-08-24T05:58:23.000000Z,3334,8800,5466,0,2026-08-24,01:57,83,near_documented_finish_minute,8a21015210c19936d3b18175ae3f4061ae1e5d8d,
2026-08-24.0638.BallpointPen.Ink.Paper.12x9,2,2,0,2026-08-24T08:40:26.000Z,2026-08-24T10:39:03.000000Z,2434,7117,4683,0,2026-08-24,06:38,63,near_documented_finish_minute,8a21015210c19936d3b18175ae3f4061ae1e5d8d,
2026-08-25.1941.BallpointPen.Ink.Paper.9x12,6,6,0,2026-08-24T11:41:43.000Z,2026-08-25T23:41:28.000000Z,7267,129585,122318,0,2026-08-25,19:41,28,near_documented_finish_minute,8a21015210c19936d3b18175ae3f4061ae1e5d8d,
2026-08-26.1229.BallpointPen.Ink.Paper.9x12,2,2,0,2026-08-26T15:36:41.000Z,2026-08-26T16:29:21.000000Z,1768,3160,1392,0,2026-08-26,12:29,21,near_documented_finish_minute,8a21015210c19936d3b18175ae3f4061ae1e5d8d,
2026-08-27.0856.BallpointPen.Ink.Paper.9x12,10,10,0,2026-08-26T16:47:54.000Z,2026-08-27T12:56:45.000000Z,8957,72531,63574,0,2026-08-27,08:56,45,near_documented_finish_minute,8a21015210c19936d3b18175ae3f4061ae1e5d8d,
2026-08-28.0108.BallpointPen.Ink.Paper.9x12,10,0,10,2026-08-27T22:18:23.333Z,2026-08-28T05:08:50.000000Z,8702.468,24626.667,15924.199,0,2026-08-28,01:08,50,near_documented_finish_minute,429541ae7f93c869056df956873f3441d580914c,
2026-08-29.0254.BallpointPen.Ink.Paper.9x12,4,0,4,2026-08-28T07:46:26.867Z,2026-08-29T06:55:04.000000Z,1095.433,83317.133,82221.7,0,2026-08-29,02:54,64,near_documented_finish_minute,429541ae7f93c869056df956873f3441d580914c,
2026-08-29.0602.BallpointPen.Ink.Paper.9x12,2,0,2,2026-08-29T09:18:02.267Z,2026-08-29T10:02:14.000000Z,2429.666,2651.733,222.067,0,2026-08-29,06:02,14,near_documented_finish_minute,429541ae7f93c869056df956873f3441d580914c,
2026-08-29.0716.BallpointPen.Ink.Paper.9x12,3,0,3,2026-08-29T10:23:56.467Z,2026-08-29T11:16:20.000000Z,2415.999,3143.533,727.534,0,2026-08-29,07:16,20,near_documented_finish_minute,429541ae7f93c869056df956873f3441d580914c,
2026-08-29.1450.BallpointPen.Ink.Paper.9x12,9,0,9,2026-08-29T15:08:02.800Z,2026-08-29T18:50:55.000000Z,5652.466,13372.2,7719.734,0,2026-08-29,14:50,55,near_documented_finish_minute,7293edccff883b4c604d710addbf26c85910cfcc,
2026-08-29.1849.BallpointPen.Ink.Paper.9x12,5,0,5,2026-08-29T20:10:33.400Z,2026-08-29T22:49:22.000000Z,2950.766,9528.6,6577.834,0,2026-08-29,18:49,22,near_documented_finish_minute,7293edccff883b4c604d710addbf26c85910cfcc,
2026-08-30.0022.BallpointPen.Ink.Paper.9x12,4,0,4,2026-08-30T01:22:17.933Z,2026-08-30T04:22:19.000000Z,2802.967,10801.067,7998.1,0,2026-08-30,00:22,19,near_documented_finish_minute,7293edccff883b4c604d710addbf26c85910cfcc,
2026-08-30.1126.FountainPen.Ink.Paper.9x12,15,0,15,2026-08-30T08:37:00.100Z,2026-08-30T15:26:00.000000Z,9546.467,24539.9,14993.433,0,2026-08-30,11:26,0,near_documented_finish_minute,7293edccff883b4c604d710addbf26c85910cfcc,
2026-08-30.1712.BallpointPen.Ink.Paper.9x12,6,0,6,2026-08-30T17:08:10.800Z,2026-08-30T21:12:34.000000Z,2904.433,14663.2,11758.767,0,2026-08-30,17:12,34,near_documented_finish_minute,7293edccff883b4c604d710addbf26c85910cfcc,
2026-08-31.0009.BallpointPen.Ink.Paper.9x12,8,0,8,2026-08-30T22:13:58.167Z,2026-08-31T04:09:47.000000Z,4029.999,21348.833,17318.834,0,2026-08-31,00:09,47,near_documented_finish_minute,480bc7e24261e6d3bbcacd261a00782b7e40211a,
2026-08-31.0732.BallpointPen.Ink.Paper.9x12,6,0,6,2026-08-31T07:19:38.700Z,2026-08-31T11:32:53.000000Z,3616.334,15194.3,11577.966,0,2026-08-31,07:32,53,near_documented_finish_minute,480bc7e24261e6d3bbcacd261a00782b7e40211a,
2026-08-31.1039.BallpointPen.Ink.Paper.9x12,7,0,7,2026-08-31T13:52:19.033Z,2026-08-31T14:39:58.000000Z,2083.434,2858.967,775.533,0,2026-08-31,10:39,58,near_documented_finish_minute,480bc7e24261e6d3bbcacd261a00782b7e40211a,
2026-08-31.1212.BallpointPen.Ink.Paper.9x12,11,0,11,2026-08-31T15:11:36.000Z,2026-08-31T16:12:29.000000Z,2635.667,3653,1017.333,0,2026-08-31,12:12,29,near_documented_finish_minute,480bc7e24261e6d3bbcacd261a00782b7e40211a,
2026-09-01.0213.BallpointPen.Ink.Paper.9x12,12,0,12,2026-09-01T14:26:06.367Z,2026-09-01T18:13:21.000000Z,5932.767,13634.633,7701.866,1,2026-09-01,02:13,43221,documented_finish_conflict,7fca6fcc36d873b92a6c64fff5980e8d5afde5a6,Final MP4 creation boundary is 43221 seconds after the documented group finish minute in America/New_York; possible 12-hour label discrepancy; no correction applied.
2026-09-01.0237.BallpointPen.Ink.Paper.9x12,4,0,4,2026-08-31T21:25:00.633Z,2026-09-01T06:37:07.000000Z,2013.833,33126.367,31112.534,0,2026-09-01,02:37,7,near_documented_finish_minute,fe66d1dbb117486c2046376423316fd2cc25d488,
2026-09-01.0619.BallpointPen.Ink.Paper.9x12,9,0,9,2026-09-01T08:20:22.367Z,2026-09-01T10:19:12.000000Z,4881.532,7129.633,2248.101,0,2026-09-01,06:19,12,near_documented_finish_minute,fe66d1dbb117486c2046376423316fd2cc25d488,
2026-09-01.2356.BallpointPen.Ink.Paper.9x12,9,0,9,2026-09-02T02:20:14.733Z,2026-09-02T03:56:07.000000Z,4483.7,5752.267,1268.567,0,2026-09-01,23:56,7,near_documented_finish_minute,7fca6fcc36d873b92a6c64fff5980e8d5afde5a6,
2026-09-02.0301.BallpointPen.Ink.Paper.9x12,11,0,11,2026-09-02T05:24:00.600Z,2026-09-02T07:01:47.000000Z,3802.334,5866.4,2064.066,1,2026-09-02,03:01,47,near_documented_finish_minute,7fca6fcc36d873b92a6c64fff5980e8d5afde5a6,
2026-09-02.0813.BallpointPen.Ink.Paper.9x12,10,0,10,2026-09-02T09:48:35.833Z,2026-09-02T12:13:51.000000Z,3631.433,8715.167,5083.734,0,2026-09-02,08:13,51,near_documented_finish_minute,7fca6fcc36d873b92a6c64fff5980e8d5afde5a6,
2026-09-02.2023.BallpointPen.Ink.Paper.9x12,19,0,19,2026-09-02T17:15:45.133Z,2026-09-03T00:23:18.000000Z,10601.767,25652.867,15051.1,0,2026-09-02,20:23,18,near_documented_finish_minute,7fca6fcc36d873b92a6c64fff5980e8d5afde5a6,123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168{ "packet_status": "exploratory_public_derived_sidecar_v1", "dataset": "maxwellinked/time-lapse-artifacts", "pinned_dataset_revision": "b4b58f0ce0effb31ebf7671fbb0bd9c11765db4e", "canonical_metadata": { "file_path": "metadata.csv", "size_bytes": 370833, "sha256": "d516da7a4341dddf0b2b5ad50f6200f283ea0cdefc6de465882fbc021abfba8a", "field_count": 29, "row_count": 549 }, "source_snapshot_schema": { "file_path": "SCHEMA.md", "size_bytes": 19411, "sha256": "3624d5858bd4c0df796775ee6400106eb146101acbf112a515ad4a49c3262082" }, "local_source_audits": [ { "source_audit_id": "ingest_20260827", "availability": "retained_locally_not_bundled", "size_bytes": 36337, "sha256": "ddef8b59b14a491a6490d481d7acfd4f5f799c601247807268af0bda997bade6", "base_hub_revision": "69a3e249fc390b43515fa77587b53bd775f75f1e", "row_count": 27, "object_role_counts": { "canonical_fragment": 22, "noncanonical_inshot_derivative": 5 } }, { "source_audit_id": "ingest_20260829", "availability": "retained_locally_not_bundled", "size_bytes": 27954, "sha256": "fe89f2d0fe7b3cb1606f60d5772197fc1d0c57821a51782d3ecd3f18c47882d9", "base_hub_revision": "c5c4da8fa880e39a56a2cfd032c5c87072442fe1", "row_count": 19, "object_role_counts": { "canonical_fragment": 19 } }, { "source_audit_id": "ingest_20260830", "availability": "retained_locally_not_bundled", "size_bytes": 56981, "sha256": "7d0cc82763bf8e2026fd7c8de078cb0ccba70b774ab65f0867b9b8a77a281d20", "base_hub_revision": "44ac040f74f3eb4b2efc647d2d306dfe29a012d5", "row_count": 39, "object_role_counts": { "canonical_fragment": 39 } }, { "source_audit_id": "ingest_20260831", "availability": "retained_locally_not_bundled", "size_bytes": 46851, "sha256": "91f15a43af2346a302b66dde18fa96f8583c61b6de6dfb1389bb4ed01a92a6c8", "base_hub_revision": "aa3b60a89a9045f8ecb836fbcab0da1dbb291569", "row_count": 32, "object_role_counts": { "canonical_fragment": 32 } }, { "source_audit_id": "ingest_20260901", "availability": "retained_locally_not_bundled", "size_bytes": 19217, "sha256": "8df0d8eb9a329e9d60dab9db9c2e375df1bb99343f8f26eed214f3ba1f48137b", "base_hub_revision": "53b02712af07d278c9456ecb319e970e2954d2c4", "row_count": 13, "object_role_counts": { "canonical_fragment": 13 } }, { "source_audit_id": "ingest_20260902", "availability": "retained_locally_not_bundled", "size_bytes": 46844, "sha256": "4a94d412299388bc88cafd5c0a33b3383be04e30d0b03ead997370945df47c1c", "base_hub_revision": "99371163392d9f4b6685da116fb92398a610457e", "row_count": 32, "object_role_counts": { "canonical_fragment": 32 } }, { "source_audit_id": "ingest_20260902_evening", "availability": "retained_locally_not_bundled", "size_bytes": 42498, "sha256": "f6fe34c60f8e2295c1cd9fa7a489aa82bb9b314009276e9b2ff10b7688631043", "base_hub_revision": "81d5675113fcd5e26eac0289c228f7ccfe552e42", "row_count": 29, "object_role_counts": { "canonical_fragment": 29 } } ], "relationship_sidecars": [ { "file_path": "Standard_Time_Lapses/Provenance/2026-08-27/fragment_sequence_relationships.csv", "size_bytes": 15322, "sha256": "62b1fd9add3be03e3e7198df8f107a416741682c79878b7622c6ea1c34ec4ce8", "row_count": 27, "object_role_counts": { "canonical_fragment": 22, "noncanonical_inshot_derivative": 5 }, "source_hub_revision": "8a21015210c19936d3b18175ae3f4061ae1e5d8d" }, { "file_path": "Standard_Time_Lapses/Provenance/2026-08-29/fragment_sequence_relationships.csv", "size_bytes": 12748, "sha256": "9648cf53ce35dd30b6c0c8c3c223c4ed68aea9a03d2e7f4843ad6f39e04c7bb7", "row_count": 19, "object_role_counts": { "canonical_fragment": 19 }, "source_hub_revision": "429541ae7f93c869056df956873f3441d580914c" }, { "file_path": "Standard_Time_Lapses/Provenance/2026-08-30/fragment_sequence_relationships.csv", "size_bytes": 26023, "sha256": "427b416c617c9bf9400ec574452902180fec94c8a0dbe8fc1526ece7a1bdb50c", "row_count": 39, "object_role_counts": { "canonical_fragment": 39 }, "source_hub_revision": "7293edccff883b4c604d710addbf26c85910cfcc" }, { "file_path": "Standard_Time_Lapses/Provenance/2026-08-31/fragment_sequence_relationships.csv", "size_bytes": 21413, "sha256": "e006ba8b30f31b14f750992455c74459a88d50d40e9b4fe57623c5a8dd332272", "row_count": 32, "object_role_counts": { "canonical_fragment": 32 }, "source_hub_revision": "480bc7e24261e6d3bbcacd261a00782b7e40211a" }, { "file_path": "Standard_Time_Lapses/Provenance/2026-09-01/fragment_sequence_relationships.csv", "size_bytes": 8821, "sha256": "200d7f4e38d06caf7a472dbaec2b7bae62a3dd1b4fce808b638391b2060a957a", "row_count": 13, "object_role_counts": { "canonical_fragment": 13 }, "source_hub_revision": "fe66d1dbb117486c2046376423316fd2cc25d488" }, { "file_path": "Standard_Time_Lapses/Provenance/2026-09-02/fragment_sequence_relationships.csv", "size_bytes": 40663, "sha256": "066ababd2a40c2be23087588603dc680adadd54e7cbb6708ab238c22e216932e", "row_count": 61, "object_role_counts": { "canonical_fragment": 61 }, "source_hub_revision": "7fca6fcc36d873b92a6c64fff5980e8d5afde5a6" } ], "source_scope": { "audit_rows": 191, "relationship_rows": 191, "canonical_fragment_rows": 186, "excluded_noncanonical_derivative_rows": 5, "fragment_groups": 25 }, "note": "Absolute local source paths are intentionally omitted. Logical audit IDs, byte sizes, hashes, and source revisions bind the retained local receipts. Direct MP4 tags and frame counts can be re-probed from the pinned public media objects."}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172{ "status": "pass_with_one_preserved_documented_finish_conflict", "verification_level": "repository_packet_self_consistency", "pinned_dataset_revision": "b4b58f0ce0effb31ebf7671fbb0bd9c11765db4e", "counts": { "canonical_timing_rows": 186, "direct_device_filename_start_rows": 22, "calibrated_frame_model_rows": 164, "calibration_groups": 5, "fragment_groups": 25, "inter_fragment_transitions": 161, "excluded_noncanonical_derivatives": 5 }, "repository_identity_and_source_checks": { "timing_relationship_record_id_path_sets_equal": true, "timing_relationship_record_id_path_sha256_xet_matches": true, "canonical_metadata_record_id_size_xet_matches": true, "canonical_record_ids_paths_sha256_unique": true, "format_video_creation_times_equal": true, "exact_literal_capture_tag_preserved": "5.000000", "literal_capture_tag_used_in_timing_formula": false }, "retained_local_audit_claims_not_reperformed": { "audit_relationship_path_sets_equal": true, "audit_record_id_sha256_size_matches": true, "all_rows_same_observable_technical_profile": true }, "calibration_checks": { "model_id": "tla-framelapse-android14-tag5-empirical-v1", "formula": "estimated_elapsed_seconds = 0.8 + video_frame_count * 7 / 30", "direct_observation_count": 22, "holdout_count": 0, "maximum_absolute_model_residual_seconds": 0.833333, "nominal_five_fps_minimum_error_seconds": 59.6, "nominal_five_fps_maximum_error_seconds": 314.8 }, "chronology_checks": { "groups_with_contiguous_positions": 25, "strictly_increasing_creation_boundaries_within_groups": true, "gaps_positive_above_uncertainty": 159, "gaps_within_uncertainty_of_zero": 2, "gaps_negative_beyond_uncertainty": 0 }, "documented_finish_crosscheck": { "threshold_seconds": 120, "near_minute_groups": 24, "maximum_near_minute_delta_seconds": 83, "conflict_groups": [ { "fragment_set_label": "2026-09-01.0213.BallpointPen.Ink.Paper.9x12", "delta_seconds": 43221, "note": "Final MP4 creation boundary is 43221 seconds after the documented group finish minute in America/New_York; possible 12-hour label discrepancy; no correction applied." } ] }, "aggregate_descriptors": { "serialized_recording_elapsed_seconds_sum": 109973.465, "serialized_recording_elapsed_hours_sum": 30.548185, "note": "This is the exact Decimal sum of the published three-decimal recording_elapsed_seconds values. Calculation before row serialization gives 109973.466666... seconds, 0.001667 seconds higher. The sum mixes 22 directly observed start-to-boundary intervals with 164 calibrated estimates; it is not drawing-active time or corpus calendar span." }, "immutability_checks": { "metadata_csv_sha256_unchanged": true, "relationship_sidecar_hashes_unchanged": true, "canonical_metadata_field_count_unchanged": true }, "not_reperformed_by_repository_validator": [ "source-media tag and frame-count probing", "source-media ordinary SHA-256 hashing", "retained local source-audit byte verification", "NTFS timestamp observation" ]}12345276 unmodified lines282283284285286287288# Validation Report## Current v0.4.0 release candidateBranch `codex/prepare-v0.4.0-release` starts at exact Hub `main` revision276 unmodified lines6. Most active indexed videos at this revision contain an audio stream (485 of677). Stream presence does not establish meaningful signal; rights andprivacy review remain necessary.7. Encoded frame rate and playback duration cannot recover real drawing time.8. The 2012–2016 archive has no public video payload in this release.9. No official train/validation/test partition or global `work_id` exists.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950276 unmodified lines327328329330331332333334335336# Validation Report## Unreleased exploratory recording-timing layerThe recording-timing sidecar is pinned to source revision`b4b58f0ce0effb31ebf7671fbb0bd9c11765db4e` and covers exactly the 186canonical fragments in the six dated relationship sidecars. The includedvalidator passed with repository-packet self-consistency scope.| Check | Result || --- | ---: || Timing rows | 186 || Direct device-filename start observations | 22 || Profile-matched model applications | 164 || Independent holdout observations | 0 || Maximum absolute in-sample model residual | 0.833333 seconds || Owner-confirmed complete source sequences | 25 || Within-sequence transitions | 161 || Positive beyond uncertainty / within uncertainty / negative beyond uncertainty | 159 / 2 / 0 || Final boundaries near documented finish minute | 24 / 25 || Preserved documented-finish conflicts | 1 || Timing bundle files verified | 8 || Repository regression tests | 40 / 40 passed |The one retained conflict is`2026-09-01.0213.BallpointPen.Ink.Paper.9x12`, whose final MP4 boundary is43,221 seconds after the documented finish minute. No timestamp is corrected.The 109,973.465-second serialized aggregate mixes 22 observed and 164 estimatedstart-to-finalization intervals; it is neither drawing-active time nor corpuscalendar span. Calculation before three-decimal row serialization differs by0.001667 seconds.The validator recomputes identity joins, timestamp arithmetic, row formulas,full-precision calibration metrics, sequence chronology, group summaries,validation summaries, source receipts, and bundle hashes:```bashpython tools/validate_recording_timing.py --root .python -m unittest discover -s tools -p "test_*.py" -v```This repository-only run does not re-probe source-media tags or frame counts,rehash the 186 source videos, verify the retained local audit bytes, orre-observe NTFS timestamps. No MP4, canonical metadata row or field,relationship sidecar, Viewer configuration, or root `SHA256SUMS` payload entryis changed by the timing layer.## Current v0.4.0 release candidateBranch `codex/prepare-v0.4.0-release` starts at exact Hub `main` revision276 unmodified lines6. Most active indexed videos at this revision contain an audio stream (485 of677). Stream presence does not establish meaningful signal; rights andprivacy review remain necessary.7. Encoded frame rate and playback duration cannot by themselves recoverwall-clock or real drawing time. The recording-timing sidecar providesnarrower start-to-finalization evidence for 186 matching-profile fragmentsonly; it supplies neither drawing-active time nor per-frame timestamps.8. The 2012–2016 archive has no public video payload in this release.9. No official train/validation/test partition or global `work_id` exists.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151#!/usr/bin/env python3"""Focused regression tests for the recording-timing sidecar validator."""
from __future__ import annotations
import csvimport hashlibimport jsonimport shutilimport subprocessimport sysimport tempfileimport unittestfrom pathlib import Path
TOOLS = Path(__file__).resolve().parentREPO_ROOT = TOOLS.parentVALIDATOR = TOOLS / "validate_recording_timing.py"TIMING_RELATIVE = Path( "Standard_Time_Lapses/Provenance/Recording_Timing")RELATIONSHIP_DATES = ( "2026-08-27", "2026-08-29", "2026-08-30", "2026-08-31", "2026-09-01", "2026-09-02",)
def rewrite_bundle(timing_dir: Path) -> None: entries = [] for path in sorted(timing_dir.iterdir(), key=lambda item: item.name): if path.is_file() and path.name != "bundle.sha256": digest = hashlib.sha256(path.read_bytes()).hexdigest() entries.append(f"{digest} {path.name}") (timing_dir / "bundle.sha256").write_text( "\n".join(entries) + "\n", encoding="utf-8", newline="\n" )
class RecordingTimingValidatorTests(unittest.TestCase): def run_validator(self, root: Path) -> subprocess.CompletedProcess[str]: return subprocess.run( [sys.executable, str(VALIDATOR), "--root", str(root)], check=False, capture_output=True, text=True, encoding="utf-8", )
def copy_fixture(self, destination: Path) -> Path: shutil.copy2(REPO_ROOT / "metadata.csv", destination / "metadata.csv") timing_destination = destination / TIMING_RELATIVE timing_destination.parent.mkdir(parents=True, exist_ok=True) shutil.copytree(REPO_ROOT / TIMING_RELATIVE, timing_destination) for date in RELATIONSHIP_DATES: relative = Path( f"Standard_Time_Lapses/Provenance/{date}/fragment_sequence_relationships.csv" ) target = destination / relative target.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(REPO_ROOT / relative, target) return timing_destination
def test_current_repository_packet_passes(self) -> None: completed = self.run_validator(REPO_ROOT) self.assertEqual(completed.returncode, 0, completed.stdout + completed.stderr) summary = json.loads(completed.stdout) self.assertEqual(summary["status"], "ok") self.assertEqual(summary["timing_rows"], 186)
def test_full_precision_metric_regression_is_rejected(self) -> None: with tempfile.TemporaryDirectory(prefix="tla-timing-metric-") as temp_dir: root = Path(temp_dir) timing_dir = self.copy_fixture(root) model_path = timing_dir / "calibration_model.json" model = json.loads(model_path.read_text(encoding="utf-8")) model["calibration"][ "model_residual_seconds_observed_minus_estimated" ]["mean"] = 0.012227 model_path.write_text( json.dumps(model, indent=2) + "\n", encoding="utf-8", newline="\n" ) rewrite_bundle(timing_dir) completed = self.run_validator(root)
self.assertNotEqual(completed.returncode, 0) self.assertIn("calibration model residual metrics mean", completed.stdout)
def test_frame_count_mutation_is_rejected_after_bundle_refresh(self) -> None: with tempfile.TemporaryDirectory(prefix="tla-timing-frame-") as temp_dir: root = Path(temp_dir) timing_dir = self.copy_fixture(root) timing_path = timing_dir / "recording_timing.csv" with timing_path.open("r", encoding="utf-8-sig", newline="") as handle: reader = csv.DictReader(handle) fieldnames = list(reader.fieldnames or []) rows = list(reader) calibrated = next( row for row in rows if row["timing_basis"] == "calibrated_frame_model" ) calibrated["video_frame_count"] = str( int(calibrated["video_frame_count"]) + 30 ) with timing_path.open("w", encoding="utf-8", newline="") as handle: writer = csv.DictWriter(handle, fieldnames=fieldnames, lineterminator="\n") writer.writeheader() writer.writerows(rows) rewrite_bundle(timing_dir) completed = self.run_validator(root)
self.assertNotEqual(completed.returncode, 0) self.assertIn("calibrated elapsed", completed.stdout)
def test_bundle_path_traversal_is_rejected(self) -> None: with tempfile.TemporaryDirectory(prefix="tla-timing-bundle-") as temp_dir: root = Path(temp_dir) timing_dir = self.copy_fixture(root) bundle = timing_dir / "bundle.sha256" bundle.write_text( bundle.read_text(encoding="utf-8") + f"{'0' * 64} ../metadata.csv\n", encoding="utf-8", newline="\n", ) completed = self.run_validator(root)
self.assertNotEqual(completed.returncode, 0) self.assertIn("malformed entry", completed.stdout)
def test_repository_validator_limits_are_explicit(self) -> None: summary_path = REPO_ROOT / TIMING_RELATIVE / "validation_summary.json" summary = json.loads(summary_path.read_text(encoding="utf-8")) self.assertEqual( summary["verification_level"], "repository_packet_self_consistency" ) self.assertIn( "source-media tag and frame-count probing", summary["not_reperformed_by_repository_validator"], ) self.assertIn( "NTFS timestamp observation", summary["not_reperformed_by_repository_validator"], )
if __name__ == "__main__": unittest.main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353#!/usr/bin/env python3"""Validate the exploratory recording-timing sidecar and its source joins."""
from __future__ import annotations
import argparseimport csvimport hashlibimport jsonimport mathimport refrom collections import Counter, defaultdictfrom datetime import datetime, timedelta, timezonefrom decimal import Decimal, InvalidOperationfrom pathlib import Pathfrom zoneinfo import ZoneInfo
TIMING_FIELDS = [ "record_id", "file_path", "sha256", "hub_xet_hash", "fragment_set_label", "sequence_position", "sequence_count", "source_hub_revision", "source_audit_id", "source_filename", "format_creation_time_utc", "video_creation_time_utc", "capture_fps_tag_literal", "video_frame_count", "local_time_zone", "device_filename_start_local", "format_creation_time_local", "capture_start_time_utc", "capture_start_time_local", "timing_basis", "recording_elapsed_seconds", "start_uncertainty_seconds", "timing_model_id", "calibration_profile_status", "previous_record_id", "inter_fragment_gap_seconds", "gap_uncertainty_seconds", "gap_status", "documented_group_finish_date", "documented_group_finish_time", "group_finish_delta_seconds", "group_finish_crosscheck_status", "timing_evidence_state", "notes",]
CALIBRATION_FIELDS = [ "record_id", "file_path", "source_filename", "direct_start_local", "direct_start_utc", "creation_boundary_local", "creation_boundary_utc", "video_frame_count", "observed_elapsed_seconds", "nominal_five_fps_elapsed_seconds", "nominal_five_fps_error_seconds", "model_elapsed_seconds", "model_residual_seconds", "video_frames_per_observed_wall_second",]
GROUP_FIELDS = [ "fragment_set_label", "fragment_count", "direct_start_count", "calibrated_start_count", "first_capture_start_utc", "last_creation_boundary_utc", "recording_elapsed_seconds_sum", "group_wall_span_seconds", "within_group_gap_seconds_sum", "within_uncertainty_gap_count", "documented_group_finish_date", "documented_group_finish_time", "group_finish_delta_seconds", "group_finish_crosscheck_status", "source_hub_revision", "notes",]
MODEL_ID = "tla-framelapse-android14-tag5-empirical-v1"MODEL_INTERCEPT = Decimal("0.8")MODEL_FRAME_NUMERATOR = Decimal(7)MODEL_FRAME_DENOMINATOR = Decimal(30)LOCAL_ZONE_NAME = "America/New_York"LOCAL_ZONE = ZoneInfo(LOCAL_ZONE_NAME)EXPECTED_ROWS = 186EXPECTED_GROUPS = 25EXPECTED_DIRECT = 22EXPECTED_CALIBRATED = 164EXPECTED_TRANSITIONS = 161EXPECTED_SOURCE_REVISION = "b4b58f0ce0effb31ebf7671fbb0bd9c11765db4e"EXPECTED_SOURCE_SCHEMA_SHA256 = "3624d5858bd4c0df796775ee6400106eb146101acbf112a515ad4a49c3262082"EXPECTED_SOURCE_SCHEMA_SIZE = 19411EXPECTED_CONFLICT_GROUP = "2026-09-01.0213.BallpointPen.Ink.Paper.9x12"EXPECTED_CONFLICT_DELTA = Decimal(43221)EXPECTED_RELATIONSHIP_PATHS = { f"Standard_Time_Lapses/Provenance/{date}/fragment_sequence_relationships.csv" for date in ( "2026-08-27", "2026-08-29", "2026-08-30", "2026-08-31", "2026-09-01", "2026-09-02", )}
RECORD_RE = re.compile(r"^tla-[0-9a-f]{16}$")HASH_RE = re.compile(r"^[0-9a-f]{64}$")REVISION_RE = re.compile(r"^[0-9a-f]{40}$")DEVICE_FILENAME_RE = re.compile( r"^VID_(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})\.mp4$")
def read_csv(path: Path) -> tuple[list[str], list[dict[str, str]]]: with path.open("r", encoding="utf-8-sig", newline="") as handle: reader = csv.DictReader(handle) if not reader.fieldnames: raise ValueError(f"missing CSV header: {path}") return list(reader.fieldnames), list(reader)
def read_json(path: Path) -> dict[str, object]: value = json.loads(path.read_text(encoding="utf-8")) if not isinstance(value, dict): raise ValueError(f"JSON root must be an object: {path}") return value
def sha256_file(path: Path) -> str: digest = hashlib.sha256() with path.open("rb") as handle: for chunk in iter(lambda: handle.read(1024 * 1024), b""): digest.update(chunk) return digest.hexdigest()
def parse_decimal(text: str, label: str, errors: list[str]) -> Decimal | None: try: value = Decimal(text) except (InvalidOperation, ValueError): errors.append(f"{label}: invalid decimal {text!r}") return None if not value.is_finite(): errors.append(f"{label}: decimal is not finite") return None return value
def parse_int(text: str, label: str, errors: list[str]) -> int | None: try: value = int(text) except ValueError: errors.append(f"{label}: invalid integer {text!r}") return None return value
def parse_timestamp(text: str, label: str, errors: list[str]) -> datetime | None: try: value = datetime.fromisoformat(text.replace("Z", "+00:00")) except ValueError: errors.append(f"{label}: invalid ISO-8601 timestamp {text!r}") return None if value.tzinfo is None: errors.append(f"{label}: timestamp has no UTC offset") return None return value
def device_filename_timestamp( source_filename: str, label: str, errors: list[str]) -> datetime | None: match = DEVICE_FILENAME_RE.fullmatch(source_filename) if not match: errors.append(f"{label}: invalid retained device filename") return None year, month, day, hour, minute, second = map(int, match.groups()) try: return datetime(year, month, day, hour, minute, second, tzinfo=LOCAL_ZONE) except ValueError: errors.append(f"{label}: invalid date/time in retained device filename") return None
def close_decimal( actual: Decimal | None, expected: Decimal, tolerance: Decimal, label: str, errors: list[str],) -> None: if actual is not None and abs(actual - expected) > tolerance: errors.append(f"{label}: expected {expected}, found {actual}")
def close_timestamp( actual: datetime | None, expected: datetime, tolerance_seconds: float, label: str, errors: list[str],) -> None: if actual is None: return difference = abs((actual.astimezone(timezone.utc) - expected.astimezone(timezone.utc)).total_seconds()) if difference > tolerance_seconds: errors.append(f"{label}: timestamp differs by {difference:.6f} seconds")
def decimal_mean(values: list[Decimal]) -> Decimal: return sum(values, Decimal(0)) / Decimal(len(values))
def decimal_population_standard_deviation(values: list[Decimal]) -> Decimal: mean = decimal_mean(values) variance = sum((value - mean) ** 2 for value in values) / Decimal(len(values)) return variance.sqrt()
def decimal_root_mean_square(values: list[Decimal]) -> Decimal: mean_square = sum(value**2 for value in values) / Decimal(len(values)) return mean_square.sqrt()
def validate_metric_block( block: object, expected: dict[str, Decimal], tolerance: Decimal, label: str, errors: list[str],) -> None: if not isinstance(block, dict): errors.append(f"{label} is missing") return if set(block) != set(expected): errors.append( f"{label} fields differ: expected {sorted(expected)}, found {sorted(block)}" ) for name, expected_value in expected.items(): close_decimal( parse_decimal(str(block.get(name, "")), f"{label} {name}", errors), expected_value, tolerance, f"{label} {name}", errors, )
def validate_bundle(timing_dir: Path, errors: list[str]) -> None: bundle_path = timing_dir / "bundle.sha256" if not bundle_path.is_file(): errors.append("bundle.sha256 is missing") return expected_files = { path.name for path in timing_dir.iterdir() if path.is_file() and path.name != "bundle.sha256" } listed_files: set[str] = set() for line_number, line in enumerate( bundle_path.read_text(encoding="utf-8").splitlines(), start=1 ): match = re.fullmatch(r"([0-9a-f]{64}) ([^/\\]+)", line) if not match: errors.append(f"bundle.sha256 line {line_number}: malformed entry") continue expected_hash, name = match.groups() if name in listed_files: errors.append(f"bundle.sha256: duplicate entry {name}") continue listed_files.add(name) target = timing_dir / name if not target.is_file(): errors.append(f"bundle.sha256: missing listed file {name}") elif sha256_file(target) != expected_hash: errors.append(f"bundle.sha256: SHA-256 mismatch for {name}") if listed_files != expected_files: errors.append( "bundle.sha256 inventory differs from directory files: " f"listed={sorted(listed_files)} actual={sorted(expected_files)}" )
def validate_source_receipts( root: Path, manifest: dict[str, object], errors: list[str],) -> list[dict[str, str]]: if manifest.get("packet_status") != "exploratory_public_derived_sidecar_v1": errors.append("source_manifest packet_status is unexpected") if manifest.get("dataset") != "maxwellinked/time-lapse-artifacts": errors.append("source_manifest dataset is unexpected") if manifest.get("pinned_dataset_revision") != EXPECTED_SOURCE_REVISION: errors.append("source_manifest pinned_dataset_revision is unexpected")
canonical_metadata = manifest.get("canonical_metadata") if not isinstance(canonical_metadata, dict): errors.append("source_manifest canonical_metadata is missing") return [] if canonical_metadata.get("file_path") != "metadata.csv": errors.append("source_manifest canonical metadata path is unexpected") metadata_path = root / str(canonical_metadata.get("file_path", "")) if not metadata_path.is_file(): errors.append(f"pinned metadata source is missing: {metadata_path}") return [] metadata_fields, metadata_rows = read_csv(metadata_path) if sha256_file(metadata_path) != canonical_metadata.get("sha256"): errors.append("metadata.csv differs from the source_manifest receipt") if metadata_path.stat().st_size != canonical_metadata.get("size_bytes"): errors.append("metadata.csv byte size differs from the source_manifest receipt") if len(metadata_fields) != canonical_metadata.get("field_count"): errors.append("metadata.csv field count differs from the source_manifest receipt") if len(metadata_rows) != canonical_metadata.get("row_count"): errors.append("metadata.csv row count differs from the source_manifest receipt")
source_snapshot_schema = manifest.get("source_snapshot_schema") if not isinstance(source_snapshot_schema, dict): errors.append("source_manifest source_snapshot_schema is missing") else: if source_snapshot_schema.get("file_path") != "SCHEMA.md": errors.append("source snapshot schema path is unexpected") if source_snapshot_schema.get("sha256") != EXPECTED_SOURCE_SCHEMA_SHA256: errors.append("source snapshot schema SHA-256 receipt is unexpected") if source_snapshot_schema.get("size_bytes") != EXPECTED_SOURCE_SCHEMA_SIZE: errors.append("source snapshot schema byte-size receipt is unexpected")
relationship_rows: list[dict[str, str]] = [] relationship_sidecars = manifest.get("relationship_sidecars") if not isinstance(relationship_sidecars, list) or len(relationship_sidecars) != 6: errors.append("source_manifest must list six relationship sidecars") return relationship_rows listed_paths = { str(receipt.get("file_path", "")) for receipt in relationship_sidecars if isinstance(receipt, dict) } if listed_paths != EXPECTED_RELATIONSHIP_PATHS: errors.append("source_manifest relationship path set is unexpected") for receipt in relationship_sidecars: if not isinstance(receipt, dict): errors.append("source_manifest relationship receipt is not an object") continue relative_path = str(receipt.get("file_path", "")) sidecar_path = root / relative_path if not sidecar_path.is_file(): errors.append(f"relationship sidecar is missing: {relative_path}") continue _, rows = read_csv(sidecar_path) relationship_rows.extend(rows) if sha256_file(sidecar_path) != receipt.get("sha256"): errors.append(f"relationship sidecar SHA-256 mismatch: {relative_path}") if sidecar_path.stat().st_size != receipt.get("size_bytes"): errors.append(f"relationship sidecar byte-size mismatch: {relative_path}") if len(rows) != receipt.get("row_count"): errors.append(f"relationship sidecar row-count mismatch: {relative_path}") role_counts = dict(Counter(row.get("object_role", "") for row in rows)) if role_counts != receipt.get("object_role_counts"): errors.append(f"relationship sidecar role counts mismatch: {relative_path}") revisions = {row.get("source_hub_revision", "") for row in rows} if revisions != {receipt.get("source_hub_revision")}: errors.append(f"relationship sidecar source revision mismatch: {relative_path}") return relationship_rows
def validate_local_audit_receipts( manifest: dict[str, object], errors: list[str]) -> dict[str, int]: receipts = manifest.get("local_source_audits") if not isinstance(receipts, list) or len(receipts) != 7: errors.append("source_manifest must list seven retained local audit receipts") return {} canonical_counts: dict[str, int] = {} total_rows = 0 total_roles: Counter[str] = Counter() for receipt in receipts: if not isinstance(receipt, dict): errors.append("source_manifest local audit receipt is not an object") continue audit_id = str(receipt.get("source_audit_id", "")) if not audit_id or audit_id in canonical_counts: errors.append(f"duplicate or blank source_audit_id: {audit_id!r}") continue if receipt.get("availability") != "retained_locally_not_bundled": errors.append(f"{audit_id}: local audit availability is unexpected") digest = receipt.get("sha256") if not isinstance(digest, str) or not HASH_RE.fullmatch(digest): errors.append(f"{audit_id}: local audit SHA-256 receipt is malformed") if not isinstance(receipt.get("size_bytes"), int) or receipt["size_bytes"] <= 0: errors.append(f"{audit_id}: local audit byte-size receipt is malformed") revision = receipt.get("base_hub_revision") if not isinstance(revision, str) or not REVISION_RE.fullmatch(revision): errors.append(f"{audit_id}: local audit base revision is malformed") row_count = receipt.get("row_count") role_counts = receipt.get("object_role_counts") if not isinstance(row_count, int) or not isinstance(role_counts, dict): errors.append(f"{audit_id}: local audit counts are malformed") continue if any(not isinstance(value, int) or value < 0 for value in role_counts.values()): errors.append(f"{audit_id}: local audit role counts are malformed") continue if sum(role_counts.values()) != row_count: errors.append(f"{audit_id}: local audit role counts do not sum to row_count") total_rows += row_count total_roles.update(role_counts) canonical_counts[audit_id] = int(role_counts.get("canonical_fragment", 0)) if total_rows != 191 or total_roles != Counter( {"canonical_fragment": EXPECTED_ROWS, "noncanonical_inshot_derivative": 5} ): errors.append("local audit receipt aggregate counts are unexpected") expected_scope = { "audit_rows": 191, "relationship_rows": 191, "canonical_fragment_rows": EXPECTED_ROWS, "excluded_noncanonical_derivative_rows": 5, "fragment_groups": EXPECTED_GROUPS, } if manifest.get("source_scope") != expected_scope: errors.append("source_manifest source_scope differs") return canonical_counts
def main() -> None: parser = argparse.ArgumentParser() parser.add_argument("--root", type=Path, default=Path(".")) parser.add_argument("--timing-dir", type=Path) args = parser.parse_args()
root = args.root.resolve() timing_dir = ( args.timing_dir.resolve() if args.timing_dir else root / "Standard_Time_Lapses" / "Provenance" / "Recording_Timing" ) errors: list[str] = []
required_files = { "README.md", "SCHEMA.md", "recording_timing.csv", "calibration_observations.csv", "group_timing_summary.csv", "calibration_model.json", "source_manifest.json", "validation_summary.json", "bundle.sha256", } missing = sorted(name for name in required_files if not (timing_dir / name).is_file()) if missing: raise SystemExit(f"missing timing files: {missing}")
timing_fields, timing_rows = read_csv(timing_dir / "recording_timing.csv") calibration_fields, calibration_rows = read_csv( timing_dir / "calibration_observations.csv" ) group_fields, group_rows = read_csv(timing_dir / "group_timing_summary.csv") model = read_json(timing_dir / "calibration_model.json") manifest = read_json(timing_dir / "source_manifest.json") validation = read_json(timing_dir / "validation_summary.json")
if timing_fields != TIMING_FIELDS: errors.append(f"recording_timing.csv field contract differs: {timing_fields}") if calibration_fields != CALIBRATION_FIELDS: errors.append( f"calibration_observations.csv field contract differs: {calibration_fields}" ) if group_fields != GROUP_FIELDS: errors.append(f"group_timing_summary.csv field contract differs: {group_fields}") if len(timing_rows) != EXPECTED_ROWS: errors.append(f"expected {EXPECTED_ROWS} timing rows, found {len(timing_rows)}") if len(calibration_rows) != EXPECTED_DIRECT: errors.append( f"expected {EXPECTED_DIRECT} calibration rows, found {len(calibration_rows)}" ) if len(group_rows) != EXPECTED_GROUPS: errors.append(f"expected {EXPECTED_GROUPS} group rows, found {len(group_rows)}")
relationship_rows = validate_source_receipts(root, manifest, errors) expected_audit_counts = validate_local_audit_receipts(manifest, errors) _, metadata_rows = read_csv(root / "metadata.csv") metadata_by_id = {row["record_id"]: row for row in metadata_rows} canonical_relationships = { row["record_id"]: row for row in relationship_rows if row.get("object_role") == "canonical_fragment" } if len(canonical_relationships) != EXPECTED_ROWS: errors.append( f"expected {EXPECTED_ROWS} canonical relationship rows, " f"found {len(canonical_relationships)}" )
for field in ("record_id", "file_path", "sha256", "hub_xet_hash"): values = [row.get(field, "") for row in timing_rows] if not all(values) or len(values) != len(set(values)): errors.append(f"{field} values must be nonblank and unique")
timing_by_id = {row["record_id"]: row for row in timing_rows} groups: dict[str, list[dict[str, str]]] = defaultdict(list) basis_counts: Counter[str] = Counter() profile_counts: Counter[str] = Counter() audit_counts: Counter[str] = Counter() serialized_elapsed_values: list[Decimal] = [] unrounded_elapsed_values: list[Decimal] = []
for row_number, row in enumerate(timing_rows, start=2): label = f"recording_timing.csv row {row_number} {row.get('record_id', '')}" record_id = row.get("record_id", "") if not RECORD_RE.fullmatch(record_id): errors.append(f"{label}: invalid record_id") if not HASH_RE.fullmatch(row.get("sha256", "")): errors.append(f"{label}: invalid ordinary SHA-256") if not HASH_RE.fullmatch(row.get("hub_xet_hash", "")): errors.append(f"{label}: invalid Xet identity") if not REVISION_RE.fullmatch(row.get("source_hub_revision", "")): errors.append(f"{label}: invalid source_hub_revision")
relationship = canonical_relationships.get(record_id) metadata = metadata_by_id.get(record_id) if relationship is None: errors.append(f"{label}: record_id is absent from canonical relationships") else: for timing_name, relationship_name in ( ("file_path", "file_path"), ("sha256", "sha256"), ("hub_xet_hash", "hub_xet_hash"), ("fragment_set_label", "fragment_set_label"), ("sequence_position", "sequence_position"), ("sequence_count", "sequence_count"), ("source_hub_revision", "source_hub_revision"), ): if row.get(timing_name) != relationship.get(relationship_name): errors.append(f"{label}: {timing_name} differs from relationship source") if metadata is None: errors.append(f"{label}: record_id is absent from metadata.csv") else: if row.get("file_path") != metadata.get("file_name"): errors.append(f"{label}: file_path differs from metadata.csv") if row.get("hub_xet_hash") != metadata.get("hub_xet_hash"): errors.append(f"{label}: hub_xet_hash differs from metadata.csv") if relationship is not None: if relationship.get("file_path") != metadata.get("file_name"): errors.append(f"{label}: relationship path differs from metadata.csv") if relationship.get("hub_xet_hash") != metadata.get("hub_xet_hash"): errors.append(f"{label}: relationship Xet identity differs from metadata.csv") if relationship.get("size_bytes") != metadata.get("size_bytes"): errors.append(f"{label}: relationship byte size differs from metadata.csv") if row.get("documented_group_finish_date") != metadata.get("date"): errors.append(f"{label}: documented finish date differs from metadata.csv") if row.get("documented_group_finish_time") != metadata.get("time"): errors.append(f"{label}: documented finish time differs from metadata.csv")
if row.get("format_creation_time_utc") != row.get("video_creation_time_utc"): errors.append(f"{label}: format/video creation_time values differ") if row.get("capture_fps_tag_literal") != "5.000000": errors.append(f"{label}: literal capture tag is not preserved") if row.get("local_time_zone") != LOCAL_ZONE_NAME: errors.append(f"{label}: unexpected local time zone") if row.get("timing_model_id") != MODEL_ID: errors.append(f"{label}: unexpected timing model ID")
frames = parse_int(row.get("video_frame_count", ""), label, errors) if frames is not None and frames <= 0: errors.append(f"{label}: video_frame_count must be positive") boundary = parse_timestamp( row.get("format_creation_time_utc", ""), f"{label} creation boundary", errors ) boundary_local = parse_timestamp( row.get("format_creation_time_local", ""), f"{label} local boundary", errors ) if boundary is not None and boundary_local is not None: close_timestamp( boundary_local, boundary, 0.001, f"{label} local/UTC creation boundary", errors, ) capture_start = parse_timestamp( row.get("capture_start_time_utc", ""), f"{label} capture start", errors ) capture_start_local = parse_timestamp( row.get("capture_start_time_local", ""), f"{label} local capture start", errors, ) if capture_start is not None and capture_start_local is not None: close_timestamp( capture_start_local, capture_start, 0.001, f"{label} local/UTC capture start", errors, )
basis = row.get("timing_basis", "") profile = row.get("calibration_profile_status", "") basis_counts[basis] += 1 profile_counts[profile] += 1 audit_counts[row.get("source_audit_id", "")] += 1 elapsed = parse_decimal( row.get("recording_elapsed_seconds", ""), f"{label} elapsed", errors ) uncertainty = parse_decimal( row.get("start_uncertainty_seconds", ""), f"{label} start uncertainty", errors, ) if elapsed is not None: serialized_elapsed_values.append(elapsed) if basis == "direct_device_filename_start": if profile != "calibration_observation": errors.append(f"{label}: direct row has unexpected profile status") direct_start = device_filename_timestamp(row.get("source_filename", ""), label, errors) retained_start = parse_timestamp( row.get("device_filename_start_local", ""), f"{label} retained filename timestamp", errors, ) if direct_start is not None: close_timestamp( retained_start, direct_start, 0.001, f"{label} retained filename timestamp", errors, ) close_timestamp( capture_start, direct_start, 0.001, f"{label} selected direct start", errors, ) if boundary is not None: expected_elapsed = Decimal( str( ( boundary.astimezone(timezone.utc) - direct_start.astimezone(timezone.utc) ).total_seconds() ) ) unrounded_elapsed_values.append(expected_elapsed) close_decimal( elapsed, expected_elapsed, Decimal("0.001"), f"{label} direct elapsed", errors, ) close_decimal( uncertainty, Decimal(1), Decimal(0), f"{label} direct uncertainty", errors, ) elif basis == "calibrated_frame_model": if profile != "observable_profile_match_only": errors.append(f"{label}: calibrated row has unexpected profile status") if row.get("device_filename_start_local"): errors.append(f"{label}: calibrated row has a device filename start") if frames is not None: expected_elapsed = ( MODEL_INTERCEPT + Decimal(frames) * MODEL_FRAME_NUMERATOR / MODEL_FRAME_DENOMINATOR ) unrounded_elapsed_values.append(expected_elapsed) close_decimal( elapsed, expected_elapsed, Decimal("0.0006"), f"{label} calibrated elapsed", errors, ) if boundary is not None and capture_start is not None: expected_start = boundary - timedelta(seconds=float(expected_elapsed)) close_timestamp( capture_start, expected_start, 0.001, f"{label} calibrated start", errors, ) close_decimal( uncertainty, Decimal(2), Decimal(0), f"{label} calibrated uncertainty", errors, ) else: errors.append(f"{label}: invalid timing_basis {basis!r}")
evidence = row.get("timing_evidence_state", "") evidence_tokens = evidence.split(";") if evidence else [] if not evidence_tokens or len(evidence_tokens) != len(set(evidence_tokens)): errors.append(f"{label}: timing_evidence_state is blank or duplicated") if "capture-fps-tag-preserved-not-used" not in evidence_tokens: errors.append(f"{label}: evidence does not state capture tag non-use")
groups[row.get("fragment_set_label", "")].append(row)
if basis_counts != Counter( { "direct_device_filename_start": EXPECTED_DIRECT, "calibrated_frame_model": EXPECTED_CALIBRATED, } ): errors.append(f"unexpected timing_basis counts: {dict(basis_counts)}") if profile_counts != Counter( { "calibration_observation": EXPECTED_DIRECT, "observable_profile_match_only": EXPECTED_CALIBRATED, } ): errors.append(f"unexpected calibration_profile_status counts: {dict(profile_counts)}") if dict(audit_counts) != expected_audit_counts: errors.append( f"source_audit_id counts differ from retained receipts: {dict(audit_counts)}" ) if len(groups) != EXPECTED_GROUPS: errors.append(f"expected {EXPECTED_GROUPS} timing groups, found {len(groups)}")
gap_counts: Counter[str] = Counter() conflict_groups: dict[str, Decimal] = {} near_finish_deltas: list[Decimal] = [] computed_group_rows: dict[str, dict[str, Decimal | int | str]] = {} transition_count = 0 for group_label, rows in groups.items(): rows.sort(key=lambda item: int(item["sequence_position"])) positions = [int(row["sequence_position"]) for row in rows] counts = {int(row["sequence_count"]) for row in rows} if positions != list(range(1, len(rows) + 1)) or counts != {len(rows)}: errors.append(f"{group_label}: sequence positions/count are not contiguous") if len({row["source_hub_revision"] for row in rows}) != 1: errors.append(f"{group_label}: mixed source_hub_revision values") finish_pairs = { (row["documented_group_finish_date"], row["documented_group_finish_time"]) for row in rows } if len(finish_pairs) != 1: errors.append(f"{group_label}: mixed documented group finish values") continue finish_date, finish_time = next(iter(finish_pairs)) try: documented_finish = datetime.strptime( f"{finish_date} {finish_time}", "%Y-%m-%d %H:%M" ).replace(tzinfo=LOCAL_ZONE) except ValueError: errors.append(f"{group_label}: invalid documented group finish") continue final_boundary = parse_timestamp( rows[-1]["format_creation_time_utc"], f"{group_label} final boundary", errors ) if final_boundary is None: continue expected_finish_delta = Decimal( str( ( final_boundary.astimezone(timezone.utc) - documented_finish.astimezone(timezone.utc) ).total_seconds() ) ) expected_finish_status = ( "near_documented_finish_minute" if abs(expected_finish_delta) <= Decimal(120) else "documented_finish_conflict" ) for row in rows: close_decimal( parse_decimal( row["group_finish_delta_seconds"], f"{group_label} finish delta", errors, ), expected_finish_delta, Decimal("0.001"), f"{group_label} finish delta", errors, ) if row["group_finish_crosscheck_status"] != expected_finish_status: errors.append(f"{group_label}: incorrect finish crosscheck status") if expected_finish_status == "documented_finish_conflict": conflict_groups[group_label] = expected_finish_delta else: near_finish_deltas.append(abs(expected_finish_delta))
elapsed_sum = Decimal(0) gap_sum = Decimal(0) first_start: datetime | None = None previous_boundary: datetime | None = None previous_record_id = "" within_uncertainty_count = 0 for index, row in enumerate(rows): elapsed_value = parse_decimal( row["recording_elapsed_seconds"], f"{group_label} elapsed", errors ) if elapsed_value is not None: elapsed_sum += elapsed_value start = parse_timestamp( row["capture_start_time_utc"], f"{group_label} capture start", errors ) boundary = parse_timestamp( row["format_creation_time_utc"], f"{group_label} boundary", errors ) if index == 0: first_start = start if row["previous_record_id"] or row["inter_fragment_gap_seconds"] or row["gap_uncertainty_seconds"]: errors.append(f"{group_label}: first row has previous/gap values") if row["gap_status"] != "blank_for_first": errors.append(f"{group_label}: first row gap_status is not blank_for_first") else: transition_count += 1 if row["previous_record_id"] != previous_record_id: errors.append(f"{group_label}: previous_record_id chain is broken") if start is not None and previous_boundary is not None: expected_gap = Decimal( str( ( start.astimezone(timezone.utc) - previous_boundary.astimezone(timezone.utc) ).total_seconds() ) ) gap = parse_decimal( row["inter_fragment_gap_seconds"], f"{group_label} gap", errors ) close_decimal( gap, expected_gap, Decimal("0.001"), f"{group_label} gap", errors, ) if gap is not None: gap_sum += gap uncertainty = Decimal( 2 if row["timing_basis"] == "direct_device_filename_start" else 3 ) close_decimal( parse_decimal( row["gap_uncertainty_seconds"], f"{group_label} gap uncertainty", errors, ), uncertainty, Decimal(0), f"{group_label} gap uncertainty", errors, ) expected_gap_status = ( "negative_beyond_uncertainty" if expected_gap < -uncertainty else "within_uncertainty_of_zero" if abs(expected_gap) <= uncertainty else "positive_above_uncertainty" ) if row["gap_status"] != expected_gap_status: errors.append(f"{group_label}: incorrect gap_status") if expected_gap_status == "within_uncertainty_of_zero": within_uncertainty_count += 1 gap_counts[row["gap_status"]] += 1 previous_boundary = boundary previous_record_id = row["record_id"]
if first_start is not None: wall_span = Decimal( str( ( final_boundary.astimezone(timezone.utc) - first_start.astimezone(timezone.utc) ).total_seconds() ) ) if abs(wall_span - elapsed_sum - gap_sum) > Decimal("0.01"): errors.append(f"{group_label}: elapsed + gaps does not equal wall span") computed_group_rows[group_label] = { "fragment_count": len(rows), "direct_start_count": sum( row["timing_basis"] == "direct_device_filename_start" for row in rows ), "calibrated_start_count": sum( row["timing_basis"] == "calibrated_frame_model" for row in rows ), "elapsed_sum": elapsed_sum, "gap_sum": gap_sum, "wall_span": wall_span, "within_uncertainty_count": within_uncertainty_count, "finish_delta": expected_finish_delta, "finish_status": expected_finish_status, }
if transition_count != EXPECTED_TRANSITIONS: errors.append( f"expected {EXPECTED_TRANSITIONS} transitions, found {transition_count}" ) expected_gap_counts = Counter( {"positive_above_uncertainty": 159, "within_uncertainty_of_zero": 2} ) if gap_counts != expected_gap_counts: errors.append(f"unexpected transition gap counts: {dict(gap_counts)}") if conflict_groups != {EXPECTED_CONFLICT_GROUP: EXPECTED_CONFLICT_DELTA}: errors.append(f"unexpected finish conflicts: {conflict_groups}")
group_by_label = {row["fragment_set_label"]: row for row in group_rows} if len(group_by_label) != len(group_rows): errors.append("group_timing_summary.csv has duplicate fragment_set_label values") for group_label, computed in computed_group_rows.items(): row = group_by_label.get(group_label) if row is None: errors.append(f"group summary is missing {group_label}") continue for field, key in ( ("fragment_count", "fragment_count"), ("direct_start_count", "direct_start_count"), ("calibrated_start_count", "calibrated_start_count"), ("within_uncertainty_gap_count", "within_uncertainty_count"), ): if int(row[field]) != computed[key]: errors.append(f"{group_label}: group summary {field} differs") for field, key in ( ("recording_elapsed_seconds_sum", "elapsed_sum"), ("within_group_gap_seconds_sum", "gap_sum"), ("group_wall_span_seconds", "wall_span"), ("group_finish_delta_seconds", "finish_delta"), ): close_decimal( parse_decimal(row[field], f"{group_label} summary {field}", errors), computed[key], Decimal("0.01"), f"{group_label} summary {field}", errors, ) if row["group_finish_crosscheck_status"] != computed["finish_status"]: errors.append(f"{group_label}: group summary finish status differs")
calibration_by_id = {row["record_id"]: row for row in calibration_rows} if len(calibration_by_id) != EXPECTED_DIRECT: errors.append("calibration observations have duplicate record IDs") residuals: list[Decimal] = [] no_intercept_residuals: list[Decimal] = [] wall_frame_rates: list[Decimal] = [] nominal_five_errors: list[Decimal] = [] for record_id, calibration in calibration_by_id.items(): timing = timing_by_id.get(record_id) label = f"calibration {record_id}" if timing is None or timing.get("timing_basis") != "direct_device_filename_start": errors.append(f"{label}: does not join to a direct timing row") continue if calibration["file_path"] != timing["file_path"] or calibration["source_filename"] != timing["source_filename"]: errors.append(f"{label}: identity fields differ from timing row") start = parse_timestamp(calibration["direct_start_utc"], f"{label} start", errors) boundary = parse_timestamp( calibration["creation_boundary_utc"], f"{label} boundary", errors ) frames = parse_int(calibration["video_frame_count"], label, errors) if start is None or boundary is None or frames is None: continue observed = Decimal(str((boundary - start).total_seconds())) nominal = Decimal(frames) / Decimal(5) modeled = MODEL_INTERCEPT + Decimal(frames) * MODEL_FRAME_NUMERATOR / MODEL_FRAME_DENOMINATOR residual = observed - modeled residuals.append(residual) no_intercept_residuals.append( observed - Decimal(frames) * MODEL_FRAME_NUMERATOR / MODEL_FRAME_DENOMINATOR ) wall_frame_rates.append(Decimal(frames) / observed) nominal_five_errors.append(observed - nominal) for field, expected, tolerance in ( ("observed_elapsed_seconds", observed, Decimal("0.001")), ("nominal_five_fps_elapsed_seconds", nominal, Decimal("0.001")), ("nominal_five_fps_error_seconds", observed - nominal, Decimal("0.001")), ("model_elapsed_seconds", modeled, Decimal("0.0006")), ("model_residual_seconds", residual, Decimal("0.0006")), ): close_decimal( parse_decimal(calibration[field], f"{label} {field}", errors), expected, tolerance, f"{label} {field}", errors, ) effective = Decimal(frames) / observed close_decimal( parse_decimal( calibration["video_frames_per_observed_wall_second"], f"{label} video frames per observed wall second", errors, ), effective, Decimal("0.000001"), f"{label} video frames per observed wall second", errors, )
if model.get("model_id") != MODEL_ID: errors.append("calibration_model.json has an unexpected model_id") if model.get("status") != "revision_pinned_exploratory_in_sample_calibration": errors.append("calibration_model.json has an unexpected status") if model.get("source_dataset_revision") != EXPECTED_SOURCE_REVISION: errors.append("calibration_model.json source revision differs") if model.get("formula") != ( "estimated_elapsed_seconds = 0.8 + video_frame_count * 7 / 30" ): errors.append("calibration_model.json formula differs") constants = model.get("constants") if not isinstance(constants, dict): errors.append("calibration_model.json constants are missing") else: expected_constants = { "empirical_intercept_seconds": float(MODEL_INTERCEPT), "seconds_per_frame_numerator": int(MODEL_FRAME_NUMERATOR), "seconds_per_frame_denominator": int(MODEL_FRAME_DENOMINATOR), } if constants != expected_constants: errors.append(f"calibration model constants differ: {constants}") calibration_model_section = model.get("calibration") if not isinstance(calibration_model_section, dict): errors.append("calibration_model.json calibration section is missing") else: if calibration_model_section.get("sample_count") != EXPECTED_DIRECT: errors.append("calibration model sample_count differs") if calibration_model_section.get("group_count") != 5: errors.append("calibration model group_count differs") if calibration_model_section.get("holdout_count") != 0: errors.append("calibration model must state that no holdout exists") if len(residuals) == EXPECTED_DIRECT: validate_metric_block( calibration_model_section.get( "model_residual_seconds_observed_minus_estimated" ), { "minimum": min(residuals), "maximum": max(residuals), "mean": decimal_mean(residuals), "standard_deviation_population": decimal_population_standard_deviation( residuals ), "root_mean_square": decimal_root_mean_square(residuals), "maximum_absolute": max(abs(value) for value in residuals), }, Decimal("0.0000006"), "calibration model residual metrics", errors, ) validate_metric_block( calibration_model_section.get( "no_offset_seven_thirtieths_residual_seconds" ), { "minimum": min(no_intercept_residuals), "maximum": max(no_intercept_residuals), "mean": decimal_mean(no_intercept_residuals), }, Decimal("0.0000006"), "calibration no-intercept residual metrics", errors, ) validate_metric_block( calibration_model_section.get( "video_frames_per_observed_wall_second" ), { "minimum": min(wall_frame_rates), "maximum": max(wall_frame_rates), "mean": decimal_mean(wall_frame_rates), "standard_deviation_population": decimal_population_standard_deviation( wall_frame_rates ), }, Decimal("0.00000006"), "calibration video-frames-per-observed-wall-second metrics", errors, ) validate_metric_block( calibration_model_section.get( "nominal_five_fps_error_seconds_observed_minus_n_over_5" ), { "minimum": min(nominal_five_errors), "maximum": max(nominal_five_errors), "mean": decimal_mean(nominal_five_errors), }, Decimal("0.0006"), "calibration nominal-five-fps error metrics", errors, )
application = model.get("application") if not isinstance(application, dict): errors.append("calibration_model.json application section is missing") else: expected_application_values = { "direct_start_rows": EXPECTED_DIRECT, "calibrated_estimate_rows": EXPECTED_CALIBRATED, "direct_filename_timestamp_resolution_allowance_seconds": 1, "estimated_start_uncertainty_seconds": 2, "calibrated_gap_uncertainty_seconds": 3, } for name, expected in expected_application_values.items(): if application.get(name) != expected: errors.append(f"calibration application {name} differs") if not isinstance(application.get("profile_match_fields"), list) or len( application["profile_match_fields"] ) != 8: errors.append("calibration application profile-match declaration differs")
if validation.get("status") != "pass_with_one_preserved_documented_finish_conflict": errors.append("validation_summary status differs") if validation.get("verification_level") != "repository_packet_self_consistency": errors.append("validation_summary verification level differs") counts = validation.get("counts") if not isinstance(counts, dict): errors.append("validation_summary counts are missing") else: expected_counts = { "canonical_timing_rows": EXPECTED_ROWS, "direct_device_filename_start_rows": EXPECTED_DIRECT, "calibrated_frame_model_rows": EXPECTED_CALIBRATED, "calibration_groups": 5, "fragment_groups": EXPECTED_GROUPS, "inter_fragment_transitions": EXPECTED_TRANSITIONS, "excluded_noncanonical_derivatives": 5, } if counts != expected_counts: errors.append(f"validation_summary counts differ: {counts}") if validation.get("pinned_dataset_revision") != EXPECTED_SOURCE_REVISION: errors.append("validation_summary pinned revision differs")
expected_repository_checks = { "timing_relationship_record_id_path_sets_equal": True, "timing_relationship_record_id_path_sha256_xet_matches": True, "canonical_metadata_record_id_size_xet_matches": True, "canonical_record_ids_paths_sha256_unique": True, "format_video_creation_times_equal": True, "exact_literal_capture_tag_preserved": "5.000000", "literal_capture_tag_used_in_timing_formula": False, } if validation.get("repository_identity_and_source_checks") != expected_repository_checks: errors.append("validation_summary repository identity/source checks differ")
expected_local_claims = { "audit_relationship_path_sets_equal": True, "audit_record_id_sha256_size_matches": True, "all_rows_same_observable_technical_profile": True, } if validation.get("retained_local_audit_claims_not_reperformed") != expected_local_claims: errors.append("validation_summary retained local-audit claims differ")
calibration_checks = validation.get("calibration_checks") if not isinstance(calibration_checks, dict): errors.append("validation_summary calibration_checks is missing") else: expected_calibration_values = { "model_id": MODEL_ID, "formula": "estimated_elapsed_seconds = 0.8 + video_frame_count * 7 / 30", "direct_observation_count": EXPECTED_DIRECT, "holdout_count": 0, } for name, expected in expected_calibration_values.items(): if calibration_checks.get(name) != expected: errors.append(f"validation_summary calibration {name} differs") if residuals: close_decimal( parse_decimal( str(calibration_checks.get("maximum_absolute_model_residual_seconds", "")), "validation_summary maximum absolute residual", errors, ), max(abs(value) for value in residuals), Decimal("0.0000006"), "validation_summary maximum absolute residual", errors, ) if nominal_five_errors: for name, expected in ( ("nominal_five_fps_minimum_error_seconds", min(nominal_five_errors)), ("nominal_five_fps_maximum_error_seconds", max(nominal_five_errors)), ): close_decimal( parse_decimal( str(calibration_checks.get(name, "")), f"validation_summary {name}", errors, ), expected, Decimal("0.0006"), f"validation_summary {name}", errors, )
expected_chronology = { "groups_with_contiguous_positions": EXPECTED_GROUPS, "strictly_increasing_creation_boundaries_within_groups": True, "gaps_positive_above_uncertainty": gap_counts["positive_above_uncertainty"], "gaps_within_uncertainty_of_zero": gap_counts["within_uncertainty_of_zero"], "gaps_negative_beyond_uncertainty": gap_counts["negative_beyond_uncertainty"], } if validation.get("chronology_checks") != expected_chronology: errors.append("validation_summary chronology checks differ")
finish_summary = validation.get("documented_finish_crosscheck") if not isinstance(finish_summary, dict): errors.append("validation_summary documented finish crosscheck is missing") else: if finish_summary.get("threshold_seconds") != 120: errors.append("validation_summary finish threshold differs") if finish_summary.get("near_minute_groups") != len(near_finish_deltas): errors.append("validation_summary near-minute group count differs") if near_finish_deltas: close_decimal( parse_decimal( str(finish_summary.get("maximum_near_minute_delta_seconds", "")), "validation_summary maximum near-minute delta", errors, ), max(near_finish_deltas), Decimal("0.001"), "validation_summary maximum near-minute delta", errors, ) conflicts = finish_summary.get("conflict_groups") if not isinstance(conflicts, list) or len(conflicts) != 1: errors.append("validation_summary conflict group receipt differs") else: conflict = conflicts[0] if not isinstance(conflict, dict): errors.append("validation_summary conflict group is malformed") else: if conflict.get("fragment_set_label") != EXPECTED_CONFLICT_GROUP: errors.append("validation_summary conflict label differs") close_decimal( parse_decimal( str(conflict.get("delta_seconds", "")), "validation_summary conflict delta", errors, ), EXPECTED_CONFLICT_DELTA, Decimal("0"), "validation_summary conflict delta", errors, )
serialized_total = sum(serialized_elapsed_values, Decimal(0)) unrounded_total = sum(unrounded_elapsed_values, Decimal(0)) aggregate = validation.get("aggregate_descriptors") if not isinstance(aggregate, dict): errors.append("validation_summary aggregate descriptors are missing") else: close_decimal( parse_decimal( str(aggregate.get("serialized_recording_elapsed_seconds_sum", "")), "validation_summary serialized elapsed sum", errors, ), serialized_total, Decimal("0"), "validation_summary serialized elapsed sum", errors, ) close_decimal( parse_decimal( str(aggregate.get("serialized_recording_elapsed_hours_sum", "")), "validation_summary serialized elapsed hours", errors, ), serialized_total / Decimal(3600), Decimal("0.0000006"), "validation_summary serialized elapsed hours", errors, ) note = aggregate.get("note") if not isinstance(note, str) or "0.001667 seconds" not in note: errors.append("validation_summary aggregate rounding note differs") close_decimal( unrounded_total, Decimal(1649602) / Decimal(15), Decimal("0.000000000000000000001"), "unrounded corpus elapsed total", errors, )
expected_immutability = { "metadata_csv_sha256_unchanged": True, "relationship_sidecar_hashes_unchanged": True, "canonical_metadata_field_count_unchanged": True, } if validation.get("immutability_checks") != expected_immutability: errors.append("validation_summary immutability checks differ")
expected_not_reperformed = { "source-media tag and frame-count probing", "source-media ordinary SHA-256 hashing", "retained local source-audit byte verification", "NTFS timestamp observation", } not_reperformed = validation.get("not_reperformed_by_repository_validator") if not isinstance(not_reperformed, list) or set(not_reperformed) != expected_not_reperformed: errors.append("validation_summary non-reperformed checks declaration differs")
validate_bundle(timing_dir, errors)
if errors: for error in errors: print(f"ERROR: {error}") raise SystemExit(f"recording timing validation failed with {len(errors)} error(s)")
print( json.dumps( { "status": "ok", "source_revision": EXPECTED_SOURCE_REVISION, "timing_rows": len(timing_rows), "direct_filename_timestamp_rows": basis_counts[ "direct_device_filename_start" ], "calibrated_rows": basis_counts["calibrated_frame_model"], "groups": len(groups), "transitions": transition_count, "gap_status_counts": dict(gap_counts), "finish_conflicts": { key: float(value) for key, value in conflict_groups.items() }, "bundle_files_verified": len( [ path for path in timing_dir.iterdir() if path.is_file() and path.name != "bundle.sha256" ] ), }, indent=2, sort_keys=True, ) )
if __name__ == "__main__": main()Archive_Specifications.md+31-11
CHANGELOG.md+16
README.md+36-16
SCHEMA.md+36-2
Standard_Time_Lapses/Provenance/README.md+13-4
Standard_Time_Lapses/Provenance/Recording_Timing/README.mdAdded+85
Standard_Time_Lapses/Provenance/Recording_Timing/SCHEMA.mdAdded+88
Standard_Time_Lapses/Provenance/Recording_Timing/bundle.sha256Added+8
Standard_Time_Lapses/Provenance/Recording_Timing/calibration_model.jsonAdded+67
Standard_Time_Lapses/Provenance/Recording_Timing/calibration_observations.csvAdded+23
Standard_Time_Lapses/Provenance/Recording_Timing/group_timing_summary.csvAdded+26
Standard_Time_Lapses/Provenance/Recording_Timing/recording_timing.csvAdded
Standard_Time_Lapses/Provenance/Recording_Timing/source_manifest.jsonAdded+168
Standard_Time_Lapses/Provenance/Recording_Timing/validation_summary.jsonAdded+72
VALIDATION.md+49-1
tools/test_recording_timing.pyAdded+151
tools/validate_recording_timing.pyAdded+1353