Skip to content

test(gaia): pin the flagship's index root to _code_search_start - #4663

Merged
kovtcharov-amd merged 1 commit into
mainfrom
autofix/issue-4660
Oct 4, 2026
Merged

kovtcharov-amd merged 1 commit into
mainfrom
autofix/issue-4660

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

The required Unit Tests (Linux, py3.12) check fails on main for every PR. #4647 changed where the flagship starts code search, but the test that pins that choice still expected the old rule. This brings the test in line with the agent, and adds a case for the bug #4647 actually fixed: the first allowed path doesn't exist yet.

Closes #4660

Test plan

  • python -m pytest tests/unit/test_project_map.py passes (88 passed)
  • python util/lint.py --all passes
  • Unit Tests (Linux, py3.12) is green on this PR
🔍 Technical details
  • The pinned expression is now self._project_map_root() or _code_search_start(allowed).
  • _IndexRootAgent calls the flagship's real _code_search_start. The test pulls that one function out of agent.py with ast and compiles it, so it doesn't have to import GaiaAgent, which the file avoids because of the editable-install problem. That way the stand-in can't drift from the helper's logic.
  • New test test_the_index_skips_an_allowed_path_that_does_not_exist: allowed[0] is missing and allowed[1] exists. It fails under the old allowed[0] rule and passes under the new one.
  • The full tests/unit/ suite couldn't finish in this job (missing optional test deps such as responses, and a time limit). The change only touches this test file.

The index-root pinning test still expected the pre-#4647 'first allowed
path' rule, so it failed on main and blocked the Linux unit-test gate.
The stand-in agent now runs the flagship's own _code_search_start,
compiled from its source, and a new case covers a missing first path.

Closes #4660
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit a85f8cf Oct 4, 2026
@kovtcharov-amd
kovtcharov-amd deleted the autofix/issue-4660 branch October 4, 2026 14:52
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.

test(gaia): index-root pinning test out of sync with #4647's code-search-start fix

1 participant