Commit Graph

7 Commits

Author SHA1 Message Date
Teknium e83816a4d1 review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
2026-09-03 09:44:26 -07:00
Teknium 0071ba9965 Merge origin/main (561b053f79) into simp/forwardport: forward-port 220 main commits into the simplified tree 2026-09-03 03:31:03 -07:00
Teknium d61bafcbd1 refactor(agent/turn_context): per-turn reset as a data table, _str_attr route reads, compact TurnContext field docs 2026-09-02 18:35:16 -07:00
Teknium e7d4b2123e refactor(agent/turn): unify compression-attempt helpers, collapse verdict boilerplate, dedupe persist-lock wrappers
- turn_context_compaction: shared home for _clear_overflow_warn,
  _reset_retry_state_after_compaction, _blocked_compress_reason,
  _apply_grown_window, _refund_api_call (used by turn_preflight and the
  turn-start preflight passes).
- turn_context: _with_persist_lock + _clear_staged_cli_input_if_persisted +
  two try/except/finally wrappers -> one _persist_under_lock; MoA sanitize
  model extracted to _sanitize_model_for; predicates flattened.
- turn_preflight: PreflightVerdict merged into PreflightGateVerdict (the
  gate's carrier) and mutated in place; duplicate guard chain + refund blocks
  collapsed onto the shared helpers.
- turn_preflight_gate: builds the carrier once, no re-unpack of the inner
  verdict.
- turn_iteration_prep: step-callback tool-round scan and steer injection lifted
  into helpers; dead _verdict closures on always-fallthrough paths removed.
2026-09-02 18:28:29 -07:00
Teknium c94ced6225 refactor(agent/turn): AST-neutral bracket/signature packing across r3-08 slice 2026-09-02 18:01:27 -07:00
Teknium 74b928b6a3 refactor(turn): compact log-call formatting in turn_context_compaction 2026-09-02 16:43:08 -07:00
Teknium 84c2e326f2 refactor(turn): split build_turn_context into helpers; extract turn-start compaction to turn_context_compaction.py 2026-09-02 16:40:40 -07:00