fix: clear remaining test failures + content-less query tab regression#1116
Merged
fix: clear remaining test failures + content-less query tab regression#1116
Conversation
… asserting on raw turn
…and registry eviction
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three loose ends from the AI audit work, two test-only and one real production fix.
What changed
test(ai-chat): resolve currentQuery via resolveTurnForWire instead of asserting on raw turn(b5bdac41)AIChatViewModelMentionsTests.currentQueryResolvedwas asserting onuserTurn.plainTextdirectly aftersendMessage(). The design intentionally keeps.attachmentblocks raw untilresolveTurnForWireruns (sibling testsStored user turn keeps typed text rawandresolveTurnForWire expands attachmentsboth pass and confirm this contract). Updated the test to callawait vm.resolveTurnForWire(userTurn)first and assert on the wire-resolved text. Test-only change.test(coordinator): seed lazy-load skip path with execution timestamp and registry eviction(0e2b0aec)MainContentCoordinatorLazyLoadTests.skipsWhenAlreadyExecutingwas missing setup that mirrors a real "tab is currently executing" state: rows seeded,lastExecutedAtset, registry evicted. Without those, the coordinator would computeneedsLazyLoad = truefor an unrelated reason, so the assertion was racing the actual early-return. Added the missing fixture state. Test-only change.fix(session): do not auto-create empty query tab for content-less query payloads(59ac47bf)SessionStateFactory.createwas unconditionally callingtabMgr.addTab(...)on.querypayloads. When the payload hadnilinitialQuery,niltabTitle, andnilsourceFileURL (the "connection-only" case), users got an emptyQuery 1tab they didn't ask for. Added ahasContentguard so empty.querypayloads result in an empty tab manager, matching the existing.connectionOnlyPayload_createsEmptyTabManagertest expectation. User-visible: opening a connection without an explicit tab payload no longer pre-populates an empty query tab.Test plan
xcodebuild buildgreenswiftlint lint --strictclean on every touched fileAIChatViewModelMentionsTests,MainContentCoordinatorLazyLoadTests,SessionStateFactoryTests,OpenTableTabTests)Query 1tab still appears (theisNewTab=truepath is unchanged)Query 1tab is created