Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
caf0dee
feat(taosd): implement phase1 repair CLI parsing and validation
hzcheng Mar 6, 2026
555e6d6
feat(repair): add meta force repair flow and coverage
hzcheng Mar 6, 2026
2ac1025
feat(repair): add tsdb force repair flow and coverage
hzcheng Mar 8, 2026
03eae54
feat(repair): refactor repair option structure and remove deprecated …
hzcheng Mar 9, 2026
c7b7f49
feat(meta): refactor meta repair to separate strategy functions
hzcheng Mar 9, 2026
9006f50
feat(repair): redesign CLI for multi-target data repair
hzcheng Mar 9, 2026
47ef776
refactor(dmRepair): replace generic target array with type-specific a…
hzcheng Mar 9, 2026
0277b27
feat(dnode): refactor repair options to support multiple node types
hzcheng Mar 10, 2026
c69c223
feat: remove dnode from node-type option and clean up generateNewMeta…
hzcheng Mar 10, 2026
14cca94
feat(meta): refactor meta repair logic and remove unused static variable
hzcheng Mar 10, 2026
03f767f
feat(meta): temporarily disable meta backup during forced repair
hzcheng Mar 10, 2026
a8080fe
feat(wal): add dynamic corruption handling with dmRepair integration
hzcheng Mar 10, 2026
bdc47aa
remove useless files
hzcheng Mar 10, 2026
452be5f
feat(repair): add vnode type and force mode detection functions
hzcheng Mar 10, 2026
a434412
feat(tsdb): add force repair functionality for file system integrity
hzcheng Mar 10, 2026
fdb9965
feat(tsdb): implement deep scan and fix for data file repair
hzcheng Mar 10, 2026
44fd1e3
docs: update TSDB repair strategies and documentation
hzcheng Mar 11, 2026
88df66f
docs: clarify TSDB repair strategy behavior and limitations
hzcheng Mar 11, 2026
25e38ba
docs: plan tsdb force repair test redesign
hzcheng Mar 11, 2026
0480ebc
feat(test): add comprehensive force repair test suite for TSDB
hzcheng Mar 12, 2026
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ test/screenlog*
test/output.tmp

CMakeUserPresets.json

.agents/
skills-lock.json
36 changes: 36 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Repository Guidelines

## Project Structure & Module Organization

Check failure on line 3 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Headings should be surrounded by blank lines

AGENTS.md:3 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Project Structure & Module Organization"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
- `source/` contains core engine code, organized by subsystem (`dnode/`, `client/`, `libs/`, `os/`, `util/`).

Check failure on line 4 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Lists should be surrounded by blank lines

AGENTS.md:4 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- `source/` contains core engi..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
- `include/` stores exported headers, largely mirrored by subsystem.
- `tools/`, `utils/`, and `examples/` provide operational binaries, helper utilities, and sample client usage.
- `contrib/` holds bundled third-party dependencies; `cmake/` contains build options and platform logic.
- `test/` is the newer pytest-based end-to-end framework (`cases/`, `env/`, `new_test_framework/`).
- `tests/` contains unit/system/legacy/perf/chaos suites and CI runner scripts.

## Build, Test, and Development Commands

Check failure on line 11 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Headings should be surrounded by blank lines

AGENTS.md:11 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Build, Test, and Development Commands"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
- `./build.sh gen`: configure a debug build in `debug/` with tests/tools enabled.

Check failure on line 12 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Lists should be surrounded by blank lines

AGENTS.md:12 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- `./build.sh gen`: configure ..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
- `./build.sh bld`: compile using available CPU cores.
- `./build.sh test`: run CTest from the configured build directory.
- `cmake -B debug -DBUILD_TOOLS=true -DBUILD_TEST=true -DBUILD_CONTRIB=true && cmake --build debug`: direct CMake equivalent.
- `cd test && pytest cases/...`: run new pytest cases.
- `cd tests && ./run_all_ci_cases.sh -t python`: run Python-based system CI cases.
- `./build.sh conan-build-all`: optional Conan-driven dependency + build pipeline.

## Coding Style & Naming Conventions

Check failure on line 20 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Headings should be surrounded by blank lines

AGENTS.md:20 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Coding Style & Naming Conventions"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
- C/C++ formatting follows `.clang-format`: 2-space indentation, 120-column limit, no tabs, sorted includes.

