REPOSITORY ANALYSIS

deepseek-harness-jev-pre-compaction

A pre-compaction advisor for DeepSeek Harness that scores eligible tool results before normal compaction and replaces selected model-visible results with markers or archive pointers.

E2 · source reviewedPublic material or source evidence was reviewed. A fixed-version source review requires checking a pinned revision; this is not a reproduction, performance endorsement, or safety guarantee.
Stars
5
Forks
0
License
MIT
Last commit
2026-09-21

What Jev does here

Jev returns a global should_reduce Noul and per-result retain Nouls; deterministic code keeps protected or invalid items and applies hard-low-retain and dual-signal truncation rules.

Makes pruning incremental and distinguishes recoverable workspace archives from unload-and-rerun behavior.

Fixed-version documentation and implementation material were inspected on 2026-10-24. No DSH session was run. Preserving append-only events does not prove the agent will retrieve omitted evidence when needed.

What task does this project fit?

Prune tool results before DeepSeek Harness reaches its normal compaction boundary.

Material analysed:

From input to action

  1. The advisor selects paired, non-error tool results outside the protected recent tail.
  2. Jev returns global should_reduce and per-result retain probabilities.
  3. Code keeps pinned/invalid items, truncates very-low-retain items, and gates intermediate cases on the global signal.

Implementation details that matter

Global disagreement is not an absolute veto

The reviewed apply.ts has a hard low-retain path that truncates even when should_reduce disagrees. Intermediate cases use both signals and a per-pass truncation limit.

Inspect the supporting source ↗

Recovery modes have different assumptions

Workspace mode archives original output before replacing it; unload mode asks the agent to rerun the tool. Re-execution is suitable only when repeating that tool is acceptable.

Inspect the supporting source ↗

When to choose it

Choose it for early, incremental reduction in DSH. For non-repeatable tools prefer recoverable archival and verify archive-write failures before enabling pruning.

How to inspect it yourself

Read src/decision/apply.ts with retain=0.1 and then an intermediate retain under the same global score. Confirm the hard and dual-signal paths differ; compare workspace versus unload recovery in README.

Limits of this review

  • No DSH session was run.
  • Preserving append-only events does not prove the agent will retrieve omitted evidence when needed.
Primary material used in this analysis