Skip to content

test: use the transaction's json helper in the malformed cleanup fixture - #16194

Merged
lawrencecchen merged 1 commit into
mainfrom
fix-web-typecheck-tx-json
Sep 30, 2026
Merged

lawrencecchen merged 1 commit into
mainfrom
fix-web-typecheck-tx-json

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

web-typecheck fails on main since #15423: web/tests/vm-workflows.test.ts(6219,37): error TS18047: 'sql' is possibly 'null'. The call sits inside sql.begin(async (tx) => …), where TypeScript drops the earlier null narrowing of the module-level sql. The inserts already go through tx, so the fixture now encodes the JSON with tx.json too.

bunx tsc --noEmit -p web reports 0 errors.

Changelog

none

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes a web typecheck failure by switching the malformed cleanup fixture to use tx.json instead of sql.json inside sql.begin, where TypeScript no longer narrows the module-level sql.

Written for commit 762349b. Summary will update on new commits.

Review in cubic

Inside sql.begin's callback TypeScript no longer narrows the module-level
`sql` to non-null, so web-typecheck fails on main with TS18047 since #15423.
The rows are written through `tx`, so encode them with `tx.json` as well.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lawrencecchen
lawrencecchen enabled auto-merge (squash) September 30, 2026 19:58
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3c6ca366-55e5-4d46-8a60-15c6c723c8af

📥 Commits

Reviewing files that changed from the base of the PR and between 0468e2e and 762349b.

📒 Files selected for processing (1)
  • web/tests/vm-workflows.test.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@lawrencecchen
lawrencecchen merged commit 21c3f9b into main Sep 30, 2026
17 of 20 checks passed
@lawrencecchen
lawrencecchen deleted the fix-web-typecheck-tx-json branch September 30, 2026 19:58
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 762349b4aa, merged 2026-09-30 19:58:56 UTC

  • Not verified at merge: ci-status (not reported), CI fast guards (in progress), Fast static checks (in progress), guest-install (in progress), Testbox broker trust boundary (in progress), Web complexity (in progress), Web complexity candidate (in progress)
  • Verified: web-validation
  • Skipped by policy: web-build, web-database-tests, web-tests
  • Full suite: runs on main after merge.

Labeled merged-unverified: if main breaks near this merge, look here first.

@github-actions github-actions Bot added the merged-unverified A judging check was not green at merge; see the merge receipt comment label Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-unverified A judging check was not green at merge; see the merge receipt comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant