Repository navigation
the kernel speaks in code — no comments, and now it is checked - #76
Merged
Merged
Conversation
PR #75 slipped `///` doc comments into four public items in `comb.rs`, and six more were already sitting in the tree from the paydown in #73. Both went unnoticed because the script that was supposed to catch them was vacuous: it stripped comments out of the source and then searched the stripped result for comment markers, so it could never find one. It had been reporting `TOTAL COMMENTS: 0` the whole time. `tools/speech.py` is a correct scanner. It blanks string and char literals so a `//` inside a URL is not a comment, then reports every line and block comment. `just speech` runs it, `just lint` depends on it, and CI runs it in the rust job — the rule is now enforced rather than asserted. The comment that survives is `//!`, the module header, which is the one form the rule allows. Where a comment said something the code could say, the code now says it: - `comb.rs` — the four `///` blocks folded into the module header, which already explained the key scheme. - `hum-nest/src/serve.rs` — `is_tool_block` became `bridge_reports_tool_whole`. The bridge ships a tool block whole, as one `chunk:tool_executed`, so its streamed deltas and its stop event are redundant with that chunk. The name says which. - `hum-paths/src/config.rs` — a partial nest section now asserts against the default rather than a literal, so the line says the default filled in. The full-config test still pins the number. - `humd/src/drift.rs`, `humd/src/drone.rs`, `humd/src/thrumd/conn.rs` — comments that only repeated the test name or the match arm are gone. - `thehum/src/anchor.rs` — the four selector bytes are now `PLACEHOLDER_SELECTOR`, and the module header explains why it is one. The hives are exempt. Each is a separate workspace and a kind any third party may write in any language, so they answer to their own community's conventions, not ours. 369 comments live there and all of them stay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #75 slipped
///doc comments into four public items incomb.rs, and six more were already sitting in the tree from the paydown in #73. Both went unnoticed because the script that was supposed to catch them was vacuous.The verifier could not fail
It stripped the comments and then searched the stripped result for comment markers. It had been reporting
TOTAL COMMENTS: 0the whole time — for a codebase that had comments in it.tools/speech.pyis a correct scanner. It blanks string and char literals so a//inside a URL is not a comment, then reports every line and block comment.It is now enforced rather than asserted:
just speechruns it,just lintdepends on it, and CI runs it in the rust job.The only comment form that survives is
//!, the module header — the one the rule allows.Where a comment said something, the code says it now
humd/src/comb.rs///blockshum-nest/src/serve.rsis_tool_block+ a comment explaining the suppressionbridge_reports_tool_whole— the bridge ships a tool block whole, as onechunk:tool_executed, so its streamed deltas and stop event are redundant with that chunkhum-paths/src/config.rsassert_eq!(..., 300_000); // default fillshumd/src/drift.rsd.mark(...); // ignoredhumd/src/drone.rsDrone::new(); // NoopClassifierhumd/src/thrumd/conn.rsOk(None) => break; // EOFthehum/src/anchor.rs&[0x4e, 0x71, 0xd9, 0x2d]); // placeholder selectorPLACEHOLDER_SELECTOR, with the module header explaining why it is oneThe hives are exempt
Each hive is a separate workspace and a kind any third party may write in any language, so they answer to their own community's conventions, not ours. 369 comments live there and all of them stay.
Tests
413 pass, 0 failed.