Commit Graph

9 Commits

Author SHA1 Message Date
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 4987f27fde refactor(gateway): slash_commands_session — inline single-use lifecycle-hook helper, compact docstrings, fold calls 2026-09-03 00:07:29 -07:00
Teknium e530f5936f refactor(gateway): stream_consumer*/slash_commands* — hug closing brackets (AST-identical) 2026-09-02 23:42:01 -07:00
Teknium 901796093b refactor(gateway): fold long string literals and dict/call layouts in slash_commands_session/model
Implicit-concatenation string literals re-wrapped to 100 cols (byte-identical values, verified
by AST constant diff vs base); remaining fitted calls folded. Group now -25.2% LOC.
2026-09-02 19:55:39 -07:00
Teknium 559714fb18 refactor(gateway): compact slash_commands_session/model — fold calls, inline single-use helpers, tighten docs
- Fold parenthesised multi-line calls that fit in 100 cols; inline _switch_and_commit,
  _reasoning_picker_choices, _configured_display_context, listing_kwargs (single-use).
- Collapse getattr-guarded calls on always-present mixin methods (_is_user_authorized,
  _schedule_telegram_topic_title_rename); next()-based lookups; contextlib.suppress.
- Docstrings/comments compacted by hand — every WHY (IDOR guards, cache/rotation
  invariants, off-loop rationale) kept; narrative and issue-number history dropped.
- Differential parity vs base: 9216 traced cases for /new,/title,/undo,/branch;
  12000 for the resume ownership guards; /fast + /reasoning tables; listing goldens.
2026-09-02 19:40:07 -07:00
Teknium f7c5b16fcc refactor(gateway): break /model, /new, /compress, /resume god methods into phase helpers
- slash_commands_model: _ModelSwitchContext dataclass replaces 12-kwarg plumbing;
  _handle_model_command (193 LOC) -> listing / switch / guard / commit phases;
  _commit_model_switch (175) -> cached-agent swap / record / confirmation;
  /fast and /reasoning display toggles routed through dict tables.
- slash_commands_session: /new hooks + cleanup lifted; _handle_compress_command_inner
  -> _run_manual_compression; /resume -> resolve target / access-denied helpers;
  persisted-row ownership proof extracted (_persisted_row_proves_owner, _sattr).
- Zero user-visible change (golden + differential fuzz vs base for guards, listing,
  /fast, /reasoning); test net 137 files / 1842 passed.
2026-09-02 19:04:09 -07:00
Teknium 2e9a5e9f32 refactor(gateway/slash): collapse /whoami, /platform, /stop, /footer, /verbose duplication; extract /compress preview; module docstrings 2026-09-02 16:41:41 -07:00
Teknium 59acca1850 refactor(gateway/slash): unify context-breakdown transcript load; tidy module headers and import order 2026-09-02 16:30:01 -07:00
Teknium 04fc5ea9ee refactor(gateway/slash): extract session-transcript commands into gateway/slash_commands_session.py (GatewaySessionCommandsMixin) 2026-09-02 16:03:07 -07:00