Skip to content

+ Fossil (Plan 9 file server) reader - #516

Open
Hawkynt wants to merge 5 commits into
mainfrom
feat/fossil
Open

Hawkynt wants to merge 5 commits into
mainfrom
feat/fossil

Conversation

@Hawkynt

@Hawkynt Hawkynt commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Read-only Fossil descriptor (the catalogue row was MISSING). It reads the header, superblock, source entries, pointer trees, MetaBlocks and DirEntries, covering the active tree and local snapshots. Blocks already archived to Venti are refused, because there is no Venti to fetch them from.

Verification

  • A volume formatted by plan9port's flfmt and filled by its fossil server over 9P reads back byte-identical to what the server returned. The volume has nested and empty directories, a file with a two-level pointer tree, and a snapshot taken before a rewrite; the snapshot keeps the old bytes. The fixture is committed with generate.sh recording how it was made.
  • Refusal tests cover bad header and superblock magic, truncation, and damaged meta blocks.
  • Locally, all 18 Fossil-filtered tests pass.

Not included

No writer yet: labels, epochs and tags are not proven against fossil.

Sourcing

Rung 1: converted from plan9port's MIT-licensed fossil sources, with the notice beside the code. The on-disk notes are in docs/FOSSIL-ON-DISK.md.

Hawkynt and others added 5 commits October 23, 2026 15:15
The catalogue listed Fossil as MISSING. New read-only Fossil descriptor
(header magic 0x3776ae89 at 128 KiB): superblock, 40-byte source entries,
pointer-tree walk (local block addresses, zero scores as holes), MetaBlocks
and DirEntries v7-v9, gen/mgen checked; the whole local tree from the Fossil
root - active/ plus snapshot/ - with modes, owners and mtimes. Venti scores
are refused (no Venti here); damaged meta blocks and out-of-partition
blocks are refused, never guessed.

Oracle: a volume formatted by plan9port's flfmt and filled by its fossil
server over 9P - nested and empty directories, a 900 KB file with a
two-level pointer tree, a local snapshot taken before a rewrite - reads
byte-identical to what that server returned; the snapshot keeps the old
bytes. flchk is not usable as oracle without Venti (errors even on a fresh
volume).

Not writable yet: a writer must keep labels, epochs and tags consistent and
is unproven against fossil (READ-ONLY-BUT-SOURCES-WRITE).

Sourcing: rung 1 - converted from plan9port's MIT-licensed fossil sources
(1f13969; THIRD-PARTY-NOTICE.Fossil.txt), docs/FOSSIL-ON-DISK.md.
Keep Fossil, G722 and main fixture resources together, record the existing pinned plan9port MIT conversion notice, and regenerate FileSystems API documentation on the current Android-capable baseline. Main artwork is retained.

Verified: Release solution build; reproduced the missing-ledger failure, then passed 56 focused filesystem/architecture/documentation checks with 1 corpus-dependent skip; documentation generation completed without errors.
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