Skip to content

Commit 43a15e7

Browse files
committed
docs(deprecate): mark minContextLimit + modelMinLimits deprecated (soft, no behavior change)
minContextLimit (default 80%) is the lower bound for turn/iteration reminder nudges. The growth-nudge floor (minNudgeContextPercent + nudgeGrowthTokens, ranxianglei#343/ranxianglei#351) is the maintained mechanism — two parallel 'min' knobs confuse users. Soft deprecation: JSDoc @deprecated, schema [DEPRECATED] prefixes, EN/zh Status DEPRECATED + removal-consequence note, legend reworded (may still take effect until removed). zh default fixed 45% -> 80%. No behavior change; 1053/1053 unchanged.
1 parent 58043e0 commit 43a15e7

6 files changed

Lines changed: 93 additions & 13 deletions

File tree

‎CONFIGURATION.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ACP reads config from up to three layers (later layers override earlier):
3535

3636
## Parameter Reference
3737

38-
Status legend: **ACTIVE** = currently used | **DEPRECATED** = accepted but no effect | **EXPERIMENTAL** = may change
38+
Status legend: **ACTIVE** = currently used | **DEPRECATED** = kept for backward compatibility, scheduled for removal (may still take effect until then) | **EXPERIMENTAL** = may change
3939

4040
---
4141

@@ -164,8 +164,8 @@ Core compression behavior.
164164
#### `compress.minContextLimit`
165165
- **Type:** `number | \`${number}%\``
166166
- **Default:** `"80%"`
167-
- **Status:** ACTIVE
168-
- **Description:** Lower context usage threshold for turn/iteration reminder nudges. ACP stops injecting those reminders when usage drops below this level (or when the limit cannot be resolved to a concrete value, e.g. a `"X%"` limit with an unknown model context window). Growth nudges are governed separately by `minNudgeContextPercent`.
167+
- **Status:** DEPRECATED
168+
- **Description:** **Deprecated — scheduled for removal.** Lower context usage threshold for turn/iteration reminder nudges. ACP stops injecting those reminders when usage drops below this level (or when the limit cannot be resolved to a concrete value, e.g. a `"X%"` limit with an unknown model context window). Growth nudges are governed separately by `minNudgeContextPercent`. Still honored until removed; when it is removed, the lower-bound gating for turn/iteration reminder nudges is retired along with it (new sessions should rely on the growth-nudge system).
169169

170170
#### `compress.modelMaxLimits`
171171
- **Type:** `Record<string, number | \`${number}%\`>`
@@ -176,8 +176,8 @@ Core compression behavior.
176176
#### `compress.modelMinLimits`
177177
- **Type:** `Record<string, number | \`${number}%\`>`
178178
- **Default:** `undefined`
179-
- **Status:** ACTIVE
180-
- **Description:** Per-model override for `minContextLimit`.
179+
- **Status:** DEPRECATED
180+
- **Description:** **Deprecated — scheduled for removal alongside `minContextLimit`.** Per-model override for `minContextLimit`. Still honored until removed.
181181

182182
#### `compress.nudgeFrequency`
183183
- **Type:** `number`

‎CONFIGURATION.zh-CN.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ACP 从最多三层配置文件中读取(后加载的覆盖先加载的):
3535

3636
## 参数参考
3737

38-
状态说明:**ACTIVE** = 当前生效 | **DEPRECATED** = 接受但无效果 | **EXPERIMENTAL** = 可能变更
38+
状态说明:**ACTIVE** = 当前生效 | **DEPRECATED** = 保留向后兼容,计划移除(在此之前可能仍生效) | **EXPERIMENTAL** = 可能变更
3939

4040
---
4141

@@ -163,9 +163,9 @@ ACP 从最多三层配置文件中读取(后加载的覆盖先加载的):
163163

164164
#### `compress.minContextLimit`
165165
- **类型:** `number | \`${number}%\``
166-
- **默认值:** `"45%"`
167-
- **状态:** ACTIVE
168-
- **说明:** 上下文使用率下限。使用率降至此值以下时,ACP 停止 nudge。
166+
- **默认值:** `"80%"`
167+
- **状态:** DEPRECATED
168+
- **说明:** **已废弃——计划移除。** 轮次/迭代提醒 nudge 的上下文使用率下限。使用率降至此值以下时,ACP 停止注入这些提醒(当限制无法换算为具体数值时同样停止,例如模型上下文窗口未知时的 `"X%"`)。增长 nudge 由 `minNudgeContextPercent` 单独控制。在此之前仍然生效;移除时,轮次/迭代提醒 nudge 的下限门控将随之取消(新配置应依赖增长 nudge 体系)。
169169

170170
#### `compress.modelMaxLimits`
171171
- **类型:** `Record<string, number | \`${number}%\`>`
@@ -176,8 +176,8 @@ ACP 从最多三层配置文件中读取(后加载的覆盖先加载的):
176176
#### `compress.modelMinLimits`
177177
- **类型:** `Record<string, number | \`${number}%\`>`
178178
- **默认值:** `undefined`
179-
- **状态:** ACTIVE
180-
- **说明:** 按模型覆盖 `minContextLimit`。
179+
- **状态:** DEPRECATED
180+
- **说明:** **已废弃——将与 `minContextLimit` 一同移除。** 按模型覆盖 `minContextLimit`。在此之前仍然生效。
181181

182182
#### `compress.nudgeFrequency`
183183
- **类型:** `number`

‎dcp.schema.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
]
147147
},
148148
"minContextLimit": {
149-
"description": "Soft lower threshold for reminder nudges. Below this, turn/iteration reminders are off (compression is less likely). At or above this, reminders are on. Accepts number or \"X%\" of the model context window.",
149+
"description": "[DEPRECATED — scheduled for removal; growth nudges (minNudgeContextPercent) are the maintained floor] Soft lower threshold for reminder nudges. Below this, turn/iteration reminders are off (compression is less likely). At or above this, reminders are on. Still honored until removed. Accepts number or \"X%\" of the model context window.",
150150
"default": 50000,
151151
"oneOf": [
152152
{
@@ -174,7 +174,7 @@
174174
}
175175
},
176176
"modelMinLimits": {
177-
"description": "Per-model override for minContextLimit by exact provider/model key. If set, this takes priority over the global minContextLimit.",
177+
"description": "[DEPRECATED — overrides the deprecated minContextLimit; will be removed alongside it] Per-model override for minContextLimit by exact provider/model key. If set, this takes priority over the global minContextLimit.",
178178
"type": "object",
179179
"additionalProperties": {
180180
"oneOf": [
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# REQ — Deprecate `minContextLimit` (and `modelMinLimits`)
2+
3+
- **Task ID:** 2026-08-29_deprecate-min-context-limit
4+
- **Date:** 2026-08-29
5+
- **Priority:** P2
6+
- **Status:** Done (pending review)
7+
8+
## Background
9+
10+
`compress.minContextLimit` (default `"80%"`) is the soft lower bound for turn/iteration reminder nudges: `overMinLimit` gates when those anchors are set/cleared. Since #343/#351, the growth-nudge floor (`minNudgeContextPercent`, cascade via `compress.providers`) is the maintained "minimum" mechanism — two parallel "min" knobs confuse users.
11+
12+
Maintainer direction (2026-08-29): mark `minContextLimit` as deprecated.
13+
14+
## Requirement
15+
16+
1. **Soft deprecation only** — annotations, no behavior change:
17+
- `@deprecated` JSDoc on `CompressConfig.minContextLimit` and `CompressConfig.modelMinLimits` (the flat per-model map only feeds `minContextLimit`; same fate).
18+
- `dcp.schema.json`: `[DEPRECATED — …]` description prefix (repo convention, cf. `allowSubAgents`).
19+
- `CONFIGURATION.md` / `CONFIGURATION.zh-CN.md`: Status → DEPRECATED, deprecation notes, legend reworded ("kept for backward compatibility, scheduled for removal (may still take effect until then)") — the old legend "accepted but no effect" is wrong for a soft deprecation.
20+
2. Deprecation text must state the removal consequence: when removed, the lower-bound gating for turn/iteration reminder nudges is retired with it (those nudges depend on `overMinLimit`); the growth-nudge system (`minNudgeContextPercent` + `nudgeGrowthTokens`) is the maintained mechanism.
21+
3. No runtime warnings, no validation rejection, no default changes, no removal in this PR.
22+
23+
## Non-goals
24+
25+
- Actually removing the field or changing nudge behavior.
26+
- Deprecating `nudgeFrequency` / `iterationNudgeThreshold` (only meaningful to revisit at removal time).
27+
- Touching `maxContextLimit` / `modelMaxLimits`.
28+
29+
## Acceptance criteria
30+
31+
- Annotations present in code + schema + both docs.
32+
- `npm run typecheck` passes; full suite 1053/1053 unchanged (annotation-only change proves no behavior drift).
33+
- CI green.
34+
35+
## References
36+
37+
- PR #351 (nested providers floor, stacked-under), PR #343 (growth floor gate)
38+
- Deprecation precedents: `gc.algorithm`, `gc.maxBlockAge`, schema `allowSubAgents`
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# WORKLOG — 2026-08-29_deprecate-min-context-limit
2+
3+
## 1. Overview
4+
5+
Marks `compress.minContextLimit` and `compress.modelMinLimits` as **deprecated** (soft: annotations only, behavior unchanged). The growth-nudge floor (`minNudgeContextPercent` + `nudgeGrowthTokens`, #343/#351) is the maintained "minimum" mechanism going forward.
6+
7+
Stacked on #351 (`2026-08-29_min-nudge-providers-models`), which is stacked on #343. Merge order: #343 → #351 → this.
8+
9+
## 2. Changes
10+
11+
| File | Change |
12+
|---|---|
13+
| `lib/config.ts` | `@deprecated` JSDoc on `minContextLimit` + `modelMinLimits` (removal consequence noted) |
14+
| `dcp.schema.json` | `[DEPRECATED — …]` description prefix on both properties |
15+
| `CONFIGURATION.md` | Status → DEPRECATED for both; deprecation note incl. removal consequence; legend line 38 reworded to cover soft deprecation ("may still take effect until then") |
16+
| `CONFIGURATION.zh-CN.md` | Same as EN; additionally fixed the stale default `45%` → `80%` (code default, `lib/config.ts`) |
17+
| devlog | This REQ/WORKLOG |
18+
19+
Behavior: **none changed** — `resolveContextTokenLimit(…, "min")`, `overMinLimit`, anchor set/clear in `inject.ts` untouched.
20+
21+
## 3. Verification
22+
23+
- `npm run typecheck` ✓
24+
- Full suite: 1053/1053 ✓ (unchanged from #351 — annotation-only change, no behavior drift)
25+
- CI (pr-validation / test 22 / test 24 / build / build-artifact / e2e) ✓
26+
27+
## 4. Commits
28+
29+
| Hash | Subject |
30+
|---|---|
31+
| (pending) | docs(deprecate): mark minContextLimit + modelMinLimits deprecated (soft, no behavior change) |

‎lib/config.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,19 @@ export interface CompressConfig {
3232
showCompression: boolean
3333
summaryBuffer: boolean
3434
maxContextLimit: number | `${number}%`
35+
/**
36+
* @deprecated Soft lower bound for turn/iteration reminder nudges. Scheduled
37+
* for removal in a future version — growth nudges (`minNudgeContextPercent` +
38+
* `nudgeGrowthTokens`) are the maintained nudge mechanism. Still honored
39+
* until removed; removing it will retire the lower-bound gating for
40+
* turn/iteration reminder nudges.
41+
*/
3542
minContextLimit: number | `${number}%`
3643
modelMaxLimits?: Record<string, number | `${number}%`>
44+
/**
45+
* @deprecated Per-model override for the deprecated `minContextLimit`.
46+
* Still honored until removed alongside `minContextLimit`.
47+
*/
3748
modelMinLimits?: Record<string, number | `${number}%`>
3849
/** Nested per-provider / per-model overrides (billion-context-pi style). Resolved field-by-field: model > provider > global. */
3950
providers?: Record<string, CompressProviderOverrides>

0 commit comments

Comments
 (0)