Check failure on line 21 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Lists should be surrounded by blank lines

AGENTS.md:21 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- C/C++ formatting follows `.c..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
- Python formatting uses `black` (see `.pre-commit-config.yaml`).
- Run `pre-commit run -a` before pushing; hooks validate YAML/JSON, whitespace, typos, and run `cppcheck`.
- Pytest files should follow `test_*.py` naming (for example, `test_insert_double.py`).

## Testing Guidelines

Check failure on line 26 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Headings should be surrounded by blank lines

AGENTS.md:26 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Testing Guidelines"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
- Configure with `-DBUILD_TEST=true` so CTest targets are generated.

Check failure on line 27 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Lists should be surrounded by blank lines

AGENTS.md:27 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Configure with `-DBUILD_TEST..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
- Add C/C++ unit tests near the target module and register with CMake `add_test`.
- Add end-to-end coverage under `test/cases/`; reuse deployment YAMLs from `test/env/`.
- For every change, include at least one automated verification path and list exact test commands in the PR description.

## Commit & Pull Request Guidelines

Check failure on line 32 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Headings should be surrounded by blank lines

AGENTS.md:32 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Commit & Pull Request Guidelines"] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
- Branch from `3.0` (not `main`); docs-only branches should start with `docs/`.

Check failure on line 33 in AGENTS.md

View workflow job for this annotation

GitHub Actions / check-with-markdownlint

Lists should be surrounded by blank lines

