You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
entity_model_test.clj guards the JVM-heap entities (Library, Namespace, Var) and the EDN-file entity (DialectCompat) against the running system, but it never connects to MongoDB. Every Mongo entity in entity-attribute-model.edn — Example, ExampleHistory, Note, SeeAlso, User, LegacyVarRedirect — and all their cardinalities and coverage figures (examples 2671, see-alsos 2494, users 4902, editors 1708/2671, deleted-at 54/2671, …) rest solely on a one-time dev/sidecar_repl.clj run against a snapshot. They carry :status {:state :exists :verified "2026-06-09"} with the same confidence as the tested entities, and the test-ns docstring claims REPL-verified findings are "now permanently guarded" — which is only true for the in-process entities. These numbers will drift as the database changes and nothing catches it.
Steps to Reproduce
Read the :require in test/clojuredocs/entity_model_test.clj — no congomongo, no DB connection.
Note assertions exist only for search/clojure-lib, static, compat, api.common.
Change any Mongo cardinality in docs/entity-attribute-model.edn (e.g. examples → 9999) and run lein test clojuredocs.entity-model-test.
Observed: tests pass.
Expected: a test fails when a documented Mongo cardinality no longer matches the database.
Context
The model's value is the reliability ratchet — REPL findings hardened into tests. That ratchet stops at the MongoDB boundary. Options: (a) a DB-backed test tier that runs against seed data (data/mongodb/) and asserts key-universe + cardinalities; (b) downgrade the Mongo entities' status to reflect that they are snapshot-derived, not test-guarded; (c) both. Surfaced while verifying the model for #43.
References
test/clojuredocs/entity_model_test.clj
docs/entity-attribute-model.edn — Mongo entities: example, example-history, note, see-also, user, legacy-var-redirect
dev/sidecar_repl.clj L114-125 (the one-time counts)
Problem
entity_model_test.cljguards the JVM-heap entities (Library, Namespace, Var) and the EDN-file entity (DialectCompat) against the running system, but it never connects to MongoDB. Every Mongo entity inentity-attribute-model.edn— Example, ExampleHistory, Note, SeeAlso, User, LegacyVarRedirect — and all their cardinalities and coverage figures (examples 2671, see-alsos 2494, users 4902,editors1708/2671,deleted-at54/2671, …) rest solely on a one-timedev/sidecar_repl.cljrun against a snapshot. They carry:status {:state :exists :verified "2026-06-09"}with the same confidence as the tested entities, and the test-ns docstring claims REPL-verified findings are "now permanently guarded" — which is only true for the in-process entities. These numbers will drift as the database changes and nothing catches it.Steps to Reproduce
:requireintest/clojuredocs/entity_model_test.clj— nocongomongo, no DB connection.search/clojure-lib,static,compat,api.common.docs/entity-attribute-model.edn(e.g. examples → 9999) and runlein test clojuredocs.entity-model-test.Context
The model's value is the reliability ratchet — REPL findings hardened into tests. That ratchet stops at the MongoDB boundary. Options: (a) a DB-backed test tier that runs against seed data (
data/mongodb/) and asserts key-universe + cardinalities; (b) downgrade the Mongo entities' status to reflect that they are snapshot-derived, not test-guarded; (c) both. Surfaced while verifying the model for #43.References
test/clojuredocs/entity_model_test.cljdocs/entity-attribute-model.edn— Mongo entities:example,example-history,note,see-also,user,legacy-var-redirectdev/sidecar_repl.cljL114-125 (the one-time counts)