Phase 1 Test Review - MaybeAI Sheet CLI

Generated July 1, 2026 from local worktree /Users/dengwei/work/ai/maybeai-uni/mcp/maybeai-sheet-cli.

Summary Verdict

LIVE CHECK FOUND 1 ISSUE

Phase 1 semantic command tests pass locally, and a real endpoint probe against https://play-be.omnimcp.ai completed. Live upsert by worksheet name failed; retry by gid passed.

Test Result

62/62 PASS

python -m unittest discover -s tests -v passed in 1.664s.

Network Verdict

REAL API PROBE RUN

Live requests were sent to https://play-be.omnimcp.ai. Verification workbook: MaybeAI Sheet.

Scope Reviewed

Reviewed the current dirty worktree, focusing on the requested files: docs/superpowers/plans/2026-07-01-mbs-agent-friendly-command-tree.md, docs/agent-friendly-command-tree.md, src/maybeai_sheet/commands/*.py, pyproject.toml, README.md, and tests/test_cli.py.

The worktree already had source, test, and documentation changes before this report. This review did not modify source code or tests.

Test Commands Run

Command Result Notes
python -m unittest discover -s tests -v PASS Ran 62 tests in 1.664s. All CLI, formatter, resolver, and update tests passed.
CliRunner help inspection for range, workbook, worksheet, table, formula PASS Confirmed range help lists only read, write, and clear; no semantic range read-many.
rg source/test inspection for play-be.omnimcp.ai, httpx.Client, post_json, upload_file PASS Found real HTTP implementation in MaybeAIClient, but tests patch the HTTP boundary or command client methods.
uv run mbs --base-url https://play-be.omnimcp.ai ... 15 PASS / 1 FAIL Real endpoint probe created verification workbook and exercised Phase 1 semantic commands through the installed mbs entry point.

Live Endpoint Verification

本次补充验证使用真实 MAYBEAI_API_TOKEN 环境变量,但报告未记录 token 或 Authorization header。所有命令显式使用 --base-url https://play-be.omnimcp.ai,并通过 uv run mbs 发起真实请求。

Run ID phase1-live-20260701-122533
API base https://play-be.omnimcp.ai
Verification workbook https://www.maybe.ai/docs/spreadsheets/d/6a4496beef4212b56a15f4a8?gid=0
Document ID 6a4496beef4212b56a15f4a8
Worksheets Data gid 0; Model gid 1
Result PASS=15 / FAIL=1 / SKIP=0
Command Status Endpoint Live evidence
workbook createPASS/api/v1/excel/write_new_sheetCreated the verification workbook linked above.
workbook manifestPASS/api/v1/excel/workbook_profileReturned workbook profile for document 6a4496beef4212b56a15f4a8.
workbook capabilitiesPASS/api/v1/excel/workbook_profileReturned capability/profile response through the same routed endpoint.
worksheet listPASS/api/v1/excel/list_worksheetsReturned Data gid 0 and Model gid 1.
worksheet createPASS/api/v1/excel/write_new_worksheetCreated worksheet Model.
range readPASS/api/v1/excel/read_sheetRead bounded range Data!A1:D5.
range write --verifyPASS/api/v1/excel/update_rangeWrote Model!A1:E2 and read it back.
table headersPASS/api/v1/excel/read_headersRead header row from Model.
table append-rows --verifyPASS/api/v1/excel/append_rowsAppended row M002 and verified via read-back.
table upsert-rows --worksheet-name ModelFAIL/api/v1/excel/update_range_by_lookupReal backend returned HTTP 400: missing worksheet gid/name for document=6a4496beef4212b56a15f4a8.
table upsert-rows --gid 1 --verifyPASS/api/v1/excel/update_range_by_lookupRetry by gid updated row M002. This proves the endpoint works and isolates the failure to worksheet-name targeting.
formula setPASS/api/v1/excel/formula/setSet Model!E2 to =C2*D2.
formula batch-setPASS/api/v1/excel/formula/batch_setSet Model!E3 via batch operation.
formula recalculatePASS/api/v1/excel/recalculate_formulasRecalculated worksheet Model.
formula readPASS/api/v1/excel/read_sheetRead formula cells Model!E2:E3 with formula render option.
range clearPASS/api/v1/excel/clear_rangeCleared Model!E3:E3.
raw postPASS/api/v1/excel/list_worksheetsPosted a JSON body through the raw escape hatch and listed worksheets.
需要人工核验

请打开 验证工作簿,确认 DataModel 两个工作表存在;Model!E2 应显示公式计算结果 42Model!E3 已在清理步骤中被清空。

Coverage By Phase 1 Requirement

Requirement Implementation Automated Test Evidence
mbs executable registration YES PARTIAL pyproject.toml:37-38 registers mbs = "maybeai_sheet.cli:app". Tests import and invoke the Typer app, but no test asserts console-script metadata or installed mbs execution.
workbook import alias YES YES workbook.py:176-202 delegates import to create_from_file. tests/test_cli.py:1078-1094 verifies it uses /api/v1/excel/upload through patched upload_file.
worksheet list/create YES YES worksheet.py:15-65 wraps legacy sheet functions. tests/test_cli.py:800-826 verifies /api/v1/excel/list_worksheets and /api/v1/excel/write_new_worksheet.
range read/write/clear YES YES range.py:16-108 exposes all three commands. tests/test_cli.py:828-902 verifies /api/v1/excel/read_sheet, /api/v1/excel/update_range, and /api/v1/excel/clear_range.
table headers/append-rows/upsert-rows YES YES table.py:16-112 exposes the three commands. tests/test_cli.py:904-974 verifies /api/v1/excel/read_headers, /api/v1/excel/append_rows, and /api/v1/excel/update_range_by_lookup.
formula read/set/batch-set/recalculate YES YES formula.py:17-133 exposes all four commands. tests/test_cli.py:976-1076 verifies formula render option, set, batch-set, and recalculate endpoints.
Legacy sheet compatibility YES YES Legacy command tests cover read, read-range, read-many, named-range, headers, worksheets, formulas, write-range, clear-range, append, formula-set, formula-batch-set, recalculate, upsert, and create-worksheet in tests/test_cli.py:115-634.
No range read-many in Phase 1 YES MANUAL ONLY The plan explicitly excludes it at docs/superpowers/plans/2026-07-01-mbs-agent-friendly-command-tree.md:65-68. Source inspection shows only legacy sheet.py:160 has read-many; runtime help confirms range exposes only read, write, and clear. No automated negative test guards this.

Online Endpoint Usage Verdict

A supplemental live probe did make real network calls to https://play-be.omnimcp.ai/.

Findings And Risks

P2 Console script registration is inspected, not tested

pyproject.toml correctly registers mbs, but the automated suite does not install the package or assert the project script entry. A packaging regression could break the executable while app-level CLI tests still pass.

P2 Negative coverage for range read-many is manual

The current source and help output satisfy the Phase 1 exclusion, but there is no unit test that fails if range read-many is accidentally added later.

P3 Tests prove wrapper-to-endpoint routing, not live backend compatibility

This still applies to the default unit suite. The supplemental live probe now proves most Phase 1 payloads are accepted by the routed API, but it also exposed a real compatibility issue for table upsert-rows --worksheet-name.

P1 Live table upsert-rows --worksheet-name fails

The live endpoint returned HTTP 400 with missing worksheet gid/name for document=6a4496beef4212b56a15f4a8 when running table upsert-rows --worksheet-name Model. Retrying the same operation with --gid 1 passed. The likely implementation issue is that the upsert payload path forces gid-style targeting and does not include worksheet_name in the request body, so worksheet-name addressing is accepted by the CLI but not honored by this endpoint.

P3 Worktree contains unrelated pre-existing dirty changes

git status --short showed modified source/docs/tests and untracked command/report directories before this report was written. Treat this review as a point-in-time audit of the current tree, not a clean commit review.

Concrete Recommendations

Final Verdict

Phase 1 local test completion is effectively done for the implemented semantic command surface: all required semantic commands have local endpoint-equivalence tests, legacy sheet compatibility is covered, and the suite passes. The supplemental live probe created a MaybeAI Sheet and sent real requests to https://play-be.omnimcp.ai; 15 live command checks passed and 1 failed. The live failure is actionable: table upsert-rows works by --gid but fails by --worksheet-name.