AGENTS.md:33 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Branch from `3.0` (not `main..."] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
- Follow commit prefixes used in history: `fix:`, `feat:`, `docs:`, `chore:`, `test(scope):`.
- PRs should include problem summary, linked issue, design notes, and verification command output.
- Complete the contributor CLA before first code contribution.
71 changes: 71 additions & 0 deletions docs/data_repair/01-参数重构/findings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Findings & Decisions

## Requirements
- 参考 `.vscode/dev/phase1-repair-freeze.md` 完成 `taosd -r` 参数层重构。
- `--mode` 冻结值:`force|replica|copy`,本期仅 `force` 支持,`replica/copy` 返回 `TSDB_CODE_OPS_NOT_SUPPORT`。
- `--force` 完全弃用,出现即 `TSDB_CODE_INVALID_PARA`。
- `--file-type` 本期仅 `wal|tsdb|meta`,`tdb` 不兼容。
- `taosd -r` 仅在“未出现任何新修复参数”时走旧行为。
- 新修复参数必须与 `-r` 一起使用。
- 本期边界仅支持 `--node-type vnode`。

## Research Findings
- `taosd` 参数入口在 `source/dnode/mgmt/exe/dmMain.c::dmParseArgs`。
- 当前 `-r` 仅设置 `generateNewMeta=true`,并无新修复参数解析。
- `generateNewMeta` 在 `source/dnode/vnode/src/meta/metaOpen.c` 中触发旧元数据重建流程。
- 当前仓内未发现现成 `--node-type/--file-type/--mode` 解析实现可复用。
- 已在 `dmMain.c` 完成参数层接入:repair long options 解析、phase1 语义校验、`-r` 兼容策略收敛、repair help 输出。
- 已在 `test/cases/80-Components/01-Taosd/test_com_cmdline.py` 补充 phase1 repair 参数层用例。

## Technical Decisions
| Decision | Rationale |
|----------|-----------|
| 在 `dmMain.c` 内先落地 repair 参数层解析与校验 | 现有参数解析集中在该文件,改动最小且风险可控 |
| 通过命令矩阵做红绿验证 | 直接对应冻结文档 P/E 编号,证据清晰 |
| 新修复参数校验通过后在 phase1 直接成功返回 | 避免误进入正常 taosd 启动流程,保持“参数层重构”边界清晰 |

## Current Audit
- 2026-03-06 通过 `planning-with-files` 会话恢复脚本发现:上一会话还有 41 条未同步消息。
- 结合 `git diff --stat` 核对,当前工作区实际仅存在 `source/dnode/mgmt/exe/dmMain.c` 与 `test/cases/80-Components/01-Taosd/test_com_cmdline.py` 两处未提交改动。
- 上一会话提到的 `source/dnode/mgmt/repair/CMakeLists.txt` 与 `source/dnode/mgmt/CMakeLists.txt` 改动当前不在工作区中,应视为未落地或已回退。

## Review Follow-up Fixes
- 修复了 repair long option 缺参时误吞下一个选项的问题:当 `--node-type` 等参数后紧跟另一个 `-` 开头选项时,现统一报 `requires a parameter`。
- 修复了新增命令行测试在 ASAN/LSAN 环境下的稳定性问题:`_run_taosd()` 默认注入 `ASAN_OPTIONS=detect_leaks=0`(若调用环境未显式设置 `detect_leaks=`)。
- 调整了 phase1 repair 中 `TSDB_CODE_OPS_NOT_SUPPORT` 的进程退出行为:保留不支持提示,同时返回非零 shell 退出码,避免自动化脚本将失败误判为成功。
- 新增回归覆盖:缺少 long option 参数、`mode copy` 非零退出、ASAN 环境下命令执行路径。

## Issues Encountered
| Issue | Resolution |
|-------|------------|
| 环境无 pytest(`pytest` command / module not found) | 使用 `python3 -m py_compile` 做语法验证,待 CI 或完整测试镜像执行 pytest |

## Verification Update (2026-03-06)
- 手工执行 phase1 repair 命令矩阵共 20 条,结果为 20/20 通过。
- 覆盖范围包括成功路径 `p01-p05`、错误路径 `e01-e12`,并补充了 `e03b`(`--node-type` 缺参)回归场景。
- 当前命令行退出码行为已验证:`INVALID_PARA -> 24`、`INVALID_CFG -> 25`、`OPS_NOT_SUPPORT -> 1`、成功路径 -> `0`。
- `pytest` 解释器与插件可启动,但执行 `cases/80-Components/01-Taosd/test_com_cmdline.py -k repair_cmdline_phase1` 时在当前环境卡住,无完成结果;已确认不再是 `pytest` 缺失问题,而是测试运行期环境/初始化问题。

## Matrix Coverage Update (2026-03-06)
- `test_repair_cmdline_phase1` 已扩展为表驱动矩阵测试,覆盖冻结文档中的 `P01-P05` 与 `E01-E12`。
- 新增统一断言辅助方法 `_assert_taosd_case()`,便于后续继续按冻结矩阵增量扩展。
- 当前额外保留了 `E03b`(`--node-type` 缺参)回归场景,用于保护此前修复的 long option 缺参问题。
- `E13-E16` 暂未纳入该测试:这四项属于 repair 真正执行阶段的运行期错误,而当前 phase1 实现仍停留在参数层校验与分流,不具备稳定触发条件。

## Review Update (2026-03-06, Matrix Tests)
- 对扩展后的 `test_repair_cmdline_phase1` 进行了专项复审,未发现新的阻塞问题。
- 当前矩阵测试已按冻结文档覆盖 `P01-P05` 与 `E01-E12`,结构上可维护性良好。
- 一项轻微观察:部分成功路径仍使用较宽松的输出关键字(如 `version`)做匹配,后续如需进一步收紧断言,可改为更稳定的版本输出特征;当前不构成 blocker。

## Planning Files Location
- 当前任务的规划文件已统一位于 `docs/data_repair/01-参数重构/`。
- 后续若继续维护该任务,请更新此目录下的 `task_plan.md`、`findings.md`、`progress.md`,而不是项目根目录。

## Resources
- `.vscode/dev/phase1-repair-freeze.md`
- `.vscode/dev/RS.md`
- `source/dnode/mgmt/exe/dmMain.c`
- `source/dnode/vnode/src/meta/metaOpen.c`

## Visual/Browser Findings
- 无。
166 changes: 166 additions & 0 deletions docs/data_repair/01-参数重构/progress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Progress Log

## Session: 2026-03-06

### Phase 1: 需求冻结对齐与现状确认
- **Status:** complete
- **Started:** 2026-03-06 UTC
- Actions taken:
- 阅读冻结文档并提炼 P01-P05 与 E01-E16。
- 定位 `dmParseArgs` 和 `generateNewMeta` 旧链路。
- 确认当前代码尚未实现新修复参数层。
- Files created/modified:
- `task_plan.md` (created)
- `findings.md` (created)
- `progress.md` (created)

### Phase 2: TDD 红阶段(命令行为验证)
- **Status:** complete
- Actions taken:
- 使用 `debug/build/bin/taosd` 执行冻结矩阵关键命令进行红阶段验证。
- 观察到 `--node-type` 当前被识别为 invalid option,不满足新参数语义冻结。
- 观察到 `-r --help` 当前仅输出通用 help,不满足 repair help 预期。
- 执行环境触发 LSAN 中止(exit=134),但首条错误输出仍可用于确认参数层行为不符合预期。
- Files created/modified:
- `progress.md` (updated)

### Phase 3: 参数层实现与重构
- **Status:** complete
- Actions taken:
- 在 `source/dnode/mgmt/exe/dmMain.c` 新增 repair 参数上下文结构。
- 增加 long option 解析、`--vnode-id` 格式校验、phase1 语义校验与 `-r` 兼容收敛逻辑。
- 新增 `dmPrintRepairHelp()`,并接入 `-r --help` 专用输出路径。
- 新增 phase1 轻量 repair 分支:新参数校验通过后直接返回成功,不进入正常 taosd 启动流程。
- Files created/modified:
- `source/dnode/mgmt/exe/dmMain.c` (modified)

### Phase 4: 绿阶段验证
- **Status:** complete
- Actions taken:
- 执行 `cmake --build debug --target taosd -j8`,编译通过。
- 在 `ASAN_OPTIONS=detect_leaks=0` 环境运行 P01-P05 与 E01-E12 命令矩阵。
- 记录行为:成功路径均 exit=0;`INVALID_PARA` 路径 exit=24;`INVALID_CFG` 路径 exit=25;`OPS_NOT_SUPPORT` 路径按低 8 位表现为 exit=0,但均打印不支持信息。
- Files created/modified:
- `progress.md` (updated)

### Phase 6: 补充参数层测试用例
- **Status:** complete
- Actions taken:
- 在 `test/cases/80-Components/01-Taosd/test_com_cmdline.py` 新增 `test_repair_cmdline_phase1`。
- 增加 `_run_taosd` 辅助方法,断言 `-r --help`、缺少 `-r`、`--force` 弃用、`mode=copy` 不支持、force 参数成功路径。
- 尝试执行 pytest:环境缺少 `pytest` 可执行和模块,改为 `python3 -m py_compile` 完成语法验证。
- Files created/modified:
- `test/cases/80-Components/01-Taosd/test_com_cmdline.py` (modified)

## Test Results
| Test | Input | Expected | Actual | Status |
|------|-------|----------|--------|--------|
| red_p03_expected_success_now_fail | `taosd -r --node-type vnode --file-type wal --vnode-id 1234 --mode force -V` | 应支持新参数 | 报 `invalid option: --node-type` | FAIL(预期红) |
| red_e10_force_should_invalid_para | `taosd -r --node-type vnode --file-type wal --vnode-id 1 --force 1 -V` | 应明确报弃用参数错误 | 提前报 `invalid option: --node-type` | FAIL(预期红) |
| red_e01_repair_without_r | `taosd --node-type vnode --file-type wal --vnode-id 1 --mode force -V` | 应返回 INVALID_PARA | 报 `invalid option: --node-type` | FAIL(预期红) |
| red_p02_r_help | `taosd -r --help` | repair help | 通用 help | FAIL(预期红) |
| p01_legacy_r | `taosd -r -V` | success | version 输出,exit=0 | PASS |
| p02_repair_help | `taosd -r --help` | repair help | repair help 输出,exit=0 | PASS |
| p03_force_wal | `taosd -r --node-type vnode --file-type wal --vnode-id 1234 --mode force -V` | success | version 输出,exit=0 | PASS |
| p03_force_wal_no_version | `taosd -r --node-type vnode --file-type wal --vnode-id 1 --mode force` | success | 输出 phase1 提示并直接返回,exit=0 | PASS |
| p04_force_tsdb_multi | `taosd -r --node-type vnode --file-type tsdb --vnode-id 2,3 --mode force --backup-path /backup/vnode_tsdb -V` | success | version 输出,exit=0 | PASS |
| p05_force_meta_none_backup | `taosd -r --node-type vnode --file-type meta --vnode-id 1234 --mode force --backup-path none -V` | success | version 输出,exit=0 | PASS |
| e01_without_r | `taosd --node-type vnode --file-type wal --vnode-id 1 --mode force -V` | INVALID_PARA | `repair options must be used with '-r'`, exit=24 | PASS |
| e02_unknown | `taosd -r --unknown-opt` | INVALID_CFG | invalid option,exit=25 | PASS |
| e03_missing_node_type | `taosd -r --file-type wal --vnode-id 1 --mode force -V` | INVALID_PARA | 缺少 node-type,exit=24 | PASS |
| e04_non_vnode | `taosd -r --node-type mnode --file-type wal --vnode-id 1 --mode force -V` | OPS_NOT_SUPPORT | `not supported in this phase`,exit=0* | PASS |
| e05_missing_file_type | `taosd -r --node-type vnode --vnode-id 1 --mode force -V` | INVALID_PARA | 缺少 file-type,exit=24 | PASS |
| e06_file_type_tdb | `taosd -r --node-type vnode --file-type tdb --vnode-id 1 --mode force -V` | OPS_NOT_SUPPORT | `not supported in this phase`,exit=0* | PASS |
| e07_missing_vnode_id | `taosd -r --node-type vnode --file-type wal --mode force -V` | INVALID_PARA | 缺少 vnode-id,exit=24 | PASS |
| e08_vnode_id_format | `taosd -r --node-type vnode --file-type wal --vnode-id 1,a --mode force -V` | INVALID_PARA | 格式错误,exit=24 | PASS |
| e09_missing_mode | `taosd -r --node-type vnode --file-type wal --vnode-id 1 -V` | INVALID_PARA | 缺少 mode,exit=24 | PASS |
| e10_deprecated_force | `taosd -r --node-type vnode --file-type wal --vnode-id 1 --force 1 -V` | INVALID_PARA | `--force` 废弃错误,exit=24 | PASS |
| e11_mode_copy | `taosd -r --node-type vnode --file-type tsdb --vnode-id 1 --mode copy -V` | OPS_NOT_SUPPORT | `mode copy` 不支持,exit=0* | PASS |
| e11_mode_replica | `taosd -r --node-type vnode --file-type wal --vnode-id 1 --mode replica -V` | OPS_NOT_SUPPORT | `mode replica` 不支持,exit=0* | PASS |
| e12_replica_node_in_force | `taosd -r --node-type vnode --file-type tsdb --vnode-id 1 --mode force --replica-node 1.1.1.1:/d -V` | INVALID_PARA | 参数组合非法,exit=24 | PASS |
| py_compile_test_com_cmdline | `python3 -m py_compile test/cases/80-Components/01-Taosd/test_com_cmdline.py` | 语法通过 | exit=0 | PASS |

## Error Log
| Timestamp | Error | Attempt | Resolution |
|-----------|-------|---------|------------|
| 2026-03-06 UTC | LSAN 在命令行验证时中止进程(exit=134) | 1 | 使用 `ASAN_OPTIONS=detect_leaks=0` 运行命令矩阵,避免 LSAN 干扰参数层验证 |
| 2026-03-06 UTC | 无法运行 pytest(command/module not found) | 1 | 记录环境限制,使用 `py_compile` 验证新增测试语法 |

## 5-Question Reboot Check
| Question | Answer |
|----------|--------|
| Where am I? | Phase 6 |
| Where am I going? | 等待可用 pytest 环境做完整执行验证 |
| What's the goal? | 完成 taosd -r 参数层重构并验证 |
| What have I learned? | 参数层 + 命令行测试已落盘;当前环境缺失 pytest |
| What have I done? | 已补充 phase1 repair 参数层用例并完成语法验证 |

### Phase 6 审计补记:会话恢复与现状核对
- **Status:** complete
- Actions taken:
- 运行 `planning-with-files` 的 `session-catchup.py`,识别上一会话存在 41 条未同步上下文。
- 运行 `git diff --stat` 核对当前真实工作区,仅确认两处未提交修改:`source/dnode/mgmt/exe/dmMain.c`、`test/cases/80-Components/01-Taosd/test_com_cmdline.py`。
- 对比发现上一会话提及的 repair 子目录 CMake 改动当前不在工作区,进度总结以实际文件状态为准。
- Files created/modified:
- `task_plan.md` (updated)
- `findings.md` (updated)
- `progress.md` (updated)

### Phase 6 审计后修复:review 问题闭环
- **Status:** complete
- Actions taken:
- 修复 `dmParseLongOptionValue()`:当 long option 缺参且后继 token 为另一个选项时,直接报 `requires a parameter`,不再误吞后续选项。
- 修复 `dmFinalizeRepairOption()`:phase1 repair 的 `OPS_NOT_SUPPORT` 场景改为返回非零进程退出码,保持 shell/脚本可判错。
- 更新 `test_repair_cmdline_phase1`:新增 `--node-type` 缺参回归断言,并将 `mode copy` 场景改为断言非零退出。
- 更新 `_run_taosd`:默认补充 `ASAN_OPTIONS=detect_leaks=0`,避免 LSAN 导致伪失败。
- 执行 `cmake --build debug --target taosd -j8`、`python3 -m py_compile ...` 与 3 条关键命令回归验证,均符合预期。
- Files created/modified:
- `source/dnode/mgmt/exe/dmMain.c` (modified)
- `test/cases/80-Components/01-Taosd/test_com_cmdline.py` (modified)
- `findings.md` (updated)
- `progress.md` (updated)

### Phase 6 验证补记:repair 命令矩阵 20/20
- **Status:** complete
- Actions taken:
- 重新执行 `cmake --build debug --target taosd -j8`,确认当前 `taosd` 构建通过。
- 验证 `python3 -m pytest --version` 可用,并补充 `LD_PRELOAD` / `LD_LIBRARY_PATH` / `ASAN_OPTIONS=detect_leaks=0` 后重试目标 pytest 用例。
- 由于目标 pytest 用例在当前环境运行阶段持续卡住,转为执行手工 repair 命令矩阵,共 20 条命令全部通过。
- 确认 `OPS_NOT_SUPPORT` 场景现统一返回非零退出码 `1`,其余返回码符合预期。
- Files created/modified:
- `findings.md` (updated)
- `progress.md` (updated)

### Phase 6 测试补记:冻结矩阵补齐
- **Status:** complete
- Actions taken:
- 对照 `.vscode/dev/phase1-repair-freeze.md` 重新审视参数矩阵与错误码矩阵覆盖范围。
- 将 `test_repair_cmdline_phase1` 扩展为表驱动测试,补齐 `P01-P05` 与 `E01-E12` 的参数层用例。
- 新增 `_assert_taosd_case()` 统一命令执行断言,降低后续矩阵维护成本。
- 使用 `python3 -m py_compile test/cases/80-Components/01-Taosd/test_com_cmdline.py` 验证新增测试语法通过。
- 明确记录:`E13-E16` 为 repair 执行期错误,当前 phase1 参数层实现暂不适用。
- Files created/modified:
- `test/cases/80-Components/01-Taosd/test_com_cmdline.py` (modified)
- `findings.md` (updated)
- `progress.md` (updated)

### Phase 6 review 补记:矩阵测试复审
- **Status:** complete
- Actions taken:
- 对本轮扩展后的 `test_repair_cmdline_phase1` 做了专项 review,重点检查矩阵覆盖准确性与测试可维护性。
- 确认新增表驱动结构与 `_assert_taosd_case()` 辅助方法没有引入新的阻塞问题。
- 记录一项非阻塞观察:部分成功路径的输出断言仍偏宽松,当前可接受,后续如需收紧可进一步增强。
- Files created/modified:
- `findings.md` (updated)
- `progress.md` (updated)

### Phase 6 维护补记:规划文件迁移
- **Status:** complete
- Actions taken:
- 确认 `task_plan.md`、`findings.md`、`progress.md` 已迁移到 `docs/data_repair/01-参数重构/`。
- 检查仓库内不存在对旧根目录规划文件路径的残留引用。
- 后续本任务的规划与进度维护将以新目录中的文件为准。
- Files created/modified:
- `docs/data_repair/01-参数重构/task_plan.md` (updated)
- `docs/data_repair/01-参数重构/findings.md` (updated)
- `docs/data_repair/01-参数重构/progress.md` (updated)
Loading
Loading