Skip to content

Load the mascot symbols from CodevisorUI in their weight test - #1519

Merged
dylanplayer merged 1 commit into
mainfrom
codevisor/toffee
Nov 28, 2026
Merged

dylanplayer merged 1 commit into
mainfrom
codevisor/toffee

Conversation

@dylanplayer

Copy link
Copy Markdown
Member

Main's Build has failed in ci / checks-swift on every merge since #1513, so no Alpha has gone out. The only failure is the "Mascot symbols" test, for all four symbols.

Cause: #1513 added resources: [.copy("Fixtures")] to the CodevisorUITests target. That gives the test target its own Bundle.module, which takes precedence over the Bundle.module it got from CodevisorUI through @testable import. So NSImage(symbolName:bundle: .module, …) in the test began searching CodevisorKit_CodevisorUITests.bundle, which only contains the fixtures. The .copy("Resources/BotMascotArt") change wasn't involved.

Apps: not affected. CodevisorSymbol loads symbols from CodevisorUI's own Bundle.module, and the built Mac and iOS apps' CodevisorKit_CodevisorUI.bundle still has mascot, mascot.fill, mascot.badge.plus and mascot.fill.badge.plus (checked with assetutil).

Fix: the test now gets each symbol through CodevisorSymbol.nsImage(pointSize:), the same lookup the app uses.

Verification:

  • node scripts/test-swift.mjs before the fix: the same 4 failures as CI, and nothing else failed.
  • node scripts/check.mjs --all --lanes=swift-style,swift after the fix: format, lint and all Swift tests pass, including the mascot suite (4/4) and the 634-test run.

🤖 Generated with Claude Code

#1513 gave CodevisorUITests its own resources (Fixtures), so the test
target now has its own Bundle.module. The mascot symbol test's
`bundle: .module` stopped meaning CodevisorUI's bundle and looked the
symbols up in the test bundle, which has none, failing checks-swift on
every merge since. The apps were never affected: CodevisorSymbol loads
from CodevisorUI's own bundle, which still has all four symbols.

The test now draws each symbol through CodevisorSymbol.nsImage, the
same lookup the app uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dylanplayer
dylanplayer merged commit e395662 into main Nov 28, 2026
@dylanplayer
dylanplayer deleted the codevisor/toffee branch November 28, 2026 07:15
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.

1 participant