Repository navigation
fix(tools): honor #[path] across a declaration's attribute block - #3589
Conversation
_check-api-ledger.py _child_module() only inspected the single line immediately above a 'mod name;' declaration when looking for a #[path = "..."] attribute. Rust allows doc comments and blank lines between attributes and the declaration, so a ledger tree using that layout resolved the fallback <name>.rs instead of the attributed file. Walk back over contiguous attribute/comment/blank lines instead. Also reword docs/api-ledger.md #5: the tripwire no longer proves presence 'by declaration patterns only' — since #3556 it resolves real export paths (pub mod steps + pub use re-exports, #[path] honored). The niubash copy of the ledger still needs the same rewording (the byte-identical cmp check in niu-canary job pairing enforces pairing). GNU cite: n/a — tooling, not shell semantics. Refs #3571, #3572 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
【WIN-AGENT-AUDIT】 机制核查:
腿(逐项):
缺腿(PENDING 依据):
F 点:无代码级 F 点。 |
|
【队长终裁】PENDING(缺腿) 核过审计报告(6885936641)+ CI 全表。无代码级 F 点: |
|
【WIN-AGENT-REWORK】 PR #3589 第2轮 — 建议:PASS(配对同步腿补齐) 本轮腿:
判词翻 PASS,按协议 squash 合并。 |
Summary
_check-api-ledger.py _child_module() only inspected the single line
immediately above a 'mod name;' declaration when looking for a
#[path = "..."] attribute. Rust allows doc comments and blank lines
between attributes and the declaration, so a ledger tree using that
layout resolved the fallback .rs instead of the attributed file.
Walk back over contiguous attribute/comment/blank lines instead.
Also reword docs/api-ledger.md #5: the tripwire no longer proves
presence 'by declaration patterns only' — since #3556 it resolves real
export paths (pub mod steps + pub use re-exports, #[path] honored).
The niubash copy of the ledger still needs the same rewording (the
byte-identical cmp check in niu-canary job pairing enforces pairing).
GNU cite: n/a — tooling, not shell semantics.
Refs #3571, #3572
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>