fix(architecture-diagram): SKILL.md Stage 5 的确定性检查逻辑恒真,未测到真正的非确定性来源

Open
#370 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
documentation

Research direction

Start with Stage 1 and Stage 5 in skills/gf-architecture-diagram/SKILL.md, then compare the corresponding guidance in references/rust.md. Run the documented extraction command twice and inspect the node/edge topology comparison; done means independent extraction results are compared, the build-cache claim is corrected, and the language reference remains consistent.

Written by the indexing model from the issue text.

Description

bug priority:medium triage:done type:bug

Context

Issue #331 交付时的最终代码审查发现(已在合并前修复的 5 项 must-fix 之外,作为不影响已交付产物的遗留问题记录):

skills/gf-architecture-diagram/SKILL.md 的 Stage 5「确定性检查」目前的实现是把 Stage 1 同一份提取结果(capture)重新渲染一次,再比较两次渲染的拓扑。但同一份 .dot 源用 dot -Tsvg 渲染两次必然字节相同,所以这个检查在设计上就是空转,抓不到它声称要防止的问题。

真正可能出现非确定性的地方是 Stage 1 本身(提取时 dict/set 遍历顺序、cargo metadata 输出顺序等),Stage 5 目前完全绕开了这一层。

同时 Stage 1 里"重复调用可能命中 build cache 返回空输出"的理由站不住——cargo metadata 是元数据查询,不依赖构建缓存,也不会返回空 packages[]。这个不成立的理由正是 Stage 5 空转设计的来源。

Goal

修复 SKILL.md Stage 5 使其真正测到非确定性,而不是恒真通过。

Acceptance Criteria

  • Stage 5 重新跑一次 ## 提取命令(而不是复用同一份 capture),得到两份独立的提取结果
  • 比较两次独立提取出的 node/edge 集合(拓扑),而不是重渲染同一份数据后比较 SVG
  • Stage 1 中「重复调用命中 build cache 返回空输出」的说法被删除或替换为站得住的理由
  • references/rust.md 及未来新增的语言层文档与此变更保持一致
Dominant language
Rust
Stars
2
Forks
2
Avg merge
11m
Merged PRs (30d)
50

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from byx-darwin/gitflow-cli

All issues in byx-darwin/gitflow-cli

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.