Pipeline

Per call, the executed stack is determined by squeeze_mode. The rungs are cumulative, with one documented exception.

Stage graph

deterministic : L1
extractive    : L1 -> L2
verified      : L1 -> L2 -> NLI receipt (+ auto-relax loop)
  • L1 (deterministic): comment stripping, AST pruning of fenced code (per-fence), and a fact-preserving JSON reform. Deletion-only: code bodies are never removed - removing code removes facts.
  • L2 (extractive): a token-level classifier retains or drops each token at a threshold calibrated to the target ratio. The output is the input minus dropped spans - no fact removed or altered. Exception: when the tabular-JSON reform fires, L2 is skipped (the reform is the compression; deleting table cells would remove facts). The receipt discloses this as counts.l2_skipped: "json_reform".
  • NLI (verified): a small entailment model checks kept output against the input over a full-coverage set of premise windows. A fidelity gate can trigger an auto-relax loop: if the strictest attempt scores below the acceptance threshold, the compression is retried less aggressively and the receipt discloses both the first-attempt ratio and the retries taken (quality.relaxed_ratio, quality.relax_steps). The gate is the worst window (quality.min_window_posterior) and the count below threshold (counts.windows_below_threshold); there is no separate reverse-direction pass.

Invariants that hold on every path

  • Every output word of a subset rung is an in-order substring of an input word.
  • The receipt always ships. Its fields populate per what ran; absence means the stage did not run (fields).
  • Determinism: same input bytes plus parameters, same engine generation, byte-identical output and receipt (determinism).

Flow diagram

A full per-input-path flow diagram (every branch of every rung, receipt emission per path) is being prepared and will complete this page.