Repository navigation
test(outliner, db): tests for operator changes the suite let through - #13679
Open
yuxi-liu-wired wants to merge 10 commits into
Open
yuxi-liu-wired wants to merge 10 commits into
yuxi-liu-wired wants to merge 10 commits into
Conversation
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 11, 2026
This was referenced Oct 12, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 13, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 16, 2026
yuxi-liu-wired
force-pushed
the
test/mutation-library-tests
branch
5 times, most recently
from
October 22, 2026 11:01
9cee638 to
ff758a8
Compare
yuxi-liu-wired
force-pushed
the
test/mutation-library-tests
branch
5 times, most recently
from
October 31, 2026 11:00
25c1cb3 to
33e4df1
Compare
yuxi-liu-wired
force-pushed
the
test/mutation-library-tests
branch
from
November 3, 2026 12:00
33e4df1 to
0e75e52
Compare
yuxi-liu-wired
force-pushed
the
test/mutation-library-tests
branch
7 times, most recently
from
November 18, 2026 14:37
7b3cba7 to
09ef9c5
Compare
Catches mutant 174:if->if-not@7111 in normalize-extends-value.
Covers many-value replacement, default-value input parsing, property rename validation and many-to-one guard, unchanged-schema upserts, upsert :properties, closed choices on many number properties, the validation message, blank page values, self values in collections and which created values batch-remove-property! deletes.
…nd deleted ids from tx-data
…inverse order and choice, stale ids
…operty lookups as they are
…d bidirectional properties edge cases
yuxi-liu-wired
force-pushed
the
test/mutation-library-tests
branch
from
November 19, 2026 12:00
09ef9c5 to
b888bd3
Compare
This branch has not been deployed
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.
Tests only. No source changes.
These tests come from mutation testing: each change of one operator in the source (
=tonot=,andtoor,firsttolast,whentowhen-notand so on) that the existing tests let through. Each new test passes on master and fails on at least one such change. Changes that no test could observe (for examplefirstandlastof a collection that always holds one item) got no test.What the tests cover
deps/outliner/test/logseq/outliner/property_mutation_test.cljs(logseq.outliner.property)::logseq.property.class/extendsto two unrelated parents keeps bothbatch-set-property!with a collection replaces a:manyproperty's values:numberand:defaultproperties are converted by the property's typeupsert-property!with an unchanged schema leaves the property untouched, and sets the given properties:many:numberproperty:nodevaluebatch-remove-property!deletes only the values no other block uses (shared numbers, ordinary blocks and closed choices stay)deps/outliner/test/logseq/outliner/op/construct_mutation_test.cljs(logseq.outliner.op.construct, the ops used by undo/redo and sync)::create-page,:insert-blocksand:delete-blockstake their uuids and ids from the transaction data (entity maps, datom maps and[:db/add ...]/[:db/retractEntity ...]vectors)deps/db/test/logseq/db_mutation_test.cljs(logseq.db)::block.temp/*attributes are dropped; a page with a block parent is rejected; a transaction without changes commits nothing; the failure log follows its suppress flags; entities given as bare items are dropped; deleting blocks retracts their childrenbatch-transact-with-temp-conn!builds no tx metaget-downof nil are nil; journal page lookup by day at its edgespage-empty?and orphaned pages;sort-page-random-blocksleaves out property value blocks and keeps the given order of siblings sharing an orderChecks
logseq.outliner.property-mutation-testandlogseq.outliner.op.construct-mutation-test29 tests, 87 assertions;logseq.db-mutation-test21 tests, 47 assertions; 0 failures, 0 errors.--lint src test), carve, large-vars, ns-docstrings and minimize-public-vars clean indeps/outlineranddeps/db.Which mutants each test catches
Each row: a change of one operator in the source (at the commit the mutation pass ran on) that the existing tests let through and this test fails on.
register-transact-fn-receives-transact-of-a-repo-testdeps/db/src/logseq/db.cljsregister-transact-fn!when→when-not(when f (reset! *transact-fn f)))register-transact-fn-receives-transact-of-a-repo-testdeps/db/src/logseq/db.cljstransact!and→orexpand-deletes? (and (not (string? repo-or-conn))register-transact-fn-receives-transact-of-a-repo-testdeps/db/src/logseq/db.cljstransact!if→if-nottx-data (if expand-deletes?register-transact-invalid-callback-fn-is-told-of-invalid-data-testdeps/db/src/logseq/db.cljsregister-transact-invalid-callback-fn!when→when-not(when f (reset! *transact-invalid-callback f)))transact-drops-block-temp-attributes-testdeps/db/src/logseq/db.cljsremove-temp-block-dataseq→empty?(seq (:block/refs data))transact-drops-block-temp-attributes-testdeps/db/src/logseq/db.cljsremove-temp-block-datafirst→last(contains? #{:db/add :db/retract} (first data))transact-drops-entities-given-as-bare-items-testdeps/db/src/logseq/db.cljstransact!or→and(remove (fn [m] (or ;; db/idtransact-rejects-a-page-with-a-block-parent-testdeps/db/src/logseq/db.cljsthrow-if-page-has-block-parent!=→not=(= :block/parent (:a d))transact-without-changes-commits-nothing-testdeps/db/src/logseq/db.cljstransact-syncand→or(and tx-report (seq (:tx-data tx-report)))transact-failed-log-follows-suppress-flags-testdeps/db/src/logseq/db.cljstransact-syncor→and(when-not (or (:db-sync/suppress-transact-failed-log? tx-meta)transact-failed-log-follows-suppress-flags-testdeps/db/src/logseq/db.cljstransact-syncand→or(and (:db-sync/suppress-stale-rebase-transact-failed-log? tx-meta)transact-failed-log-follows-suppress-flags-testdeps/db/src/logseq/db.cljstransact-sync=→not=(= :entity-id/missing (:error (ex-data e)))))transact-delete-blocks-retracts-children-testdeps/db/src/logseq/db.cljstransact!if→if-nottx-data (if expand-deletes?batch-transact-with-temp-conn-empty-batch-builds-no-tx-meta-testdeps/db/src/logseq/db.cljsbatch-transact-with-temp-conn!and→or(when (and @*complete? (seq tx-data))siblings-and-down-of-nil-are-nil-testdeps/db/src/logseq/db.cljsget-right-siblingnil?→some?(assert (or (de/entity? block) (nil? block)))siblings-and-down-of-nil-are-nil-testdeps/db/src/logseq/db.cljsget-left-siblingnil?→some?(assert (or (de/entity? block) (nil? block)))siblings-and-down-of-nil-are-nil-testdeps/db/src/logseq/db.cljsget-downnil?→some?(assert (or (de/entity? block) (nil? block)))get-journal-page-by-day-edges-testdeps/db/src/logseq/db.cljsget-journal-page-by-dayand→or(when (and db journal-day)get-journal-page-by-day-edges-testdeps/db/src/logseq/db.cljsget-journal-page-by-dayfirst→last(when-let [eid (some-> (first (d/datoms db :avet :block/journal-day journal-day)page-empty-and-orphaned-pages-testdeps/db/src/logseq/db.cljspage-empty?if→if-not(let [page-id (if (string? page-id)page-empty-and-orphaned-pages-testdeps/db/src/logseq/db.cljsget-orphaned-pagesnot→identity(not (journal? page))))sort-page-random-blocks-leaves-out-property-value-blocks-testdeps/db/src/logseq/db.cljsblock-order-pathor→and(if (or (:logseq.property/created-from-property block)sort-page-random-blocks-keeps-given-order-of-siblings-sharing-an-order-testdeps/db/src/logseq/db.cljscompare-order-pathsnil?→some?(and (nil? path-1) (nil? path-2)) 0get-alias-source-page-of-an-alias-of-2-pages-is-the-older-testdeps/db/src/logseq/db.cljsget-alias-source-pagefirst→last(first (:block/_alias (d/entity db alias-id)))))get-graph-rtc-uuid-testdeps/db/src/logseq/db.cljsget-graph-rtc-uuidwhen→when-not(when db (get-key-value db :logseq.kv/graph-uuid)))get-bidirectional-properties-custom-title-testdeps/db/src/logseq/db.cljsbuild-bidirectional-property-groupif→if-not(if (string? custom)get-bidirectional-properties-without-target-is-nil-testdeps/db/src/logseq/db.cljsget-bidirectional-propertiesand→or(when (and db target-idget-bidirectional-properties-ignores-recycled-classes-testdeps/db/src/logseq/db.cljsget-bidirectional-propertiesand→or(when (and (not (built-in? class-ent))get-bidirectional-properties-ignores-db-attributes-testdeps/db/src/logseq/db.cljsbidirectional-property-attr?and→or(and (or (db-property/user-property-namespace? attr-ns)derive-history-outliner-ops-resolves-block-maps-to-uuids-testdeps/outliner/src/logseq/outliner/op/construct.cljcstable-entity-refor→and(let [eid (or (:db/id x)derive-history-outliner-ops-save-block-marks-refs-created-in-tx-testdeps/outliner/src/logseq/outliner/op/construct.cljcsanitize-block-payloadwhen→when-notcreated-ref-uuids (when (and (seq created-uuids) (seq refs))derive-history-outliner-ops-save-block-marks-refs-created-in-tx-testdeps/outliner/src/logseq/outliner/op/construct.cljcsanitize-block-payloadseq→empty?created-ref-uuids (when (and (seq created-uuids) (seq refs))derive-history-outliner-ops-save-block-marks-refs-created-in-tx-testdeps/outliner/src/logseq/outliner/op/construct.cljcsanitize-block-payloadseq→empty?created-ref-uuids (when (and (seq created-uuids) (seq refs))derive-history-outliner-ops-save-block-marks-refs-created-in-tx-testdeps/outliner/src/logseq/outliner/op/construct.cljcsanitize-block-payloadseq→empty?(seq created-ref-uuids)derive-history-outliner-ops-save-block-marks-refs-created-in-tx-testdeps/outliner/src/logseq/outliner/op/construct.cljccreated-block-uuids-from-tx-data>=→>(>= (count item) 4)rewrite-block-title-with-retracted-refs-restores-missing-ref-testdeps/outliner/src/logseq/outliner/op/construct.cljcget-missing-ref-by-lookupor→and:block/title (or title "")rewrite-block-title-with-retracted-refs-restores-missing-ref-testdeps/outliner/src/logseq/outliner/op/construct.cljcrewrite-block-title-with-retracted-refsseq→empty?(seq retracted-refs)derive-history-outliner-ops-create-page-finds-created-uuid-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljccreated-page-uuid-from-tx-datawhen→when-not(when (and (map? item)derive-history-outliner-ops-create-page-finds-created-uuid-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljccreated-page-uuid-from-tx-dataand→or(when (and (map? item)derive-history-outliner-ops-create-page-finds-created-uuid-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljccreated-page-uuid-from-tx-data=→not=(= title (:block/title item))derive-history-outliner-ops-create-page-finds-created-uuid-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljccreated-page-uuid-from-tx-dataand→or(when (and (= :block/title (:a datom))derive-history-outliner-ops-create-page-finds-created-uuid-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljccreated-page-uuid-from-tx-dataand→or(when (and (= title title') (uuid? uuid'))derive-history-outliner-ops-delete-blocks-takes-ids-retracted-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-ids=→not=(= :db/retractEntity (first item))derive-history-outliner-ops-delete-blocks-takes-ids-retracted-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-idsfirst→last(= :db/retractEntity (first item))derive-history-outliner-ops-delete-blocks-takes-ids-retracted-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-ids>=→>(>= (count item) 2))derive-history-outliner-ops-delete-blocks-takes-ids-retracted-in-tx-data-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-ids=→not=(= :block/uuid (:a item)))derive-history-outliner-ops-delete-blocks-takes-created-uuids-for-missing-lookups-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-idsseq→empty?unresolved-created-lookups? (and (seq created-uuids)derive-history-outliner-ops-delete-blocks-takes-created-uuids-for-missing-lookups-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-ids=→not=(= (count ids') (count created-uuids))derive-history-outliner-ops-delete-blocks-takes-created-uuids-for-missing-lookups-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-idsand→or(and (vector? id)derive-history-outliner-ops-delete-blocks-takes-created-uuids-for-missing-lookups-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-ids=→not=(= :block/uuid (first id))derive-history-outliner-ops-delete-blocks-takes-created-uuids-for-missing-lookups-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-idsfirst→last(= :block/uuid (first id))derive-history-outliner-ops-delete-blocks-takes-created-uuids-for-missing-lookups-testdeps/outliner/src/logseq/outliner/op/construct.cljcmaybe-rewrite-delete-block-idsnil?→some?(nil? (d/entity db id))))derive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljcinserted-block-uuids-from-tx-datasome?→nil?(some? (:a item)) (:e item)derive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljcinserted-block-uuids-from-tx-dataor→and:else (or (:db/id item) [:block/uuid (:block/uuid item)])))derive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljcinserted-block-uuids-from-tx-dataand→or(and (= :block/parent (:a item))derive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljcinserted-block-uuids-from-tx-data=→not=(and (= :block/parent (:a item))derive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljcinserted-block-uuids-from-tx-data=→not=(= :block/parent (nth item 2 nil))))))derive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-opsif→if-notblocks (if (= :insert-blocks op) (first args') (get-in args' [2 :template-blocksderive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-ops=→not=blocks (if (= :insert-blocks op) (first args') (get-in args' [2 :template-blocksderive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-opsfirst→lastblocks (if (= :insert-blocks op) (first args') (get-in args' [2 :template-blocksderive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-opsnot→identity(assoc :available (filterv #(not (contains? inserted-uuids %)) available))))derive-history-outliner-ops-insert-blocks-takes-uuids-of-inserted-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-explicit-outliner-op-groupsfirst→last(let [canonicalized-op (if (contains? #{:insert-blocks :apply-template} (first oderive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcreplaces-empty-target?or→and(and (or (:replace-empty-target? opts)derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcreplaces-empty-target?and→or(and (:sibling? opts) (> (count source-uuids) 1)))derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcreplaces-empty-target?>→>=(and (:sibling? opts) (> (count source-uuids) 1)))derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcreplaces-empty-target?first→last(or (= (first source-uuids) (:block/uuid (d/entity db target-ref)))derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcreplaces-empty-target?=→not=(= :db/add (first item))]derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcreplaces-empty-target?first→last(= :db/add (first item))]derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcreplaces-empty-target?and→or(and (= :block/title a) (false? added?)derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcreplaces-empty-target?=→not=(and (= :block/title a) (false? added?)derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-blocks-opor→and(if (or replaced-target?derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-blocks-opand→or(and (:replace-empty-target? opts)derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-blocks-op=→not=(= (inc (count created-uuids)) (count source-blocks))))derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-blocks-opinc→dec(= (inc (count created-uuids)) (count source-blocks))))derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-blocks-opif→if-not(if (seq created-rst-uuids)derive-history-outliner-ops-insert-blocks-replaces-empty-target-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-blocks-opseq→empty?(if (seq created-rst-uuids)derive-history-outliner-ops-move-blocks-inverse-restores-in-page-order-testdeps/outliner/src/logseq/outliner/op/construct.cljccompare-document-ordernil?→some?(nil? path-1) -1derive-history-outliner-ops-move-blocks-inverse-restores-in-page-order-testdeps/outliner/src/logseq/outliner/op/construct.cljccompare-document-ordernil?→some?(nil? path-2) 1derive-history-outliner-ops-move-blocks-inverse-restores-in-page-order-testdeps/outliner/src/logseq/outliner/op/construct.cljccompare-document-orderif→if-not(if (zero? c)derive-history-outliner-ops-move-blocks-up-down-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcopposite-move-restores?seq→empty?(seq top-level-blocks)derive-history-outliner-ops-move-blocks-up-down-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcopposite-move-restores?=→not=(= (:db/id left) (:db/id (ldb/get-left-sibling right))))derive-history-outliner-ops-move-blocks-up-down-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcopposite-move-restores?some?→nil?(some? (if up?derive-history-outliner-ops-move-blocks-up-down-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcopposite-move-restores?if→if-not(some? (if up?derive-history-outliner-ops-move-blocks-up-down-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcopposite-move-restores?first→last(ldb/get-left-sibling (first top-level-blocks))derive-history-outliner-ops-move-blocks-up-down-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcopposite-move-restores?last→first(ldb/get-right-sibling (last top-level-blocks)))))))derive-history-outliner-ops-inverse-reverses-groups-of-different-sizes-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonical-move-op-for-blockor→and(assoc (dissoc (or opts {}) :outliner-op)derive-history-outliner-ops-inverse-reverses-groups-of-different-sizes-testdeps/outliner/src/logseq/outliner/op/construct.cljcreverse-inverse-entry-groupsfirst→last(if-let [group-size (first sizes)]derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljchas-replace-empty-target-insert-op?and→or(and (contains? #{:insert-blocks :apply-template} op)derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-opsfirst→last(filter #(contains? #{:insert-blocks :apply-template} (first %)))derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-opsfirst→last(first args)derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-opsor→and(->> (or blocks [])derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-ops=→not=(if (and (= :delete-blocks op)derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-opsseq→empty?(seq @forward-insert-ops*))derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-opsfirst→last(let [ids (op->inserted-ids (first @forward-insert-ops*))]derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-opsif→if-not(if (seq ids)derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-opsseq→empty?(if (seq ids)derive-history-outliner-ops-explicit-inverse-deletes-take-inserted-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcderive-history-outliner-opsnil?→some?(nil? explicit-inverse-outliner-ops)derive-history-outliner-ops-undo-picks-built-or-explicit-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcbuild-inverse-insert-likeand→or(when (and (= :block/uuid (:a d))derive-history-outliner-ops-undo-picks-built-or-explicit-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcpatch-inverse-delete-block-ops=→not=(if (and (= :delete-blocks op)derive-history-outliner-ops-undo-picks-built-or-explicit-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcderive-history-outliner-opsand→or(and (= :apply-template (:outliner-op tx-meta))derive-history-outliner-ops-undo-picks-built-or-explicit-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcderive-history-outliner-ops=→not=(and (= :apply-template (:outliner-op tx-meta))derive-history-outliner-ops-undo-picks-built-or-explicit-inverse-testdeps/outliner/src/logseq/outliner/op/construct.cljcderive-history-outliner-opsseq→empty?(seq (:db-sync/inverse-outliner-ops tx-meta)))derive-history-outliner-ops-rejects-stale-numeric-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-template-opand→or(when-not (and template-ref target-ref)derive-history-outliner-ops-rejects-stale-numeric-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-opsif→if-notblocks (if (= :insert-blocks op) (first args') (get-in args' [2 :template-blocksderive-history-outliner-ops-rejects-stale-numeric-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-insert-ops=→not=blocks (if (= :insert-blocks op) (first args') (get-in args' [2 :template-blocksderive-history-outliner-ops-rejects-stale-numeric-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-semantic-outliner-opor→and(cond-> (or opts {})derive-history-outliner-ops-rejects-stale-numeric-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcstale-numeric-id-in-page-ops?or→and(or (some #(numeric-id-in-block-ref-attrs? db %) blocks)derive-history-outliner-ops-rejects-stale-numeric-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcstale-numeric-id-in-page-ops?or→and(or (unresolved-numeric-entity-id? template-id)derive-history-outliner-ops-rejects-stale-numeric-ids-testdeps/outliner/src/logseq/outliner/op/construct.cljcstale-numeric-id-in-op?not=→=(and (not= :transact op)derive-history-outliner-ops-forward-op-shapes-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonicalize-semantic-outliner-opor→and(cond-> (or opts {})derive-history-outliner-ops-forward-op-shapes-testdeps/outliner/src/logseq/outliner/op/construct.cljcnormalize-op-entriesfirst→last(and (keyword? (first ops'))derive-history-outliner-ops-forward-op-shapes-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonical-block-idand→or(and (integer? block-id)derive-history-outliner-ops-forward-op-shapes-testdeps/outliner/src/logseq/outliner/op/construct.cljccanonical-property-idand→or(and (integer? property-id)derive-history-outliner-ops-inverse-needs-every-block-and-a-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcdelete-root->restore-planand→or(when (and (seq blocks) (some? target-id))derive-history-outliner-ops-inverse-needs-every-block-and-a-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcbuild-inverse-delete-blocksand→or(when (and (not incomplete?)derive-history-outliner-ops-inverse-needs-every-block-and-a-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcmove-root->restore-opand→or(when (and (some? root-id)derive-history-outliner-ops-inverse-needs-every-block-and-a-target-testdeps/outliner/src/logseq/outliner/op/construct.cljcbuild-inverse-move-blocksand→or(when (and (not incomplete?)derive-history-outliner-ops-delete-inverse-defers-refs-to-later-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljcsplit-block-refsif→if-not[(if (seq out) (assoc block' k (set out)) (dissoc block' k))derive-history-outliner-ops-delete-inverse-defers-refs-to-later-blocks-testdeps/outliner/src/logseq/outliner/op/construct.cljcsplit-block-refsseq→empty?[(if (seq out) (assoc block' k (set out)) (dissoc block' k))extends-with-two-unrelated-parents-keeps-bothdeps/outliner/src/logseq/outliner/property.cljsnormalize-extends-valueif→if-not(if (single-entity-ref? value)batch-set-property-collection-replaces-many-valuesdeps/outliner/src/logseq/outliner/property.cljsbuild-property-value-tx-data=→not=multiple-values? (= :db.cardinality/many (:db/cardinality property))convert-property-input-string-parses-default-value-of-number-propertydeps/outliner/src/logseq/outliner/property.cljsconvert-property-input-stringand→or(and (= (:db/ident property) :logseq.property/default-value)convert-property-input-string-parses-default-value-of-number-propertydeps/outliner/src/logseq/outliner/property.cljsconvert-property-input-string=→not=(and (= (:db/ident property) :logseq.property/default-value)upsert-property-rename-validates-new-namedeps/outliner/src/logseq/outliner/property.cljsvalidate-property-name-updatenot=→=(when (and (some? property-name) (not= property-name (:block/title property)))upsert-property-rename-property-with-valuesdeps/outliner/src/logseq/outliner/property.cljsschema-for-updateand→or(let [many->one? (and (db-property/many? property)upsert-property-rename-property-with-valuesdeps/outliner/src/logseq/outliner/property.cljsupdate-propertynot=→=(and (some? property-name) (not= property-name (:block/title property)))upsert-property-with-unchanged-schema-leaves-property-untoucheddeps/outliner/src/logseq/outliner/property.cljsupdate-propertyand→or(and (seq schema)upsert-property-with-unchanged-schema-leaves-property-untoucheddeps/outliner/src/logseq/outliner/property.cljsupdate-propertyand→or(and (:db/cardinality schema) (not= (:db/cardinality schema) (keyword (name (:dbupsert-property-with-unchanged-schema-leaves-property-untoucheddeps/outliner/src/logseq/outliner/property.cljsupdate-propertyand→or(and (= :default (:logseq.property/type schema)) (not= :db.type/ref (:db/valueTyupsert-property-with-unchanged-schema-leaves-property-untoucheddeps/outliner/src/logseq/outliner/property.cljsupdate-property=→not=(and (= :default (:logseq.property/type schema)) (not= :db.type/ref (:db/valueTyupsert-property-with-unchanged-schema-leaves-property-untoucheddeps/outliner/src/logseq/outliner/property.cljsupdate-propertynot=→=(and (= :default (:logseq.property/type schema)) (not= :db.type/ref (:db/valueTyupsert-property-with-unchanged-schema-leaves-property-untoucheddeps/outliner/src/logseq/outliner/property.cljsupdate-propertyseq→empty?(seq (entity-plus/lookup-kv-then-entity property :property/closed-values))))upsert-property-sets-given-propertiesdeps/outliner/src/logseq/outliner/property.cljsupdate-propertywhen→when-not(when (seq properties)upsert-property-sets-given-propertiesdeps/outliner/src/logseq/outliner/property.cljsupdate-propertyseq→empty?(when (seq properties)upsert-closed-value-on-many-number-propertydeps/outliner/src/logseq/outliner/property.cljsvalidate-property-value-auxnot→identity(let [value' (if (and many? (not (sequential? value)))invalid-property-value-message-shows-first-errordeps/outliner/src/logseq/outliner/property.cljsvalidate!if→if-noterror-msg (str "Property validation failed: \"" (:block/title property) "\" " (iset-page-property-to-blank-string-is-rejecteddeps/outliner/src/logseq/outliner/property.cljsconvert-ref-property-valueor→and(if (or (string/blank? v) (not (string? v)))batch-set-property-rejects-own-block-in-collectiondeps/outliner/src/logseq/outliner/property.cljsthrow-error-if-self-valueor→and(let [values (if (or (sequential? value) (set? value)) value [value])]batch-remove-property-deletes-only-unshared-created-valuesdeps/outliner/src/logseq/outliner/property.cljsbatch-remove-property!nil?→some?(nil? value-referrers*)batch-remove-property-deletes-only-unshared-created-valuesdeps/outliner/src/logseq/outliner/property.cljsbatch-remove-property!and→or(andbatch-remove-property-deletes-only-unshared-created-valuesdeps/outliner/src/logseq/outliner/property.cljsbatch-remove-property!not→identity(not (or (entity-util/page? value) (ldb/closed-value? value)))batch-remove-property-deletes-only-unshared-created-valuesdeps/outliner/src/logseq/outliner/property.cljsbatch-remove-property!or→and(not (or (entity-util/page? value) (ldb/closed-value? value)))batch-remove-property-deletes-only-unshared-created-valuesdeps/outliner/src/logseq/outliner/property.cljsbatch-remove-property!empty?→seq(empty? (set/difference value-referrers block-id-set)))))batch-remove-property-deletes-only-unshared-created-valuesdeps/outliner/src/logseq/outliner/property.cljsbatch-remove-property!when→when-notretract-blocks-tx (when (seq deleting-entities)batch-remove-property-deletes-only-unshared-created-valuesdeps/outliner/src/logseq/outliner/property.cljsbatch-remove-property!seq→empty?retract-blocks-tx (when (seq deleting-entities)