test: unit suite and security lint green on macOS; lossless portable type seed - #439
Merged
Merged
Conversation
- vitest set FOXFLOW_FILES_DIR to realpathSync(tmpdir()). On macOS that is /private/var/folders/…, while the workflow suites build fixtures under tmpdir() = /var/folders/… (a symlink to it). The lexical half of the file-pipe containment check (c20efd3) then refused every fixture: 41 tests in 10 files failed on every Mac. CI runs Linux, where /tmp is not a link, so it stayed green. The root is now tmpdir() as the suites spell it; the real-path half of the check resolves both sides itself, and the confinement tests (symlink escape, climbing out, prefix sibling) still pass. - Both ESLint configs ignore .claude/**. Agent worktrees are whole gitignored checkouts of the repo; the security gate linted them and failed on days-old copies of the code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gated CLI integration test (FOX_IT_DB=1) asserts that t_all_types is UNCHANGED from Postgres demo_c to MySQL demo_c. Since #290 the canonical type carries each engine's default fractional-seconds precision, so Postgres TIMESTAMP (6 digits) and MySQL DATETIME (0) are, correctly, a difference: migrating one onto the other truncates microseconds. The test has failed since then, unnoticed, because CI does not run it. The seed was what was wrong: a 'portable' matrix should be lossless. The MySQL and MariaDB c_ts columns are now DATETIME(6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_f13a2a33-776b-4d0a-8af8-f90361c45346) |
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.
Two test-environment problems found while running every test layer locally. Neither changes product code.
1. Unit suite and security lint fail on every Mac
vitest.config.tssetFOXFLOW_FILES_DIRtorealpathSync(tmpdir()). On macOS that is/private/var/folders/…, while the workflow suites build their fixtures undertmpdir(), which is/var/folders/…(a symlink to it). The lexical half of the file-pipe containment check (added in c20efd3) then refused every fixture, so 41 tests in 10 files failed on macOS. CI runs Linux, where/tmpisn't a symlink, so CI stayed green.tmpdir()as the suites spell it. The real-path half of the check resolves both sides itself..., a sibling directory sharing the prefix) still pass..claude/**. Agent worktrees are whole gitignored checkouts of the repo, andlint:securityfailed on days-old copies of the code inside them.2. The gated CLI integration test has failed since #290
FOX_IT_DB=1(apps/cli/src/commands/__tests__/integration.seed.test.ts) asserts that the advanced seed'st_all_typesis UNCHANGED from Postgres to MySQL. Since #290 the canonical type carries each engine's default fractional-seconds precision:TIMESTAMPhas 6 digits and MySQLDATETIMEhas 0, which is correctly a difference, because migrating one onto the other truncates microseconds.The seed was what was wrong: a portable matrix should be lossless, so the MySQL and MariaDB
c_tscolumns are nowDATETIME(6).Verification (macOS)
vitest run: all green (previously 41 failures). Workflow-engine and workflow-server: 850 pass.lint:security,eslint .and the ESLint-config parity test pass.FOX_IT_DB=1CLI integration: 2/2 (previously 1 failure) afterseed-advanced.sh mysql mariadb.🤖 Generated with Claude Code
Note
Low Risk
Test, lint, and seed fixture changes only; no application or auth/data-path logic modified.
Overview
Fixes macOS-only test and lint failures and aligns advanced MySQL/MariaDB seed timestamps with the portable type matrix—no product runtime changes.
Vitest:
FOXFLOW_FILES_DIRis set totmpdir()instead ofrealpathSync(tmpdir())so workflow file-pipe containment matches how fixtures are built on macOS (/var/folders/…vs/private/var/folders/…), restoring 41 previously failing workflow tests on Mac while Linux CI behavior stays the same.ESLint: Both
eslint.config.jsandeslint.security.config.jsignore.claude/**so agent worktrees (duplicate gitignored checkouts) are not linted twice against stale code.Seeds:
c_tsin advanced MySQL and MariaDBt_all_typesmoves from plainDATETIMEtoDATETIME(6), matching Postgres microsecond precision so the gatedFOX_IT_DB=1integration assertion that the portable matrix is unchanged across engines passes again.Reviewed by Cursor Bugbot for commit 4a6ec00. Bugbot is set up for automated code reviews on this repo. Configure here.