Node-path and connection checks resolve scripts by path only, ignoring uid

未关闭
#110 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
godot, node.js, typescript
领域
backend, testing

调研方向

Read src/scenes/validate.ts to understand how resolveReference prefers uid over path, then trace scriptViews in src/scenes/node-paths.ts and checkConnections in src/scenes/scene-graph.ts. Run the UID tests in test/uids.test.ts and add coverage for a script resource with a stale path and valid uid. Done means node-path and connection checks still inspect that script; the issue lists npm run build && npm test.

由索引模型根据 Issue 内容生成。

描述

severity: low tech-debt

Summary

#66 unified uid:// resolution for ext_resources, autoloads, the main scene and registry scripts, but the node-path and signal-connection checks still map ext_resource ids to scripts by their path attribute only.

Where

  • src/scenes/node-paths.ts:57-61 (scriptViews)
  • src/scenes/scene-graph.ts:177-182, src/scenes/scene-graph.ts:191-194 (checkConnections)
  • Compare src/scenes/validate.ts:97-127 (resolveReference: uid first, then path)

Impact

When an ext_resource has a stale path but a valid uid (the case scene-ext-resource-path-stale describes), Godot loads the uid's script. The node-path and connection checks silently skip that script, so they miss findings. A third resolution strategy is left to drift.

Suggested fix

Add one per-scene helper, "ext id -> loaded script absolute path", built on resolveReference, and use it in validate.ts, node-paths.ts and scene-graph.ts.

Acceptance criteria

  • A scene whose script ext_resource has a stale path and a valid uid still gets node-path and connection checks.

Getting started

  • Relevant files: src/scenes/node-paths.ts, src/scenes/scene-graph.ts, src/scenes/validate.ts, test/uids.test.ts
  • How to run tests: npm run build && npm test

Related: #66


Filed by repo-audit/full-audit at e836036. Severity: low. Effort: S. audit-key: tech-debt|src/scenes/scene-graph.ts|checkConnections

主要语言
TypeScript
星标
0
派生
6
平均合并
1 天 21 小时
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/godot-correctness-mcp 的其他 Issue

查看 TMHSDigital/godot-correctness-mcp 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。