docs(comments): rewrite comments across all crates to the guidelines
Sweep every first-party crate source (1956 .rs files) to the project comment guidelines: delete redundant restatements, decorative banners, change narration, and end-of-line comments; keep and tighten the crucial ones (invariants, bug rationale, SAFETY blocks, ported-source attribution). No functional code changed. Every edit is proven comment-only against the prior tree by a comment-stripping lexer (string/char/raw-string aware) plus a separate doctest-fence check. Where removing a comment made rustfmt or clippy want to re-lay-out adjacent code, the minimal triggering comment is restored so code tokens stay byte-identical. Gates green: cargo fmt --all --check (0 diffs), cargo check and cargo clippy --workspace --all-targets (0 warnings). Adds scripts/check_codegen_comment_guidelines.py — the enforcement gate for these guidelines (flags banners, end-of-line comments, change narration, and commented-out code).
This commit is contained in:
1 parent
ff0fb56c67
commit
a02b555e66
1458 files changed
+10729
-21750
No files matched your search
@@ -333,8 +333,6 @@ mod shell_suggestion_key_tests {
|
||||
);
|
||||
}
|
||||
|
||||
// -- always-on Tab fetch (no KIGI_SUGGESTIONS) --------------------------
|
||||
|
||||
/// Tab in bash mode with no fetched candidates fires a deterministic
|
||||
/// fetch — no env flag, no AI, dropdown-scale limit.
|
||||
#[test]
|
||||
@@ -432,8 +430,6 @@ mod shell_suggestion_key_tests {
|
||||
);
|
||||
}
|
||||
|
||||
// -- terminal-like Tab (single-candidate accept / common-prefix fill) --
|
||||
|
||||
/// Exactly one token candidate: Tab accepts it immediately — no
|
||||
/// dropdown flash — and the accept re-fetch keeps the pipeline alive.
|
||||
#[test]
|
||||
@@ -652,9 +648,9 @@ mod shell_suggestion_key_tests {
|
||||
.count()
|
||||
}
|
||||
|
||||
/// BugBot: a Fill whose range clips a paste chip used to no-op the
|
||||
/// write and STILL kick a refetch — every Tab spun fill+refetch with no
|
||||
/// draft change. The declined fill now degrades to opening the
|
||||
/// BugBot: a Fill whose range clips a paste chip no-ops the write yet
|
||||
/// would still kick a refetch — every Tab would spin fill+refetch with
|
||||
/// no draft change. The declined fill degrades to opening the
|
||||
/// dropdown: candidates visible, nothing fetched, chip intact, and the
|
||||
/// second Tab rides the normal open-dropdown handling.
|
||||
#[test]
|
||||
@@ -705,11 +701,11 @@ mod shell_suggestion_key_tests {
|
||||
}
|
||||
|
||||
/// BugBot sibling hole: the OPEN-dropdown accept (Tab/Enter/mouse all
|
||||
/// share the helper) used to consume the candidates and close before
|
||||
/// the write path declined the chip-clipping splice — leaving nothing.
|
||||
/// The probe now makes it an honest no-op: nothing consumed, dropdown
|
||||
/// up, chip/draft/generation untouched, no kick — and Enter must not
|
||||
/// fall through to send.
|
||||
/// share the helper) would consume the candidates and close before the
|
||||
/// write path declined the chip-clipping splice — leaving nothing. The
|
||||
/// probe makes it an honest no-op: nothing consumed, dropdown up,
|
||||
/// chip/draft/generation untouched, no kick — and Enter must not fall
|
||||
/// through to send.
|
||||
#[test]
|
||||
fn dropdown_accept_clipping_paste_chip_keeps_candidates() {
|
||||
let (mut agent, text) = chip_agent(vec![
|
||||
@@ -796,8 +792,6 @@ mod shell_suggestion_key_tests {
|
||||
);
|
||||
}
|
||||
|
||||
// -- Bash-mode gating of the as-you-type pipeline ------------------------
|
||||
|
||||
/// Typing in the normal (chat) prompt never fires the suggest pipeline;
|
||||
/// the same keystroke in bash mode debounces a request.
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user