emrg: LLM attempt log only on retry — first attempt silent - #823
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 577: first-attempt silent + retry counter for both chat() and chat_stream(); +4 tests with positive/negative log assertions; CI test+test-windows green. Matches rant 2026-08-17T14:27:39.
|
I tested this PR end-to-end (Windows, branch feature/llm-log-attempt-on-retry):
Code review notes:
No issues found from my side. |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 578: 2nd approval. Re-verified diff (llm.py attempt-on-retry + 4 tests + Agent.md 873); CI test+test-windows green, mergeable CLEAN.
|
I tested the conflict state of this PR against the updated master (3637421, after #820/#821/#822 merged) and found the fix is trivial: Conflict scope: only 1 file — Root cause of the positional conflict: master advanced (869 → 871, +2 tests from the merged PRs), and this PR's own count was 873 (869 + 4 new tests). On the merged tree the true collected count is 875. Verified resolution (tested locally on the merged tree):
Suggested rebase: No other issues found from my side. |
80dfbe9 to
c5016a2
Compare
Fix host rant 2026-08-17T14:27:39 — the
LLM stream attempt 1/4/LLM request: url=... (attempt 1/4)debug lines printed on EVERY request were noise: 1/4 is the normal first attempt.Changes (emrg/server/llm.py):
_request()(non-stream): the attempt debug line now only logs whenattempt > 0(i.e. retries)chat_stream(): same —LLM stream attemptonly on retryRetries remain fully traceable: the existing transient-error/body-unparseable/premature-end warnings already log "retrying ... (attempt N/4)" at WARNING level; the debug counter now supplements only the retry path (attempt 2/4, 3/4, 4/4).
Tests (+4 in tests/test_llm.py):
Doc sync: Agent.md Python count 871→873. Full suite: 872 passed + 1 skipped; import + CLI OK.