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 6d8842c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: Cargo.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
[package]
2
2
name = "mega2"
3
-
version = "0.41.80"
3
+
version = "0.42.0"
4
4
edition = "2024"
5
5
license = "MIT OR Apache-2.0"
6
6
description = "Monorepo engine and Git hosting server for AI agents: trunk-based storage, Git Smart HTTP, Git LFS, OCI registry, and Agent Session Capture"
Copy file name to clipboardExpand all lines: docs/configuration.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,8 @@ One line of purpose and the key entries per section; full comments and defaults
84
84
-**`[log]`**: tracing logs. `level` (trace..error), `print_std` (off in production), `with_ansi` (stdout only). All hot-reloadable.
85
85
-**`[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.
86
86
-**`[monorepo]`**: `import_dir` (default `/third-party`, the ImportRepo multi-branch exception), `admin`, `root_dirs` (directory initialization), `object_format` (`sha1` by default; `sha256` / `blake3` require Libra), `push_policy` (`trunk` by default, which requires an explicit `git.push_auth`; the review sample is [`config-review.toml`](../config/config-review.toml)), and `max_push_commits` (the trunk push-chain limit). User-visible path and push behavior is in the [User Guide](./user-guide.md); the full key list and defaults are in [`config.toml`](../config/config.toml).
87
-
-**Path validation:**`config validate`, service startup, and hot-reload candidates use the same checks and report the invalid field. Each `root_dirs` entry must be a unique single path component: no `/`, `\`, or NUL; not empty, `.` or `..`; no leading or trailing spaces; and not a reserved root entry (`.cedar`, `.mega_cedar.json`, `.buckroot`, `.buckconfig`, or `.git`, case-insensitive). `import_dir` must be a canonical absolute non-root path with no trailing slash, `//`, `.` or `..` segments, NUL, or `\`; its first component must appear in `root_dirs`. Paths under `import_dir` always use ImportRepo semantics, even when `root_dirs` contains that name. `root_dirs` creates directories only during initial setup; changing it later requires a restart and does not add or remove directories in an initialized repository. See the [initialization manual](./manual/monorepo-init.md).
87
+
-**Path validation:**`config validate`, service startup, and hot-reload candidates use the same checks and report the invalid field. Each `root_dirs` entry must be a unique single path component: no `/`, `\`, or NUL; not empty, `.` or `..`; no leading or trailing spaces; and not a reserved root entry (`.cedar`, `.mega_cedar.json`, `.buckroot`, `.buckconfig`, or `.git`, case-insensitive). `.view` and `.filter` also cannot be `root_dirs` entries or the first `import_dir` component, and match exact case. `import_dir` must be a canonical absolute non-root path with no trailing slash, `//`, `.` or `..` segments, NUL, or `\`; its first component must appear in `root_dirs`. Paths under `import_dir` always use ImportRepo semantics, even when `root_dirs` contains that name. `root_dirs` creates directories only during initial setup; changing it later requires a restart and does not add or remove directories in an initialized repository. See the [initialization manual](./manual/monorepo-init.md).
88
+
- **View reserved names:** `.view` and `.filter` are view URL names reserved by complete, exact-case first-component matching; `.viewer` and `.View` are unaffected, and this rule is independent of `[views].enabled`. Provisioning and product writes return `MONO_PATH_INVALID` for paths beginning with either name, and trunk Git pushes that create those paths are also rejected; review pushes do not use this creation classification, and existing `mega_refs` rows for those paths are caught by the startup check below. Once the view URL entry point ships, those Git URLs are answered by it and do not enter Monorepo dispatch. With `enabled = true`, HTTP and SSH check root-tree entries and every `mega_refs` row before binding (regardless of ref name, CL status, or a leading slash in the path); a conflict or unreadable root tree rejects startup, while `enabled = false` skips the check. Conflict errors list each `root tree entry "<name>"` or `mega_refs path "<path>"` with Rust `{:?}` quoting, include `[views] enabled = false`, `docs/configuration.md`, and `View reserved names`, and contain no value read from configuration. No supported removal path exists for an existing root-tree or `mega_refs` conflict: keep `enabled = false`; this plan provides no cleanup SQL. After upgrade, a `root_dirs` value containing `.view` or `.filter` is rejected and must be renamed or removed; changing configuration does not alter an initialized root tree.
-**`[lfs]`**: `[lfs.ssh].http_url` (href base for SSH transfer; LFS payloads still move over HTTP) and `[lfs.local].lfs_file_path`. In trunk mode, LFS authorization follows `git.push_auth`; see the [Deployment Guide](./deployment.md).
@@ -106,7 +107,7 @@ One line of purpose and the key entries per section; full comments and defaults
106
107
107
108
## 5. Fail-closed startup validation
108
109
109
-
`Config::validate` and `AppContext::new` reject invalid configuration at startup. The [Deployment Guide](./deployment.md) covers trunk / storage-only prerequisites, including `cedar.enforcement = "off"`, no open CLs, no non-terminal `push_queue` rows, an explicit `push_auth` compatible with the selected mode, and `ssh_receive_pack = false`. Other examples include unknown or removed fields, invalid `cedar.enforcement` values, the reserved anonymous principal in `monorepo.admin`, optional services enabled outside storage-only mode, out-of-range `storage_events` values, non-canonical filters, and SecretRef namespace mismatches. Secret values are never included in error messages.
110
+
`Config::validate` and `AppContext::new` reject invalid configuration at startup. The [Deployment Guide](./deployment.md) covers trunk / storage-only prerequisites, including `cedar.enforcement = "off"`, no open CLs, no non-terminal `push_queue` rows, an explicit `push_auth` compatible with the selected mode, and `ssh_receive_pack = false`. Other examples include unknown or removed fields, invalid `cedar.enforcement` values, the reserved anonymous principal in `monorepo.admin`, optional services enabled outside storage-only mode, out-of-range `storage_events` values, non-canonical filters, and SecretRef namespace mismatches. Secret values are never included in error messages. With `[views].enabled = true`, services also check the reserved names `.view` and `.filter` before binding; see “View reserved names” in §4.
0 commit comments