|
compress: raise budget 6000 + richer prompt detail + input headroom
Increase the compression summary budget and push the prompt toward more detail and completeness, so the agent keeps more durable facts when old turns are folded into a summary. Budget (output): - context_summary_max_tokens 4000 → 6000 (global default). - navi_code compression_max_tokens 4000 → 6000 (profile override). Prompt (base, all profiles): - New 'Intermediate Findings' section: durable facts from read/grep/log/terminal that informed decisions (was forbidden by 'do not preserve intermediate reasoning'). Existing sections get richer instructions (Active Files: key symbol affected; Decisions: rationale + trigger; Completed: step + file + verification outcome; Errors: snippet + what was tried + outcome). - Loosen 'tight bullet points' → 'specific and complete; prefer listing over generalizing — losing a fact costs more than a longer summary'. - 'Do not write implementation code' → 'preserve short critical code verbatim (final signatures, one-line fixes, key config lines); drop long blocks'. Input headroom (so the summarizer can SEE what it must preserve): - Non-critical tool result preview 300 → 800 chars. - _MAX_SUMMARY_INPUT_CHARS 24000 → 32000 (fits 65k–128k windows with 6k output). Profile prompt (navi_code/compression_prompt.txt): preserve short diagnostic snippets verbatim (exact error line, failing assertion, one-line fix) instead of blanket 'do not preserve long output'; keep code signatures + short key snippets, not just names. Tests: Intermediate Findings section in base prompt; 'short critical code' phrasing; non-critical preview keeps 800 chars; meta-summary threshold raised (2×6000 chars). Fixed flaky test_attach_session_seeds_context_fill (relied on _startup worker timing after Etap 4 lengthened attach; now explicit attach like its sibling + mock get_todos to skip a 30s×2 real-network timeout). Full suite: 1008 passed, 1 skipped. |
|---|
|
|
| navi/config.py |
|---|
| navi/core/compressor.py |
|---|
| navi/profiles/navi_code/compression_prompt.txt |
|---|
| navi/profiles/navi_code/config.json |
|---|
| tests/clients/test_tui_app.py |
|---|
| tests/unit/core/test_compressor.py |
|---|