Skip to content

feat(session): no-op detection, re_derive_brief timeout + token tracking - #121

Merged
CodeNinjaSarthak merged 1 commit into
mainfrom
feat/session-manager-improvements
May 3, 2026
Merged

feat(session): no-op detection, re_derive_brief timeout + token tracking#121
CodeNinjaSarthak merged 1 commit into
mainfrom
feat/session-manager-improvements

Conversation

@CodeNinjaSarthak

Copy link
Copy Markdown
Owner

Changes

Tests

42 passing, mypy clean. 4 new tests in Section 10:

  • timeout → failed
  • token usage recorded
  • noop skips pipeline
  • changed brief runs pipeline

Closes #105, #107, #108

- Add RE_DERIVE_BRIEF_TIMEOUT_SECONDS = 60 constant; wrap re_derive_brief
  with asyncio.wait_for — timeout surfaces as status=failed via existing
  exception handler (#108)
- Record re_derive_brief token usage into cost_tracker after call, mirrors
  pipeline.py pattern exactly (#105)
- Skip run_pipeline when re_derive_brief returns structurally identical
  brief (excluding raw_user_input); write status=complete and return early
  with session.refine.noop log event (#107)
- 4 new tests in Section 10, 42 total passing, mypy clean

Closes #105, #107, #108
@CodeNinjaSarthak
CodeNinjaSarthak merged commit e59062a into main May 3, 2026
2 checks passed
@CodeNinjaSarthak
CodeNinjaSarthak deleted the feat/session-manager-improvements branch May 3, 2026 12:44
CodeNinjaSarthak added a commit that referenced this pull request May 5, 2026
…ing (#121)

- Add RE_DERIVE_BRIEF_TIMEOUT_SECONDS = 60 constant; wrap re_derive_brief
  with asyncio.wait_for — timeout surfaces as status=failed via existing
  exception handler (#108)
- Record re_derive_brief token usage into cost_tracker after call, mirrors
  pipeline.py pattern exactly (#105)
- Skip run_pipeline when re_derive_brief returns structurally identical
  brief (excluding raw_user_input); write status=complete and return early
  with session.refine.noop log event (#107)
- 4 new tests in Section 10, 42 total passing, mypy clean

Closes #105, #107, #108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

session: include re_derive_brief LLM token usage in session cost_tracker

1 participant