Holidays nuked all the hot-cached context in my head. I spent a few days just spinning wheels until it repopulated. But the basic idea works now!
Much testing and benchmarking work remains to make sure it's not going to lose data, and that it won't denial-of-service itself (because object-map -> facts fan-out is big).
Also a second giant blog post is due (following the one discussed above). Lots of notes have accumulated.
It will be fun even if the concept ultimately crashes and burns to the ground :)
In which case, there's always datomic and xtdb :D
(def repl-facts
[{:alt.site.evalapply/meta
{:description "Root namespace for a named site."}}
{:alt.site.evalapply/features
{:paid #{:alt.site-feature/feat-1
:alt.site-feature/feat-2
:alt.site-feature/feat-3}
:trial #{:alt.site-feature/feat-4}
:complimentary #{}
:available #{}}}
{:alt.site.evalapply/users
{:authorised #{:alt.user.evalapply/user-1
:alt.user.evalapply/user-2
:alt.user.evalapply/user-3}
:unauthorized #{:alt.root.*}}
:alt.user.evalapply/user-1 {:name {:first "Wiley"
:last "Coyote"}
:roles #{:alt.role.evalapply/owner}}
:alt.role.evalapply/owner {:rw #{:alt.user.evalapply/*}
:ro #{}}}])
(assert-facts! (#'user/system-state)
::app
:alt.root/user-1
(uuid/v7)
repl-facts)
(redact-facts! (#'user/system-state)
::app
:alt.root/user-1
(uuid/v7)
(subvec repl-facts 2))
(read-now! (#'user/system-state)
::app)
(edit: add note about upcoming blog)