The legacy OwlBot post-processing pipeline for Node.js monoreposactively skips updating the hardcoded 0.1.0 clientLibrary.version in snippet_metadata_*.json files. This is due to a refactor that bypassed the original Python version-updating logic in favor of a newer JavaScript post-processor (node-monorepo-newprocess.js) which omits the version replacement code.
Detailed Diagnosis
- The Hardcoded Placeholder: During upstream generation (
bazel-bot), gapic-generator-typescript runs hermetically and has no knowledge of the downstream package version. Therefore, it hardcodes "version": "0.1.0" in typescript/src/templater.ts:66 when generating snippet metadata.
- The Intended Fix (The Old Way): Originally,
synthtool handled this during post-processing. synthtool/languages/node.py (lines 414-416) would read package.json and call common.update_library_version() to rewrite the metadata files.
- The Regression (The Root Cause): The monorepo post-processing was refactored to use a dedicated script.
synthtool/languages/node_mono_repo.py (line 625) now executes node-monorepo-newprocess.js instead of the logic in node.py.
- The Missing Code: Reviewing
node-monorepo-newprocess.js reveals that it entirely lacks any logic to update metadata versions. It only executes:
librarian.js (if present).
- README generation via
gapic-node-processing.
npm run fix.
- The Consequence: Because
node-monorepo-newprocess.js skips the version update, the raw 0.1.0 placeholder from the Bazel sandbox is committed to main by OwlBot.
Proof
OwlBot PR #8092 (merged April 28, 2026) updated snippets for google-cloud-cloudsecuritycompliance but leaked the 0.1.0 version into main precisely because the post-processor failed to rewrite it.
Proposed Solutions
We have two viable paths forward:
Option A: Rely on Manual Patching until Librarian Migration
Acknowledge the bug in the legacy pipeline but avoid investing effort into patching synthtool. let the upcoming migration to librarian permanently solve the issue and do a manual update before the migration to reduce the diff noise.
Option B: Fix the Legacy Pipeline
Port the version replacement logic into node-monorepo-newprocess.js within the googleapis/synthtool repository.
- Read the local
package.json version.
- Iterate through
./samples/generated/**/*.json.
- Overwrite
clientLibrary.version and save.
- Release a new
synthtool Docker image (owlbot-nodejs) to the CI pipeline to halt the leakage immediately.
The legacy OwlBot post-processing pipeline for Node.js monoreposactively skips updating the hardcoded
0.1.0clientLibrary.versioninsnippet_metadata_*.jsonfiles. This is due to a refactor that bypassed the original Python version-updating logic in favor of a newer JavaScript post-processor (node-monorepo-newprocess.js) which omits the version replacement code.Detailed Diagnosis
bazel-bot),gapic-generator-typescriptruns hermetically and has no knowledge of the downstream package version. Therefore, it hardcodes"version": "0.1.0"intypescript/src/templater.ts:66when generating snippet metadata.synthtoolhandled this during post-processing.synthtool/languages/node.py(lines 414-416) would readpackage.jsonand callcommon.update_library_version()to rewrite the metadata files.synthtool/languages/node_mono_repo.py(line 625) now executesnode-monorepo-newprocess.jsinstead of the logic innode.py.node-monorepo-newprocess.jsreveals that it entirely lacks any logic to update metadata versions. It only executes:librarian.js(if present).gapic-node-processing.npm run fix.node-monorepo-newprocess.jsskips the version update, the raw0.1.0placeholder from the Bazel sandbox is committed tomainby OwlBot.Proof
OwlBot PR #8092 (merged April 28, 2026) updated snippets for
google-cloud-cloudsecuritycompliancebut leaked the0.1.0version intomainprecisely because the post-processor failed to rewrite it.Proposed Solutions
We have two viable paths forward:
Option A: Rely on Manual Patching until Librarian Migration
Acknowledge the bug in the legacy pipeline but avoid investing effort into patching
synthtool. let the upcoming migration tolibrarianpermanently solve the issue and do a manual update before the migration to reduce the diff noise.Option B: Fix the Legacy Pipeline
Port the version replacement logic into
node-monorepo-newprocess.jswithin thegoogleapis/synthtoolrepository.package.jsonversion../samples/generated/**/*.json.clientLibrary.versionand save.synthtoolDocker image (owlbot-nodejs) to the CI pipeline to halt the leakage immediately.