Repository navigation
fix(tests): unit tests catch failed saves, late responses and permission gaps - #344
Merged
Merged
Conversation
…ess races Replace mock-only locale, hotkey and interface tests with tests of the real services. Wait for locale strings in the cascade locale spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… polling Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…issions and controls Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch selection Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… failures Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Many unit tests did not protect real behaviour. Some only checked that a mock or a signal returned what the test gave it. Important paths had no tests: failed saves, late responses after the user changed selection, permission checks, and message origin checks.
We split the app into 5 blocks (common, admin, ui, systems/modules/drivers/repositories, domains/zones/groups/users/triggers/overlays). A reviewer audited each block and reported max 20 findings: low-value tests and untested behaviour. Then a fix agent for each block deleted or rewrote the low-value tests and added one focused test for each gap. Each block then went through a review loop until the reviewer approved.
tsc -p tsconfig.spec.jsonhas the same 14 errors asdevelop, and none are new.src/testschanged. There are no source changes.cascade-locale.spec.tsnow waits for the locale strings. Before this change it sometimes failed because of a race.Source bug found (not fixed here)
src/app/common/settings.service.ts:213: a slow save that fails can bring back an old value. If save A (columns = 4) is still in progress when save B (columns = 5) is successful, and A then fails, line 213 putscolumns: 4back into the pending changes.get()then returns 4, and the next save overwrites the saved 5. We did not add a failing test. This needs a separate fix.Reviewed with sol-loop: 5 blocks, 1 to 2 rounds each, with gpt-6.1-sol on xhigh. Sol verdict: approved for all blocks.
Created with Claude Opus 5.5 (fix agents on xhigh) and GPT-6.1 Sol (reviews) in Claude Code through T3 Code.
🤖 Generated with Claude Code