Repository navigation
Conversation
…g CoreType switches (cherry picked from commit 3547c94)
…rations table, drop isRef/gc/fillRefs methods (cherry picked from commit b3e1eed)
…gacy refs at every ingress (cherry picked from commit 5dfd3eb)
…torage-epoch fail-fast (cherry picked from commit 3938956)
…lifecycle and using-adoption at call sites (cherry picked from commit ed57355)
Split from 9808cd9: codec test registration, ES2024/Disposable lib, build target, npm engines, and the 0.7.0 version bump.
The CFD table took (CoreType, ValueType) constructor arguments, so a new ValueType could compile without a mapping and FieldValue silently widened to CoreValue. kValueTypeCoreTypes is now the single frozen map; operations derive their CoreType from it, and FieldValue ends in never.
…p values Nested Encodable values were created with a plain JSONDecoder, so refs inside a cyclical payload came back as __r/__d wrappers. A virtual child factory now preserves the parent decoder class and its pooled acquire path. JSONBaseEncoder.convertDictionary copied raw values, so a Date in a map was written as an ISO string while the checksum tagged it as a Date. Each value now goes through convertValue.
…rprint A missing marker rejected any file, including .DS_Store, and told the user to delete data GoatDB does not own. The guard now looks for a known GoatDB artifact, names it, and requires a backup before any delete or move. A fingerprint over fixed encoded fixtures is pinned per epoch, so a codec change fails CI until the epoch is bumped and its fingerprint recorded. Also documents the legacy rich-text ref break and the map-Date fix.
This was referenced Oct 27, 2026
The storage-epoch guard reads and writes store-root files during open. In the browser, OPFS sync access handles exist only in worker context, so those calls must cross the existing json-log worker boundary. This is 07b4eca's code and boundary tests; the epoch-suite rewrite stays on the worker branch.
ofriw
force-pushed
the
pr/66-codec-storage
branch
from
October 27, 2026 10:59
f21e876 to
ceb6c48
Compare
Collaborator
Author
|
Superseded by the reviewed, fully verified replacement stack: https://github.com/goatplatform/goatdb/stack/92
Each complete replacement tip passed full Deno + Node + browser suites on current Deno2.9.1 and actual floor2.3.3, with Node24.14.1 and Playwright1.64.1. Exact tip hashes, scope, dependencies, gates and breaking/data notices are in the new PR bodies. Final tip9e9a759f has 0 failures on all six full runs; the 49-source-commit content audit and independent review passed. Remote Actions status is separate from these measured local gates. Review bottom-up. This replaces the old split, not just its last diff. No PR was merged, no issue was edited, and original remote branches are retained. |
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.
Part 1 of the #66 split (see #66 for the umbrella). This is the core-value and storage half; the refactor is behavior-preserving except where noted under Breaking.
What changed
One type-operation table.
CoreTypedispatch is now two frozen tables:kTypeOpsinbase/core-typesandkTypeOperationsincfds/base/types. TheisRef/gc/fillRefsinstance methods are gone, andCoreTypeis derived from a singlekValueTypeCoreTypesmap so a new value type cannot be forgotten (FieldValuenow ends inneveras a compile-time completeness check).One Date wire format. A
Dateis always encoded as{ "__t": "D", "__v": <epoch-seconds> }, including insidemapfields, and the checksum is redefined accordingly. Legacy bare-number dates are rejected with an explicit message.Storage epoch fail-fast. A store root records
kStorageFormatEpoch(currently1). The guard runs before repositories open, ignores unrelated files (.DS_Store, user documents), names the offending GoatDB artifact, and demands a backup instead of silently resetting. A codec fingerprint test pins the epoch to the wire formats it protects, so a codec change cannot ship without a bump.Leak-safe decoder pool.
JSONCyclicalDecoderinstances areDisposable; call sites useusing, and the pool returns instances on every path (including decode errors).Legacy richtext refs. Dead ref/richtext code is deleted; legacy refs are rejected at every ingress instead of being half-supported.
Worker-owned file I/O. File access used by the storage epoch runs inside the json-log worker. Main-thread OPFS has no
createSyncAccessHandle, so the boundary is required, not cosmetic. A guard test (WorkerBoundary) blocks new direct importers offile-impl.ts.Gates. ES2024 lib,
deno task check, esbuild targetes2022, Node engines>=24, version0.7.0, and the core-value characterization tests.Breaking
CoreType/value-type tables and the removal ofisRef/gc/fillRefs.Verification
deno task checkclean;deno task buildleaves assets clean..DS_Storestore opens,.goatroot/nested artifact rejection naming the entry, mismatched marker requires a backup, codec fingerprint,ValueTypemap totality, legacy-ref wording.Stack: this is the base of
pr/66-jsonlog-workerandpr/66-infra-cli-ci-npm.Stack position
This PR is the bottom layer of GitHub stack #80 (
main ← #74 ← #75 ← #76 ← #77 ← #78).branch protection against the stack base (
main), so each layer is CI-verified eventhough it targets the branch below it.
gh stack checkout 80(requires thegh-stackextension).