Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mega2"
version = "0.42.20"
version = "0.42.23"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "Monorepo engine and Git hosting server for AI agents: trunk-based storage, Git Smart HTTP, Git LFS, OCI registry, and Agent Session Capture"
Expand Down
2 changes: 2 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ See the [Configuration Guide](./configuration.md) for SecretRef settings and val
| SSH | `service ssh` (dedicated port) | read-only (upload-pack) in storage-only; `git.ssh_receive_pack=false` is mandatory — omitting it refuses startup |
| Git LFS | `/info/lfs` + `/api/v1/lfs` | mounted in both modes; write authorization follows `push_auth` |
| Product API | `/api/v1/*` (status, file/blob, file/tree, preview reads + create-entry/delete-entry/move-entry/edit/save writes + tags) | trunk / storage-only mode |
| Git view URLs (read-only) | `/.filter/<filter_id>.git`, `/.view/<name>.git`, `/.view/<name>@<version>.git` (HTTP and SSH upload-pack) | `[views].enabled` defaults off and requires restart; receive-pack is rejected and LFS under view prefixes returns 404 |
| Views API | `/api/v1/views` (`POST ?wait=true` registration and `GET ?name=&version=`), `GET /api/v1/views/{filter_id}`, `GET /api/v1/views/metrics`; see [views operations](./deploy-trunk.md) | `[views].enabled` defaults off and requires restart; mounted only in trunk / storage-only, returns 404 when disabled |
| OCI registry | `/v2/` | `[oci].enabled` and storage-only; fail-closed (not registered) under review |
| Agent Capture | `/api/v1/agent-capture` | `[agent_capture].enabled` and storage-only |
| MST/2 snapshot surface | `/api/v2` | nest is static; handlers fail closed unless `[mst2].enabled`; toggling needs a restart |
Expand Down
2 changes: 2 additions & 0 deletions docs/architecture.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ HTTP router 在 `server::http_server::app`(`src/server/http_server.rs:681`)
| SSH | `service ssh`(独立端口) | storage-only 下只读(upload-pack);`git.ssh_receive_pack=false` 为强制项,省略会拒绝启动 |
| Git LFS | `/info/lfs` + `/api/v1/lfs` | 两种形态均挂载;写授权随 `push_auth` |
| 产品 API | `/api/v1/*`(status、file/blob、file/tree、preview 读 + create-entry/delete-entry/move-entry/edit/save 写 + tags) | trunk / storage-only 形态 |
| Git 视图 URL(只读) | `/.filter/<filter_id>.git`、`/.view/<name>.git`、`/.view/<name>@<version>.git`(HTTP 与 SSH upload-pack) | `[views].enabled` 缺省关闭,重启生效;receive-pack 拒绝,视图前缀 LFS 返回 404 |
| 视图 API | `/api/v1/views`(`POST ?wait=true` 注册、`GET ?name=&version=`)、`GET /api/v1/views/{filter_id}`、`GET /api/v1/views/metrics`;请求见[视图运维](./deploy-trunk.md) | `[views].enabled` 缺省关闭,重启生效;只在 trunk / storage-only 挂载,关闭时返回 404 |
| OCI registry | `/v2/` | `[oci].enabled` 且 storage-only;review 形态 fail-closed 不注册 |
| Agent Capture | `/api/v1/agent-capture` | `[agent_capture].enabled` 且 storage-only |
| MST/2 快照面 | `/api/v2` | nest 静态注册,handler 在 `[mst2].enabled` 为 false 时 fail-closed;切换需重启 |
Expand Down
2 changes: 1 addition & 1 deletion docs/deploy-trunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ DELETE FROM mega_view_root_chain_scan;

`recycle-filter` 与 `rebuild-all` 都有显式事务。`COMMIT` 之前的语句失败时,psql 会停止并断开连接,事务不会提交。recycle-filter 只回收目标过滤器的派生提交映射与对象引用,保留对象以供后续清扫;rebuild-all 清掉全部派生状态。两者把过滤器置为回收态:`projected_seq = 0`,且 `ready_seq`、`warming_since` 为 NULL。worker 只为活跃视图(`ready_seq` 或 `warming_since` 非空)执行 catch_up,因此回收态视图会等待重新预热。clear-root-chain-scan 只清暂存表,不改视图状态;下一次根链扩展会按当前的 `main@/` 重新判定。

三段 SQL 都不用 `TRUNCATE`,不删除 `mega_view_filter`、`mega_view` 或 `mega_view_register_log`,也不改 `last_access_at` 与过滤器定义列。rebuild-all 是全表 `DELETE`,停服窗口随派生行数增长。本节只记录停服运维与恢复语义;视图 Git URL 的对象读取尚未开放。
三段 SQL 都不用 `TRUNCATE`,不删除 `mega_view_filter`、`mega_view` 或 `mega_view_register_log`,也不改 `last_access_at` 与过滤器定义列。rebuild-all 是全表 `DELETE`,停服窗口随派生行数增长。本节记录停服运维与恢复语义;视图 Git URL 已支持只读 clone 与 fetch,用法见[用户指南](./user-guide.zh.md#27-视图-url只读)。

投影停止时,首个失败点会以 ERROR 事件给出。除 message 外,停止告警字段为 `metric=view_projection_stops_total`、`filter_id`、`s`、`commit_id`、`reason`;当 reason 是 `row_absent` 或 `unparsable` 时还带 `tree_id`。例如:`metric=view_projection_stops_total s=7 reason=row_absent`。按 reason 处理:

Expand Down
Loading
Loading