Repository navigation
Geode 0.7.0
A last write as each session ends, one Studio setting for every store, scopes on boards, erasure that reaches every kind of store, typed paths for roblox-ts, pruning of keys the template dropped, and leaderstats.
Breaking, in Studio only: every store now defaults to mock when neither it nor Geode.setup sets a mode. Shared stores, boards, the MemoryStore helpers, premades and matchmakers used to default to real, so a playtest no longer reads or writes their live data unless the game sets studio = "real" or "scope". Geode.setup({ studio }) now reaches every store made after it, not just Geode.players: profile stores, shared stores, boards, the MemoryStore helpers and matchmakers follow its mode unless they pass their own studio. In the scope mode, MemoryStore names and messaging topics now get a studio_ prefix as well, so a playtest never talks to live servers. Live servers behave as before.
Added
beforeReleaseon profile stores andGeode.players: one system transaction just before the final save, on every release while the session is still this server's. It hears why:leave,shutdown,handoff,releaseordestroy. It must not yield, it goes through the pipeline and guards, and an error or a rejection is reported while the release goes on. It never runs once the session is lost, and edits and rollbacks from development tools skip itprofile:release(reason)andstore:releaseAll(reason)take the reason the hook hears.store:destroy()releases every profile, stops listening for handoffs and refuses later loads with the load errordestroyedstudio = "auto": in Studio, one read decides. With API access the stores usescope, without it, or in a place that was never published,mock. A read that fails some other way picksmockand is reported. On live servers it does nothing- Every store takes
studio: shared stores, boards, the MemoryStore helpers, premades and matchmakers, as profile stores did. The bridge'sprofilesanswer names the mode in use, neverauto scopeonGeode.Rankedboards, withboard.scope, andGeode.setup({ scope })as the default for profile stores, shared stores and boards that aren't given oneboard:remove(userId)takes a player off a board: an all-time board, or the current window and every window still keptsharedStore:delete(key), andkeyForUseron shared stores soGeode.erasereaches the key of each playerGeode.erase(userId)erases the player on every profile store, every board and every shared store withkeyForUser, and lists each one in its report'sstores. Failures carry the store'skind- Typed paths in the typings. Give
Geode.players,Geode.Profile.storeorGeode.Client.startthe data's type and every path and value is checked against it: list paths only, reads frozen and typed by the path,incrementonly on numbers,appendandinsertonly on lists. Without a type, everything stays as loose as before prune = { version, keep, dryRun }on profile stores andGeode.players: keys the template no longer has are removed on load, after reconciling, as one system transaction. They're archived first in a<name>_prunedDataStore, and when that write fails nothing is removed. Lists, empty template tables and kept paths are left alone.versiongoes up with every template change, and a server never prunes a record that a newer template wrote, nor lowers its version, so rolling deploys are safe. Two templates under one version stop pruning at that version on every server, reported on every load it holds back, until the version is raised. Studio on live data only ever does a dry run. Each load that prunes sendsprunedtelemetry, and the bridge'shellolistspruneleaderstats = { { path, name, order, format } }onGeode.players: an IntValue, NumberValue or StringValue per stat in each player'sleaderstatsfolder, picked from the template's value, kept in step throughobserveand removed when the profile is released. A player who leaves while their data loads never gets any. The game's own objects are never destroyed or replaced: a value it made under a stat's name is used when the class matches, and otherwise that stat is skipped. Both are reported once. Values only go from the data to the player list, so what the game writes to them is never saved- Services have an optional
leaderstatsadapter. Mock servers have one, andserver.playerListreads back what it shows. Itsattachlists the stats it left out inskippedand the game's values it writes to inadopted - Record meta gains
templateVersionandtemplateShape, written only by stores that prune. The shape isclashonce two templates wrote the same version.meta.formatstays1
Changed
- The
mockStudio mode keeps one in-memory server per services table, on the real clock, shared by every store. Before, each profile store made its own store:eraseandGeode.erasealso remove the profile's prune archive, one more request per erase- A shared store that holds a copy of a key whose stored value is gone reads it again past the DataStore cache, so a delete on another server whose message never arrived doesn't leave old data behind
- Docs: values written as a session ends, where Studio keeps data, board scopes, erasure across stores and what Roblox keeps after it, deleting shared keys, typed paths in roblox-ts, pruning and the meta it leaves, and leaderstats
Fixed
replicateonGeode.playersreaches players who were already on the server when it was called and whose data loaded without waiting, as in-memory Studio data does- In Studio without API access, a DataStore read fails with a 502 that says so. It now counts as no access instead of an internal error, so it isn't retried and
studio = "auto"picksmockwithout a report