You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 433197a
Browse filesBrowse the repository at this point in the historyBrowse files
Config::validate() (config validate, service startup, hot-reload candidates)
now checks the [monorepo] path policy shape:
- every root_dirs entry is a unique single path component: no '/', '\' or
NUL; not '.', '..' or empty; no leading/trailing whitespace; not a root
entry init_trees already adds (.cedar, .mega_cedar.json, .buckroot,
.buckconfig) and not .git (any case);
- import_dir is a canonical absolute non-root path without NUL or '\'
whose first component is listed in root_dirs.
Errors name the field and never include secrets. Invalid configs that used
to produce a broken root tree now fail before startup (minor bump).
Shipped config comments, docs/configuration(.zh).md, docs/manual/monorepo-init.md
and docs/monorepo.md describe the rules including import-first.
Tests: monorepo_root_dirs_rejects_invalid_entries, monorepo_import_dir_shape,
monorepo_shape_error_names_field_without_secret, shipped_configs_pass_monorepo_shape,
monorepo_shipped_config_comments.
Plan: docs/plan/plan-20260923.md FU-04 (Codex R2 PASS, Claude R2 PASS).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Eli Ma <eli@patch.sh>
Copy file name to clipboardExpand all lines: docs/configuration.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,7 @@ One line of purpose and the key entries per section; full comments and defaults
83
83
-**`[log]`**: tracing logs. `level` (trace..error), `print_std` (off in production), `with_ansi` (stdout only). All hot-reloadable.
84
84
-**`[database]`**: PostgreSQL only (`db_type = "postgres"`). `db_url`, pool `max_connection` / `min_connection`, `acquire_timeout` / `connect_timeout`, `sqlx_logging`. Inject credentials via `MEGA_DATABASE__DB_URL`, not via Vault SecretRef.
85
85
-**`[monorepo]`**: product rules (authoritative: [`monorepo.md`](./monorepo.md)). `import_dir` (default `/third-party`, the ImportRepo multi-branch exception), `admin`, `root_dirs` (directory init), `object_format` (`sha1` default; `sha256` / `blake3` are Libra extensions — see [`refactoring/config.md`](./refactoring/config.md) and [`refactoring/protocol.md`](./refactoring/protocol.md)), `push_policy` (`review` default / `trunk`), `max_push_commits` (trunk chain-length bound). Bootstrap: `mega2 --config <path> service init --yes` (see [`manual/monorepo-init.md`](./manual/monorepo-init.md)).
86
+
- Path shape (`config validate`, service startup and hot-reload candidates run the same check; a violation fails and names the field): every `root_dirs` entry is a unique single path component — no `/`, `\` or NUL; not `.`, `..` or empty; no leading/trailing spaces; not a reserved root entry (`.cedar`, `.mega_cedar.json`, `.buckroot`, `.buckconfig`, `.git`); `import_dir` is a canonical absolute non-root path (no trailing slash, no `//`, `.` or `..` segments, no NUL or `\`) whose first component is listed in `root_dirs`. **Import first**: a path under `import_dir` is always an ImportRepo (created by Git push), even if `root_dirs` has the same name. `root_dirs` only creates directories at the first initialization (`service init`, or the first service start on an empty database); changing it later needs a restart and does not add or remove top-level directories of an initialized repository (see [`manual/monorepo-init.md`](./manual/monorepo-init.md)).
-**`[lfs]`**: `[lfs.ssh].http_url` (href base for the SSH transfer; LFS payloads still move over HTTP), `[lfs.local].lfs_file_path`. In trunk, LFS authorization follows `git.push_auth` — see [`deploy-trunk.md`](./deploy-trunk.md) §6.
0 commit comments