Repository navigation
serve: name an empty numeric field of the start screen as unread - #733
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Verdict: CLEAN: Empty numeric fields now reach unread reporting, while absent fields retain their existing behavior.
Checked
- Duplicates: 0 new functions, types, or constants. The fix stays in the shared numeric reader.
- Complexity: the parser removes an early return for empty values and reuses the existing unread branch.
- Silent failure: 1 changed
.ok()site followed through its consumers. Empty and invalid values return no number and name the record onunread; absent keys return before the note. Zero remains valid; overflow reaches the note. - Tests: the two added cases protect screen.rs:271. Restoring
self.word(key)?.parse().ok()makes their unread assertion fail, by static mutation analysis. - Gates: no pins or thresholds moved; no cases removed. The PR describes failure before the fix.
- Escape catalog: no C1–C4 pattern matched. This change touches startup rendering, with no inference hot path change.
Notes
Tests were inspected, not executed. The PR reports 15 passing screen tests.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
Collaborator
Author
|
The review is done and the contribution check passed, so I'm merging this. |
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.
시작 화면이 값이 빈 숫자 필드를 조용히 빼지 않고 unread 행에 이름을 남기도록 고칩니다.
Fixes #722. Part of #565. Tracked in #699.
What and why
The start screen reads numbers from the start's record lines. When a numeric field is present but its value is not a number, the screen notes that line in its
unreadrow instead of filling the value in. A field written with an empty value, such ascache ram=orparallel slots=, skipped that note. The screen left the value out and theunreadrow did not name the line either, so the gap was invisible.Line::numincrates/serve/src/screen.rsread the field throughword, which returnsNonefor an empty value. The?on that call returned beforeunread.noteran. The note came in with 0661e74 (theunreadrow), and the early return has been there since.numnow reads the field withtext(key)?and takes the first word of it. If the first word is missing or is not a whole number, it notes the line as unread. A key that is absent still returnsNonewithout a note.bytes_besideneeds no change:numruns first on the same key, and an empty value has no parenthesis. The other numeric readers on the screen all go throughnum, so this is the only place that changed. No signature, record schema or public API changes.Release notes: Fixed: the start screen names a numeric field with an empty value on its unread row instead of dropping it silently.
Code shape
Line::num, the one reader the numeric fields share.numnow says a value that is empty or not a number is noted as unread.cargo fmtpasses.cargo clippyhas not been run on this head, so the lint count is unchecked.Duplication found or removed (
path:line): none.What I ran
The change touches only the start screen's text reader in
bloomery-serve. It has no device code, so no GPU gate applies.I extended the existing test
a_value_that_is_no_number_is_named_not_filled_inwith two cases,cache ram=andparallel slots=(both empty). Before the fix the test failed because nounreadrow appeared for them. After it, the screen tests pass as a group:Reproduce:
Not run:
cargo clippyand the full workspace check on this head. I did not save the raw failing output of the base run, so the failure above is the observed result and not a pasted log.What I ran into
This does not block the PR. Nothing outside the change turned up.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.