sx-gitea Phase 3: wire — smart-HTTP protocol over native CIDs (TDD, 272/272)
lib/gitea/wire.sx: git-style pkt-line framing (byte-compatible hex4 lengths + flush sections); object closure walker (commits/trees/blobs/ tags) with missing-object detection; wants/haves pack negotiation. Objects travel as '<cid> <serialized-sx>' pkt lines — receivers re-derive the CID from the bytes, so packs are tamper-evident by construction. Server endpoints: GET info/refs (read-gated advertisement incl. '@ HEAD' symref line), POST git-upload-pack (read), POST git-receive-pack (write; 401/403/404 like the rest of the API) with per-ref command application: create/update/delete via ref-CAS, fast-forward enforcement on heads/*, closure-completeness check, stale detection, heads|tags-only. Client: gitea/remote over any dream app fn — ls-remote, clone! (sets HEAD + default-branch, cleans up on unreachable remote), mirror fetch!, push!/push-delete! with local pack computation. Suite syncs two in-memory forges end to end: clone, incremental fetch, push, non-ff rejection + recovery, branch create/delete, tag push, private-repo credentialed round trip. sx-parse comes from spec/parser.sx on the OCaml server host — added to the conformance load order. Also merged loops/git (git-wire export/ import adapters, 267/267) for future stock-git interop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"suites": {
|
||||
"repo": {"pass": 91, "fail": 0},
|
||||
"access": {"pass": 103, "fail": 0}
|
||||
"access": {"pass": 103, "fail": 0},
|
||||
"wire": {"pass": 78, "fail": 0}
|
||||
},
|
||||
"total_pass": 194,
|
||||
"total_pass": 272,
|
||||
"total_fail": 0,
|
||||
"total": 194
|
||||
"total": 272
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user