monorepo-knowledge

Guides Bazel Monorepo development with tt mn commands, unit testing, and CI/CD configuration.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill monorepo-knowledge-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monorepo-knowledge
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/monorepo-knowledge
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill monorepo-knowledge-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working in the TikTok Bazel Monorepo need to learn the tt mn command set, Trunk-Based Development workflow, Bazel build configuration, and CI/CD pipeline setup, which are scattered across many internal documents. ## Core Features & Use Cases - Local Development Workflow: Covers sparse checkout, code validation with tt mn validate, local builds with tt mn build, and testing with tt mn test. - Unit Testing Guidance: Explains the Mockey and Convey testing frameworks, LLM-based test generation via tt mn test generate, and coverage reporting. - CI/CD and Bazel Build Configuration: Details standard CI pipeline stages, ByteCycle deployment, Go version pinning, Beast Mode optimization, and cross-repository IDL consumption. - Use Case: An engineer onboarding a new service into the Monorepo can follow the guides to run tt monorepo init, configure the CI yaml, and troubleshoot common Bazel build errors like relocation overflow or package conflicts. ## Quick Start Ask the assistant how to set up local development and run unit tests in the TikTok Bazel Monorepo using the tt mn command set.

Frequently Asked Questions about monorepo-knowledge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run unit tests in a Bazel Monorepo?

Use the tt mn test command to interactively select and run unit test targets, or pass a specific target like //app/upvote_rpc/service:service_test. Add --coverage to get a visualized coverage report, or use tt mn test remote to run tests in a bytesuite container simulating CI.

How do I set up sparse checkout in a Bazel Monorepo?

Use the tt mn local command set: run tt monorepo local enable-sparse to prepare the repo, then tt monorepo local clone to sparse-clone it, and tt monorepo local add to add specific modules and their dependencies to your local disk.

How do I specify the Go version for Bazel builds?

Add workspace_init("1.20") to the last line of the WORKSPACE file. Use a plain version like "1.20" for the internal Tango distribution, "oss1.22.11" for open-source Go, or "host" for the system-installed version.

Why does my Bazel build fail with a relocation overflow error?

The relocation overflow error occurs when 32-bit relative jumps exceed their range during linking. Fix it by adding test --linkopt='-pie' to your .bazelrc file or passing --linkopt=-pie directly on the build command.

Can I generate unit tests automatically with LLM in a Monorepo?

Yes, run tt mn test generate --path=<source path> --codebaseID=<id> inside the Monorepo directory after granting the ci_qualityarchitecture_satcheck service account repository access. You receive a merge request link via a Bits quality notification when the task completes.

Why does the Go debugger fail with internal debugger error in Monorepo?

The internal debugger error happens because the Tango compiler is incompatible with the open-source delve debugger. Change the WORKSPACE Go version from a Tango version like "1.22" to an open-source version like "oss1.22" to resolve it.