Skip to content

revert: require fileSizeBytes in SpikeGLX meta validation - #5

Merged
tabedzki merged 2 commits into
mainfrom
tabedzki/revert/require-filesizebytes
Aug 17, 2026
Merged

revert: require fileSizeBytes in SpikeGLX meta validation#5
tabedzki merged 2 commits into
mainfrom
tabedzki/revert/require-filesizebytes

Conversation

@tabedzki

Copy link
Copy Markdown

🤖 Human guided, AI assisted PR (using this skill). AI text below. 🤖

Summary

Reverts the frame-alignment fallback added in #4.

The underlying cause of the missing fileSizeBytes/fileTimeSecs/fileSHA1 fields has been identified and fixed: SpikeGLX itself was crashing before completing its shutdown/finalization sequence. That's now fixed at the source, so new recordings should always have these fields going forward.

Since these fields are relied on downstream for values we need, validate_file should go back to strictly requiring fileSizeBytes rather than tolerating its absence. The previously-affected .meta files (from the two recordings that motivated #4) will be corrected in place by a separate one-off script, rather than having the reader permanently accommodate malformed metadata.

Change

element_array_ephys/readers/spikeglx.py: SpikeGLX.validate_file reverted to its pre-#4 form — a direct meta.meta["fileSizeBytes"] lookup, raising IOError on mismatch (and KeyError if the key is absent, as before).

Verified the resulting file is byte-identical to the state immediately prior to #4 (git diff against that commit is empty for this file).

Assisted-by: ClaudeCode:claude-sonnet-5

Reverts the frame-alignment fallback added in #4. The root cause
(SpikeGLX crashing before finishing its shutdown sequence, so
fileSizeBytes/fileTimeSecs/fileSHA1 were never written) has been
fixed upstream in SpikeGLX itself. These fields are relied on
downstream for values we need, so validate_file should go back to
treating their absence as an error rather than silently tolerating
it. Previously-affected files will be corrected by a separate
one-off script.

This reverts commit 0f2e909.

Assisted-by: ClaudeCode:claude-sonnet-5
@tabedzki
tabedzki merged commit 8a7942a into main Aug 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant