Skip to content

fix: restore bugfixes silently dropped by the v0.5.0 release commit - #306

Merged
Jiaaqiliu merged 1 commit into
aiming-lab:mainfrom
atulya-singh:fix/restore-fixes-dropped-by-v0.5.0
Aug 19, 2026
Merged

fix: restore bugfixes silently dropped by the v0.5.0 release commit#306
Jiaaqiliu merged 1 commit into
aiming-lab:mainfrom
atulya-singh:fix/restore-fixes-dropped-by-v0.5.0

Conversation

@atulya-singh

Copy link
Copy Markdown
Contributor

I went looking for the cause of one reverted fix (#234, restored in #304) and found it wasn't a one-off. The v0.5.0 release commit reverted most of a month of merged PRs.

What happened

12d3fd8 ("release: AutoResearchClaw v0.5.0") is a single squashed commit — 318 files, +42,268/−8,632 — sitting directly on top of 84dad0a. Judging by what survived and what didn't, the v0.5.0 work was branched around 2026-04-09/10 and landed on 05-19, overwriting everything merged in between. Nothing in the commit mentions reverting anything.

The date cutoff is unusually clean:

merged commit fate
04-06 ad806b5 MiniMax preset URL / from-stage intact
04-06 28478cc MCP path traversal, dispatcher failover intact
04-07 5dc7fcc Responses API / MiniMax 404 intact
04-08 be89838 HITL collab fixes intact
04-10 afccebe scripted HITL adapter intact
04-10 e6a6dfa perf: lift regex compilation (#231) reverted
04-10 7b57457 --from-stage without --output (#217) fix kept, 212-line test file deleted
04-10 684ddb2 Gemini native adapter (#227) file deleted
04-11 8ec230d retry error tracking (#234) reverted (→ #304)
04-20 9f8d11d doctor gateway probe reverted
04-20 61a92d8 Volcengine/BytePlus presets (#240) reverted
04-20 28508f2 SOTA hallucination (#239 / fixes #238) reverted
04-21 9f15247 search plan schema variants (#243) reverted

Everything ≤04-08 survives; almost everything ≥04-10 is gone. 61a92d8 is the sharpest case — it came in via 84dad0a, the release commit's own parent, and was wiped by its own child.

I verified each of these against HEAD rather than trusting a diff heuristic — the refactor moved prompts.py into a prompts/ package, so "file gone" needed checking by hand. 5dc7fcc looked lost by line-matching but its content genuinely moved into prompts/ml.py; it's fine.

What this PR restores

Three correctness fixes whose removal is unambiguous, each mapping to an issue that's closed but reproducible again at HEAD:

Doctor gateway probehealth.py:177 was back to method="HEAD" on /models, byte-for-byte pre-fix. Gateways that reject HEAD but serve GET normally get reported as unreachable, which is what #292 and #241 were about.

SOTA hallucination (#238) — this one is the clearest evidence of an accident rather than a decision. The release didn't just drop the fix, it restored the exact prompt line the fix removed:

# researchclaw/prompts/ml.py:186 at HEAD — the line #239 deleted
"- State whether SOTA results exist on this benchmark and what they are.\n"
"- Add a 'Benchmark' subsection listing: name, source, metrics, "
"current SOTA (if known)."

The goal.md disclaimer is gone too. Notably prompts/ml.py:182 still has the anti-fabrication line from 5dc7fcc (04-07) while line 186 has the pre-#239 text (04-20) — the file is a snapshot from between those two dates, which is exactly the squash artifact you'd expect.

Search plan schema variants (#243)_literature.py was back to plan.get("search_strategies", []), so a plan returned as search_phases / phases, or with dict-wrapped queries, silently produces zero queries.

What this PR deliberately does not restore

These may have been removed on purpose, and that's your call, not mine:

Happy to send any of those as follow-ups if you confirm they weren't intentional.

Testing

pytest tests/ → 2799 passed, 56 skipped (2797 on main + the 2 tests added here).

#239's tests were dropped by the release too, so they're restored: the test_rc_prompts.py guard, and the test_rc_executor.py assertion that had to change because goal.md now leads with the disclaimer. I added a probe-method test for the doctor fix. I checked the new tests actually fail against un-restored source rather than passing vacuously:

FAILED tests/test_rc_health.py::test_check_llm_connectivity_probes_with_get_not_head
FAILED tests/test_rc_prompts.py::TestPromptManagerDefaults::test_topic_init_no_sota_hallucination

#243 has no test and I didn't add one. Its parsing sits inline in _execute_search_strategy, which needs run-dir artifacts, adapters and an LLM path to drive, so any test I wrote would be mostly mock scaffolding. Worth noting the original also shipped without tests — which is a large part of why it disappeared unnoticed for three months. If you want it covered, extracting the plan-parsing into a helper would make it a one-liner to test; happy to do that separately.

Worth considering

The single most useful change here isn't in the diff: whatever produced 12d3fd8 should rebase rather than squash onto main, or at minimum diff against main before landing. Five merged community PRs were reverted with no notice, and the only reason any of it surfaced is that I chased an unrelated 429 error message. I'd suggest a CI check that fails when a PR deletes a test file it didn't add — that alone would have caught #217, #240 and #227.

I'd also hold off closing #238, #241, #292 and #243 as fixed until this (or an equivalent) lands, since all four currently reproduce on main.

The v0.5.0 release commit (12d3fd8) appears to have been branched from
around 2026-04-09 and squashed onto main on 05-19, so everything merged
in between was reverted without any mention of it. Fixes dated 04-06 to
04-08 survive intact; almost everything from 04-10 onward is gone.

Restores three correctness fixes whose removal is unambiguous, each of
which maps to an issue that is currently closed but reproducible again
at HEAD:

- Doctor gateway probe: health.py was back to `method="HEAD"` on /models.
  Gateways that reject HEAD but serve GET fine report a false doctor
  failure (aiming-lab#292, aiming-lab#241).

- SOTA hallucination (aiming-lab#238): the release restored the exact prompt line
  the fix removed ("State whether SOTA results exist ... and what they
  are"), and dropped the goal.md disclaimer. The prompt block moved from
  prompts.py to prompts/ml.py in the refactor, carrying the pre-fix text
  with it, so this reads as an artifact of the squash rather than intent.

- Search plan schema variants (aiming-lab#243): _literature.py was back to
  `plan.get("search_strategies", [])`, so plans returned as
  search_phases/phases or with dict-wrapped queries silently yield no
  queries.

aiming-lab#234's retry fix was reverted the same way; that one is already restored
in PR aiming-lab#304, so it is deliberately not touched here.

Deliberately NOT restored, because removal may have been intentional and
that is the maintainers' call: the Gemini native adapter (aiming-lab#227,
llm/gemini_adapter.py is deleted and no gemini preset remains) and the
Volcengine/BytePlus presets (aiming-lab#240, merged in 84dad0a — the release's own
parent — and now absent from PROVIDER_PRESETS entirely).

Tests: the aiming-lab#239 tests were dropped too and are restored. Added coverage
for the doctor probe. aiming-lab#243 shipped with no tests, which is a large part
of why it vanished unnoticed; its parsing is inline in a heavily-coupled
stage function, so it stays untested here.
@Jiaaqiliu
Jiaaqiliu merged commit 9fe64de into aiming-lab:main Aug 19, 2026
@Jiaaqiliu

Copy link
Copy Markdown
Collaborator

Merged. This is the most valuable report in the queue, and the finding is confirmed independently rather than taken on trust.

Verification

12d3fd80 is a single squashed commit, 318 files, +42,268/−8,632. The sharpest case you named checks out exactly as described — 61a92d8 (Volcengine/BytePlus presets, #240) came in via 84dad0a4, the release commit's own parent, and was wiped by its own child:

parent 84dad0a4  researchclaw/llm/__init__.py : 4 volcengine references
HEAD  (pre-merge) researchclaw/llm/__init__.py : 0

tests/test_volcano_provider.py shows in the release commit's own stat block as 165 --. A release commit deleting a test file it never wrote is not a judgement call about scope; it's a squash artifact.

The three fixes this PR restores also reproduced at HEAD before merge: health.py back to method="HEAD", prompts/ml.py:186 carrying the exact SOTA line #239 removed, and _literature.py back to a bare plan.get("search_strategies", []).

One merge conflict, resolved by keeping both sides

_literature.py conflicted: main had grown handling for a query_strategies.<sub_question>.{boolean_seeds, queries} schema, while this PR adds dict-wrapped queries and a top-level queries list. Those are complementary — different schema variants, not competing implementations — so I unified them behind one helper rather than picking a winner:

def _collect_queries(raw: Any, out: list[str]) -> None:
    """Append query strings from raw into out."""

It accepts plain strings and dict-wrapped entries, ignores non-lists and junk, and all three call sites (search_strategies, query_strategies, top-level queries) now go through it. Behaviour check:

plain strings      -> ['a', 'b']
dict-wrapped       -> ['x', 'y']
mixed + junk       -> ['ok', 'z']
non-list input     -> []
None               -> []

That also answers your note about #243 being untestable where it sat — the parsing is now a free function, so it's a one-liner to cover. Worth a follow-up.

On the process point

Your closing observation is the part worth acting on, and I'd rather say so plainly than let it sit under a merged PR: five merged community PRs were reverted with no notice, and the only reason any of it surfaced is that you chased an unrelated 429 message. That's a real cost to people who contributed in good faith. The CI check you propose — fail a PR that deletes a test file it didn't add — would have caught #217, #240 and #227, and is cheap to add.

Not restored, as you left them

Gemini native adapter (#227), Volcengine/BytePlus presets (#240), and the e6a6dfa regex hoisting (#231) are still out, along with the deleted tests/test_from_stage_run_dir.py. You were right to leave those as a maintainer call. Given the above, none of the three look intentional to me either — follow-up PRs restoring them would be welcome, test file first.

Post-merge: 2956 passed (baseline before this batch: 2869), no regressions.

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.

Goal.md Hallucinated References

2 participants