Typed declarations
Connect a scalar method and native batch method through an immutable, statically discoverable declaration.
go test ./examples/declarations/basicOpen declaration example →Compile-tested examples · v1.0.1
The repository examples cover declarative contracts, concrete client bindings, compiler transformations, adaptive controls, fairness, overload handling, recursive batching, operation waves, and editor workflows. The Go examples run in the mandatory test suite.
Run locally
git clone https://github.com/Voskan/BatchWeaver.git
cd BatchWeaver
git checkout v1.0.1
go test ./examples/... -count=1The three editor fixtures are standalone modules and are exercised through editor/LSP checks rather than the root module test command.
Foundations
Connect a scalar method and native batch method through an immutable, statically discoverable declaration.
go test ./examples/declarations/basicOpen declaration example →Generate ordered PostgreSQL SQL from two key components and one explicit at-most-one join, then validate the content-addressed plan.
go test ./examples/composite-join-sqlOpen SQL example →Validate two strict configuration documents that produce the same semantic digest and operation catalog.
batchweaver config validate --file \
examples/configuration/batchweaver.yamlOpen configuration examples →Compile pgx v5, go-redis v9, gqlgen, and grpc-go integrations and run their hermetic client suites.
go test ./examples/client-bindings
go test ./adapters/...Open client bindings →Compiler
The fixture contains a scalar repository call in a loop, a compatible batch provider, equivalence tests, and the expected static prefetch behavior.
batchweaver scan ./examples/static-prefetch/...
batchweaver prove ./examples/static-prefetch/...
batchweaver transform diff ./examples/static-prefetch/...
batchweaver test -- -race ./examples/static-prefetch/...Adaptive runtime
Profile a synthetic workload and produce a bounded shadow-mode tuning recommendation.
go test ./examples/adaptive-runtimeOpen example →Exercise weighted fair scheduling across anonymized classes and explicit overload admission decisions.
go test ./examples/fairness-overloadOpen example →Build a dependency DAG, co-schedule independent operations, and identify the critical path.
go test ./examples/multi-operation-waveOpen example →Load a tree breadth-first, issuing one proven batched call per frontier with explicit cycle and limit policies.
go test ./examples/recursive-batchingOpen example →Editors
Open a standalone Go module containing an N+1 loop and inspect the live opportunity diagnostic and code lens.
Open editor-diagnostics →Open a read-only virtual diff from the editor. Applying changes remains a separate explicit CLI operation.
Open editor-transform-preview →Run BatchWeaver as the language server while delegating standard Go language features to the user's gopls.
batchweaver lsp --stdio --proxy-goplsOpen editor-proxy →Next step
Start with a non-production clone, declare explicit providers, review every proof and diff, and retain scalar rollback.