Repository navigation
The generated Go wire models carry no digest of the whole registry - #2250
Merged
Merged
Conversation
sdk/go/wire/models.gen.go held one header line with the SHA-256 of the whole registry schema. A change to any model rewrote that line, so two changes to different ops always conflicted on it, and a conflict in a generated file is resolved only by merging and regenerating. Nothing read the line. The check compares the whole generated text, so a stale file still fails. A change to a bound, a default or an enum value that leaves the Go types as they are leaves both generated files unchanged: the Go code is the same. The schema annotation that listed static factory defaults, and the list that classified those factories, only fed the digest and go with it. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
sdk/go/wire/models.gen.go conflicted on the registry digest line. The file is regenerated with its generator: it differs from the file on main by that line only. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
main brings the source worker's registration in knowledge.source.list and knowledge.source.inspect, the knowledge.read rate bucket for knowledge.source.worker_accounts, and the benchmark results for source worker copy capacity. sdk/go/wire/models.gen.go conflicted on the registry digest line. The file is regenerated with its generator: it differs from the file on main by that line only. Every other generated file is current. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main brings one agent mock that answers every loom tool of a plugin eval case's session, and the code_repo.prs shapes in the analyzer shape list. Nothing conflicted. docs/development/code-generation.md keeps both changes: the plugin_eval_tools.py row from main and the Go generator paragraph from this branch. No generator rewrites a file on the merged tree. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Suneeth12
added a commit
to Suneeth12/loom
that referenced
this pull request
Dec 5, 2026
… digest Signed-off-by: Suneeth12 <suneethreddy2005@gmail.com>
10 tasks done
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.
Related: #2094
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The generated Go wire models (
sdk/go/wire/models.gen.go) carry no digest of the whole registry schema, so two pull requests that each change an operation do not conflict on that header line.Why
scripts/codegen/sdk_go_gen.pywrote one header line intosdk/go/wire/models.gen.go:// Registry model schema SHA-256: <digest of the whole registry schema>. A change to any model changed that line, so two pull requests that each changed an op always conflicted on it, whatever the two changes were. A conflict in a generated file cannot be resolved by hand: the branch is merged withmain, the file is regenerated and the pull request is reviewed again.Nothing read the line. Outside the generator, no test, script, workflow or Go file names it. One test asserted its effect (
test_static_factory_default_change_changes_generated_bytes) and one paragraph ofdocs/development/code-generation.mddescribed it as the schema hash.The digest existed because a bound, a static default or an enum value can change without changing a Go type. That case needs no marker: the Go code is the same, so the file is current.
--checkcompares the whole generated text of both files, so a file that is stale in any declaration still fails.Design: the digest is removed, not replaced by a digest per model. A digest per model would also end the conflict, but it keeps a marker nothing reads at the cost of one more line for each of the 1,152 generated types, and it rewrites a line of a model whose Go type did not change.
Scope and risk
scripts/codegen/sdk_go_gen.py: the header line, the digest computation and its two imports are removed. Thex-loom-factory-defaultsschema annotation,_factory_defaultsand_STATIC_FACTORIESare removed with them: no renderer reads the annotation, so they only fed the digest, and they failed generation for a default factory that the list did not classify.sdk/go/wire/models.gen.go: regenerated. The diff is the one removed header line; every declaration is byte-identical.sdk/go/client.gen.gois unchanged.docs/development/code-generation.md: the paragraph on the schema hash becomes one sentence on when the two files change.sdk/rust/. The serde default helpers that renumber on a model change are the subject of the related pull request.Lines of other generated files that change with every added op, table or setting, whichever it is. They are listed here and not changed:
sdk/typescript/src/generated/ops.ts:12664export const GENERATED_OP_COUNT = 396;(a public export of the TypeScript SDK)sdk/ruby/lib/clickhouse/loom/generated/ops.rb:11OP_COUNT = 396docs/reference/operations.md:127396 operations in 45 groups.docs/reference/status.md:28396 operations, 282 of them experimental.docs/reference/status.md:9457 boolean settings load false.docs/reference/schema.md:145198 tables, 5 views and 19 materialized viewsschemas/schema.sql:19-- Counts: 198 tables + 5 views + 19 materialized views.The Python tables, the Go client, the CLI snapshots,
tests/analyzer/shapes.txt, the reach manifest and the plugin eval tool definitions hold no such line.Compatibility, rollout and rollback
sdk/go/wire/models.gen.goafter it.Tests
tests/unit/test_sdk_go_codegen.pyholds four tests of the contract. Each fails onmain:max_lengthonTrackerSimilarInput.textleaves both generated sources identical;TrackerSimilarInput.kindsleaves both generated sources identical. This replacestest_static_factory_default_change_changes_generated_bytes, which asserted the opposite: the behaviour it pinned is the one this change removes;TrackerSimilarInputchanges that declaration only, by one line, and leaves the client unchanged.The branch is merged with
mainthree times. The first two merges conflicted on the digest line, and the file is regenerated with its generator: it differs from the file onmainby that line only. The third merge did not conflict and no generator rewrote a file.What ran:
main: the wire source is identical apart from the removed line, the client source is identical.python -m scripts.codegen.sdk_go_gen --check: exit 1 before regenerating (sdk/go/wire/models.gen.go is stale), exit 0 after, and exit 0 again on the merged tree after each merge.gofmtran from thegolang:1.27.4image, the version CI installs: the generator formatted through it,gofmt -loversdk/goprints nothing, andgo vet ./...insdk/goexits 0, before and after the first merge.--checkofsdk_py_gen,sdk_py_client_gen,sdk_py_admin_gen,sdk_ts_gen,sdk_rb_gen,agent_plugin_sync,standalone_skills,served_skills,settings_reference,settings_schema,settings_example,docs_reference,op_reach_censusandplugin_eval_tools: all exit 0.sdk_rust_gen --checkneedsrustfmt, which the local machine lacks; its inputs are untouched and CI runs it.ruff format --checkandruff checkon the changed Python files, Prettier on the changed page,make typecheck,scripts/gates/function_length_gate.py,scripts/gates/check_no_secrets.py: pass.pytest -n 2overtests/unit/test_sdk_go_codegen.py,test_go_sdk_contract.py,test_sdk_parity.py,test_sdk_surface_contract.py,test_docs_reference.py,test_public_copy.py,test_doc_links.py,test_package_contracts.py,test_op_transport_contract.py,test_tunable_constants.py,test_store_names_refused.py,test_degraded_unnoted.py,test_agent_instructions.pyandtests/analyzer, before the first merge: 655 passed, 12 skipped, 1 failed. After the first merge,tests/unit/test_sdk_go_codegen.pyalone: 9 passed. After the second merge,tests/unit/test_sdk_go_codegen.py,test_doc_links.pyandtest_public_copy.py: 311 passed.tests/analyzer/test_corpus.py::test_shapes_file_matches_builders, and it failed onmainas well in that run: thecode_repo.prsstatement selectsmerge_commit_sha, andtests/analyzer/shapes.txtheld the two shapes from before that column.mainnow holds the shapes that select the column and the third merge brings them;tests/analyzerdid not run again after it. This change touches neither file.Left to CI: the full unit and integration suites and the Go SDK's
go test.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. Checked: the generated diff is one line, the unformatted generator output matches
mainapart from that line, and each new test fails onmain.I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump), the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py) and the standalone skill bundles (python3 scripts/codegen/standalone_skills.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code