Skip to content

fix(lint): replace non-null assertions failing biome ci on main#3230

Merged
frankh merged 1 commit into
mainfrom
posthog-code/fix-biome-non-null-assertions
Jul 7, 2026
Merged

fix(lint): replace non-null assertions failing biome ci on main#3230
frankh merged 1 commit into
mainfrom
posthog-code/fix-biome-non-null-assertions

Conversation

@frankh

@frankh frankh commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

The required quality check (biome ci .) is currently red on main, which blocks the Trunk merge queue for every PR. Two lint/style/noNonNullAssertion errors are the cause:

  • packages/workspace-server/src/services/skills/skills.ts:541const ref = queue.shift()!;
  • packages/agent/src/server/agent-server.ts:1390Date.now() - this.barrierReleasedAtMs!

Fix

  • skills.ts: queue.shift() now assigns without ! and breaks early if it somehow returns undefined — behavior-preserving given the while (queue.length > 0) guard.
  • agent-server.ts: fall back to Date.now() when barrierReleasedAtMs is unset (yields 0) instead of asserting non-null; also removes a latent NaN when 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

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
@trunk-io

trunk-io Bot commented Jul 7, 2026

Copy link
Copy Markdown

😎 Merged manually by @frankh - details.

@frankh

frankh commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/trunk merge

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit f616fa9.

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(lint): replace non-null assertions f..." | Re-trigger Greptile

@frankh frankh added the Stamphog This will request an autostamp by stamphog on small changes label Jul 7, 2026
@frankh frankh enabled auto-merge (squash) July 7, 2026 14:17

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trivial lint fixes replacing non-null assertions with proper null guards. No behavioral risk.

@frankh frankh merged commit 85752ed into main Jul 7, 2026
24 checks passed
@frankh frankh deleted the posthog-code/fix-biome-non-null-assertions branch July 7, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant