Skip to content

Nightly property counterexample [c4aa8917acde] (seed=921817945) #2

Open

Description

@github-actions

A nightly property fuzz SHARD failed with a fast-check counterexample.

Reproduce locally:

PROPERTY_SEED=921817945 PROPERTY_NUM_RUNS=600 pnpm --filter @docmost/prosemirror-markdown exec vitest run test/generative/

fast-check shrinks the failure to a minimal counterexample. Commit it as a permanent fixture under packages/prosemirror-markdown/test/fixtures/counterexamples/ + a case in counterexamples.test.ts, then FIX the converter (do not weaken a property). See packages/prosemirror-markdown/README.md.

Tail of the test output (contains the shrunk counterexample):


�[1m�[30m�[46m RUN �[49m�[39m�[22m �[36mv4.1.6 �[39m�[90m/home/runner/work/gitmost/gitmost/packages/prosemirror-markdown�[39m

 �[32m✓�[39m test/generative/counterexamples.test.ts �[2m(�[22m�[2m1 test�[22m�[2m)�[22m�[32m 42�[2mms�[22m�[39m
 �[32m✓�[39m test/generative/env-int.test.ts �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 7�[2mms�[22m�[39m
 �[32m✓�[39m test/generative/flat-roundtrip.property.test.ts �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[33m 12139�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P1 — semantic round-trip: docsCanonicallyEqual(mdToPm(pmToMd(d)), d) �[33m 3949�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P2 — byte fixpoint: pmToMd(mdToPm(pmToMd(d))) === pmToMd(d) �[33m 3761�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P3 — totality: neither converter throws �[33m 4198�[2mms�[22m�[39m
 �[31m❯�[39m test/generative/nested-roundtrip.property.test.ts �[2m(�[22m�[2m5 tests�[22m�[2m | �[22m�[31m1 failed�[39m�[2m)�[22m�[33m 49681�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m every generated nested doc passes schema.nodeFromJSON(...).check() �[33m 439�[2mms�[22m�[39m
�[31m     �[31m×�[31m P1 — semantic round-trip: docsCanonicallyEqual(mdToPm(pmToMd(d)), d)�[39m�[33m 23250�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P2 — byte fixpoint: pmToMd(mdToPm(pmToMd(d))) === pmToMd(d) �[33m 8120�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P3 — totality: neither converter throws �[33m 11269�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P4 — markdownToProseMirror never throws and always returns a schema-valid doc �[33m 6599�[2mms�[22m�[39m

�[31m⎯⎯⎯⎯⎯⎯⎯�[39m�[1m�[41m Failed Tests 1 �[49m�[22m�[31m⎯⎯⎯⎯⎯⎯⎯�[39m

�[41m�[1m FAIL �[22m�[49m test/generative/nested-roundtrip.property.test.ts�[2m > �[22m#351 nested generative round-trip — properties�[2m > �[22mP1 — semantic round-trip: docsCanonicallyEqual(mdToPm(pmToMd(d)), d)
�[31m�[1mError�[22m: Property failed after 477 tests
{ seed: 921817945, path: "476:392:0:0:0:0:2:1:1:3:3:3:2:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0", endOnFailure: true }
Counterexample: [{"type":"doc","content":[{"type":"taskList","content":[{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"indent":null,"textAlign":null},"content":[{"type":"text","text":"+ 6v2ia ! BZ9 bwc4ev𠀀"},{"type":"hardBreak"},{"type":"text","text":"S naïve brttXQ","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]},{"type":"text","text":"T3807l h90 b","marks":[{"type":"strike"},{"type":"code"}]}]},{"type":"excalidraw","attrs":{"src":"https://ta4a.o3oly.lcg//9","alt":null,"width":"640","height":null,"size":"320","align":"center"}},{"type":"pdf","attrs":{"src":"http://43549y3lck.a3npq8chv.yjf///T//","name":"lp","width":"640"}}]},{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]},{"type":"text","text":"A 0🙂","marks":[{"type":"bold"}]},{"type":"text","text":"a a"}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]},{"type":"paragraph","attrs":{"textAlign":null},"content":[{"type":"text","text":"0 0","marks":[{"type":"code"}]}]}]}]}]}]
Shrunk 172 time(s)

Hint: Enable verbose mode in order to have the list of all failing values encountered during the run�[39m
�[90m �[2m❯�[22m buildError ../../node_modules/.pnpm/[email protected]/node_modules/fast-check/lib/fast-check.js:�[2m2441:16�[22m�[39m
�[90m �[2m❯�[22m asyncThrowIfFailed ../../node_modules/.pnpm/[email protected]/node_modules/fast-check/lib/fast-check.js:�[2m2453:8�[22m�[39m

�[31m�[1mCaused by: Error�[22m: P1 divergence @ $.content[0].content[1].content[0].content.length: got=2 want=3�[39m
�[36m �[2m❯�[22m test/generative/nested-roundtrip.property.test.ts:�[2m105:17�[22m�[39m
�[90m �[2m❯�[22m AsyncProperty.run ../../node_modules/.pnpm/[email protected]/node_modules/fast-check/lib/fast-check.js:�[2m1197:19�[22m�[39m
�[90m �[2m❯�[22m asyncRunIt ../../node_modules/.pnpm/[email protected]/node_modules/fast-check/lib/fast-check.js:�[2m2495:15�[22m�[39m
�[90m �[2m❯�[22m test/generative/nested-roundtrip.property.test.ts:�[2m97:5�[22m�[39m

�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯�[22m�[39m


�[2m Test Files �[22m �[1m�[31m1 failed�[39m�[22m�[2m | �[22m�[1m�[32m3 passed�[39m�[22m�[90m (4)�[39m
�[2m      Tests �[22m �[1m�[31m1 failed�[39m�[22m�[2m | �[22m�[1m�[32m22 passed�[39m�[22m�[90m (23)�[39m
�[2m   Start at �[22m 10:13:59
�[2m   Duration �[22m 51.68s�[2m (transform 590ms, setup 2.97s, import 2.11s, tests 61.87s, environment 0ms)�[22m

undefined
/home/runner/work/gitmost/gitmost/packages/prosemirror-markdown:
 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command failed with exit code 1: vitest run test/generative/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions