Files
billion-context/docs
ework-agent d401a28ea7 fix: make the compress receipt's 'fold more' recommendation opt-in (default off)
⚠️ MODEL-FACING TEXT CHANGE — the success compress receipt changes what the
model reads: with the new default (compress.postComPressTail off, the
pre-existing behavior is NOT the default), the receipt no longer re-advises
the remaining foldable ranges after every successful fold, and no longer
emits the 'Uncovered history remains' audit note. With it on (explicit opt-in),
the range list is restored and the uncovered note fires at most once per
nudge-injection cycle (fresh injection re-opens it). The verbatim
context-minimum stop signal is unchanged in both modes.

Consumption-chain reasoning (#6855 discipline): the removed text carried the
only forward-pointing refs the model propagated into its NEXT compress call
(startId/endId copied from the 'Current compressible ranges' list). Removing
it removes the propagation anchor entirely — no phantom-value class possible.
Nothing else in the receipt is altered byte-wise; the stop-signal sentence
(#1387) is preserved verbatim, so models that key on it see identical text.
The per-turn growth nudge (KDD #8) is a separate channel and untouched.

Why: per-receipt re-recommendation drove models into endless fold loops
against explicit user stop requests (#7318: 200+ folds in one night on a
0.1.216 build; #6522 '不要连续推荐' and #5872 are the same family — the
receipt footer drives single-message retry folds). Each fold rewrites the
context prefix and re-bills the prompt cache.

config surface (#1437 discipline, owner decision in-thread 2026-11-20):
adds compress.postComPressTail (boolean, default off) to the existing three-
level compress hierarchy (global/provider/model via mergeCompress); boolean
only (non-boolean rejects the whole block like the sibling requireNudge /
requireRecommendation); no new env var (knob goes through the existing
compress file hierarchy, env-discipline #2030). Docs: config-reference seed
entry + regenerated configuration.md en/zh/ja + website.

Plumbing: the flag is stamped per round on session.transient next to the
existing nudge gate (src/unprompted-gate.ts) and read at the tail decision
point in src/stream.ts — off by default when a session has no stamp
(defensive: never recommend on an unknown posture). The #6522 at-most-once
latch rides on an in-memory Session field (uncoveredReceiptNoted), re-opened
only by an actual nudge injection.

Fixes #7318 (design: default off); implements #6526's at-most-once note (that
PR is superseded — its change was unconditional, this one is gated).
Supersedes: https://github.com/ranxianglei/billion-context/pull/6526
2026-11-20 23:07:03 +08:00
..

Documentation

All system documentation for billion-context lives in this directory. The repo root keeps only four core entry files — README.md, README.zh-CN.md, AGENTS.md, CHANGELOG.md — and recognized community-maintained README translations (README.<locale>.md, e.g. README.ja.md, approved 2026-11-09, #6000). Former root doc paths keep one-line redirect stubs at the root (tracked in lifecycle §5).

Full catalog: index.md / index.zh-CN.md — every doc with a one-line description. This page is the directory landing: where things are and which rules keep them live.

Sections

Section Docs What you'll find
Start here configuration · clients · how-it-works Full configuration reference (generated, drift-guarded) · per-client integration deep dives · one diagram of the whole flow
System architecture architecture / 中文 LIVE hub: overall diagram + one page per module (pipeline / lanes / kernel / identity / fastpaths / storage / webui / update), each with its own diagram — freshness is CI-enforced (architecture-docs lane)
Identity & protocol message-identity · session-identity · session-identity-resolution · identity-channels · msgid-infrastructure · opencode-responses-websocket · plugin-protocol The identity doctrine (msg id, session id, persona forks, the #5825 channel wiring) and per-client protocol notes
Engineering & operations technical-notes · lifecycle · auto-merge-guardrails · unified-loop-spec Mechanism deep-dives · the transition/retirement ledger (CI-enforced) · the evidence appendix behind AGENTS.md §7 · historical design (superseded by code)

Rules of the road (why this directory stays readable)

  1. Bilingual by default — English base name + *.zh-CN.md mirror; a single-language doc must say why in its index entry.
  2. Every new or moved doc is listed in index.md + index.zh-CN.md in the same PR — an unlisted doc does not exist.
  3. Architecture docs are LIVE — structural changes update the affected page, diagram, and hub ledger row in the same PR; CI lane architecture-docs enforces the mechanical parts.
  4. Procedures live in ../reference/, not here — docs/ is decision/reviewer-facing reference; reference/ holds the lazy-loaded how-to material (testing / release / git-pr / env-vars / the KDD full-text ledger).
  5. Moves leave a stub — a one-line redirect at the old path + a hygiene-ledger entry in lifecycle.md §5 with an explicit removal condition.

The authoritative wording of these rules: AGENTS.md §3 "Documentation Layout".