Skip to content

Nightly property counterexample [0fe5889aab66] (seed=887373606) #3

Open

Description

@github-actions

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

Reproduce locally:

PROPERTY_SEED=887373606 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 34�[2mms�[22m�[39m
 �[32m✓�[39m test/generative/env-int.test.ts �[2m(�[22m�[2m7 tests�[22m�[2m)�[22m�[32m 3�[2mms�[22m�[39m
 �[32m✓�[39m test/generative/flat-roundtrip.property.test.ts �[2m(�[22m�[2m10 tests�[22m�[2m)�[22m�[33m 11208�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P1 — semantic round-trip: docsCanonicallyEqual(mdToPm(pmToMd(d)), d) �[33m 3720�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P2 — byte fixpoint: pmToMd(mdToPm(pmToMd(d))) === pmToMd(d) �[33m 3508�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P3 — totality: neither converter throws �[33m 3838�[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 44058�[2mms�[22m�[39m
     �[32m✓�[39m every generated nested doc passes schema.nodeFromJSON(...).check()�[32m 296�[2mms�[22m�[39m
�[31m     �[31m×�[31m P1 — semantic round-trip: docsCanonicallyEqual(mdToPm(pmToMd(d)), d)�[39m�[33m 22896�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P2 — byte fixpoint: pmToMd(mdToPm(pmToMd(d))) === pmToMd(d) �[33m 7967�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P3 — totality: neither converter throws �[33m 7399�[2mms�[22m�[39m
     �[33m�[2m✓�[22m�[39m P4 — markdownToProseMirror never throws and always returns a schema-valid doc �[33m 5496�[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 516 tests
{ seed: 887373606, path: "515:472:0:0:0:2:1:1:1:1:1:1:3:3: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", endOnFailure: true }
Counterexample: [{"type":"doc","content":[{"type":"callout","attrs":{"type":"info"},"content":[{"type":"taskList","content":[{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"Ls ) = こんにちは w","marks":[{"type":"highlight","attrs":{"color":"yellow"}}]},{"type":"text","text":"yf2🙂"},{"type":"text","text":"8A0Rt izT4b","marks":[{"type":"code"},{"type":"highlight"}]},{"type":"text","text":"🙂7BcF3t6🙂"},{"type":"text","text":"0b hywB","marks":[{"type":"bold"},{"type":"code"}]},{"type":"text","text":"🚀MS91A9"},{"type":"text","text":"tjaPQ5 S00 TE","marks":[{"type":"link","attrs":{"href":"https://y2opud.ld//m/f/%04//q/K","title":"F 7br"}}]},{"type":"text","text":"h🙂"},{"type":"text","text":"2LTt77","marks":[{"type":"bold"},{"type":"code"}]},{"type":"text","text":"🙂JIu"}]}]},{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"MhX 5DoND","marks":[{"type":"highlight","attrs":{"color":"#ffcc00"}}]},{"type":"mathInline","attrs":{"text":"x^2 + y^2"}},{"type":"text","text":"q4z10Y🙂"},{"type":"text","text":"1","marks":[{"type":"strike"},{"type":"code"}]},{"type":"text","text":"𝐀kk7"},{"type":"mathInline","attrs":{"text":"a < b"}}]}]},{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"indent":null,"textAlign":"center"},"content":[{"type":"text","text":"🙂0 a","marks":[{"type":"code"}]},{"type":"hardBreak"},{"type":"text","text":"# a a🙂"},{"type":"text","text":"🙂A 0","marks":[{"type":"bold"}]}]}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]},{"type":"paragraph","attrs":{"indent":null},"content":[{"type":"text","text":"a a","marks":[{"type":"textStyle","attrs":{"color":"#123456"}}]}]}]}]}]
Shrunk 128 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[0].content[2].content[0].content.length: got=3 want=4�[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 09:35:13
�[2m   Duration �[22m 45.75s�[2m (transform 460ms, setup 2.19s, import 1.99s, tests 55.30s, 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions