Skip to content

[DO NOT MERGE] test: audit coverage for cursor installer and writer - #75

Draft
Li-Sanze wants to merge 4 commits into
mainfrom
cursor/audit-installer-writer-tests-7642
Draft

Li-Sanze wants to merge 4 commits into
mainfrom
cursor/audit-installer-writer-tests-7642

Conversation

@Li-Sanze

@Li-Sanze Li-Sanze commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

问题清单

按严重程度排列。每条都有对应测试,CI 用 pytest.mark.xfail(strict=True) 保持绿色。

AUDIT-1|中|installer/cursor_plugin.py:51-67|完成一次 Cursor 安装后,把已安装的 .cursor/skills/sopify/analyze/SKILL.md 改成与源码树不同的内容,再对同一 home 重跑安装。|预期:重写该阶段 Skill,action 不是 skipped。实际:install_cursor_user_plugin_assets 返回 skipped,截断内容还在;同一条件下 run_install 的 host 与 payload 也都是 skipped。|tests/test_cursor_cli_install_surface.py::CursorCliInstallSurfaceTests::test_reinstall_restores_phase_skill_that_differs_from_source|确认

AUDIT-2|低|installer/distribution.py:848(简体中文摘要在 676-677 行打印)|对空 home 执行 cursor:zh-CN 安装并渲染默认用户摘要。|预期:成功摘要不把「没跑 smoke」显示成英文占位。实际:诊断行是 (no smoke output)。传入以 Runtime smoke check passed 开头的输出时,中文译文「运行时自检已通过。」是正常的。|tests/test_install_user_summary.py::InstallUserSummaryTests::test_success_summary_does_not_print_empty_smoke_placeholder|确认

AUDIT-3|低|installer/distribution.py:900-906(摘要用在 647 行)|渲染 cursor:zh-CN 的默认用户摘要。|预期:下一步写成「打开 Cursor」,和其他宿主一样用产品名。实际:_host_display_name 没有 cursor,句子是「在目标仓库中打开 cursor」,上一行则是「重启 Cursor」。|tests/test_install_user_summary.py::InstallUserSummaryTests::test_cursor_summary_uses_the_product_display_name|确认

AUDIT-4|低|sopify_writer/store.py:321,读取在 sopify_writer/io.py:18|把 state/active_plan.json 写成 JSON 数组 [],再 finalize_plan。|预期:抛出 InvariantViolationError,不归档。实际:read_json 原样返回数组,finalize_plan 对它调用 .get,抛出 AttributeError;方案目录仍在。空对象 {} 会走协议错误,不在这条里。|tests/test_sopify_writer_state_guards.py::ProtocolStoreStateGuardTests::test_finalize_rejects_non_object_active_plan|确认

全量 python3 -m pytest tests -q:333 passed,4 xfailed,88 subtests passed。

Open in Web Open in Cursor 

cursoragent and others added 4 commits October 11, 2026 15:31
Lock the top-level Skill contract, Doctor failure when it is missing, and the best-effort CLI behavior recommendation. Mark the phase-skill repair skip as an expected failure.

Co-authored-by: 叁則 <2522048902@qq.com>
Keep sessionStart aligned with the plan-package contract and lock delete, notebook, rm, tee, and absolute redirect guards that the existing hook tests do not execute.

Co-authored-by: 叁則 <2522048902@qq.com>
Lock handoff and active-plan disagreement, occupied history slots, and provenance plan_version conflicts. Mark non-object active_plan finalize as an expected failure.

Co-authored-by: 叁則 <2522048902@qq.com>
Mark the empty-smoke placeholder and the raw cursor host id in the zh-CN success summary as expected failures.

Co-authored-by: 叁則 <2522048902@qq.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants