diff --git a/.github/workflows/repository-gates.yml b/.github/workflows/repository-gates.yml index bed9c5fd..9b6e4d17 100644 --- a/.github/workflows/repository-gates.yml +++ b/.github/workflows/repository-gates.yml @@ -27,10 +27,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install system dependencies + - name: Verify system dependencies on self-hosted runner run: | - sudo apt-get update - sudo apt-get install -y pkg-config libssl-dev protobuf-compiler + command -v pkg-config + pkg-config --exists openssl + test -r "$(pkg-config --variable=includedir openssl)/openssl/ssl.h" + command -v protoc + protoc --version - uses: dtolnay/rust-toolchain@nightly with: diff --git a/Cargo.lock b/Cargo.lock index c21d5687..d2e24647 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4172,7 +4172,7 @@ checksum = "7ebb8d8732c6a6df3d8f032a82911cfc747e00efb95cc46e8d0acd5b5b88570c" [[package]] name = "mega2" -version = "0.42.149" +version = "0.43.0" dependencies = [ "anyhow", "async-recursion", @@ -4211,7 +4211,6 @@ dependencies = [ "object_store", "once_cell", "openssl", - "parse-display", "percent-encoding", "pgp 0.20.0", "rand 0.10.2", @@ -5014,31 +5013,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "parse-display" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78deb158fb1d73b29efb4b7e9b9860b78059c670de06bd28df8d0b458ded0eb" -dependencies = [ - "parse-display-derive", - "regex", - "regex-syntax", -] - -[[package]] -name = "parse-display-derive" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e95a50d1084dab562913062c4c34bb204b68fc6ec38a1395909ff5aaaf4f10a" -dependencies = [ - "proc-macro2", - "quote", - "regex", - "regex-syntax", - "structmeta", - "syn 2.0.119", -] - [[package]] name = "password-hash" version = "0.5.0" @@ -7877,29 +7851,6 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "structmeta" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329" -dependencies = [ - "proc-macro2", - "quote", - "structmeta-derive", - "syn 2.0.119", -] - -[[package]] -name = "structmeta-derive" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "strum" version = "0.25.0" diff --git a/Cargo.toml b/Cargo.toml index 8a0b1de9..7664f4ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mega2" -version = "0.42.149" +version = "0.43.0" 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" @@ -66,7 +66,6 @@ once_cell = "1.21.4" # implementation live in `src/orbit_api/` and `src/orbit/`. object_store = { version = "0.14.1", features = ["aws", "gcp"] } openssl = "0.10.81" -parse-display = "0.11.0" percent-encoding = "2.3.2" pgp = "0.20.0" rand = { version = "0.10.2", features = ["thread_rng"] } diff --git a/docs/plan/plan-20261015.md b/docs/plan/plan-20261015.md index 0d8c4118..62370bef 100644 --- a/docs/plan/plan-20261015.md +++ b/docs/plan/plan-20261015.md @@ -2910,7 +2910,7 @@ AC1..4是发布前四前置source资格;AC5..8在合法bump之后、C③三门 **Implementation write set:** `src/callisto/trace_principal.rs`、`src/callisto/trace_credential_binding.rs`、`src/callisto/trace_target.rs`、`src/callisto/mod.rs`、`src/jupiter/migration/m20261015_000100_trace_identity.rs`、`src/jupiter/migration/mod.rs`、`tests/integration_traces.rs`、`docs/refactoring/traces.md`、`docs/refactoring/integration.md`、`tests/common/traces_db.rs`、`src/lib.rs`。 -**Release write set:** `Cargo.toml(version)`、`Cargo.lock`。 +**Release write set:** `Cargo.toml(version;移除经全仓搜索与cargo tree确认未使用的parse-display直接依赖)`、`Cargo.lock`。 **Files likely touched:** 与I写集相同,新增路径标new;实际越界先ER-03修卡。 @@ -9473,30 +9473,34 @@ C4 只批准**一次**同源、同工具、同完整五门及资源根核的前 **Task type:** `implementation` -**Lifecycle / Acceptance:** `in-progress` / `locally-accepted`(2026-11-09;按用户指示不做 Codex/Claude Review,直接开发。新增 `scripts/traces_legacy_fence_probe.sh`(旧角色 DB INSERT 与 legacy prefix PUT 两个探针,缺 fixture/未运行/意外成功均 FAIL,旧 image digest 绑定 sanitized 汇总)与离线 selector `purge_perimeter_`(3/3:参数解析、缺 fixture 非零、两个探针逐案计数);nightly fmt 与严格 Clippy 通过。版本 `0.42.144`。**AC-1..AC-7 未勾选**:它们需要本部署真实实例清单、历史 backend 与 provider 权限撤销、旧 image 重启探针,专用验收部署 `capture-acceptance-20261111` 已建并用于 H5:old v0.42.132 与 pre-H5 current v0.42.147,backend 为 Local。旧镜像只读对象挂载下的 POST 400 `Read-only file system` 是准备阶段证据,非 MTR-46 接受结果;AC-1..AC-7 仍未勾。MTR-46 最终 VER-2 按 2026-11-12 ER-03 前滚条款区分 provider 与 Local backend;须等 FIX-MTR-33/.149 实际 C/D 后绑定当前 journal/manifest 重跑,H6 前仍需 DB denial、control-plane restart refusal、范围复扫和表/历史backend核验。) +**Lifecycle / Acceptance:** `done` / `complete`(2026-11-13:`.149` 本地 C2 完整门 3347 passed / 0 failed / 3 ignored,GitHub main deploy run `43350438290` 与 Docker build/push run `43350595567` 均成功;本卡真实 Local 部署 VER-2 全部完成。H6 的新版部署与 guarded DROP 仍只由 MTR-29 放行,不把本卡 complete 解释成 H6 complete。) **Description:** 自MTR-33拆出;使用 `mega2 --config <现存配置> traces purge-legacy-capture --action --journal --maintenance-manifest <受控manifest>`;父模块 `src/commands/traces.rs`,子driver `traces_purge.rs`。各action只消费对应已受审前置,ParsedExistingConfig不自动migration。 旧版本跨实例写入的外围屏障。执行owner为每部署具名DB/对象存储维护者(用户或其委派管理员);发布者只核验收据,不凭本地unit替代实际控制面/旧image行为。对所有本部署实际使用backend逐一执行,未知位置阻断。 黑盒入口冻结:通过已注册CLI/受审部署脚本操作;实际旧image/control-plane/provider DB/PUT探针与sanitized receipts,不以库内替身代替live。 **Out of scope:** 本卡只交付所声明行为轴;其它范围按共享契约与依赖表承接,生产行为不得临时扩张。 -**Current evidence:** MTR-46 live 专用部署已准备:`target/capture-acceptance/evidence/deployment-execution-plan.json` 当前 `old_restarted_pre_h5_ready`,deployment `capture-acceptance-20261111`,maintenance manifest SHA256 `590c439546f74deaaf6b97fe9b1f770d1dc28e37eb4bb44f0bda4df600e8ed88`、new config SHA256 `a9cc01f803761f2dbec00437feecf73fb3273b63e6f0182585f2c108d81ec40e`;唯一声明 backend 为 `objects/` 下 Local,Capture prefix `agent/capture-acceptance-20261111/acceptance-only/`,`git/` 与 `traces/` 排除。pre-H5 current image 为 `genedna/mega2@sha256:8f5eebd5e01a115d7765eb7211bbbd8481bbfb73021eb1f9c9fdf4b8461a4eca`(v0.42.147),旧 image 为 `genedna/mega2@sha256:1580992f6bd37d19721a32ef71800d500a411b27d2c47772b097b8a078f77c51`(v0.42.132)。2026-11-11 的真实旧 image staging POST 收到 HTTP 400 `Read-only file system`,单独对象快照核验 unchanged;该准备证据早于 FIX-MTR-33/.149 C/D,不能代替本卡 live 验收。后续注册的 Local backend VER-2 协议收据为 `/mnt/data/gitmono/mega2/target/capture-acceptance/evidence/local-perimeter-verification-plan-20261112.json`(SHA256 `9e8262622077d1efce425d0ee15130880b6a069dd4a7a3ae9ef7795ea6a85e8c`);必须在 .149 实际 C/D 后以当前冻结journal/manifest重跑。 +**历史准备阶段证据(截至 2026-11-12,后由下方终态收据更新):** MTR-46 live 专用部署已准备:`target/capture-acceptance/evidence/deployment-execution-plan.json` 当前 `old_restarted_pre_h5_ready`,deployment `capture-acceptance-20261111`,maintenance manifest SHA256 `590c439546f74deaaf6b97fe9b1f770d1dc28e37eb4bb44f0bda4df600e8ed88`、new config SHA256 `a9cc01f803761f2dbec00437feecf73fb3273b63e6f0182585f2c108d81ec40e`;唯一声明 backend 为 `objects/` 下 Local,Capture prefix `agent/capture-acceptance-20261111/acceptance-only/`,`git/` 与 `traces/` 排除。pre-H5 current image 为 `genedna/mega2@sha256:8f5eebd5e01a115d7765eb7211bbbd8481bbfb73021eb1f9c9fdf4b8461a4eca`(v0.42.147),旧 image 为 `genedna/mega2@sha256:1580992f6bd37d19721a32ef71800d500a411b27d2c47772b097b8a078f77c51`(v0.42.132)。2026-11-11 的真实旧 image staging POST 收到 HTTP 400 `Read-only file system`,单独对象快照核验 unchanged;该准备证据早于 FIX-MTR-33/.149 C/D,不能代替本卡 live 验收。后续注册的 Local backend VER-2 协议收据为 `/mnt/data/gitmono/mega2/target/capture-acceptance/evidence/local-perimeter-verification-plan-20261112.json`(SHA256 `9e8262622077d1efce425d0ee15130880b6a069dd4a7a3ae9ef7795ea6a85e8c`);必须在 .149 实际 C/D 后以当前冻结journal/manifest重跑。 **Acceptance criteria:** -- [ ] AC-1: 核实所有声明deployment实例清单。 -- [ ] AC-2: 核实所有历史backend位置清单。 -- [ ] AC-3: 旧角色对象PUT权限撤销。 -- [ ] AC-4: 存量旧进程drain后不再PUT。 -- [ ] AC-5: 部署控制面禁止旧image重启writer。 -- [ ] AC-6: 旧binary重启DB写探针失败。 -- [ ] AC-7: 旧binary重启对象PUT探针失败。 -- [ ] AC-8: 任一probe未运行不允许H6。 +- [x] AC-1: 核实所有声明deployment实例清单。 +- [x] AC-2: 核实所有历史backend位置清单。 +- [x] AC-3: 旧角色对象PUT权限撤销。 +- [x] AC-4: 存量旧进程drain后不再PUT。 +- [x] AC-5: 部署控制面禁止旧image重启writer。 +- [x] AC-6: 旧binary重启DB写探针失败。 +- [x] AC-7: 旧binary重启对象PUT探针失败。 +- [x] AC-8: 任一probe未运行不允许H6。 **Verification:** - [x] VER-1: `source .env.test && cargo test -p mega2 --test integration_traces purge_perimeter_ -- --test-threads=1`(new target/filter;须nonzero执行) -- [ ] VER-2: 实际部署维护者:逐deployment列instance/历史backend和权限撤销凭据,运行 `scripts/traces_legacy_fence_probe.sh --maintenance-manifest "$MEGA2_TRACES_MAINTENANCE_MANIFEST" --old-image "$MEGA2_TRACES_OLD_IMAGE_DIGEST" --journal "$MEGA2_TRACES_PURGE_JOURNAL"`(manifest是56核验通过的具名维护集合文件,journal是23创建并由33 fence receipt确认的UUID,旧镜像digest来自46部署清单的固定旧writer image;operator从这些受审receipt导出env并绑定SHA,不自行猜值);必须分别证明DB写失败与PUT失败,未运行/skipped=FAIL 对实际 HTTP provider backend,按原脚本逐项跑 DB INSERT/legacy prefix PUT 并证明权限拒绝;当前部署是 Local backend,没有 provider HTTP PUT endpoint,禁止将此条件记 skip 或用代理代替。此环境注册的 backend-specific 路径:等 FIX-MTR-33/.149 实际 C/D 后,以真实 old image 运行 `target/capture-acceptance/probe_old.py object`(authenticated staging POST 被只读挂载拒绝,前后对象清单同 SHA)和 `probe_old.py db`(旧进程 session PUT 遭真实 DB permission/fence deny,排除 auth/startup 错并与 statement metadata 关联);再 drain/remove old service 并记录实际 restart refusal。均绑定部署 manifest SHA、同一 journal、旧 container/image/process;本地 backend 无 provider history versions,明确记为 N/A。协议收据 `/mnt/data/gitmono/mega2/target/capture-acceptance/evidence/local-perimeter-verification-plan-20261112.json` SHA256 `9e8262622077d1efce425d0ee15130880b6a069dd4a7a3ae9ef7795ea6a85e8c`。在对应探针逐一取得前 VER-2/AC-1..AC-7 不勾选,未运行/skipped=FAIL。 +- [x] VER-2: 实际部署维护者:逐deployment列instance/历史backend和权限撤销凭据,运行 `scripts/traces_legacy_fence_probe.sh --maintenance-manifest "$MEGA2_TRACES_MAINTENANCE_MANIFEST" --old-image "$MEGA2_TRACES_OLD_IMAGE_DIGEST" --journal "$MEGA2_TRACES_PURGE_JOURNAL"`(manifest是56核验通过的具名维护集合文件,journal是23创建并由33 fence receipt确认的UUID,旧镜像digest来自46部署清单的固定旧writer image;operator从这些受审receipt导出env并绑定SHA,不自行猜值);必须分别证明DB写失败与PUT失败,未运行/skipped=FAIL 对实际 HTTP provider backend,按原脚本逐项跑 DB INSERT/legacy prefix PUT 并证明权限拒绝;当前部署是 Local backend,没有 provider HTTP PUT endpoint,禁止将此条件记 skip 或用代理代替。此环境注册的 backend-specific 路径:等 FIX-MTR-33/.149 实际 C/D 后,以真实 old image 运行 `target/capture-acceptance/probe_old.py object`(authenticated staging POST 被只读挂载拒绝,前后对象清单同 SHA)和 `probe_old.py db`(旧进程 session PUT 遭真实 DB permission/fence deny,排除 auth/startup 错并与 statement metadata 关联);再 drain/remove old service 并记录实际 restart refusal。均绑定部署 manifest SHA、同一 journal、旧 container/image/process;本地 backend 无 provider history versions,明确记为 N/A。协议收据 `/mnt/data/gitmono/mega2/target/capture-acceptance/evidence/local-perimeter-verification-plan-20261112.json` SHA256 `9e8262622077d1efce425d0ee15130880b6a069dd4a7a3ae9ef7795ea6a85e8c`。在对应探针逐一取得前 VER-2/AC-1..AC-7 不勾选,未运行/skipped=FAIL。 +**2026-11-13 MTR-46 终态验收:** 真实专用部署 `capture-acceptance-20261111` 仅有用户授权的 Local backend 与 `agent/capture-acceptance-20261111/acceptance-only/` 前缀;实际 `objects/agent/` 只有该部署的 2 个对象,Git 与新 traces 前缀分别为 14/383 个对象。Local 无 provider 历史版本/代次,记录为 N/A。旧镜像 v0.42.132(`sha256:1580992f6bd37d19721a32ef71800d500a411b27d2c47772b097b8a078f77c51`,container `5b60a258…`)以只读挂载运行;新维护镜像 v0.42.149(`sha256:12583fdb0cf604ef1255bec8f74594690f105f0e7caac7d1c89ae096f78003cd`)。manifest SHA256 `590c439546f74deaaf6b97fe9b1f770d1dc28e37eb4bb44f0bda4df600e8ed88`;真实 freeze journal `b83acca3-0b2a-4be7-b3c0-60ac56ce1955` / digest `sha256:51d65f29c71f557308d77a2e1574ffb23a8b9088e9e95eeade3c71eb6d665cfe`;preflight aggregate `f1dcbd8195404c38850600bfe1782b01e832731fcc8f8a977c368aad3e1d60c4`(1 scope / 1 owner)。 +旧 staging POST 实测 HTTP 400 `Read-only file system`,两次对象快照一致。转移 12 张表 ownership 后为 `capture_app` 显式保留 12 表 SELECT、撤销全部 INSERT/UPDATE/DELETE;旧镜像真实 PUT HTTP 400 与 PostgreSQL 唯一同窗错误关联:SQLSTATE 42501、`capture_app@capture_acceptance_v2`、`agent_capture_session`。该 `.132` 路径实际先执行 `SELECT … FOR UPDATE`,因 UPDATE 被撤销而在到达 INSERT 前拒绝;没有临时开放 DML。持久 fence `dfbc57de-96e3-4e86-ad77-4d7b1f55bfdb` 激活且同 journal 重放为 `already-active`。 +真实 inventory 仅包含授权前缀内 raw 与未完成 staging 两项;delete 将两项标记完成、Local 前缀复扫为空,Git/traces 两组内容哈希不变。旧 writer 随后被停止,capture_app DB session 为 0、HTTP listener 已关闭;期望 compose 只含 postgres/redis,显式 `up old` 被控制面以 `no such service: old` 拒绝;仅有一个容器曾使用钉定旧 digest。保留 12 张旧表及 active fence,等待 MTR-29 minor 发布后 guarded DROP。 +脱敏实证:`target/capture-acceptance/evidence/freeze-receipt.json`、`preflight-receipt.json`、`old-binary-object-probe-20261113T032121807755Z.json`、`old-db-denial-correlation-20261113.json`、`fence-receipt.json`、`pre-delete-verification.json`、`post-delete-verification.json`、`old-control-plane-restart-refusal-20261113.json`;执行面状态见 `target/capture-acceptance/evidence/deployment-execution-plan.json`。 **Dependencies:** `MTR-33, FIX-MTR-33, DEP-TR-SERVICES`;消费已受审前置产物。 **Deliverables:** N/A:实现、测试、文档产物全部列I。 @@ -10129,11 +10133,11 @@ C4 只批准**一次**同源、同工具、同完整五门及资源根核的前 **Deliverables:** N/A:产物在I写集逐文件登记。 -**Implementation write set:** `docs/refactoring/traces.md`、`docs/refactoring/agent-capture.md`、`docs/refactoring/storage-events.md`、`docs/refactoring/history-projection.md`、`docs/plan/plan-20261015.md`、`docs/user-guide.zh.md`、`docs/user-guide.md`、`docs/configuration.md`、`docs/configuration.zh.md`、`docs/deployment.md`、`docs/deployment.zh.md`、`docs/architecture.md`、`docs/architecture.zh.md`、`README.md`、`README.zh.md`、`docs/refactoring/config.md`、`docs/refactoring/integration.md`、`docs/refactoring/README.md`。 +**Implementation write set:** `docs/refactoring/traces.md`、`docs/refactoring/agent-capture.md`、`docs/refactoring/storage-events.md`、`docs/refactoring/history-projection.md`、`docs/plan/plan-20261015.md`、`docs/user-guide.zh.md`、`docs/user-guide.md`、`docs/configuration.md`、`docs/configuration.zh.md`、`docs/deployment.md`、`docs/deployment.zh.md`、`docs/architecture.md`、`docs/architecture.zh.md`、`README.md`、`README.zh.md`、`docs/refactoring/config.md`、`docs/refactoring/integration.md`、`docs/refactoring/README.md`;C-gate test-only stabilization: `src/api/router/snapshot_chunk_map_retention_tests.rs`、`src/commands/service/mod.rs`(仅 `#[cfg(test)] mod tests`)。 **Release write set:** `Cargo.toml(version)`、`Cargo.lock`。 -**Files likely touched:** 与I写集相同,新增路径标new;实际越界先ER-03修卡。 +**Files likely touched:** 与I写集相同,新增路径标new;上述两个 Rust 源路径只改测试代码,不改非-test 生产逻辑;实际越界先ER-03修卡。 **Docs and compatibility impact:** 共享契约对应章节及I所列指南/覆盖矩阵随本卡同步;API取运行时OpenAPI证据,无落盘spec。 diff --git a/docs/plan/plan-long.md b/docs/plan/plan-long.md index 938a2dd1..f21f76bb 100644 --- a/docs/plan/plan-long.md +++ b/docs/plan/plan-long.md @@ -2254,3 +2254,5 @@ Libra交接实际证据(2026-10-26):单文件main提交a4d84829,parent b 原现行表格列: 当前状态(2026-10-26,实际收口01:54:13 UTC):MTR-103已done/complete;C1完整21 targets、3140 PASS、0 failed、3原ignored,nightly fmt、all-target/all-feature严格Clippy及双build全部exit0/0warning;自己的本地Claude ER05与执行/发布审查均PASS,root在原3600秒内2298.567秒观察最终C。签名DCO提交5a2b93d9ca5a4071dbb5d1a1a6c7a403742a6102已推main,v0.42.75原生签名标注tag与手写Release已核;main CI40254455937、tag CI40254547920的amd64/arm64/Docker manifest全部attempt1实际success,未用Harbor例外。正式Mega23/118、Libra原计划0/26、联合23/144;外部资格1/4。 原现行表格列: 当前依赖与后续门(2026-10-26):MTR102与103完整C/D已闭合;当前执行前沿MTR-11,pending/空,仅来源与开工核验,尚未准入实现或认领A/C。顺序11→40→13→39→92→12/H1→LTR10→11→12→LTR01/H2;各卡自身门与跨仓资格/WRITERS/LIVE前置不省略。Libra FIX04 C1仍FAIL/STOP,F1/F2 P1未修;实际Claude2891a30b来源PASS/发布次序FAIL。仅FIX-LTR-05一次release保留现有ingress两方法同一dead_code诊断的具名例外仍待用户明确答复;未准入新Libra实现/A/C/发布,PR636已满足旧Rustdoc下一提交要求。旧FIX3诊断3/3、B8失败及8/8 STOP、所有原失败和历史数据库根因未知均保留。 ``` +**2026-11-13 MTR-46 live acceptance complete; six-hour CI running:** Dedicated Local deployment `capture-acceptance-20261111` completed MTR-46 VER-2 on the published v0.42.149 image (digest `sha256:12583fdb0cf604ef1255bec8f74594690f105f0e7caac7d1c89ae096f78003cd`) against the pinned old v0.42.132 image (`sha256:1580992f6bd37d19721a32ef71800d500a411b27d2c47772b097b8a078f77c51`). Real manifest freeze/preflight produced journal `b83acca3-0b2a-4be7-b3c0-60ac56ce1955` and aggregate `f1dcbd8195404c38850600bfe1782b01e832731fcc8f8a977c368aad3e1d60c4`; old object staging was denied by the read-only mount; DB DML was denied with SQLSTATE 42501; active fence replay was idempotent; two authorized Local objects were deleted and rescanned empty; Git/traces hashes were unchanged; old writer drain and compose restart refusal succeeded. See `target/capture-acceptance/evidence/` and the MTR-46 card. The old .132 PUT path issues `SELECT FOR UPDATE`, so the effective UPDATE denial occurs before INSERT; no DML was reopened. MTR-46 is `done / complete`; this does not claim MTR-29/H6 complete. `.149` C2 (3347 passed / 0 failed / 3 ignored), main deploy `43350438290`, and Docker push `43350595567` succeeded. Separate Action commit `88d248844b68b8daea276e3b49e54cd1765eb703` is pushed; full `repository-gates` run `43360685369` is in progress on the self-hosted six-hour runner with queueing enabled. MTR-29 still requires the family minor C/D, guarded DROP, and Libra post-DROP smoke. + diff --git a/docs/plan/plan-status.md b/docs/plan/plan-status.md index 8fd7fe2d..cb7586c2 100644 --- a/docs/plan/plan-status.md +++ b/docs/plan/plan-status.md @@ -1,3 +1,7 @@ +**2026-11-13 11:44 UTC MTR-29 local test build handoff:** At the user's request to move verification to another server, the local `cargo build --tests` session was interrupted with SIGINT and exited 130 after about 92 minutes. It had emitted only the normal `Compiling mega2` line and had not reached `cargo test --all`. This is an intentional cancellation, not a pass or a product-test failure; MTR-29 C remains pending for the new server. + +**2026-11-13 06:35 UTC MTR-29 `.43.0` release-candidate C diagnosis:** PR [#108](https://github.com/gitmono-dev/mega2/pull/108), head `9b039c7b4b09852d64c838080acc09c02a5c8f3f`, workflow run [43362201859](https://github.com/gitmono-dev/mega2/actions/runs/43362201859) passed dependency checks, nightly fmt, strict all-feature Clippy, both builds, isolated test-stack startup, Traces prerequisite preflight, and the required publication/performance suite. Its full `cargo test --all -- --nocapture` failed two tests: receipt cancellation exceeded the old 12-second bound although install ownership is rechecked every 10 seconds, and the service watcher read `MEGA_LOG__PRINT_STD=not_bool_secret` while another test temporarily set that process-wide variable (the sourced `.env.test` does not define it). The MTR-29 test-only write set now registers both affected test locations. With the official local test stack healthy, both exact tests passed after the test-only fixes; nightly fmt check also passes. Cargo 1.100 additionally reported an unused direct `parse-display` dependency; repository search and `cargo tree` proved no source or transitive use, so its removal is registered in the release write set and `Cargo.lock`. After removal, `cargo check --offline --all-targets --all-features` and strict `cargo clippy --all-targets --all-features -- -D warnings` both exited 0 with zero warnings. Standard build, build-tests, and the full C rerun on the final tree remain pending. This is not MTR-29 C acceptance: no commit/push/tag/Release/D, guarded DROP, or H6 is claimed. + **2026-11-12 17:34:44 UTC `.149` C2 完整 C 通过:** 独立六小时监督窗口实际耗时 10085.671 秒(14:46:38.525–17:34:44.195 UTC),runner exit 0、未超时;24 结果组 3347 passed / 0 failed / 3 原 ignored / 0 filtered。11 项 release-tree 与 849 项 source-tree 在 C2 结束时全部匹配;正式收据 `target/20261015/v0149-c2-20261112/success-receipt.json` SHA256 `ec618d751da23e5917f90bb88d87dd32147c7f76909f86eb514558b74c758e1d`。C1 原件与不合格原因继续保留,C2 独立取得正式本地 C;FIX-MTR-33 仍待签名提交、推送、tag/Release 与远端 D,之后才执行 MTR-46 实机屏障。交叉 Review 按用户指示豁免,不记 PASS。 **2026-11-12 FIX-MTR-33 `.149` C1/C2 qualification:** C1 ran 09:25:50–14:31:25 UTC under the user-adjusted 21,600-second boundary; all five gate commands passed, with 3,347 passed / 0 failed / 3 ignored across 24 result groups. The 849-file source manifest matches. C1 is not formal C acceptance: its original monitor exited 137 without `monitor-summary.json`, the detached observer did not obtain the runner exit code, and three frozen release-tree plan-document hashes drifted during the run. Original evidence is retained in `target/20261015/v0149-c1-20261112/`; supplemental receipt SHA256 `d734d86a8ce426f42218555ab09e9c20fc2c3621b1c1f1da869b926c904cb708`. A fresh C2 qualification is registered with the same five gates and a six-hour supervisor, after freezing current plan-document hashes; C1 is not overwritten or reclassified as a product failure. FIX-MTR-33 C/D and MTR-46 live acceptance remain pending. @@ -1717,3 +1721,5 @@ MTR-21 `done/complete`:本地 C 已通过(24 targets、3310 passed/0 failed/ 卡片进度:Mega2 `79/138`、Libra `1/27`,合计 `80/165`(`48.5%`)。下一卡 MTR-58 仍需先取得 `DEP-TR-H4` 的固定 source/binary/contract pin 与七个 selector 的逐案结果,并核实 `DEP-TR-SERVICES`;当前不把这些未交接前置记为已满足。 +**2026-11-13 MTR-46 live acceptance complete; six-hour CI running:** Dedicated Local deployment `capture-acceptance-20261111` completed MTR-46 VER-2 on the published v0.42.149 image (digest `sha256:12583fdb0cf604ef1255bec8f74594690f105f0e7caac7d1c89ae096f78003cd`) against the pinned old v0.42.132 image (`sha256:1580992f6bd37d19721a32ef71800d500a411b27d2c47772b097b8a078f77c51`). Real manifest freeze/preflight produced journal `b83acca3-0b2a-4be7-b3c0-60ac56ce1955` and aggregate `f1dcbd8195404c38850600bfe1782b01e832731fcc8f8a977c368aad3e1d60c4`; old object staging was denied by the read-only mount; DB DML was denied with SQLSTATE 42501; active fence replay was idempotent; two authorized Local objects were deleted and rescanned empty; Git/traces hashes were unchanged; old writer drain and compose restart refusal succeeded. See `target/capture-acceptance/evidence/` and the MTR-46 card. The old .132 PUT path issues `SELECT FOR UPDATE`, so the effective UPDATE denial occurs before INSERT; no DML was reopened. MTR-46 is `done / complete`; this does not claim MTR-29/H6 complete. `.149` C2 (3347 passed / 0 failed / 3 ignored), main deploy `43350438290`, and Docker push `43350595567` succeeded. Separate Action commit `88d248844b68b8daea276e3b49e54cd1765eb703` is pushed; full `repository-gates` run `43360685369` is in progress on the self-hosted six-hour runner with queueing enabled. MTR-29 still requires the family minor C/D, guarded DROP, and Libra post-DROP smoke. + diff --git a/src/api/router/snapshot_chunk_map_retention_tests.rs b/src/api/router/snapshot_chunk_map_retention_tests.rs index 2dccb541..36bcc653 100644 --- a/src/api/router/snapshot_chunk_map_retention_tests.rs +++ b/src/api/router/snapshot_chunk_map_retention_tests.rs @@ -536,8 +536,14 @@ async fn actual_receipt_create_and_read_waits_cancel_without_backend_release_or_ } // Atomic create uses the actual owner expiry; receipt input also keeps // its stricter five-second cap. Neither wait needs backend release. + // Install ownership is rechecked every RENEW_INTERVAL (10 seconds). + // Under the full parallel test suite, the expiry query can need extra + // time to acquire a database connection after that check becomes due. + // Keep the bounded cancellation assertion while allowing three check + // intervals; the backend is still never released and every no-write + // and credit-refund assertion below remains mandatory. let finished = timeout( - Duration::from_secs(if creating { 12 } else { 7 }), + Duration::from_secs(if creating { 30 } else { 7 }), &mut task, ) .await; diff --git a/src/commands/service/mod.rs b/src/commands/service/mod.rs index 414ab87a..be602f8c 100644 --- a/src/commands/service/mod.rs +++ b/src/commands/service/mod.rs @@ -265,7 +265,10 @@ async fn spawn_config_reload_watcher_with_interval( mod tests { use super::*; use crate::config::{ - Config, reload::ConfigHandle, template::config_init_template, testing::isolated_config, + Config, + reload::ConfigHandle, + template::config_init_template, + testing::{env_lock, isolated_config}, }; #[test] @@ -307,40 +310,51 @@ mod tests { assert_eq!(handle.snapshot().expect("snapshot").log.level, "info"); } - #[tokio::test] - async fn service_reload_watcher_task_reloads_changed_profile() { - let temp_dir = tempfile::tempdir().expect("temp dir"); - let config_path = temp_dir.path().join("config.toml"); - let profile_path = temp_dir.path().join("config.prod.toml"); - std::fs::write(&config_path, config_init_template(temp_dir.path())).expect("base config"); - - let config = Config::new(config_path.to_str().expect("utf-8 config path")) - .expect("base config should load"); - let handle = ConfigHandle::new(config); - let task = spawn_config_reload_watcher_with_interval( - handle.clone(), - Some(config_path), - Some(profile_path.clone()), - Duration::from_millis(10), - ) - .await - .expect("watcher should start") - .expect("watcher task"); - - std::fs::write(&profile_path, "[log]\nlevel = \"debug\"\n").expect("profile config update"); - - tokio::time::timeout(Duration::from_secs(1), async { - loop { - if handle.snapshot().expect("snapshot").log.level == "debug" { - break; - } - tokio::time::sleep(Duration::from_millis(20)).await; - } - }) - .await - .expect("reload watcher should apply profile change"); + #[test] + fn service_reload_watcher_task_reloads_changed_profile() { + // Config loading reads process-wide environment variables. Serialize + // this whole watcher test with tests that temporarily mutate them. + let _env = env_lock(); + tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .expect("test runtime") + .block_on(async { + let temp_dir = tempfile::tempdir().expect("temp dir"); + let config_path = temp_dir.path().join("config.toml"); + let profile_path = temp_dir.path().join("config.prod.toml"); + std::fs::write(&config_path, config_init_template(temp_dir.path())) + .expect("base config"); + + let config = Config::new(config_path.to_str().expect("utf-8 config path")) + .expect("base config should load"); + let handle = ConfigHandle::new(config); + let task = spawn_config_reload_watcher_with_interval( + handle.clone(), + Some(config_path), + Some(profile_path.clone()), + Duration::from_millis(10), + ) + .await + .expect("watcher should start") + .expect("watcher task"); + + std::fs::write(&profile_path, "[log]\nlevel = \"debug\"\n") + .expect("profile config update"); + + tokio::time::timeout(Duration::from_secs(1), async { + loop { + if handle.snapshot().expect("snapshot").log.level == "debug" { + break; + } + tokio::time::sleep(Duration::from_millis(20)).await; + } + }) + .await + .expect("reload watcher should apply profile change"); - task.stop().await.expect("watcher should stop"); + task.stop().await.expect("watcher should stop"); + }); } // ----- WH-13: unified cleanup tail coverage -----