fix(context): inherit role capacity instead of local total-window clamps #497

Merged
karsten merged 1 commit from fix/local-context-inherit-window into main 2026-11-15 12:01:57 +00:00
Owner

Problem

The user's <5K goal concerns BASE overhead, not total input. Yet local models implicitly received additional 16K Main / 8K child context targets. Under Minerva 0.1.338, real native compactions now succeed and tools continue, but some sessions compact repeatedly around 7–9K reported usage; others remain around 25K after multiple summaries. A smaller locality default does not make irreducible relevant task context fit and wastes summary calls.

Change

Locality alone now inherits the ordinary configured Main/worker budget. Keep existing optional localMainContextTokens/localWorkerContextTokens as explicit stricter operator targets; validate supplied values as before. Preserve configured role/physical/native limits, output headroom, independent assessment, safe handover, authorization and routing. No new input gate, tokenizer request or model dependency.

Existing configs that explicitly pin 16K/8K are NOT silently overridden. Minerva's separate shared PR #142 deliberately matches its existing role budgets and is compatible with already installed Core.

Tests

  • Real SDK Main, Dispatcher and Subagent verify inherited capacity, explicit smaller overrides, and restoring inherited capacity after removal without a sticky managed clamp.
  • Validate optional vs invalid explicit targets and unchanged physical model identity.
  • Previous small-budget/tool-discovery tests now explicitly request the small limits they are testing; this preserves their meaningful coverage.
  • 25 focused tests PASS, typecheck/build PASS. Independent review PASS on PR #497 with receipt. Exact rebased full suite PASS: 2627 passed, 1 existing optional skip, 0 failures (2628 total). Exact-head CI pending at last check.

This changes context policy defaults, not a claim of <5K production base overhead, reduced live compaction frequency or business completion.

## Problem The user's <5K goal concerns BASE overhead, not total input. Yet local models implicitly received additional 16K Main / 8K child context targets. Under Minerva 0.1.338, real native compactions now succeed and tools continue, but some sessions compact repeatedly around 7–9K reported usage; others remain around 25K after multiple summaries. A smaller locality default does not make irreducible relevant task context fit and wastes summary calls. ## Change Locality alone now inherits the ordinary configured Main/worker budget. Keep existing optional localMainContextTokens/localWorkerContextTokens as explicit stricter operator targets; validate supplied values as before. Preserve configured role/physical/native limits, output headroom, independent assessment, safe handover, authorization and routing. No new input gate, tokenizer request or model dependency. Existing configs that explicitly pin 16K/8K are NOT silently overridden. Minerva's separate shared PR #142 deliberately matches its existing role budgets and is compatible with already installed Core. ## Tests - Real SDK Main, Dispatcher and Subagent verify inherited capacity, explicit smaller overrides, and restoring inherited capacity after removal without a sticky managed clamp. - Validate optional vs invalid explicit targets and unchanged physical model identity. - Previous small-budget/tool-discovery tests now explicitly request the small limits they are testing; this preserves their meaningful coverage. - 25 focused tests PASS, typecheck/build PASS. Independent review PASS on PR #497 with receipt. Exact rebased full suite PASS: 2627 passed, 1 existing optional skip, 0 failures (2628 total). Exact-head CI pending at last check. This changes context policy defaults, not a claim of <5K production base overhead, reduced live compaction frequency or business completion.
fix(context): inherit role budgets instead of local total-window clamps
All checks were successful
decision-interface-ci / full-validation (pull_request) Successful in 3m28s
a790a752fb
Author
Owner

PI-REVIEW-RECEIPT

State: PASS
Head: a790a752fb60
Summary: PASS: No actionable findings identified in the supplied diff.
Findings: 0

<!-- PI-REVIEW-RECEIPT --> ## PI-REVIEW-RECEIPT State: **PASS** Head: `a790a752fb60` Summary: PASS: No actionable findings identified in the supplied diff. Findings: 0
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harness/core!497
No description provided.