From 99073e94c3f9c7be318843b3ced4545590ae232e Mon Sep 17 00:00:00 2001 From: cflmy Date: Tue, 1 Dec 2026 12:09:54 +0800 Subject: [PATCH] test: record a real Gitea feedback submission acceptance Capture one redacted app-area diagnostic in an isolated MQDH_HOME, store a real token through the private credential file, and submit it to the private cflmy/mqdh-feedback-e2e fixture. Record the created issue URL, duplicate fingerprint comment path, invalid-repository 404 failure and offline queue result. STATUS moves DIAG-03 to PASS (real Gitea + stand-in) and keeps DIAG-05 PARTIAL because the full failure-sample/attachment/offline-recovery matrix is not run. Token/report content are not committed; the fixture repo is private. --- docs/mqdh/STATUS.md | 4 +- .../2026-12-01-feedback-real-gitea-e2e.md | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 docs/mqdh/evidence/2026-12-01-feedback-real-gitea-e2e.md diff --git a/docs/mqdh/STATUS.md b/docs/mqdh/STATUS.md index 47246d3cff..a7843e4d45 100644 --- a/docs/mqdh/STATUS.md +++ b/docs/mqdh/STATUS.md @@ -103,9 +103,9 @@ | --- | --- | --- | | DIAG-01 错误模型、捕获点、report schema、脱敏器 | PASS | `diagnostics.test.ts`:路径/secret/敏感键/cause chain 脱敏,写入前完成。 | | DIAG-02 `mqdh report` + `/mqdh` 报告页 + 预览/删除 | PASS | CLI/Web 路由与页面已实现;预览返回完整 title/body。 | -| DIAG-03 Gitea Issue 提交、目标仓路由、模板、去重/限额 | PASS(替身) | 本地 Gitea 替身真实创建 Issue/评论、附件 multipart、小时限额;真实公网组织权限未验证。 | +| DIAG-03 Gitea Issue 提交、目标仓路由、模板、去重/限额 | PASS(真实 Gitea + 替身) | 真实 Gitea 私有夹具创建 Issue/去重评论/404 失败路径已验证(`docs/evidence/2026-12-01-feedback-real-gitea-e2e.md`);替身覆盖附件 multipart 与小时限额。真实组织权限矩阵仍有限。 | | DIAG-04 离线队列、附件选择、结果回填 | PASS | `--offline` 入队;附件仅从报告目录读取;issue URL 回填索引。 | -| DIAG-05 真实失败演练、负例/安全测试、发布证据 | PARTIAL | 真实 Bootstrap/知识/CLI 失败样本与公网提交演练未全部运行;不得写成 PASS。 | +| DIAG-05 真实失败演练、负例/安全测试、发布证据 | PARTIAL | 已做真实 Gitea app-area 提交/去重/404/离线入队;真实 Bootstrap/知识/CLI 失败样本、附件真实上传与离线恢复全流程未全部运行,不得写成 PASS。 | ## 发行与更新(DIST) diff --git a/docs/mqdh/evidence/2026-12-01-feedback-real-gitea-e2e.md b/docs/mqdh/evidence/2026-12-01-feedback-real-gitea-e2e.md new file mode 100644 index 0000000000..4c8e5e18d9 --- /dev/null +++ b/docs/mqdh/evidence/2026-12-01-feedback-real-gitea-e2e.md @@ -0,0 +1,50 @@ +# 反馈提交真实 Gitea 端到端(app-harness#16 §9) + +Date: 2026-12-01. Branch: `codex/issue-16-feedback-e2e`. +环境:本机 Linux x86_64;真实 Gitea `git.cflmy.cn`;私有测试仓 +`cflmy/mqdh-feedback-e2e`(仅用于验收,不是产品仓);真实 token 只在本地 +git 忽略环境文件与进程环境,不写入仓库/日志/报告。 + +## 1. 真实链路 + +1. 在隔离 `MQDH_HOME` 中用产品运行时捕获一条脱敏诊断报告 + (area=`app`、code=`e2e.feedback_probe`,不含凭据/私有数据)。 +2. `mqdh report token --stdin` 保存 token 到私有凭据文件(0600)。 +3. `mqdh report submit --repo cflmy/mqdh-feedback-e2e --confirm --json` + 通过真实 Gitea API 创建 Issue。 + +```json +{ + "report_id": "2026-12-01-04-09-09-f990188d", + "status": "submitted", + "repository": "cflmy/mqdh-feedback-e2e", + "issue_url": "https://git.cflmy.cn/cflmy/mqdh-feedback-e2e/issues/1", + "comment": false, + "attachments_uploaded": [], + "attachment_errors": [] +} +``` + +Issue #1 标题 `[app] e2e.feedback_probe: …`,正文含错误码/阶段/现象/预期、 +应用/平台/Node/运行时/Bundle/Tool 身份、本地报告 id 与脱敏环境;不含凭据值。 + +## 2. 负例与队列 + +- **重复指纹**:再次提交返回 `"status":"deduplicated"`、 + `issue_url` 同上、`"comment":true`,真实追加评论而非新建 Issue。 +- **无效/无权限仓库**:`--repo cflmy/definitely-missing-repo` 返回 + `Gitea API returned 404: not found`,退出码 1,不写回成功 URL。 +- **离线队列**:`--offline --confirm` 返回 `"status":"queued"`、`issue_url:null`; + 队列恢复提交仍需用户再次确认(CLI 设计),本轮未执行恢复。 + +## 3. 状态更新 + +- `DIAG-03` 从“PASS(替身)”更新为 **PASS(真实 Gitea + 替身)**:真实公网 + Gitea 创建 Issue/去重评论/404 失败路径已验证;测试仓为私有夹具。 +- `DIAG-05` 仍 **PARTIAL**:真实 Bootstrap/知识/CLI 失败样本与附件 multipart + 真实上传、离线恢复全流程未全部演练,不写成 PASS。 + +## 4. 边界 + +- 私有测试仓 `cflmy/mqdh-feedback-e2e` 仅作验收夹具;Issue #1 保留作为证据。 +- 未创建产品 tag/Release;未自动上传任何用户数据;token/报告不含凭据。 -- 2.54.1