fix(lint): replace non-null assertions failing biome ci on main#3230
Merged
Conversation
Two noNonNullAssertion errors were breaking the required `quality` check (`biome ci .`) on main, blocking the merge queue for all PRs: - skills.ts: guard queue.shift() with an early break instead of `!` - agent-server.ts: fall back to Date.now() when barrierReleasedAtMs is unset instead of asserting it non-null Generated-By: PostHog Code Task-Id: 6a70b8ad-752c-451e-bdd6-a4bf178dfe38
Contributor
Author
|
/trunk merge |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(lint): replace non-null assertions f..." | Re-trigger Greptile |
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
The required
qualitycheck (biome ci .) is currently red onmain, which blocks the Trunk merge queue for every PR. Twolint/style/noNonNullAssertionerrors are the cause:packages/workspace-server/src/services/skills/skills.ts:541—const ref = queue.shift()!;packages/agent/src/server/agent-server.ts:1390—Date.now() - this.barrierReleasedAtMs!Fix
queue.shift()now assigns without!and breaks early if it somehow returnsundefined— behavior-preserving given thewhile (queue.length > 0)guard.Date.now()whenbarrierReleasedAtMsis unset (yields0) instead of asserting non-null; also removes a latentNaNwhen the field was never set.No behavior change on the happy paths.
biome ci .now reports 0 errors; affected packages typecheck.Created with PostHog Code