headroom/.github
chopratejas 01a423a316 fix(rust): reformat/offload pipeline + log templates + diff noise (Phase 3g rework)
Replaces PR1's lossless/lossy split with ReformatTransform (pack
denser, no info lost) and OffloadTransform (drop bytes, CCR-stash
original via required cache_key). With CCR every transform is
information-preserving end-to-end, so the lossless/lossy distinction
misnamed the architecture.

OffloadTransform carries a cheap, structural estimate_bloat() method
scoped to its domain — generic byte-redundancy heuristics miss domain
semantics. The orchestrator runs reformat phase + per-offload bloat
estimation in parallel via rayon::join + par_iter, then runs offload
iff bloat clears threshold OR reformat underwhelmed.

Transforms shipped:

REFORMATS (lossless):
- JsonMinifier: serde_json round-trip whitespace stripping.
- LogTemplate: Drain-inspired order-preserving template miner.
  Collapses consecutive runs of same-template lines into
  [Template Tn: ...] (Nx) + variant table. Win comes from emitting
  the constant-token prefix once instead of N times. Lossless: every
  original line reconstructible from template + variants.

OFFLOADS (drop bytes, stash original via CCR):
- LogOffload: wraps existing LogCompressor; bloat = repetition x
  uniqueness_weight + dilution x priority_dilution_weight.
- DiffOffload: wraps existing DiffCompressor; bloat = context-to-
  change ratio. Bug-fix-on-port — persists original under the
  cache_key the parity-bound DiffCompressor mints (closes a leak).
- DiffNoise: drops lockfile hunks (Cargo.lock, package-lock.json,
  yarn.lock, etc., suffix list configurable in TOML) and
  whitespace-only hunks. Stashes original via CCR for retrieval.

Search offload exists but is not in default re-exports — modern
agents (Claude Code, Codex) use scoped rg/grep, the marginal value
didn't justify default registration. Reach via the explicit module
path if opting in.

JSON Offload is intentionally absent from this PR — already lives at
SmartCrusher; Phase 3g PR3 wraps it in the OffloadTransform contract.

Thresholds and weights live in config/pipeline.toml, embedded via
include_str!; PipelineConfig::from_toml_str loads runtime overrides.

98 new pipeline tests; full headroom-core suite (714) and workspace
tests green; cargo fmt clean. No regex, per project convention.
2026-04-30 11:10:24 -07:00
..
act fix: skip commitlint for PR merge commits 2026-04-20 22:52:20 -05:00
actions/headroom-e2e-setup ci(init-native): install [proxy] extras and use pwsh for Windows shim check 2026-04-23 16:30:30 -05:00
ISSUE_TEMPLATE Prepare for OSS release v0.2.0 2026-01-07 11:36:44 -08:00
plugin fix(rust): reformat/offload pipeline + log templates + diff noise (Phase 3g rework) 2026-04-30 11:10:24 -07:00
workflows fix(ci): pin dtolnay/rust-toolchain to 1.95.0 to match rust-toolchain.toml 2026-04-27 19:44:39 -07:00
dependabot.yml ci: group dependabot minor/patch updates per ecosystem 2026-04-16 17:54:39 -05:00
FUNDING.yml Prepare for OSS release v0.2.0 2026-01-07 11:36:44 -08:00
PULL_REQUEST_TEMPLATE.md Prepare for OSS release v0.2.0 2026-01-07 11:36:44 -08:00