Phase 0 second pass: storage identity + two-crate split + anchor workload

- Reframe storage identity: git-compatible sha1/sha256 (algorithm-tagged),
  not BLAKE3 — the ancestor POCs' BLAKE3 was an iroh-blobs artifact, and
  consuming iroh-blobs (OQ-FS-03 option (a)) dissolves with it; findings
  transfer (inline/outboard hybrid, GC shape, write-ordering analysis),
  code doesn't
- Chunk-level dedup adopted as working goal for large content, with the
  honest calibration recorded: git dedups at object granularity (objects
  are effectively single-chunk); chunk manifests are the generalization
  that pays on workspace-scale files
- Two-crate working direction: alkblobs (bucket-style CAS blob store,
  appfile layout) beneath alkfs (path tree + branches + serving protocol);
  durability contract now crosses the put/get seam
- New OQ-FS-16: remote-mount anchor workload — today's sshfs/vanilla-SFTP
  mount of this dev server's workspace, with an honest decomposition of
  why it's slow and what an indexed VFS fixes server-side
- POC register: #3 rewritten as alkblobs sha1/sha256 store skeleton,
  #4 reframed (git objects ride whole-file), new #8 mount-workload
  baseline (sshfs latency measurement, runnable today)
- AGENTS.md: two-crate direction in the crate description + convention 10
  (identity, chunk-granularity note, seam durability contract) + a
  Phase-0 working-direction quick-reference section (leanings, not
  decisions)

Verification: docs-only repo — all 16 OQ ids contiguous, every referenced
workspace path exists, BLAKE3 references re-checked as historical context
This commit is contained in:
glm-5.3-flash committed 2026-09-23 09:19:58 +00:00
1 parent 9e863747fc
commit 23a39cc9c0
2 files changed
+346 -154

No files matched your search

+49 -18
View File
@@ -48,16 +48,21 @@ not change `git config`, skip hooks, or use `git commit -i`.
## Project Conventions (Rust / virtual filesystem crate)
This is the alkfs crate — a content-addressed, branch-aware virtual
filesystem for the alk family. The intended shape (pending Phase 0
convergence): a local storage engine (path-tree metadata + content-addressed
blob store) with a producer/consumer serving protocol on alkcall channels,
so that alkgit's object storage, the coming alksftp, and the alknet
filesystem vision all compose on the same substrate. It sits in the alk*
family: alkcall (call + channels — the substrate), alktty, alktunnels,
alksocks (the protocol-crate siblings), alkgit (the first in-family
storage consumer). The conventions below apply to all work in `src/` and
`tests/` once they exist. They mirror
This is the alkfs repo — a content-addressed, branch-aware virtual
filesystem for the alk family. The working direction (pending Phase 0
convergence): a two-crate split — `alkblobs` (bucket-style
content-addressed blob store: appfile layout, git-compatible sha1/sha256
identity, chunk-level dedup for large content) beneath `alkfs` (the
path-tree mapping + branches + write sessions, plus a producer/consumer
serving protocol on alkcall channels) — so that alkgit's object storage,
the coming alksftp, and the alknet filesystem vision all compose on the
same substrate. The anchor workload is remote mounting: a dev-server
workspace mounted on a local Linux machine (today via sshfs/vanilla
SFTP, whose per-syscall round trips are the problem to beat). It sits in
the alk* family: alkcall (call + channels — the substrate), alktty,
alktunnels, alksocks (the protocol-crate siblings), alkgit (the first
in-family storage consumer). The conventions below apply to all work in
`src/` and `tests/` once they exist. They mirror
`.opencode/agents/implementation-specialist.md` §Project Conventions and
are repeated here so they apply to every session, not just spawned
implementation agents.
@@ -147,13 +152,20 @@ implementation agents.
`docs/research/phase-0.md`.
10. **Content addressing and durability ordering** — content is
identified by its hash, not its path; identical content is shared
across branches/paths by construction. The durability contract is
the crash-safety story: content must be durable before any metadata
naming it commits; a crash mid-write leaves the old version intact
and visible (the POC's branch-on-write/merge-on-close property).
Exact hashing/chunking choices are Phase 0 OQs; the *invariant*
(no torn versions visible, no orphaned-name commits) is not.
identified by its hash, not its path, with git-compatible identity
(sha1/sha256, algorithm-tagged): git objects are natively addressable
in the blob layer, never mapped through a foreign hash. Identical
content is shared across branches/paths by construction; chunk-level
dedup applies to large content (git objects are effectively
single-chunk and ride whole-file identity). The durability contract
is the crash-safety story: content must be durable before any
metadata naming it commits; a crash mid-write leaves the old version
intact and visible (the POC's branch-on-write/merge-on-close
property). Across the alkblobs/alkfs seam the contract is the
put/get API (what a returned handle promises about durability is
part of that seam's spec). Exact chunking/manifest choices are
Phase 0 OQs; the *invariant* (no torn versions visible, no
orphaned-name commits) is not.
11. **Vendored core types come from alkcall** — `Connection`,
`ProtocolHandler`, `BiStream`, `BidiStreamSource`, `AuthContext`,
@@ -296,4 +308,23 @@ referenced path, ADR, and OQ id exists.
open-op hooks
- If a TODO references a design direction that a later ADR has decided
against, the TODO is stale — remove it and align with the ADR. Do not
implement the rejected design.
implement the rejected design.
## Phase 0 working direction (quick reference)
Recorded so sessions don't relitigate settled leanings — see
`docs/research/phase-0.md` §Working direction for full context:
- **Git-compatible identity (sha1/sha256), not BLAKE3** — the ancestor
POCs' BLAKE3 was an iroh-blobs artifact; iroh-blobs is evaluated, not
adopted (findings transfer, code doesn't).
- **Chunk-level dedup is the working goal** for large content; git
objects ride whole-file identity (single-chunk regime).
- **Two-crate split (working direction): `alkblobs` + `alkfs`** — the
blob store beneath the path-tree mapping; repo shape (one repo, two
crates vs two repos) is an open sub-question.
- **Anchor workload: remote mounting** — sshfs/vanilla-SFTP replacement;
per-syscall round trips are the problem to beat.
- These are **leanings, not decisions**: every one is an open OQ
(OQ-FS-01..16) until the Phase 0 convergence; don't mark anything
"settled" in code or docs until the checklist starts ticking.