Repository navigation
fix: close remaining review items in runtime and Studio - #33
Merged
Merged
Conversation
- contextMutex.Unlock panics on an unlocked mutex instead of blocking. - Metadata pack validation shares one Ajv compiler and evicts each schema from Ajv's identity cache, so in-place edits recompile and memory stays bounded by the LRU. - History equality uses JSON semantics (undefined equals absent), so no-op patches do not record undo steps; drops the fast-deep-equal dependency. - Remove the unused issue.duplicatedTransitionCondition message.
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.
These are the last minor findings from the review of PRs #22–#24.
Runtime:
contextMutex.Unlockon an unlocked mutex panicsBefore this change, a second
Unlockblocked forever on the full token channel, which hid the bug as a deadlock. It now panics, the same waysync.Mutexdoes. The new testTestRuntime_UnlockSinLockEntraEnPanicEnVezDeBloquearcovers it.Studio: one shared Ajv compiler for metadata packs
Before, every distinct schema created its own
Ajv2020instance. Now one compiler withaddUsedSchema: falsecompiles them all, so an edited schema can reuse its$id.After each compile, the schema is removed from Ajv's identity cache. Without this, a schema edited in place would return the stale validator (the existing regression test
revalida esquemas editados…catches that). It also keeps memory bounded by the existing 128-entry LRU.Compiling 128 distinct schemas dropped from about 1.4 s to about 60 ms.
Studio: history equality with JSON semantics
snapshotsEqualnow treats a property set toundefinedthe same as a missing one. A patch like{ field: undefined }on an object without that field no longer records an undo step that changes nothing. The new test covers both the no-op patch and a real change. This also drops thefast-deep-equaldependency; the lockfile was updated with pnpm 10.11.0.Cleanup
issue.duplicatedTransitionCondition(en and es).[Unreleased]CHANGELOG entries.Validation
go vet ./...andgo test -race ./...pass.pnpm lint,typecheck,test(331 + 3 tests),buildandaudit --audit-level=highpass.