perf(core): optimize bridge bindings and buffer safety#145
Conversation
* Optimize bindMap to use MapRange and dedicated integer key formatting over fmt.Sprint * Optimize bindSlice to fast-path []byte natively using ToUint8Array * Safely copy byte slices in ToArrayBuffer and ToUint8Array to prevent unisolated JS mutation Co-authored-by: repyh <63894915+repyh@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
📝 WalkthroughWalkthroughBridge-level buffer helpers now copy input bytes to avoid aliasing; reflection binding uses a byte-slice fast-path and MapRange with integer-key formatting. CLI and ecosystem changes add loading of typego.modules.json, pinning go: imports (go get for pinned deps) during run/build flows and adjust fetching to include pinned versions; examples and temp module files updated accordingly. ChangesBridge: buffer & reflection
CLI / ecosystem: pinned dependency handling
Sequence Diagram(s)sequenceDiagram
participant CLI as Client (typego CLI)
participant Config as Config Loader (LoadConfig)
participant Fetcher as Module Fetcher (fetcher.Get)
participant GoTool as go tool (go get / go build)
participant TempFS as Temp Build Dir
CLI->>Config: Load typego.modules.json (cwd)
CLI->>TempFS: create temp build dir
CLI->>GoTool: for each pinned dep run `go get dep@version` (in TempFS)
CLI->>Fetcher: fetch go: imports with appended `@version`
Fetcher->>TempFS: write fetched module into temp dir
CLI->>GoTool: run `go mod tidy` / `go build` in TempFS
GoTool-->>CLI: build result / errors
(Note: rectangles use default participant styling; interactions show the version-pinning flow.) Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bridge/core/reflection.go`:
- Around line 381-389: The switch in reflection.go that coerces int/uint map
keys via strconv loses enum-like symbolic names when the named integer type
implements fmt.Stringer; change the int/uint cases in the switch that handles
key.Kind() so they first detect Stringer support and use the Stringer output
(via key.Interface() cast to fmt.Stringer or fmt.Sprint(key.Interface())) before
falling back to strconv.FormatInt/FormatUint. Use
reflect.TypeOf((*fmt.Stringer)(nil)).Elem() and check both
key.Type().Implements(...) and reflect.PtrTo(key.Type()).Implements(...) to
cover value and pointer receivers, and only call strconv when the type does not
implement fmt.Stringer; keep the String and default cases unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e39b5774-2e38-4235-b87d-37c6f5b32419
📒 Files selected for processing (2)
bridge/core/arraybuffer.gobridge/core/reflection.go
| switch key.Kind() { | ||
| case reflect.String: | ||
| keyStr = key.String() | ||
| } else { | ||
| case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: | ||
| keyStr = strconv.FormatInt(key.Int(), 10) | ||
| case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: | ||
| keyStr = strconv.FormatUint(key.Uint(), 10) | ||
| default: | ||
| keyStr = fmt.Sprint(key.Interface()) |
There was a problem hiding this comment.
Preserve Stringer behavior for named integer map keys.
On Line 384-Line 387, forcing all int/uint keys through strconv changes prior behavior for enum-like key types implementing String() (keys can change from symbolic names to numeric strings), which can break JS consumers relying on current key names.
💡 Suggested fix
for iter.Next() {
key := iter.Key()
var keyStr string
+ keyIface := key.Interface()
+
+ if s, ok := keyIface.(fmt.Stringer); ok {
+ keyStr = s.String()
+ } else {
+ switch key.Kind() {
+ case reflect.String:
+ keyStr = key.String()
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ keyStr = strconv.FormatInt(key.Int(), 10)
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ keyStr = strconv.FormatUint(key.Uint(), 10)
+ default:
+ keyStr = fmt.Sprint(keyIface)
+ }
+ }
-
- switch key.Kind() {
- case reflect.String:
- keyStr = key.String()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- keyStr = strconv.FormatInt(key.Int(), 10)
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- keyStr = strconv.FormatUint(key.Uint(), 10)
- default:
- keyStr = fmt.Sprint(key.Interface())
- }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@bridge/core/reflection.go` around lines 381 - 389, The switch in
reflection.go that coerces int/uint map keys via strconv loses enum-like
symbolic names when the named integer type implements fmt.Stringer; change the
int/uint cases in the switch that handles key.Kind() so they first detect
Stringer support and use the Stringer output (via key.Interface() cast to
fmt.Stringer or fmt.Sprint(key.Interface())) before falling back to
strconv.FormatInt/FormatUint. Use reflect.TypeOf((*fmt.Stringer)(nil)).Elem()
and check both key.Type().Implements(...) and
reflect.PtrTo(key.Type()).Implements(...) to cover value and pointer receivers,
and only call strconv when the type does not implement fmt.Stringer; keep the
String and default cases unchanged.
* Updated `pkg/cli/cmd/build.go` and `run.go` to explicitly retrieve external dependency versions defined in `typego.modules.json` and pass them to `go get` and `fetcher.Get` when resolving dependencies for the compiled shim. * This ensures module compatibilities (such as Go version minimum constraints like go1.25 for gin@v1.12.0) are respected and not blindly overridden by `latest`. Co-authored-by: repyh <63894915+repyh@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
pkg/cli/cmd/build.go (1)
126-129:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUse
config.Compiler.GoVersioninstead of hardcoding the Go version.The go.mod files in both
build.goandrun.gohardcodego 1.23.6, ignoring the loaded config'sCompiler.GoVersion. When a user sets a specific Go version in their config, this hardcoded version takes precedence and can cause dependency resolution failures. Useconfig.Compiler.GoVersionand fall back to a default only when the config is unavailable or omits the value.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/cli/cmd/build.go` around lines 126 - 129, Replace the hardcoded go version string used to build go.mod (the goModContent variable in pkg/cli/cmd/build.go) with a value taken from config.Compiler.GoVersion, falling back to a sensible default when config or Compiler.GoVersion is empty; update the same pattern in run.go if present so both use config.Compiler.GoVersion rather than the literal "1.23.6" and ensure the fallback default is used only when the config value is missing.pkg/cli/cmd/run.go (1)
150-153:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUse
config.Compiler.GoVersioninstead of hardcoding Go 1.23.6 in the go.mod template.The hardcoded version in lines 150-153 prevents users from configuring their required Go version via
typego.modules.json. When dependencies specify a higher minimum Go version,go getorgo buildwill fail. Theconfigvariable is already loaded at line 93 and available—useconfig.Compiler.GoVersionto populate the go.mod directive. This same issue exists inpkg/cli/cmd/build.go(lines 126-129).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/cli/cmd/run.go` around lines 150 - 153, The go.mod template currently hardcodes "go 1.23.6" in the goModContent variable; replace the literal with the configured Go version by injecting config.Compiler.GoVersion (the config variable already loaded earlier) when building goModContent in pkg/cli/cmd/run.go (and make the same change in pkg/cli/cmd/build.go where a similar goModContent is defined). Update the string construction for goModContent to interpolate config.Compiler.GoVersion (and optionally provide a sensible default if that field can be empty) so the generated go.mod uses the configured Go version instead of the hardcoded 1.23.6.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/ecosystem/config.go`:
- Around line 59-69: LoadConfig currently returns after JSON unmarshal without
validating the ModuleConfig, so call the ModuleConfig.Validate() method after
unmarshalling and before returning to catch empty/whitespace dependency paths
early; if Validate() returns an error, wrap it with context (e.g., "invalid
module config: %w") and return that wrapped error from LoadConfig. Ensure you
reference the ModuleConfig type and its Validate method and include the
configPath or a short message in the wrapped error to aid debugging.
In `@pkg/cli/cmd/build.go`:
- Around line 61-63: The code in pkg/cli/cmd/build.go currently calls
ecosystem.LoadConfig using the process cwd which misses manifests when building
a file from another directory; change it to resolve the build entry's absolute
path (absPath), set startDir := filepath.Dir(absPath) (or walk upward from
startDir) and call ecosystem.LoadConfig(startDir) so the typego.modules.json for
the entry file is found; when handling errors from LoadConfig only treat
os.ErrNotExist as optional and surface other errors (do not ignore the returned
error).
- Around line 175-179: In the loop over config.Dependencies where you build
getDepCmd with exec.Command("go","get", dep+"@"+version") and set getDepCmd.Dir
= tmpDir, stop discarding errors: call getDepCmd.CombinedOutput(), check its
error, and if non-nil log or return the command output and error (including dep
and version) and abort the build immediately (e.g., return an error or
os.Exit(1)) so a failing pinned get is reported where it occurs rather than
later during tidy/build.
In `@pkg/cli/cmd/run.go`:
- Around line 91-93: The code currently loads the module config using os.Getwd()
(cwd) and ecosystem.LoadConfig which causes wrong pinned deps when running
typego run path/to/app.ts; change the config resolution to use the script's
project directory (use filepath.Dir(absPath) or walk ancestors from absPath to
find typego.modules.json) when calling ecosystem.LoadConfig instead of
os.Getwd(), and ensure you propagate and surface any LoadConfig error that is
not an ENOENT (only treat ENOENT as “no manifest found” fallback), updating the
variables/logic around cwd, config, and the LoadConfig call accordingly.
- Around line 183-187: The loop that applies pinned dependencies (iterating over
config.Dependencies) currently ignores errors from the exec.Command named
getDepCmd (invoking "go get dep@version"), which hides broken pins; update the
code around getDepCmd.Run() to capture its error and combined stdout/stderr (use
getDepCmd.CombinedOutput or capture output), and if there is an error, log/print
the command and its output (including dep and version) and return/exit
immediately so the run aborts on failed pinned dependency resolution; reference
getDepCmd and tmpDir when updating the error handling.
---
Outside diff comments:
In `@pkg/cli/cmd/build.go`:
- Around line 126-129: Replace the hardcoded go version string used to build
go.mod (the goModContent variable in pkg/cli/cmd/build.go) with a value taken
from config.Compiler.GoVersion, falling back to a sensible default when config
or Compiler.GoVersion is empty; update the same pattern in run.go if present so
both use config.Compiler.GoVersion rather than the literal "1.23.6" and ensure
the fallback default is used only when the config value is missing.
In `@pkg/cli/cmd/run.go`:
- Around line 150-153: The go.mod template currently hardcodes "go 1.23.6" in
the goModContent variable; replace the literal with the configured Go version by
injecting config.Compiler.GoVersion (the config variable already loaded earlier)
when building goModContent in pkg/cli/cmd/run.go (and make the same change in
pkg/cli/cmd/build.go where a similar goModContent is defined). Update the string
construction for goModContent to interpolate config.Compiler.GoVersion (and
optionally provide a sensible default if that field can be empty) so the
generated go.mod uses the configured Go version instead of the hardcoded 1.23.6.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d2f09836-f1d9-4548-aee2-ab41fe215a2b
⛔ Files ignored due to path filters (1)
temp/go.sumis excluded by!**/*.sum
📒 Files selected for processing (7)
examples/projects/link-shortener/service_binexamples/projects/link-shortener/typego.modules.jsoninternal/ecosystem/config.gointernal/linker/fetcher.gopkg/cli/cmd/build.gopkg/cli/cmd/run.gotemp/go.mod
✅ Files skipped from review due to trivial changes (1)
- internal/linker/fetcher.go
| func LoadConfig(cwd string) (*ModuleConfig, error) { | ||
| configPath := filepath.Join(cwd, ConfigFileName) | ||
| configData, err := os.ReadFile(configPath) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| var config ModuleConfig | ||
| if err := json.Unmarshal(configData, &config); err != nil { | ||
| return nil, err | ||
| } | ||
| return &config, nil |
There was a problem hiding this comment.
Validate the manifest before returning it.
LoadConfig stops at JSON parsing, so empty or space-containing dependency paths now fail later during go get/inspection instead of producing a clear config error here. Call config.Validate() before returning and wrap the path in parse/validation errors.
Suggested fix
func LoadConfig(cwd string) (*ModuleConfig, error) {
configPath := filepath.Join(cwd, ConfigFileName)
configData, err := os.ReadFile(configPath)
if err != nil {
- return nil, err
+ return nil, fmt.Errorf("read %s: %w", configPath, err)
}
var config ModuleConfig
if err := json.Unmarshal(configData, &config); err != nil {
- return nil, err
+ return nil, fmt.Errorf("parse %s: %w", configPath, err)
+ }
+ if err := config.Validate(); err != nil {
+ return nil, fmt.Errorf("invalid %s: %w", configPath, err)
}
return &config, nil
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| func LoadConfig(cwd string) (*ModuleConfig, error) { | |
| configPath := filepath.Join(cwd, ConfigFileName) | |
| configData, err := os.ReadFile(configPath) | |
| if err != nil { | |
| return nil, err | |
| } | |
| var config ModuleConfig | |
| if err := json.Unmarshal(configData, &config); err != nil { | |
| return nil, err | |
| } | |
| return &config, nil | |
| func LoadConfig(cwd string) (*ModuleConfig, error) { | |
| configPath := filepath.Join(cwd, ConfigFileName) | |
| configData, err := os.ReadFile(configPath) | |
| if err != nil { | |
| return nil, fmt.Errorf("read %s: %w", configPath, err) | |
| } | |
| var config ModuleConfig | |
| if err := json.Unmarshal(configData, &config); err != nil { | |
| return nil, fmt.Errorf("parse %s: %w", configPath, err) | |
| } | |
| if err := config.Validate(); err != nil { | |
| return nil, fmt.Errorf("invalid %s: %w", configPath, err) | |
| } | |
| return &config, nil | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@internal/ecosystem/config.go` around lines 59 - 69, LoadConfig currently
returns after JSON unmarshal without validating the ModuleConfig, so call the
ModuleConfig.Validate() method after unmarshalling and before returning to catch
empty/whitespace dependency paths early; if Validate() returns an error, wrap it
with context (e.g., "invalid module config: %w") and return that wrapped error
from LoadConfig. Ensure you reference the ModuleConfig type and its Validate
method and include the configPath or a short message in the wrapped error to aid
debugging.
| // Read the typego.modules.json to find pinned versions for `typego build` | ||
| cwd, _ := os.Getwd() | ||
| config, _ := ecosystem.LoadConfig(cwd) |
There was a problem hiding this comment.
Load typego.modules.json relative to the entry file, not the process cwd.
typego build path/to/app.ts from another directory will miss that app's manifest here and silently drop the pinned versions this PR is supposed to honor. Start from filepath.Dir(absPath) (or walk upward from it), and only treat os.ErrNotExist as optional.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/cli/cmd/build.go` around lines 61 - 63, The code in pkg/cli/cmd/build.go
currently calls ecosystem.LoadConfig using the process cwd which misses
manifests when building a file from another directory; change it to resolve the
build entry's absolute path (absPath), set startDir := filepath.Dir(absPath) (or
walk upward from startDir) and call ecosystem.LoadConfig(startDir) so the
typego.modules.json for the entry file is found; when handling errors from
LoadConfig only treat os.ErrNotExist as optional and surface other errors (do
not ignore the returned error).
| for dep, version := range config.Dependencies { | ||
| if version != "latest" { | ||
| getDepCmd := exec.Command("go", "get", dep+"@"+version) | ||
| getDepCmd.Dir = tmpDir | ||
| _ = getDepCmd.Run() |
There was a problem hiding this comment.
Fail fast when a pinned go get cannot be resolved.
These errors are discarded, so a bad dep@version pin turns into a later tidy/build failure with no indication which dependency caused it. Capture the command output and abort here.
Suggested fix
if config != nil {
for dep, version := range config.Dependencies {
if version != "latest" {
getDepCmd := exec.Command("go", "get", dep+"@"+version)
getDepCmd.Dir = tmpDir
- _ = getDepCmd.Run()
+ getDepCmd.Stdout = os.Stdout
+ getDepCmd.Stderr = os.Stderr
+ if err := getDepCmd.Run(); err != nil {
+ fmt.Printf("go get %s@%s failed: %v\n", dep, version, err)
+ os.Exit(1)
+ }
}
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| for dep, version := range config.Dependencies { | |
| if version != "latest" { | |
| getDepCmd := exec.Command("go", "get", dep+"@"+version) | |
| getDepCmd.Dir = tmpDir | |
| _ = getDepCmd.Run() | |
| for dep, version := range config.Dependencies { | |
| if version != "latest" { | |
| getDepCmd := exec.Command("go", "get", dep+"@"+version) | |
| getDepCmd.Dir = tmpDir | |
| getDepCmd.Stdout = os.Stdout | |
| getDepCmd.Stderr = os.Stderr | |
| if err := getDepCmd.Run(); err != nil { | |
| fmt.Printf("go get %s@%s failed: %v\n", dep, version, err) | |
| os.Exit(1) | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/cli/cmd/build.go` around lines 175 - 179, In the loop over
config.Dependencies where you build getDepCmd with exec.Command("go","get",
dep+"@"+version") and set getDepCmd.Dir = tmpDir, stop discarding errors: call
getDepCmd.CombinedOutput(), check its error, and if non-nil log or return the
command output and error (including dep and version) and abort the build
immediately (e.g., return an error or os.Exit(1)) so a failing pinned get is
reported where it occurs rather than later during tidy/build.
| // Read the typego.modules.json to find pinned versions for `typego run` | ||
| cwd, _ := os.Getwd() | ||
| config, _ := ecosystem.LoadConfig(cwd) |
There was a problem hiding this comment.
Resolve pinned deps from the script's project, not from os.Getwd().
Running typego run path/to/app.ts outside that directory misses the app's typego.modules.json, so fetches fall back to unpinned versions here. Resolve config from filepath.Dir(absPath) (or the nearest ancestor manifest) and surface non-ENOENT errors.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/cli/cmd/run.go` around lines 91 - 93, The code currently loads the module
config using os.Getwd() (cwd) and ecosystem.LoadConfig which causes wrong pinned
deps when running typego run path/to/app.ts; change the config resolution to use
the script's project directory (use filepath.Dir(absPath) or walk ancestors from
absPath to find typego.modules.json) when calling ecosystem.LoadConfig instead
of os.Getwd(), and ensure you propagate and surface any LoadConfig error that is
not an ENOENT (only treat ENOENT as “no manifest found” fallback), updating the
variables/logic around cwd, config, and the LoadConfig call accordingly.
| for dep, version := range config.Dependencies { | ||
| if version != "latest" { | ||
| getDepCmd := exec.Command("go", "get", dep+"@"+version) | ||
| getDepCmd.Dir = tmpDir | ||
| _ = getDepCmd.Run() |
There was a problem hiding this comment.
Pinned dependency resolution should abort on failure.
Ignoring go get dep@version errors makes broken pins look like later compile/tidy failures. Stop here and print the command output so the bad dependency is obvious.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/cli/cmd/run.go` around lines 183 - 187, The loop that applies pinned
dependencies (iterating over config.Dependencies) currently ignores errors from
the exec.Command named getDepCmd (invoking "go get dep@version"), which hides
broken pins; update the code around getDepCmd.Run() to capture its error and
combined stdout/stderr (use getDepCmd.CombinedOutput or capture output), and if
there is an error, log/print the command and its output (including dep and
version) and return/exit immediately so the run aborts on failed pinned
dependency resolution; reference getDepCmd and tmpDir when updating the error
handling.
I have completed the daily optimization audit for
bridge/core.Daily Scorecard: 9/10
Optimizations Included:
bindSlice([]byte Fast Path): Avoided element-wise interface boxing by checking for[]byteand usingToUint8Arraydirectly, safely copying memory to prevent unintended JS mutation.bindMap(Allocation Reduction): Replacedv.MapKeys()(which allocates a slice of keys) with zero-allocationv.MapRange()iteration. Also swappedfmt.Sprintwith nativestrconvformatting for integer map keys to reduce overhead.ToArrayBufferto actually copy data, preventing memory mutation issues where JS modifies Go slices. Added the graceful fallbackToUint8Array.Micro-Cleanups Check:
context.TODOandcontext.Backgroundwere only used contextually within initialization methods (NewEventLoop,NewEngine).sync.Mutexvssync.RWMutexmatches read/write patterns.Benchmark Recommendations:
Run today's baseline verification with:
go test -bench=. ./bridge/corePR created automatically by Jules for task 10175132532314883363 started by @repyh
Summary by CodeRabbit
New Features
Bug Fixes
Performance Improvements