Repository navigation
uorc client: inspect, verify, safe writes, multi-file archives - #110
Merged
Merged
Conversation
- uorc inspect: frame header (scope, representation, object lengths, sizes) and the UORC-SHA256-CHAIN-v1 seal, without decoding; walks archives written back to back. --json for machine output. - uorc verify: decode in memory, check seal and declared lengths, and optionally compare with an original. Distinct exit codes: 2 usage, 3 I/O, 4 invalid archive, 5 budget, 6 overflow, 7 differs from the original. - Outputs go to a temporary file beside the destination and are moved into place with a no-replace hard link (or rename under --force); a failed run leaves nothing behind. - Ordered objects: compress_objects/decompress_objects code the concatenation once and record each length in the frame's objectLengths (resealed); decompress relabels to one object for the certified path. - Trees: a directory or several paths become [manifest, file...]; restore refuses absolute and '..' paths and symlinked parents; --resume keeps files already restored. - wasm exports inspect, verify, compress_tree, decompress_tree; the Pages site gains multi-file/folder compress, per-file download, Inspect, Verify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3LpDk5B19xbzm4jSei
afflom
force-pushed
the
claude/project-thread-3dnp1u
branch
from
November 9, 2026 16:19
4b9ed73 to
8fedf95
Compare
afflom
pushed a commit
that referenced
this pull request
Nov 9, 2026
…ands UC-API-01 now covers inspect and verify across library, CLI and Wasm; UC-OBJ-01 is build evidence from multi-object archives (zero objects, distinct empty objects, truncation and trailing bytes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3Pb2pARmowTZwiuFLV
This was referenced Nov 9, 2026
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.
Requested by Alex · project thread
Targets
main; rebased onto it after #104 merged. Rust and web only: no change toclient/src, the LexLean export orgenerated/rust.Closes #36, closes #37, closes #38.
What changes
Inspect and verify (#36)
uorc inspect [--json] <archive>reads the frame header (format, profile, scope/basis, representationraw/ulz-kernel/program, object lengths, body and archive sizes) and checks the UORC-SHA256-CHAIN-v1 seal without decoding. It walks archives written back to back, so it also covers the streams that Stream input of any size in bounded frames #106 adds.uorc verify [--json] <archive> [original]decodes in memory, checks the seal and the declared lengths, and with an original compares the bytes.inspect,frames,verify,Info,Representation,Error::Mismatch.Safe output (#37)
--forcethe move is a hard link, which fails if the destination exists, so nothing can be overwritten between check and move. With--forceit is an atomic rename. The temporary file is removed on every error path. An existing output is refused before any work starts.Ordered objects and trees (#38)
compress_objects/decompress_objectshandle any number of objects, including zero and empty ones. The body codes the concatenation once, so similar files compress together, and the frame's standardobjectLengthsrecords each length (resealed).decompresschecks the seal of a multi-object archive, relabels it to one object, and runs the existing certified path.uorc compress <dir>oruorc compress a b c -o x.uorcstores[manifest, file₁…fileₙ]. The manifest holds relative paths and kinds (file, executable, directory), so empty directories and the +x bit survive. An empty tree is the archive of zero objects. A one-object archive is always a plain stream, so the two never collide..., empty components and parents that are symlinks.--resumekeeps files that already hold the right bytes, so an interrupted restore can finish. Symlinks are skipped when packing.wasm and Pages
uorc-wasmaddsinspect,verify(with anoriginal_buffer),compress_treeanddecompress_tree.web/uorc.jsexposesinspect,verify,compressFilesanddecompressFiles.Tests
cargo test --release -p uorc: 14 library tests and 7 CLI tests pass. They cover: refused overwrite,--force, a failed run leaving no file, inspect on kernel and corrupt archives, verify with match and mismatch, the exit codes, ordered objects (zero, empty, mixed), streams, a broken seal on a relabelled archive, a nested directory with empty files, binary data, an empty dir and the +x bit,--resume, and a hostile manifest.cargo clippy -p uorc -p uorc-wasm --all-targets -D warningsandcargo fmtare clean.No CI legs are added. UC-OBJ-01 can cite
ordered_objects_round_tripanddirectories_round_trip_with_empty_files_binary_and_nesting(conformance rows are #108's lane).🤖 Generated with Claude Code
https://claude.ai/code/session_013Asa3LpDk5B19xbzm4jSei