[P1-05] Replace hardcoded num_ctx=8192 with model-aware context budgets #28

Closed
opened 2026-08-28 20:54:36 +01:00 by conductor · 1 comment
Owner

Plain summary

Replaces the hardcoded num_ctx=8192 with model-aware context budgets from the model registry: explicit output/tool-result reservation, narrow contexts for local models, wider only when useful for cloud.

Example

Switching models automatically changes the resolved context limit — the trace shows no hidden 8K override.

Technical details

Parent epic: #16

Manifest ID: P1-05

Priority: P1
Action:

  • use model registry/profile as source of truth;
  • reserve explicit output/tool-result budget;
  • local models receive narrow contexts;
  • cloud models may receive larger contexts only when useful.

Acceptance criteria:

  • changing model changes resolved context automatically;
  • outbound trace shows no hidden 8K override;
  • small local model remains under safe budget.

Dependencies: P0-07, P1-02.


Resolved dependency references

  • Depends on: #23 (P0-07), #25 (P1-02)
  • Blocks: None.

Relevant source files

Not specified in the handoff. P0-01 must identify authoritative paths before implementation; do not guess by adding another path.

Do not do

  • Do not begin this issue before its dependencies are complete.
  • Do not create a parallel authority path; replace, extend, or remain dormant.
  • Do not add unrelated cognitive subsystems or additive feature growth.
  • Do not treat module/schema existence, background activity, or model self-report as acceptance evidence.

Source directive

Preserved from /home/nick/Desktop/rune_v1_course_correction_handoff.md, Section 14. The handoff is authoritative if this issue summary is ambiguous.

Pipeline requirements

  • TDD: frozen/regression tests written first, red → green
  • ruff check and ruff format --check clean
  • Spec-compliance review gate: PASS
  • Code-quality review gate: Approved
  • Full orchestration suite regression green
  • Canary passes (where applicable)
  • Closed with a properly formatted closing comment + commit/PR references
## Plain summary Replaces the hardcoded `num_ctx=8192` with model-aware context budgets from the model registry: explicit output/tool-result reservation, narrow contexts for local models, wider only when useful for cloud. ## Example Switching models automatically changes the resolved context limit — the trace shows no hidden 8K override. ## Technical details Parent epic: #16 Manifest ID: **P1-05** **Priority:** P1 **Action:** - use model registry/profile as source of truth; - reserve explicit output/tool-result budget; - local models receive narrow contexts; - cloud models may receive larger contexts only when useful. **Acceptance criteria:** - changing model changes resolved context automatically; - outbound trace shows no hidden 8K override; - small local model remains under safe budget. **Dependencies:** P0-07, P1-02. --- ## Resolved dependency references - Depends on: #23 (P0-07), #25 (P1-02) - Blocks: None. ## Relevant source files Not specified in the handoff. P0-01 must identify authoritative paths before implementation; do not guess by adding another path. ## Do not do - Do not begin this issue before its dependencies are complete. - Do not create a parallel authority path; replace, extend, or remain dormant. - Do not add unrelated cognitive subsystems or additive feature growth. - Do not treat module/schema existence, background activity, or model self-report as acceptance evidence. ## Source directive Preserved from `/home/nick/Desktop/rune_v1_course_correction_handoff.md`, Section 14. The handoff is authoritative if this issue summary is ambiguous. ## Pipeline requirements - [ ] TDD: frozen/regression tests written first, red → green - [ ] `ruff check` and `ruff format --check` clean - [ ] Spec-compliance review gate: PASS - [ ] Code-quality review gate: Approved - [ ] Full orchestration suite regression green - [ ] Canary passes (where applicable) - [ ] Closed with a properly formatted closing comment + commit/PR references
conductor added the P1 — highv1-course-correction labels 2026-08-28 20:54:36 +01:00
gitea-actions Bot added the featuregrowth labels 2026-08-28 20:55:06 +01:00
gitea-actions Bot added the custodian label 2026-09-03 22:53:58 +01:00
Author
Owner

CLOSED PROGRAMMATICALLY — commit d0ebcc1 (contract BUILDER-2026-10-08T11:41:09Z-031e9d). resolve_context_budget (window minus reserves; num_ctx never the raw window) + 12 literals replaced across 11 files + the no-8192 build gate. 5/5 + 16/16 green.

CLOSED PROGRAMMATICALLY — commit d0ebcc1 (contract BUILDER-2026-10-08T11:41:09Z-031e9d). resolve_context_budget (window minus reserves; num_ctx never the raw window) + 12 literals replaced across 11 files + the no-8192 build gate. 5/5 + 16/16 green.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: conductor/rune#28