CLI --baseline flattens JSON payloads and resolves paths differently from MCP tools
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start with the baseline handling in src/cli.ts:364-381 and compare it with the MCP handlers in src/tools/scenes.ts and src/tools/lint.ts; then read src/baseline.ts to trace how relative paths are resolved. The proposed parity test belongs in test/tools.test.ts, alongside the existing CLI shape assertion in test/cli.test.ts. Done means every listed command preserves its payload shape, CLI and MCP agree on baseline behavior, the path rule is consistent or documented, and the CHANGELOG records the JSON shape change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
With --baseline, the CLI replaces every command's JSON payload with a generic {root, findings, count, baselined, staleBaselineEntries}. With a baseline argument, the MCP tools keep each command's own shape. Relative baseline paths also resolve differently: against the cwd in the CLI, and against the project root in MCP. Two hand-written "apply baseline" implementations have already drifted.
Where
src/cli.ts:364-381(generic payload replacement)src/baseline.ts:105-108,src/baseline.ts:133-141(readBaselineuses the cwd;baselineFindingsuses the root)src/tools/scenes.ts:26-30,src/tools/scenes.ts:79-85,src/tools/scenes.ts:97-120;src/tools/lint.ts:62-76test/cli.test.ts:147-155(asserts the flat shape); the parity test attest/tools.test.ts:131runs only without a baseline
Details
if (baseline) {
const r = applyBaseline(root, res.findings, readBaseline(baseline));
res = { root, findings: r.newFindings,
payload: { root, findings: r.newFindings, count: r.newFindings.length,
baselined: r.baselined, staleBaselineEntries: r.stale } };
With a baseline:
gdcorrect reportloses thescenes/project/registries/lintcategories,registryEntriesand the severity counts.lintlosesgodotVersion,fileCountand the counts.validate-registrieslosesentries.
MCP project_report and lint_project keep their shape and recompute the counts. MCP validate_registries keeps entries but has no count.
Impact
Scripts that parse gdcorrect ... --format json break, or read undefined, as soon as a baseline is added. The per-command JSON shapes in the docs only hold without a baseline. One baseline file cannot be referenced with the same relative path from CI and from an agent: game/.gdbaseline.json from the repo root, versus the MCP root-relative game/game/....
Suggested fix
Incremental plan:
- Add a parity test. For each of lint, validate-scenes, validate-project, validate-registries and report, compare CLI
--baselineJSON with the matching MCP tool output givenbaseline. - Add a
severityCounts(findings)helper and replace the five hand-written copies (src/cli.ts,src/lint/project.ts,src/scenes/report.ts,src/tools/lint.ts,src/tools/scenes.ts). - Move the per-command "apply baseline, keep shape, add
baselined/staleBaselineEntries" logic into one shared module, used by bothrunCommandand the tool handlers. - Delete the generic payload in
cli.ts, and addcountto the registries payload. - Choose one resolution rule for relative baseline paths and document it. Root-relative is what MCP already documents.
Acceptance criteria
- CLI and MCP JSON are identical for every command, with and without a baseline.
- The resolution rule for relative baseline paths is the same in both front ends, or the difference is documented in
--helpand README. - CHANGELOG notes the CLI JSON shape change.
Filed by repo-audit/full-audit at e836036. Severity: medium. Effort: M. audit-key: bug|src/cli.ts|runCli.baseline-payload
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 6
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/godot-correctness-mcp
-
enhancement good first issue severity: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
TMHSDigital/godot-correctness-mcp#123 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
dependencies good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
TMHSDigital/godot-correctness-mcp#116 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
TMHSDigital/godot-correctness-mcp#107 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
TMHSDigital/godot-correctness-mcp#106 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug good first issue severity: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
TMHSDigital/godot-correctness-mcp#105 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của TMHSDigital/godot-correctness-mcp
Issue tương tự
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
openclaw/openclaw#203385 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nwverse/persona#12800 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/playwright#44289 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày