test(seeder): prove seeder hardener S1–S10 - #3422
Merged
Merged
Conversation
Pin HOLD S4/S5 and add branch-killing specs for S1/S2/S3/S6/S7/S8/S9/S10. S4 stays WHERE interpolation with quote-escape only. S5 stays non-transactional. No production flip. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Peter Amiri <peter@alurium.com>
seedOnce interpolates unique values into WHERE with quote-escape only. An apostrophe does not skip — the second seedOnce creates another row. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Peter Amiri <peter@alurium.com>
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.
Why
Seeder desk IDs S1–S10 were locked. HOLD pins stay unflipped. This PR only proves current behavior so a vacuous include, a silent leftover, or a
$generateTestDatabranch drop would fail.S4 stays WHERE interpolation with quote-escape only (
Replace(val, "'", "''")). An apostrophe in the unique value does not skip — the secondseedOncecreates another row. S5 stays non-transactional: a mixedgenerateSeedslist can leave rows.Scope
vendor/wheels/tests/specs/seederSpec.cfc— the only seeder spec file. Do not inventwheels.tests.specs.seeder.vendor/wheels/tests/_assets/seeder/(seeds.cfm,withenv/,stray/,includethrow/)No production change in
Seeder.cfc. Spec-only. No changelog fragment.Out: CLI
db/seed+generate/seed, docs/blog, migrator001_seed_tag_via_model_create, blank environment throw (InvalidEnvironmentits only cover../and/), mixed-model generate honesty (totalFailed==0 && totalCreated>0).Already-proven, not refiled: InvalidEnvironment (
..//), MissingProperty, InvalidUniqueValue, EmptyUniqueProperties, no-files failure, partial-failure rollback, single-model generate honesty / Model.cfc skip.Desk S1–S10
seeds.cfmcreatesSeederMainOK99.totalCreatedis 1, nottoBeGTE(0)on an empty fixture.withenvmain +seeds/testing.cfmboth create rows.environment=developmentruns main only — the testing include did not run.seeds/orphaned.cfmmakeshasSeedFiles()true, butrunSeeds(environment=testing)returns "No seed files found" and does not create the orphan row.firstNamecreates, then creates again (does not skip). No parameterized flip.generateSeeds(models="Author,NoSuchModel_SeederS5")leaves the Author row. Not transactional. No wrap-in-transaction flip.count=0: overallsuccess=false, per-model entrysuccess=true, no rows.count=-1: overall failure, per-modelsuccess=false,totalFailed=1, no rows.success=false, message includesSeed failed:andintentional include throw, first row rolled back.request.$wheelsSeederis left set after success, after a later run (overwritten, not deleted), and after the include-throw catch.seedMappingPathis/app/db/andseedPathisExpandPath("/app/db/"), not onlytoInclude("app").$generateTestDataname and type branches: email, first/last, name/username vs displayName, phone/geo, url/password, boolean (includingpublishedAtbefore date), integer age/price/quantity/default, date, text/title/status, default string.Verification
Command actually run (LOCKED driver — not
--filter=seeder/--filter=seederSpec):The 5 errors are all
cli.lucli.services.RewriteConfigInstallernot found (rewrite.config installer specs). Out of this seeder slice. Seeder itself is 0 fail / 0 error.Wheels CLI 4.0.6. Lucee 7.0.0.395. sqlite.
Did not run
--filter=seeder(that directory does not exist; 0-bundle fail-close). Did not inventwheels.tests.specs.seeder.HEAD
c136de20ef190d3ef6575e51bae5fef9afb66d66Base
24cd4421ffb31634636c40d045a748222257fa34(develop after #3421).No closer keywords. Do not merge.