Repository navigation
test(macos): make Swift guard tests able to fail (ToolTier golden, SC006, credential/app-state, token savings label) - #1512
Merged
Conversation
Deploying mcpproxy-docs with
|
| Latest commit: |
8d71f01
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://323a85d1.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-issues-b15-macos-tray-te.mcpproxy-docs.pages.dev |
Dumbris
enabled auto-merge (squash)
October 5, 2026 13:15
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 37315265359 --repo smart-mcp-proxy/mcpproxy-go
|
… stored values String(reflecting:) on a plain Swift class prints only the type name, so the assertClean AppState leg could never fail. Walk the stored properties with a recursive Mirror dump instead; verified it fails when a secret is seeded.
12 tasks
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
Four macOS Swift test guards now fail when their assertions break, catching actual bugs in contract compliance and UI consistency. Tests drive through the app's real wiring, use decoy records to prevent false negatives, and slice UI code before matching shared components.
Fixed Issues
Follow-ups from Spec 108-l parity/docs review (#1456) #1458 (credential never in AppState): Drive the credential test through AppState's deferred client source, matching the sheet's real wiring. Test now verifies POST went through the app and that secrets never land in UserDefaults or AppState dumps.
Follow-ups from post-merge Sol 6.1 review of Spec 108/109 PRs #1451 (Token Savings label reuse): Slice the tokenSavingsSection of HomeView before asserting the shared estimate label exists, eliminating false positives from unrelated label matches elsewhere in the file.
Final done-check residuals (Spec 108/109 UX effort) #1466 (SC006 filter combinations): Feed the test a superset of ids (all combinations' ids interleaved as decoys), forcing the filter to actually select the right records instead of passing because the input was built from the expected output. Test now asserts folding does not drop or reorder records.
ToolTier golden contract (follow-up): New test pins all Go tier spellings (read, write, destructive, unannotated) as known Swift enum cases, preventing silent .unknown fallback if a tier is missing.
Tests Updated
ClientBindingModelTests.swift: Rewired credential test to use AppState's deferred source and a stub HTTP client; added offline-connection test case.HomeTokenSavingsBadgeTests.swift: Extracts tokenSavingsSection before checking the label is reused.ProfilesEnumsLabelsTests.swift: NewtestToolTierCoversTheGoTiers()pins wire spellings.SC006RecordSetTests.swift: Builds decoy superset; verifies folding preserves order and both filter + display work correctly.Review
Clean after 1 round(s).
Deferred finding:
Review Status
Folded in the deferred glm:1.1 fix (9167628): the AppState leg of assertClean now inspects stored values via Mirror so the secret scan can fail. Merged origin/main (no conflicts).
Closes #1458
Refs #1451
Refs #1466