Skip to content

fix(library): identify truncated GGUF files without failing their import - #78

Merged
MrScripty merged 2 commits into
mainfrom
fix/release-intermittent-failures
Nov 3, 2026
Merged

MrScripty merged 2 commits into
mainfrom
fix/release-intermittent-failures

Conversation

@MrScripty

Copy link
Copy Markdown
Owner

The v0.8.0 rehearsal on 89bb2f54 (run 41659076905) passed the Windows release job for the first time. It failed in two places that had passed on the previous run.

  • Linux, a real fix. A .gguf file too short for its 24-byte header made identification return a raw "failed to fill whole buffer" I/O error. The test's file is 17 bytes with no GGUF magic, so it was picked by its extension. When the watcher's background import reached the file first, the owned import failed and shutdown reported incomplete work. Truncated content is now identified as a GGUF of unknown type, and validation reports the unusable file. Genuine read failures are still errors. A regression test covers both the no-magic and the truncated-header cases.
  • macOS, a test assumption. A discovery test expected a successor owner the instant the previous owner dropped. A child spawned by a parallel test can briefly inherit the native store lock. The test now retries only that busy refusal, for up to 5 seconds, as local_start_authority already waits for release.

Local checks: all 2,358 pumas-library tests pass. With -D warnings, the Linux and Windows builds are clean. Verified by a candidate rehearsal on this branch.

🤖 Generated with Claude Code

The v0.8.0 rehearsal on 89bb2f5 failed intermittently in two places
that had passed on the previous run:

- Linux: a .gguf too short for its 24-byte header (here a 17-byte file
  with no GGUF magic, picked by extension) made identification return a
  raw "failed to fill whole buffer" I/O error. When the watcher's
  background import reached it first, the owned import failed and
  shutdown reported incomplete work. Truncated content is now identified
  as a GGUF of unknown type, so validation reports the unusable file;
  genuine read failures are still errors. A regression test covers both
  the no-magic and truncated-header cases.
- macOS: a discovery test expected a successor owner the instant the
  previous one dropped, while a child spawned by a parallel test can
  briefly inherit the native store lock. The test now retries only that
  busy refusal for up to five seconds, as local_start_authority already
  waits for release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: da44daf4-f47d-46ce-afcc-1c63aef9f479
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

This PR lets truncated GGUF files finish identification without failing their import.

  • Short .gguf files are identified as unknown instead of stopping import.
  • The owner-release test waits briefly for the store lock to clear.

No actionable issues were found. No runtime checks were run during this review.

Reviews (1) · Last reviewed commit: "fix(library): identify truncated GGUF fi..." · Reviewed by Greptile

…rain

PR CI failed once in the headless suite: right after the parked child
was drained, an immediate nonblocking acquisition of the physical store
still saw Busy. A child forked by a parallel test briefly holds an
inherited copy of the lock until its exec closes it, as the store
lifetime tests already document and wait for. The post-drain check now
waits up to five seconds for release; the earlier check that the store
is still retained while the child is unresolved is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MrScripty
MrScripty merged commit 689da1e into main Nov 3, 2026
27 checks passed
@MrScripty
MrScripty deleted the fix/release-intermittent-failures branch November 3, 2026 19:23
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