Skip to content

docs(components): document marker_mode on the six pages that omit it, and collapse's max_frac - #68

Merged
OsherElhadad merged 1 commit into
rossoctl:mainfrom
itay-nakash:docs/document-marker-mode-and-baselines
Aug 18, 2026
Merged

OsherElhadad merged 1 commit into
rossoctl:mainfrom
itay-nakash:docs/document-marker-mode-and-baselines

Conversation

@itay-nakash

Copy link
Copy Markdown
Collaborator

What

marker_mode is the per-component reversibility switch:

  • full (default) — stash the original and leave a resolvable <<cg:HASH>> marker, so the expand tool can restore it
  • summary / off — deliberate irreversible drops

Ten components accept and honor it, but only four documented it: mask, cmdfilter, extract, extract_llm. So someone assembling a pipeline around recoverability could not learn from the docs that the other six take the same knob.

This adds the row to the six pages that omitted it — collapse, summarize, dedup, failed_run, skeleton, smartcrush — reusing the exact wording already in mask.md, and lists it in the matching components.md overview entries (which omitted it for mask too).

It also documents collapse.max_frac, which was undocumented entirely: it sets the collapse threshold as a fraction of the model's context window and wins over max_tokens when the window is known (resolveBudget, components/offload/common.go:47).

Docs only — no behavior change, no defaults touched.

How it was found

Diffing every yaml:"..." struct tag under components/ against the Configuration table on each component's page. Result before → after:

component undocumented knobs before after
collapse marker_mode, max_frac —
summarize marker_mode —
dedup marker_mode —
failed_run marker_mode —
skeleton marker_mode —
smartcrush marker_mode —
mask, cmdfilter, extract, extract_llm, format, toon — —

Verification

  • Every yaml: tag on all twelve documented components now appears on its page (re-ran the same diff: 0 remaining).
  • mkdocs build --strict passes — the check docs.yaml runs on any docs/** change.
  • Confirmed each of the six actually honors the knob (parseMarkerMode → tryMark/mark), so this documents real behavior rather than a parsed-but-ignored field.

Two follow-ups I did not put in this PR

Happy to open either if useful — flagging rather than assuming.

  1. A prior-art / baselines page. mask is the observation-masking baseline and summarize is the summary-buffer baseline from the agent-context literature, and it would be worth saying so with citations. The closest published head-to-head is The Complexity Trap (JetBrains Research, DL4C @ NeurIPS 2025, MIT code) — SWE-bench Verified, 500 instances, five model configs — which finds observation masking halves cost while matching or exceeding LLM summarization's solve rate. Its Dec-2025 follow-up adds the mechanism: summarization makes agents run 13–15% longer, and it reports a 10-turn masking window as optimal (mask.keep_recent defaults to 3 here). That is a documentation/positioning change, not a defaults change — measuring before moving a default is the right order.
  2. A sliding-window / last-K component. Dropping whole messages by age is the most common baseline in the surrounding ecosystem (trim_messages, ChatMemoryBuffer, BufferedChatCompletionContext, ChatHistoryTruncationReducer) and no component covers it today — mask drops tool-output content by age and keeps every turn, which is a different thing. It is the baseline a reviewer asks about first.

🤖 Generated with Claude Code

… and collapse's max_frac

`marker_mode` is the per-component reversibility switch: `full` (the default)
stashes the original and leaves a resolvable `<<cg:HASH>>` marker so the expand
tool can restore it, while `summary` and `off` are deliberate irreversible drops.
It is accepted and honored by ten components, but only four documented it —
`mask`, `cmdfilter`, `extract` and `extract_llm`. Anyone assembling a pipeline
around recoverability had no way to learn from the docs that the other six take
the same knob.

Adds the row to `collapse`, `summarize`, `dedup`, `failed_run`, `skeleton` and
`smartcrush`, reusing the wording already in `mask.md`, and lists it in the
matching `components.md` overview entries (which also omitted it for `mask`).

Also documents `collapse.max_frac`, which was undocumented entirely: it sets the
collapse threshold as a fraction of the model's context window and wins over
`max_tokens` when the window is known (`resolveBudget`, common.go:47).

Verified: every `yaml:"..."` tag on all twelve documented components now appears
in its page, and `mkdocs build --strict` passes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Itay-Nakash <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants