Closes #319.
These are the last loose ends in how a push's answer is read, from #307's review. None of them overcharged anyone.
What changes
-
One parser (
land.rsread_answer). It replacesreport_linesand returns one of:Report(unpacked or unpack failed, theokrefs and thengrefs);Fatal(a side-band channel-3 packet or anERRpacket);Unread.
It reads report-status v1 and v2 (skipping
optionlines), plain and side-band, and reports split across packets.verdict,refused_wholeand the push path all read it, so the two readings ofoklines no longer disagree. For single-ref writes it reads the same as before, so normal writes still settle as Moved. -
A 200 with a fatal error ends for staff (
push_settlement), with the refs it asked for. It is no longer counted, because a fatal most likely took nothing. A 200 with no readable report is still counted, as before. -
A push records only the refs its report didn't refuse. A ref the report lists as
ng, or every ref when the unpack failed, fires nogit.pushevent, webhook, workflow, rule or About refresh. Refs the report doesn't mention, and answers that are fatal or unread, are still checked in the store byrecord_push, as before. A ref that moved is never dropped. A reserved push refused whole builds noPushDone. Storage is unchanged: every git push is reserved, so this filter never touchesstored_bytes. -
g1t's own copies say why they aren't counted (comments at each site, and in the docs):
test_merge.rs(refs/pull/N/mergeand the head copy): the head's objects come either from the working copy, whose pushes were already counted to this repository as its root, or from a branch of someone's own fork, whose pushes were counted to that fork. Either way, the target's owner didn't push them.forks.rskeep_headandrevive: these bytes were already counted to the working copy's root, andstored_bytesonly grows.
The runbook's drift list now includes a pull request's head copied in from someone's fork.
-
A D1 round-trip test wasn't added.
Registryholds a concrete D1 binding, and the store is called overFetch, so faking it would mean a trait across the crate. The SQL is already round-tripped on the migrated schema by the conformance suite. -
Docs: architecture/git, usage and billing, and the storage holds runbook.
Verified
| Check | Result |
|---|---|
cargo test -p g1t-repos --lib | 409 |
cargo test -p g1t-work | 311 |
cargo test -p g1t-contracts | 363 |
cargo test -p g1t-billing --lib | 312 |
cargo check --workspace, and wasm32 for repos | clean |
| conformance | 78 pass, 1 skipped |
npm run test:deploy | 118 |
Prettier 3.6.2 and git diff --check | clean |
Independent review: ready to merge. Nothing undercounts billing, and no moved ref is dropped. Its two should-fixes (the fork case in the test-merge justification, and dropping only refused refs) and the visible-escapes nit are applied in 4cfe6ba5. The remaining parser follow-ups are #332. The branch merges cleanly with #326's.