Repository navigation
Conversation
engine.PreviewDir scans a model directory in place and hashes nothing: each file's SHA-256 is the one its source states, and every file needs one. modeldir.List walks a directory in the scan's rules without opening a file. ScanMode still refuses a header-only directory scan. cmd/socair-preview builds the engine for js/wasm. tools/socair-preview mounts a Hugging Face repo as a filesystem whose reads are HTTP range requests, runs the preview on it, and shows the rows with no promotion verdict. If any read fails, it shows none. On SmolLM2-135M-Instruct the preview read 3.7 MB of a 2 GB repo, and its subject digest, file hashes, row statuses and notes equal a full scan of the same selection pulled through the airlock. Signed-off-by: Christopher Maher <chris@mahercode.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prototype, not for merge as is. This lets you put
socair.ai/in front of a Hugging Face model URL and see what Socair's checks find. The visitor's browser runs the open engine, compiled to WebAssembly, on the model's headers and small files, fetched straight from Hugging Face with range requests.What it does
engine.PreviewDirscans a model directory in place and hashes nothing.modeldir.Listwalks a directory without opening any file.ScanModestill refuses a header-only directory scan (the existing test is unchanged).cmd/socair-previewis the engine built for js/wasm. It exposessocairPreview(dir, hashes)and, for a GGUF on its own,socairPreviewFile(path).tools/socair-preview:hffs.jsis a filesystem in the shape Go's browser runtime calls. Reads become cached range requests, and headers are prefetched in parallel.try.mjsruns the same path in Node;serve.mjsserves the page locally.docs/airlock.mdrecommends, plus*.py, printed as the airlock pull's--include.Measured
Fidelity. SmolLM2's selection was pulled through
socair airlock pullat the same commit and scanned in full. The subject digest, the 13 file hashes, and every row's status and notes are identical to the preview.Size.
socair.wasmis 17 MB, 3.0 MB brotli.Tests
TestPreviewReadsInPlaceWithStatedHashes. Two falsifications: a missingSOCAIR_SCAN_TMPwould fail a snapshot, and a planted hash is reported as given.TestPreviewNeedsEveryFilesHash.TestPreviewFindsWhatAScanFinds: every row equals a full scan's, including a Remote code LEAD.TestListStatesHashesWithoutReadingAFile: a file nobody can read still lists.go vet, staticcheck (native and js/wasm), and the fullgo test ./...pass.Found along the way
The legacy torch storage walk (
internal/checks/pickle/containers.go:182) reports anyReadAterror as "a record cut off at the end of the file", a FAIL. An I/O error is not positive evidence; only end-of-file is. That's a separate issue, and the preview's all-or-nothing rule already keeps it off the page.Before this ships
/huggingface.co/*on socair.ai, plus the site's design.cmd/socair-previewandtools/socair-previewbelong in this repo or the site's.Assisted-by: Claude Code (Opus 5.5)