-
Notifications
You must be signed in to change notification settings - Fork 188
fix: handle large INSERT INTO statements in PostgreSQL parser #4003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: handle large INSERT INTO statements in PostgreSQL parser #4003
Conversation
…ments Add test case that reproduces the 'syntax error at end of input' bug when parsing large structure.sql files with very long INSERT INTO schema_migrations statements (3000+ entries). This test currently fails with the expected error, confirming the bug reproduction. Refs: #4000 Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Finished running flow.
|
||||||||||||
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Check changeset necessityStatus: NOT REQUIRED Reason:
Changeset (copy & paste):---
"@liam-hq/schema": patch
---
- ♻️ No user-facing changes — tests only
- Add reproduction test for issue #4000 validating parser behavior with very large INSERT INTO statements |
🤖 Agent Deep Modeling ExecutionProcessing time: 6m 55s View DetailsCommand Output
RUN v3.2.4 /home/runner/work/liam/liam/frontend/internal-packages/agent (node:7721) ExperimentalWarning: WASI is an experimental feature and might change at any time ✅ [INFO] 2025-11-12T07:05:50.642Z 🧠 Thinking (pm)... Crafting test cases for registration and verification I'm focusing on test cases with appropriate titles and classifications. In the registration category, I see successful user registration with a unique email and also need to address scenarios like rejecting duplicate emails and weak passwords, while recording the timestamp of terms acceptance. For email verification, I'll craft cases for generating a verification token on registration and verifying it with a valid token. I’ll also include handling expired tokens, deciding whether to classify that as SELECT or UPDATE based on the failure context. Defining test cases for various functions I'm outlining test cases across several categories. For "Authentication & Lockout," I need to log events for successful logins, count failed logins, and enforce lockouts after a certain number of attempts. I also want to ensure users can't log in during a lockout period and reset the failure counter upon a successful login. In the "Password Reset" category, I’ll create reset tokens and manage their expiration, while also enforcing single-use tokens. User management is about admin functions like creating, updating, and suspending users. Finally, the roles and permissions section will focus on assigning roles, preventing duplicate assignments, and maintaining data integrity. Setting up auditing and reporting test cases I'm detailing test cases for auditing and logs, focusing on creating login event rows and storing relevant data like IP addresses and user agents. I need to track admin actions with appropriate updated fields and ensure timestamps are set correctly. For reporting, I want to count active users and list users with failed attempts, locked-out users, and unverified users older than seven days. Each test case will strictly consist of titles and types, with required PostgreSQL extensions mentioned, along with constraint definitions for soft deletes and role/permission handling. Defining roles and email update processes I think we should define some default roles like admin and user. Although this might be slightly out-of-scope, it’s still essential. For edge cases like changing an email, I want to require re-verification. When a user updates their email, I'd set their verification timestamp to null and revert their status to PENDING until verification is complete. I’ll need to create test cases to reflect this process and ensure that the JSON for requirements stays manageable at around 30-40 test cases while drafting the main Business Requirements Document concisely. Lastly, I’ll include a confirmation line for saved requirements. Preparing the BRD and test case structure I need to call the tool and then present the Business Requirements Document (BRD), ensuring to mention that the requirements are saved. The tool call will be in the 'commentary' channel. I’m preparing the payload with test cases organized into categories like Registration, Email Verification, Authentication & Lockout, Password Reset, and User Management. Each test case will define a specific task, including user registration and email updates. I’ll make sure the categories match key processes and provide the schema structure with field types for the DB Agent to help design the database. Finally, I’ll specify the goal for the tool call for the user management system. ⏺ (pm): Planned actions:
Business Requirements Document (BRD)
Test Scenarios Summary (see saved testcases for full list)
🔧 processAnalyzedRequirementsTool() ⎿ processAnalyzedRequirementsTool: Requirements processed and streamed successfully 🧠 Thinking (db)... Preparing database operations I'm considering adding a check constraint to ensure the status is in the enum. To prevent deleting the last admin account, that’ll require a trigger— but that’s manageable. I need to proceed with creating enums and tables using functions like createMigrationTool. I’ll focus on operations such as adding the citext extension, creating various tables, and setting up indexes and constraints correctly. I’ll use the proper column types and prepare the operations array now. ⏺ (db): Purpose: Create the core schema objects (citext extension, enums, and all tables with constraints/indexes) to satisfy the user management requirements. Minimal inputs: extension name, enum values, table definitions with columns, indexes, and constraints. I'll now create the extension, enums, and tables (users, roles, permissions, user_roles, role_permissions, email_verification_tokens, password_reset_tokens, login_events) with required columns, constraints, and indexes. 🔧 createMigrationTool() ⎿ createMigrationTool: Schema successfully updated. The operations have been applied to the database schema, DDL validation successful (108/108 statements executed successfully), and new version created. ⏺ (db): Operation purpose: Created citext extension, user_status enum, and all tables, indexes, and constraints needed for the user management system. Minimal inputs: extension name, enum values, table/column/index/constraint definitions. Validation: Schema update succeeded — all operations applied and DDL validated. Summary of changes applied
Notes and assumptions (applied autonomously)
If you want, I can now:
Which of these (triggers/procedures or test-case SQL) should I implement next? 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() ⎿ saveTestcase: Successfully saved SQL for test case "Reject registration with duplicate email" in category "Registration" ⎿ saveTestcase: Successfully saved SQL for test case "Record terms acceptance timestamp on registration" in category "Registration" ⎿ saveTestcase: Successfully saved SQL for test case "Create new role with unique name" in category "Roles & Permissions" ⎿ saveTestcase: Successfully saved SQL for test case "Prevent consuming expired verification token" in category "Email Verification" 🔧 saveTestcase() 🔧 saveTestcase() ⎿ saveTestcase: Successfully saved SQL for test case "Prevent deletion of role that is assigned to users" in category "Roles & Permissions" 🔧 saveTestcase() 🔧 saveTestcase() 🔧 saveTestcase() ⎿ saveTestcase: Successfully saved SQL for test case "Admin manually creates a user with ACTIVE status" in category "User Management (Admin)" ⎿ saveTestcase: Successfully saved SQL for test case "List users with failed_login_attempts greater than zero" in category "Reporting & Queries" ⎿ saveTestcase: Successfully saved SQL for test case "User updates email resets email_verified_at and status to PENDING" in category "Email Change & Reverification" ⎿ saveTestcase: SQL syntax error: unterminated dollar-quoted string at or near "$$INSERT INTO login_events (id, user_id, event_type, details, created_at) VALUES (gen_random_uuid(), (SELECT id FROM users WHERE email = '[email protected]'), 'LOGIN_FAILURE', '{". Fix the SQL and retry. ⎿ saveTestcase: Successfully saved SQL for test case "Enforce case-insensitive uniqueness of email addresses" in category "Data Integrity & Uniqueness" ⎿ saveTestcase: Successfully saved SQL for test case "Prevent duplicate role assignment for same user" in category "Roles & Permissions" ⎿ saveTestcase: Successfully saved SQL for test case "Reject password reset with invalid token" in category "Password Reset" ⎿ saveTestcase: Successfully saved SQL for test case "Prevent reusing an already consumed verification token" in category "Email Verification" ⎿ saveTestcase: Successfully saved SQL for test case "Count ACTIVE users by day" in category "Reporting & Queries" ⎿ saveTestcase: Successfully saved SQL for test case "Query users by role name" in category "Roles & Permissions" ⎿ saveTestcase: Successfully saved SQL for test case "Prevent login for PENDING or SUSPENDED users" in category "Data Integrity & Uniqueness" ⎿ saveTestcase: Successfully saved SQL for test case "Link permission to role" in category "Roles & Permissions" ⎿ saveTestcase: Successfully saved SQL for test case "Logout inserts logout event" in category "Authentication & Lockout" ⎿ saveTestcase: Successfully saved SQL for test case "Assign role to user (user_roles insert)" in category "Roles & Permissions" ⎿ saveTestcase: Successfully saved SQL for test case "Verify email with valid token activates user" in category "Email Verification" ⎿ saveTestcase: Successfully saved SQL for test case "Create email verification token for new user" in category "Email Verification" ⎿ saveTestcase: Successfully saved SQL for test case "Admin soft-deletes a user account and sets status DELETED" in category "User Management (Admin)" ⎿ saveTestcase: Successfully saved SQL for test case "Successful login updates last_login_at and logs success event" in category "Authentication & Lockout" ⎿ saveTestcase: Successfully saved SQL for test case "Track created_by and updated_by on admin updates" in category "Auditing & Logs" ⎿ saveTestcase: Successfully saved SQL for test case "Insert login_event rows capturing IP and user agent" in category "Auditing & Logs" ⎿ saveTestcase: Successfully saved SQL for test case "Register new user with unique email succeeds" in category "Registration" ⎿ saveTestcase: Successfully saved SQL for test case "Prevent login attempts during lockout period" in category "Authentication & Lockout" ⎿ saveTestcase: Successfully saved SQL for test case "List users pending email verification older than 7 days" in category "Reporting & Queries" ⎿ saveTestcase: Successfully saved SQL for test case "Admin suspends a user account" in category "User Management (Admin)" ⎿ saveTestcase: Successfully saved SQL for test case "Successful login resets failed_login_attempts counter" in category "Authentication & Lockout" ⎿ saveTestcase: Successfully saved SQL for test case "Admin updates user profile fields" in category "User Management (Admin)" ⎿ saveTestcase: Successfully saved SQL for test case "Reset password with valid token and consume it" in category "Password Reset" ⎿ saveTestcase: Successfully saved SQL for test case "Prevent login after email change until reverified" in category "Email Change & Reverification" ⎿ saveTestcase: Successfully saved SQL for test case "List users currently locked out" in category "Reporting & Queries" 🔧 saveTestcase() ⎿ saveTestcase: Successfully saved SQL for test case "Prevent reuse of consumed or expired password reset token" in category "Password Reset" 🔧 saveTestcase() ⎿ saveTestcase: Successfully saved SQL for test case "Verify created_at and updated_at timestamps are set/updated" in category "Auditing & Logs" 🔧 saveTestcase() 🔧 saveTestcase() ⎿ saveTestcase: Successfully saved SQL for test case "Create password reset token and invalidate older tokens" in category "Password Reset" ⎿ saveTestcase: Successfully saved SQL for test case "Revoke user role" in category "Roles & Permissions" ⎿ saveTestcase: Successfully saved SQL for test case "List effective permissions for a user via role mappings" in category "Roles & Permissions" ⎿ saveTestcase: Successfully saved SQL for test case "Lock out user after 5 failed attempts within 15 minutes" in category "Authentication & Lockout" ⎿ saveTestcase: Successfully saved SQL for test case "Prevent deleting the only remaining admin account" in category "User Management (Admin)"stderr | src/createGraph.integration.test.ts > createGraph Integration > should execute complete workflow Context: trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=1d840244-4ba2-471e-8155-846fec513642; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=a64062a7-8216-4131-9212-bbc9d7a81f01; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=37500506-2d05-480c-9b4c-1357e0ba1879; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=b89d3c06-534b-482f-bcdd-f04e5cc074b4; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=b78bf707-73e4-4eeb-9b97-cfadace21862; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=f8774fa6-1ddf-4ce9-b982-1653bdfdfe66; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=27c698f6-7ba8-4c47-b9af-43c5971b37d7; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=81beb122-c80f-4fd9-b46e-29d34d7270d8; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=72b01ff5-170a-4cf9-bddf-aa29fbf29c88; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=a2cb958f-70af-4e06-961c-eaa7c2569a26; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=d42f7fc9-a2a3-4f20-8df1-f253d2160e60; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=c5834f0c-0114-424f-81f4-ccffd90054df; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=4afc601b-47a0-435e-9ff8-ffa894a93de7; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=885cad26-fd91-45f8-a72e-4acc5fed887a; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=df4e13b6-3499-4351-a5b0-cc259afc95c1; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=214a37a6-d08c-46c9-bd08-b9a190dfb195; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=5636823f-7f14-4ac0-ac75-f4757e027715; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=f2d286e7-16b8-426f-baaf-552db5816984; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=5e19c2f2-674b-4e56-b384-b3a1b6428a11; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=177c8d10-f38a-4fe4-979e-b06c527fecf9; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=bf01a5f1-71e4-4e67-a6ec-ebf46294d267 🔧 saveTestcase() ⎿ saveTestcase: Successfully saved SQL for test case "Failed login increments failed_login_attempts and logs failure" in category "Authentication & Lockout"stderr | src/createGraph.integration.test.ts > createGraph Integration > should execute complete workflow Context: trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=b5a64cea-8608-4f5c-ba96-02aacc383138; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=b88556c9-bedc-4968-bcbb-58aa8be89da3; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=961546cf-9bc0-468e-b14c-99f89acbd99a; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=bd9da524-b06b-48db-ad97-d2604ce18197; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=23293a08-bf70-4156-8776-51ac3ee0262d; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3c3c93ad-ca3c-4b78-b07b-886f09cb77b5; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=75912e9a-5021-4c47-9fa6-061a0039c2c0; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=edcb81cc-75f9-4631-977d-904d7e55c476; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=b4e5f571-9c44-4c92-9e56-39a011b0a191; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=03c252c5-2c56-4a2a-bd5b-78b55e3fdf20; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=d3878149-0dfa-45c0-a04b-d77df2a3297f; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=d6a26354-381a-453d-b3ab-325ed493cb6a; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=6a5c1bc6-27d1-4d4a-a2e9-239ed95a58c5; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=44316d8f-eefd-4f3f-b294-c59f03e2ba06; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=471a6167-c64b-4d16-9cf1-454e958c9581; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=e907160d-1363-4d09-9728-06d66b7b35e1; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3494ae19-dccf-41af-aa00-0cee1684ff3e; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=1f33ddc0-5bce-4395-b10c-060d3eab845b; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=12b73d49-1304-4152-97ad-0c5385e1ca1c; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=94cd56ad-a98c-4757-99d7-f4347de29d31; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=cd324b33-622b-4c33-aa11-7b675e048319; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=e155b192-74fb-43a2-8223-f8fa5cf0fb45; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=6a5b4a77-7b73-4428-9ef5-02edc1eef651; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=72447077-cfe6-49a7-bfca-db8c9abe78dc; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=04dce32b-f540-479a-a48b-cda3977d7ecc; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=c6bf0211-3e6d-4982-b59b-183e55ef8ce4; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=46d8c993-14e0-46ce-80c6-86fbc8df6246; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=36727b02-3e92-44e2-85e1-a04f2a67ae50; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=81219ad9-c2bd-4d2e-9ac2-6f6a566a3daa; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=4f332963-25bf-4c3c-8358-5a06d71dbca9; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=875febd7-3a8b-442a-afde-0794254b60be; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=507c5ed7-ce70-4ff4-ba72-1ff1d55f8f84; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=a2487159-c95b-4dd8-a68e-6e59dc41c6a4; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=72084527-000c-48a7-9f0b-4475704f4822; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=ebe8b573-bee4-4347-99b0-2087dbc0004b; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=0168dc3b-8df0-4667-b1cc-f92abf53baa0; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=73e7faed-7842-4045-92af-05893a9404b8; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=8cee517e-9bfd-41f2-b6c7-04b25daed773; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=2a0c6854-7733-40e1-857c-f5b21c205a46; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=536250ef-e84c-4649-8c5e-6c762336cce9; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=7ba02cd1-279a-493a-9146-b4de4a31ddec; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=7ade0761-8be5-4f71-a1ca-b61da829fd3b; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=4e696903-5aef-4ad1-b6f3-aa9ce7e41e88; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=4b647e56-59bd-4509-82b4-61ee0bfb4191; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=68de1184-9e4a-49ff-99b6-1fc0398b3440; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3b3fbea6-c996-4f4c-af1d-a3feb8639dcc; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=390f3be4-05a1-4ff8-923d-0dcc6e3a57a8; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=b90dcb15-9ab6-44bc-b5fe-5efac384437c; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=4dea7fd4-e70c-48aa-ace7-7aa675d4e7ca; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=4ad4067c-ae4f-4eff-b41a-d0c231b562ff; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=2d4eadb0-4bf8-49d7-91d2-bd90f5ba18fa; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=f1fc08eb-75a7-4778-a4d2-8e266d9a5688; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=69ca7737-f348-4e9f-b84f-5bebacbdaf82; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=583c34de-b19e-450e-98c6-a260e366f860; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=9adc19ff-6903-4c4e-9c0b-86a23c73d4f9; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=c573236d-9502-47ad-a36e-c40ab576ffe2; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=a1b8bc41-d357-44b6-b863-3bae2e980654; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=258703d5-1a54-4c58-84d4-8f7e39056a02; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=853f75d3-5911-4111-a0e5-cf5fbd519513; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=98f6276b-5a8b-48bf-bf93-fdb9d6830895; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3ff76daa-c320-42fe-ac85-6c8ad36d1d57; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=5b2181ce-6e60-4a96-9ed7-c40b2959df07; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=82683d1f-cf23-461a-9a81-6582476b7256; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=70486b1b-b6c8-435f-af28-c905d7527183; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=5f8d3174-8ee6-4153-898b-ddb01f286e19; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=7351c582-c37e-493b-bfdc-7b4b93178e30; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=eaf3f51a-ed28-4fa4-bda7-8023c90b7c6c; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=5842ea46-b00e-423a-9977-3bc03ed2ea68; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=71d18328-fa14-4b39-84bf-271de9524037; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=93b417d4-ce13-40fa-b2dc-35985ffe19e1; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=f33e236e-4006-4e40-9720-55e16da9616b; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=ad146c8e-63b6-4e46-99e2-d6991a091ace; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=7c1e1117-fc3b-48fa-aeb9-98fcc53df671; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=204428cd-c920-417a-a360-c73061347bfd; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=507cbd79-9af1-49d6-87a3-0fa8b3f76c2c; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=8f8750bd-5560-408d-ab65-7fc3fc06519d stderr | src/createGraph.integration.test.ts > createGraph Integration > should execute complete workflow Context: trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=180e382d-203d-48e7-ae31-0e45550bda47; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=d14c5aab-1bcc-4280-8236-d994111b40b6; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=fa8029b7-edf6-4de2-8750-79063c76ab6c; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=73a64c92-095d-421e-a9fb-26a9e4852ce1; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=095cac57-83b4-4ce8-81bd-66bbfd69b3f8; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=d4c9b776-ba3c-4c33-9503-46adb51d3d00; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=9d46486c-d53b-40d4-a0c7-d6da047d658e; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=e22dbd7a-50e9-4722-9abd-e7a78b0d3d6c; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=a1616d63-5bbf-4c7c-b350-f766cc9809c4; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3821bb8b-18d5-415e-8dea-90332ce908b2; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=16a0fd3e-18e2-4a64-aa9e-220c2855ec32; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=f1fee6ed-3377-4f62-bde4-012587475298; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=560fdf60-f8c5-4428-bf65-71457817cbf7; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=33f4ddff-1710-4cae-ad88-1929d22cf20f; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=71e868de-16d6-48e5-a80a-6672cc56da81; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=62e5df09-eb78-4162-8a1a-ebeeaa9307b2; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=d2b72fe9-7343-4c21-901e-3620f2faeca7; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=9c5a1641-743b-40e3-bff9-2496eb13b45a; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=0c24b3e2-f4a8-4516-bb0d-600ffcc17d63; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=53a60315-e0b7-48f0-9b45-667c1b9d98cd; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3963b557-ee9d-4c65-837c-d81b452fedc5; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=c62f6268-798a-4a84-bb7c-7cedaa710fac; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=44803950-c47b-4062-8c6a-3d381cda4926; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=e3917836-5a52-48ab-9cfc-a29739f04bea; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=1a785f8a-d6a6-412b-bade-c39831d467f7; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=29a9acbb-241a-499b-9f33-2c6b59296045; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=d7e048b8-b8d3-43af-b807-d891fe1d7653; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=75500be7-c4c2-414c-ad49-a64ce8f66afc; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=75be79bd-bbff-4383-9d28-53a839b28140; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=98ea39d3-2565-4646-9771-97a3bfc10380; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=7f4ab529-5ccf-4cbc-a01a-72d09c15d3e3; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=6266c386-cef9-44ee-bd32-9e41e89d40bd; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=d81f70a8-2d2a-4f1f-bda8-aa3e80c44920; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=a30b52c2-faa3-4269-8dff-438feb58bbef; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=54341636-9304-465e-8e2d-47e1f638dfcd; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=1bf3bbb4-f461-4133-955f-1c8b27bc8298; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=5ef7e288-d0b0-4f93-aba7-ead753bd95f4; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=ef63f509-1624-4a75-914e-e09c1e64969c; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=23df5e54-22df-4506-a03a-576c3e2655f4; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=99298757-ac43-4938-8e0a-9d9a17f0ae30; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=da328d52-1819-43ec-8b02-1add61486731; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=66e2f7f7-2ef4-4d20-a362-7197bff684e5; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=8ba93cb6-a65c-4ce0-b347-0df2ac90f724; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=baeeeea3-708b-4ac1-b397-88581235c524; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=44c396a2-1ab7-4427-b743-88c8f4151a70; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=77b7c6b3-91b9-4a10-95e2-7c446ef16117; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3bbe875a-38a4-42fc-bbdb-6d7b6fe547e6; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3600ba5b-9c87-4775-a02f-4a40ba040a79; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=5dcea0f8-25b9-4654-b412-f738803fb3ef; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3e24aece-8ff2-4a07-8552-ff65f9a3dff3; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=832b5232-d4fd-414c-b515-7eecf68fde27; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=58516b66-a9c5-492d-91be-f9dafaf1c868; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=a7ac35f6-a0b0-4017-9d4c-54404e33e523; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=2c231282-3d1b-4818-bbbd-3a3875cec9ea; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=0d4b6705-43d6-47f1-8652-040ab6be46b7; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=05f44e11-1934-461e-89cb-5ebb2ae8116e; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=b4ba021c-6e6f-4cf7-b879-2d0409f1009c; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=3ae46711-0263-43d3-9d6c-1d7e3936a942; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=2be84f89-cd77-4466-98db-d388da8b9532; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=84b82f48-d2e2-460e-ac93-189913d611eb; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=0ccaa0bb-ddd3-441b-b736-7c5fca158683; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=c88fe289-5613-4a06-9626-3d8d3832c04b; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=fffdfe22-49fe-44ff-8dd9-83a6ea2e7fc1; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=6f58195d-aacc-4ef6-a300-cb03815791b7; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=9f5d2c79-b24f-4df5-9736-15e73514e273; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=269728ff-c8de-4538-a0e3-da19172feef0; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=ccc5c3c4-29f0-4672-ae3b-456ae8376beb; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=93f0b1b1-6b25-4d96-8cf9-41e6777b4d6d; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=690a37a8-1a9e-41a9-ab38-f09a794644c8; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=5ae0a6e9-fa27-4206-905e-49b9e846606b; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=71dd1414-9517-4b6e-a7e3-147acc36c60e; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=a7d33b2b-2c55-4f4a-8849-c7da8c1cb9e7; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=cea63812-7449-4ed0-bddd-949202d49d67; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=de54a10f-60d8-4159-adf7-c2a11433bc21; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=27f781b4-1b02-4990-9a83-b0b387d5c222; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=dd52cafa-03b5-4361-81b5-04649b851819; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=0a3ac521-d9f8-46a6-bbc9-9dbedd1ff665; trace=beed5723-b1fe-4393-b482-20fe109f1a75,id=7c05e4bd-136b-488e-b924-c2bcf358ab99 ⎿ runTestTool: 23/43 test cases passed, 20 failed ❌ Test Case: Reject registration with weak password not meeting policyError:
|
8daefe8 to
3f10237
Compare
bd9c821 to
3f10237
Compare
Issue
liam erd buildfails with “syntax error at end of input” when parsing largestructure.sqlfiles #4000Why is this change needed?
When parsing large Rails
structure.sqlfiles with extensiveINSERT INTO schema_migrationsblocks (thousands of entries), the parser fails with "syntax error at end of input". This prevents users from generating ERDs from production database schemas.Changes
This PR implements two complementary fixes:
1. Filter out schema_migrations INSERT statements
commentOutSchemaMigrationsInserts()function to remove these statements before parsing2. Improve incomplete statement detection
processChunk()to better distinguish incomplete statements from actual syntax errors3. Increase chunk growth limit
CHUNK_GROWTH_LIMIT_MULTIPLIERfrom 2x to 10x4. Add regression test
Test Plan
🤖 Generated with Claude Code