The be/ JS pack writer feeds every object RAW: fold-commit.js::writePack calls pk.feed(type, body, -1, null) (base -1 = no delta), and ingest lands packs verbatim. The native keeper is OFS-ALWAYS — it deltifies against an earlier object in the SAME pack (PackLog). So JS-authored packs are bigger than native's and diverge from the on-disk format. Implement OFS_DELTA emit in the JS writer. Offset-only either way: NEVER a REF_DELTA — a base outside the current pack stays RAW (reclaimed at GIT-006 recompaction). Follow-up to PACK-001. Method Issues.
be/verbs/post/fold-commit.js::writePack and shared/ingest.js write rawrecords; a JS commit stores a full blob even when a near-identical prior version sits earlier in the same pack.
_pack_feed(buf, off, type, content, base, baseOff, …) already
accepts a base+offset (js/pack.hpp); git.delta.encode landed (JS-036) but its reconcile/wiring was left incomplete (GET-031).
same-pack base; a cross-pack base → store RAW. NO REF_DELTA in a native log. (JS-037 is the REF_DELTA-emit path — distinct; this ticket is OFS-only.)
writePack (and the commit-path ingest) emits OFS_DELTA against a chosen
earlier same-pack object (by offset); readers (PACKResolveOfs, PIDXScan) already handle it — no reader change.
same path); no in-pack base → RAW. Never REF_DELTA, never a cross-pack base.
index + resolve round-trip byte-identical objects.
be/ JS writer + the git.delta binding only. Offset-only — NO REF_DELTA
(that stays JS-037). OFS chain depth ≤ KEEP_WRITE_CHAIN_MAX (50).
be/ post/get parity suites stay green.git.delta.encode (JS-036) + _pack_feed(base, baseOff); pick thebase among objects ALREADY fed to this pack (offset known at feed time).
in-pack, else RAW. An OFS base may itself be a delta (chains, GIT-008) — cap the chain depth; a base outside the pack → RAW (never cross-file, never hash).
git.delta.encode into writePack; feed OFS_DELTA with the base offset. (Audit 07Jul26: fold-commit.js ~176-186 still feeds every record pk.feed(type, body, -1, null); no git.delta use anywhere in be/.)PACKResolveOfs/PIDXScan round-trip.be/ suites green.shared/wire.js emitPack) also feeds RAW (// GIT-018: RAW per this pass … OFS_DELTA is [PACK-002]) — deltify the wire pack here too, or factor one shared OFS-emitting feed both writers use.may need to finish the JS-036/GET-031 delta-encode wiring first.