lib/gitea: fix the fetch-pack-over-HTTP hang — native parse fast path
The sx-forge native-loop blocker: clone! of the live giles/rose-ash never returned over gitea/http-app. Root cause was NOT the transport — pack-line-parse ran every pack line through the interpreted spec parser (~6.6KB/s on the CEK machine; a full-repo pack = hours), and a non-hex byte in a pkt length header parsed negative (index-of -1), walking the scan index backwards forever. - gitea/parse-obj: use the host reader (open-input-string + read, ~3700x faster, value-identical) when the host provides it; hosts without string ports keep sx-parse. Feature-detected at load. - pkt-sections-loop: (< n 4) guard — malformed lengths error instead of hanging. - push-cmd!: haves = every advertised remote ref held locally, so a NEW branch pushes only its delta, not the whole repo closure. - tests/wire.sx: malformed-len errors, truncated-pkt clamps, parse-obj = sx-parse equivalence (blob/commit + cid). 83/83. - tests/wire-http.sh + wire-http-client.sx: end-to-end over REAL http-listen/http-request on :8943 — ls-remote/clone/push-new-branch/ fresh-clone-verify/delete. The coverage gap that hid all this. Proven vs the live forge (in sx-gitea-1): full 4468-file clone in 77s (was: hang), commit, push heads/sx-smoke-test ok, branch advertised on sx.sx-web.org. Conformance 620/620. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,10 +6,10 @@ _Generated by `lib/gitea/conformance.sh`_
|
||||
|-------|-----:|-----:|------:|
|
||||
| repo | 91 | 0 | 91 |
|
||||
| access | 103 | 0 | 103 |
|
||||
| wire | 78 | 0 | 78 |
|
||||
| wire | 83 | 0 | 83 |
|
||||
| issues | 88 | 0 | 88 |
|
||||
| pr | 100 | 0 | 100 |
|
||||
| activity | 60 | 0 | 60 |
|
||||
| search | 35 | 0 | 35 |
|
||||
| fed | 60 | 0 | 60 |
|
||||
| **Total** | **615** | **0** | **615** |
|
||||
| **Total** | **620** | **0** | **620** |
|
||||
|
||||
Reference in New Issue
Block a user