From 6cac6624f9724f291e7d514f736d94531f7bada7 Mon Sep 17 00:00:00 2001 From: Frank Song Date: Thu, 14 May 2026 23:07:14 +0800 Subject: [PATCH] Harden update link git fixture --- CHANGELOG.md | 2 ++ tests/test_issue1579_whats_new_link_404.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6df1a29..434c7a02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ### Fixed +- Update-link regression tests now pin the throwaway bare repository HEAD to `master`, avoiding failures on developer machines whose Git default branch is not `master`. + - **PR #2234** by @Jordan-SkyLF (refines #2207) — Three update-banner improvements: (1) Update summaries no longer repeat the same bullet under both "What you'll notice" and "Worth knowing" — visible notice items keep priority, and the secondary section is omitted when there is no distinct detail to show. (2) Update summaries now cap large commit lists (24 + probe item) before sending them to the summarizer and disclose when the summary uses only the latest commit subjects, while keeping the full comparison link available — bounds summarizer cost on large update ranges while remaining honest about coverage. (3) Update banners now wrap generated-summary links and long update text on narrow/mobile screens inside the banner instead of pushing controls off-screen. 108-line regression coverage for short-target dedup, repeated Agent-summary bullets, large-range capped input, and responsive wrapping. - **PR #2236** by @jasonjcwu — Silent failure detection in `api/streaming.py` now scans only NEW messages, not the full conversation history. Pre-fix, the `_assistant_added` check at `_run_agent_streaming` scanned all messages in `result["messages"]` (including pre-turn history); if any prior turn contained an assistant response, `_assistant_added` was `True` and the apperror SSE event was silently skipped, leaving the user staring at a blank response after a provider 401/429/rate-limit error. Fix extracts a `_has_new_assistant_reply(all_messages, prev_count)` helper that only inspects messages beyond the pre-turn history offset (`_previous_context_messages`); applied to both the main detection path and the self-heal/retry `_heal_ok` check. 15-test regression suite covering empty/short/long-history scenarios, the heal path, and the `len < prev_count` edge-case fallback. Also includes a small alignment fix to `test_issue1857_usage_overwrite.py` so the FakeAgent message shape matches what the real agent produces. diff --git a/tests/test_issue1579_whats_new_link_404.py b/tests/test_issue1579_whats_new_link_404.py index 9b851ac2..b188d628 100644 --- a/tests/test_issue1579_whats_new_link_404.py +++ b/tests/test_issue1579_whats_new_link_404.py @@ -38,6 +38,10 @@ def _make_throwaway_repo(tmp_path, *, local_only_commits=0, upstream_advanced=0) """ upstream = tmp_path / 'upstream.git' subprocess.run(['git', 'init', '--quiet', '--bare', str(upstream)], check=True) + subprocess.run( + ['git', '--git-dir', str(upstream), 'symbolic-ref', 'HEAD', 'refs/heads/master'], + check=True, + ) seed = tmp_path / 'seed' subprocess.run(['git', 'init', '--quiet', '--initial-branch=master', str(seed)], check=True)