Repository navigation
fix(ux): clear four human-copy grammar frictions - #8096
Conversation
Vowel-initial OracleKind display strings (exact_value, exact_error_variant, whole_object_equality) were interpolated after a hardcoded "a", rendering "a `exact_value` oracle" in verdict prose on every strong-oracle finding. - domain: add a shared indefinite_article helper that decides the article from the first alphanumeric character, with unit tests pinning the vowel-initial OracleKind members - analysis: route the five python/typescript narrative templates through it - output: route the first-pr review-card oracle phrase through it - tests: update the pinned article forms Goldens re-blessed separately. Closes #7752
Labelled lines interpolated values that themselves carry a 'label:' prefix,
producing 'Changed file(s) by language: javascript: 1.' and
'Next step: TypeScript preview advisory: ...', which read as parse errors on
the first lines a user reads.
- human: render the per-language breakdown as 'language = count', keeping the
key/value boundary readable without a second colon
- sections: when a next-step value opens with its own short leading label,
render the field label with a dash ('Next step — TypeScript preview
advisory: ...'); plain prose keeps the colon form
- tests: unit coverage for the prefix decision, and the breakdown pins
Closes #7755
Labelled lines and bare list items in the same render disagreed on trailing punctuation with no inferable rule: 'Changed file(s) by language: ... 1.' and ' Counts: ... finding(s).' carried periods while 'Summary:' and the 'Start here:' fields did not. Adopt the issue's stated convention, applied at the emit boundary so producer strings and the JSON/SARIF surfaces stay unchanged: labelled field lines and list-item values carry no trailing period; free-standing prose sentences (the 'Note:' advisory) keep theirs. - human: strip the period on 'Analysis outcome:', 'Counts:' and the language breakdown; 'Safe next action:' templates lose their terminal period - sections: strip the terminal period on discriminator/next-step field values, evidence-window bullets, full-form evidence lines and weakness bullets - triage: strip terminal periods on all 'Safe next action:' templates Closes #7756
Count nouns were hardcoded plural in interpolated strings, so the most common first-run experience (one probe, one finding on a small diff) rendered '1 probes, 1 findings', '1 entries', 'one of 1 attempts', '1 warnings', '1 findings' and '1 items blocked'. - output: add a shared count_noun(count, singular, plural) helper owning the singular/plural decision, with unit tests - app/cli: route the verbose completion line, cache describe_entries, the next-action selector, artifact summaries, gap-ledger warnings and the publish-plan blocker list through it - tests: the cache dry-run regression pin now asserts '1 entry' and rejects '1 entries' Closes #7753
WalkthroughWarning Review details and warnings were omitted to fit the comment limit. |
There was a problem hiding this comment.
Code Review
This pull request introduces several user-facing formatting improvements and grammatical fixes. Specifically, it implements correct indefinite article usage before interpolated oracle-kind labels, introduces a shared helper for proper singular/plural noun formatting across counts, resolves stacked colons in labelled lines, and enforces a single trailing-period rule for human-rendered outputs. Feedback on these changes highlights two issues: first, OracleKind::WholeObjectEquality starts with a consonant ('w'), which causes the vowel_initial_oracle_kinds_take_an test to fail since indefinite_article returns "a"; second, trim_end_matches('.') in trim_field_period will incorrectly strip ellipsis (...) from next-step messages instead of just a single trailing period.
#7752 #7756) Formatting-only re-bless of 448 fixtures via 'cargo xtask goldens bless', one blessing-reason entry per fixture (RIPR-SPEC-0002): - per-language breakdown renders 'language = count' (#7755) - oracle-kind labels take 'an' after the article fix (#7752) - labelled lines and list-item values carry no trailing period; the next-step dash form replaces the nested-label colon (#7756) Each drift line was read against the render-code intent before blessing. The unrelated 'owner_return_pin_fallible_literal' classification drift (exposed -> weakly_exposed) reproduces against unmodified main on this machine and is intentionally NOT blessed here.
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm native seams touched by #8096 are render-side string building only; no new pointer/aliasing/ownership boundaries, no new Drop semantics, no new lifetime parameters, no new unsafe code, and no new allocator calls. Memo-bound confirmation of bounded ownership passes — count_noun returns owned String, indefinite_article returns &'static str, trim_field_period/next_step_prefix return &'a str slices into caller-owned String. Conclusion: no actionable memory-lifetime finding in this PR.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
check-public-api fails on any public surface growth; the article helper is an implementation detail and belongs behind pub(crate).
There was a problem hiding this comment.
Confirmed findings
- crates/ripr/src/output/count_noun.rs:1 —
count_nounis correctly placed in the output layer; no other site computes plural nouns. The 45-charNESTED_LABEL_MAXbound innext_step_prefixis safe given the only producer emits short advisory labels. - Four re-bless commits are tidy and self-contained; the helpers are well-scoped and the golden re-bless is uniform. No architecture-level concerns block this PR.
- Output-side worker-handoff posture: every render/format path added in this PR is synchronous and runs on the calling thread. No handles, channels, or detached tasks are introduced. Worst-case residual is on existing surfaces the PR did not touch (out of scope to flag).
Verification questions
- Confirm
next_step_prefixis defined inhuman/sections.rsand used in only one place; consider whether it belongs inoutput/human.rsor a sharedoutput/humanhelper alongsidetrim_field_periodto keep section-shape rules co-located with other period/colon trimming. - Confirm heavy witness build (cargo-clippy/cargo-miri) is gated behind
--allow-heavyand not part of the gh-runner profile; the cache dry-run regression pin in tests is the only adversarial surface added by this PR, and it asserts the exact '1 entry' string. No new attack surface. - Confirm
count_nounis placed inoutput::count_noun(output layer), but its sole caller path currently goes throughapp::checkverbose eprintln. That call site is the onlypub(crate)consumer; verify no domain or test layer grew a parallel1 entriesformatter that should also route through it.
Refuted
- Format closure capturing this-module state could outlive a request if moved to a worker; but every capture is by value or owned.; refuted because: Closures passed to println!/eprintln! execute synchronously on the calling thread; no thread::spawn/tokio::spawn present in the diff.
- Counting failures in
count_nouncould be exploited by a user-controlledOracleKind.as_str()to surface a false-strong-oracle claim; refuted because:count_nounispub(crate), the only call sites are in artifacts.rs, gap_decision_ledger.rs, and first_pr.rs, all of which pass compile-time-internal counts. OracleKind is an enum matched exhaustively in the production paths; there is no user input that selects the plural branch. indefinite_articlemishandlesWholeObjectEquality(consonant 'W'), producing 'a whole_object_equality oracle'; refuted because:indefinite_articlein domain/evidence.rs decides on the first alphanumeric character of the input.OracleKind::WholeObjectEquality.as_str()iswhole_object_equality; the first alphanumeric character isw, which is not a vowel, so the function returnsa-> 'a whole_object_equality oracle'. That is correct English (e.g. 'a whole number'). The seeded concern that 'W' is the first character is wrong: the string starts with the lowercase snake-case tag, not a capital. The unit test for this branch lives in the newvowel_initial_oracle_kinds_take_an/consonant_initial_oracle_kinds_take_apair and pins the behavior.- A new test should assert no trailing period on safe next-action labels and the dash form for nested-label next steps; refuted because: The existing
crates/ripr/src/output/human/sections.rstest surface (implicitly the fixture goldens) already exercises both shapes — everyfixtures/*/expected/human.txtline that renders a labelledSafe next action:or a nestedNext step — …line is a behavioral oracle. Adding a literal unit test would duplicate the golden and re-assert the same property the test-suite runner already verifies via diff. The lane's mandate is to detect red/green changes; here there is none, and the test surface already covers the grammar change. - PR #8096 changes only render-side grammar helpers, narrative templates, and one cache dry-run assertion; no behavior the test suite executes was altered.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
The gate run showed two wrong expectations in the new article tests: 'unknown' starts with a vowel letter and correctly takes 'an', and the helper decides from the first alphanumeric of the interpolated label alone. No render-code change; the blessed goldens already carry 'an'.
There was a problem hiding this comment.
Confirmed findings
- one reviewer-thread concern (Gemini ellipsis) is not exercised by any goldens; the proposed test
trim_field_period_does_not_strip_ellipsiswould close that loop and is cheap to add. - crates/ripr/src/domain/evidence.rs:94 —
indefinite_articleunit tests do not include theWholeObjectEqualityvariant; itsas_str()starts with the consonantW, but the test inarticle_testscurrently only enumeratesExactValue/ExactErrorVariant. Add theWholeObjectEqualitycase to the vowel-side list so a future rename cannot regress silently. - No security regression introduced. Render-side string changes are bounded to user-facing output; no new attack surface, no new unsafe/FFI/secret paths, and the changelog text is hardcoded.
Verification questions
- Confirm re-blessed fixtures rely on
cargo xtask goldens bless …being run before any human-comparison gate. The pending section header in each fixture CHANGELOG now claims the bless was run with the four-issue # fragment, but the workspace-level re-bless was not exercised in the seeded thread; rely on a singlecargo test --locked --workspace(or focusedcargo test --locked --package ripr --test golden_bless) to confirm. - Confirm no re-blessed fixture ends in '...' on a field line where trim_end_matches('.') runs; fixtures seen ending in '.' pass through unchanged and are re-blessed as such. The diff is text-only fixture re-bless, not buffer surgery.
- Confirm no new unsafe code, no new FFI, no new thread::spawn, no new std::thread, no new tokio/async, no new crossbeam, no new unsafe Send/Sync impls, no new JS/N-API bindings. New helpers count_noun/indefinite_article are pure String-only with no native crossing.
- Confirm #7756 the trailing-period rule is applied at the emit boundary (
render_finding_digest_with_config,push_evidence_line, the per-field builders, andno_selection_safe_action_line); producer-sideformat!strings stay period-terminated so JSON/SARIF/check.json golden outputs are unchanged. The change is documented in the changelog and gated by the trailing-period fixture re-bless commit.
Refuted
- indefinite_article covers 'W' vowel-initial kinds; no narrative template renders a/raw WholeObjectEquality.
- #7752's indefinite_article mishandles WholeObjectEquality by still giving 'a' instead of 'an'; refuted because: The helper decides on the first alphanumeric character, so W → 'a'. No narrative template in python/classify.rs, typescript/classify.rs, human/sections.rs, human/triage.rs, or output/first_pr.rs interpolates 'WholeObjectEquality' before the rendered snake_case; they all route through OracleKind::as_str or the owner name. The seeded-thread objection that the test is 'in the wrong list' is satisfied by the per-thread reviewer who already moved WholeObjectEquality to consonant_initial_oracle_kinds_take_a.
- This commit's failure to trim ellipsis could silently corrupt any future message that legitimately ends in '...'.; refuted because: The PR scope is intentionally limited to the four user-friction frictions; the ellipsis-collapsing behavior is pre-existing and no fixture exercises it, so flagging it now would block an unrelated re-bless. Parked for a future ticket instead.
- Single-file vs cross-crate worker handoff could regress when the new helpers are added.; refuted because: All four helpers live in the synchronous human-render path used by
check_with_progress_and_origins_with_open_rust_paths; no new handles, channels, tasks, or background work are introduced in this PR.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
…7752) The previous commit inserted the corrected vowel_initial test without removing the original, which the gate's test compile rejected (E0428). The pre-fix 'cargo check' passes because #[cfg(test)] code is not built.
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- The four grammar fixes (#7752, #7753, #7755, #7756) re-bless all 1192 fixtures in lock-step. No cache/dry-run, no rebuild, no advice gate pins any individual fixture line. A future regression that swaps one helper's signature without re-blessing will be caught by the global golden comparison; the four helpers themselves are unit-tested in domain/evidence.rs (indefinite_article) and output/count_noun.rs (count_noun).
- crates/ripr/src/domain/evidence.rs:94 — Add a single closed-set test that iterates every
OracleKindvariant and asserts the expecteda/anarticle. Cheap regression guard for future kinds. - Touched surface is rendering text shaping only; no new external memory primitives, no new FFI, no new path or heap allocator usage. Verbose line interpolation in app/check.rs uses an owned String from
count_noun, not a borrowed reference or env-influenced data, so locale-influenced arguments cannot leak via path traversal or format-string expansion.
Verification questions
- Confirm
trim_field_periodinhuman/sections.rsstrips a trailing period even when the source ends with...(ellipsis), potentially producingNote: foo..style output. Not exercised by the new goldens; no current golden line ends with....
Refuted
- Allocation failure from any Box::from(slice) conversion introduced by this PR.; refuted because: Searched all changed and new files for Box::from, Box::<[u8]>::from, Box::new, Arc::new, Rc::new, and direct slice-to-Box coercions. The new helpers are pure owned
String(count_noun builds viaformat!), pure&'static str(indefinite_article), or&strslices trimmed in place (trim_field_period, next_step_prefix). No heap allocation new in the rendering path; the existing allocation-failure semantic forBox::from(slice)was not changed. - An attacker could supply a custom oracle-kind label containing "{ ... }" that, after
indefinite_articleformatting, leaks template tokens into the human output (template-injection / log-injection class).; refuted because: indefinite_article returns a static"a"or"an"slice with no template tokens, and the caller interpolates only that token; the oracle-kind field is a controlled enum variant printed through the standard"{name}"formatting which treats backticks as literals. No template substitution is reachable.
Parked follow-ups
indefinite_articleindomain/evidence.rsis now a single source of truth for the a/an prefix in narrative templates; the Python and TypeScript classify.rs andfirst_pr.rscard all import it. The change is local and the unit tests pinExactValue/ExactErrorVariant/Unknownas vowel-initial andSnapshot/RelationalCheck/BroadError/SmokeOnly/MockExpectation/GuardedResultMatchas consonant-initial. No sibling test enumerates everyOracleKindvariant; consider adding one if a future kind slips in unnoticed.- next_step_prefix NESTED_LABEL_MAX = 45 is safe: producers emit labels
Static limitunsupported_syntax`` (~26 chars) andTypeScript preview advisory:(~30 chars); no emitted label in any site currently exceeds 40 characters; a 45-byte bound leaves a 5-byte margin for future taxonomy growth. - Parked follow-up: re-bless the per-fixture
Pending — ...CHANGELOG appends withcargo xtask goldens bless <fixture> --reason "..."so that the four## Pendingsections stop carrying a placeholder reason and carry the canonical four-issue reason. This is mechanical, not a code defect. - Helpers count_noun, indefinite_article, trim_field_period, and next_step_prefix are colocated near their consumers but each lives in its own module. This is fine for a 4-fix cleanup PR but a follow-up could group
src/output/human/_helpers.rsif more human-render rules accumulate; not actionable in this PR.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
It is spelled with a vowel letter but pronounced with a consonant 'w'
('a whole object equality oracle'), which is exactly what the
first-alphanumeric helper decides. The issue text grouped it with the
vowel-initial kinds; the helper and the re-blessed goldens were already
correct.
There was a problem hiding this comment.
Confirmed findings
- Pre-existing
trim_field_periodusesvalue.trim_end_matches('.'); review found no edge-case where the trailing-period rule strips ellipsis (...) because there are no goldens with ellipsis inside a labelled/list item. This is fine for the current PR but could surprise a future fixture that emits ellipsis in a list-item value. - Goldens in fixtures/<...>/expected/ now end lines with no trailing period on labelled field lines and use '—' for nested next-step; review of ~30 sampled goldens shows the rule applies consistently and the human*.txt and human-full.txt lines both match. No architectural concern, only a note that the ellipsis guard test from the seeded thread remains missing as a low-priority test gap (also captured as a low-severity observation).
- trim_field_period relies on trim_end_matches('.') and has no regression test locking '...' as a non-stripped tail. Add a unit test in crates/ripr/src/output/human/sections.rs asserting that a value like 'See TypeScript preview' is left alone. Cost: 5 lines.
- Cosmetic only:
indefinite_articleis exposed viapub(crate) useindomain/mod.rsand re-exported nowhere user-facing. Renaming or relocating the helper in a later cleanup is fine; no move constraints force this PR to land with the current shape.
Verification questions
- Confirm next_step_prefix returns a borrow into NEXT_STEP_PREFIX / NEXT_STEP_NESTED_PREFIX constants (no allocation), so a
&'static strreturn is correct. The 45-char threshold is documented as bounded by 'TypeScript preview advisory' length. - Confirm fixture re-bless pattern is uniform across all 1192 fixtures: stripping trailing
.afterAnalysis outcome:,Counts:,Safe next action:,Discriminator:,Next step:,Changed file(s) by language:; language breakdown key/value pairs now use=not:. No producer or machine-readable surface is altered. - Confirm trim_end_matches('.') in trim_field_period eats ellipses; fixtures today don't exercise trailing '...', so this is a latent bug, not a current regression.
Refuted
- trim_field_period trims a legitimate ellipsis '...' down to '' with no opt-out and silently changes meaning.; refuted because: trim_end_matches('.') strips any number of trailing periods; an input that ends with '...' collapses to ''. No sampled emitter in the re-bless scope produces '...' as a labelled field value, so the strip is a no-op for the public surface. The concern is hypothetical, not reproducible from the diff.
- trim_end_matches('.') will regress a rendered '...' next-step string; refuted because: No current fixture's next-step string ends in literal '...'. The risk is theoretical pending a future author; the seeded reviewer marks it as a to-add regression test, not a current regression.
- indefinite_article returns a borrowed &str that escapes the frame and could dangle after the OracleKind match arm ends; refuted because: Helper is
pub fn indefinite_article(word: &str) -> &'static str; the returned value is one of two'staticstring literals selected by a match on the input's first alphanumeric character. The input&stris only read bychars().find(...)and never retained. No lifetime carries past the call; per Rust convention an allocation failure here aborts, no recoverable fallback.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Re-bless passed without external verification; Pending entries from prior snapshot are now plain '## Pending' headings rather than the new SHA-stamped '## Pending — ()' form.
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- All human-render-side changes in this PR operate on owned String or borrowed &str within the same render pass; no resizable view or active-view regression introduced. Render emits into producer-owned buffers and the fixture re-bless is uniform.
- All four #7777 grammar commits are confined to leaf helpers and the human emit boundary; no shared infra moved, no new boundaries created. The 1192-fixture re-bless is mechanical and uniform. Nothing for this lane to flag.
Refuted
- next_step_prefix could allocate or detach under NESTED_LABEL_MAX=40 heuristic; refuted because: Function returns &'static str from a two-element match — no allocation, no buffer detach, no resizable-view involvement.
- The new format!() interpolation could introduce a heap allocation that needs bounds.; refuted because: No new unbounded formatting added; helpers refactor existing bounded strings.
- trivially re-blessing 1192 fixtures in one commit is suspect because manual edits would not produce uniform drift; this should be investigated as a sign of an unintended helper-shape change.; refuted because: The exact pattern (one trailing Pending section per fixture with one trailing-period deletion on the human emit boundary line) is the documented output of
cargo xtask goldens bless --reason ..., which re-derives each fixture from current output and is expected to touch every fixture in lock-step. The size of the diff is evidence of mechanical tooling, not of a hidden behavioural change; helpers (count_noun, indefinite_article, trim_field_period, next_step_prefix) are tiny and inspectable in the diff.
…ammar (#7756) - check_python safe-action expectations drop the stripped terminal period - regenerate the fourteen discarded-matcher canonical human/human-full reports for the labelled-line no-period rule (drill-in lines keep their workspace-relative spelling via the same projection the comparator uses) - re-bless fixtures/human_full_shared_parse_port/expected/library-human-lines.json These are expectation updates for intentional #7756 output; no producer behavior changes in this commit.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- No memory ownership, async handoff, GC root, or detach behavior is touched by this PR. All helpers run on the render thread and emit owned String or borrowed &'static str; no JS worker boundary is present in this codebase. Render-only human-copy fix is safe for the worker-handoff lane.
- Four changelog fragments and 1192 fixture re-blesses drift if the workspace
cargo xtask goldens blessis not run afterindefinite_articleorcount_nounchange. Not a source-route defect; flagged for the compiler/operator lane to run a singlecargo test --locked --workspaceafter the merge. - Re-bless was performed via a workspace-level golden bless not exercised in the seeded CI thread; a single fresh
cargo test --locked --package riprshould be the final gate so the workspace lock and the canonical-golden fixtures stay aligned. - crates/ripr/src/output/human.rs:381 — Consider centralising the labelled-line period/colon trimming policy in human/sections.rs so all emit sites share one rule; today Analysis outcome + Counts + language breakdown + safe-next-action each inline their own strip logic.
- 1192-fixture re-bless was mechanical via xtask goldens bless; the re-bless command and per-fixture reason text in each expected/CHANGELOG.md are uniform. A future regression in any of the four helpers would re-diverge fixtures globally, so the test signal is the global re-bless comparison itself, not a per-fixture unit test.
Refuted
- Worker-handoff or async capture risk introduced by these helpers.; refuted because: No async, JS, or worker boundary is touched; helpers are synchronous render-thread string builders returning owned String / &'static str / borrowed &str with no captured handles.
- All four helpers (#7752/#7753/#7755/#7756) are pure render-side string shaping; no analyzer, parser, or oracle-evidence path was touched, so semantic drift in the JSON/check.json surfaces is implausible.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
#7752 #7753) unindexed_guidance pins the uncertain-owner-reach INSPECT guidance verbatim; the human and explain renders now carry no trailing period on the labelled next-step value (#7756), while JSON keeps the producer string. Pin both forms: the raw producer text for the field/JSON assertions, the stripped render form for human/human-full/explain. The semantic under test — unindexed doc assertions prompt inspection without credit or gap claims — is unchanged.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- PR is a render-only change: no new spawn, channel, scope, or detach point is introduced; nothing new crosses a worker boundary.
- Goldens re-blessed in lockstep across 1192 fixtures because the four grammar helpers are exercised in nearly every fixture's labelled line. A single helper signature change without re-bless would still be caught by the workspace-level cargo test --locked, since each fixture's expected human.txt is checked verbatim. No architecture-level change is required; centralizing or version-stamping the goldens is out of scope for this PR.
Refuted
- Siblings of trim_field_period could still strip a meaningful trailing period from a free-standing note line outside the labeled list.; refuted because: trim_field_period is invoked only by labelled field lines and list-item values in render_finding_digest_with_config; free-standing Note: prose remains untouched. Code path verified by reading render_finding_digest_with_config and sections.rs callers; all routes are wrapped by is_wrappable_advisory_prose gating that excludes the Note branch.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
…ps (RIPR-SPEC-0002) The reviewer-followup commits (shared-guidance trim through trim_field_period, single-period-only strip, leftover template periods) changed rendered bytes again; goldens check never ran green between those commits and this blessing. All drifts are formatting_only period strips on labelled human lines. owner_return_pin_fallible_literal keeps its expected classification (the local exposed->weakly_exposed flip is the known environment drift and is deliberately not blessed; only its three formatting lines are updated).
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- crates/ripr/src/output/human/sections.rs:42 —
next_step_prefixheuristic (colon-with-space within NESTED_LABEL_MAX=40) is unit-tested only with synthetic strings; no fixture today exercises a nested label like 'Next step: Foo — bar:' that would flip to dash form. Add a fixture that emits a 2-segment colon label to lock the heuristic.
Verification questions
- Confirm trim_field_period strips a single trailing '.' but leaves '..' or '...' untouched; shared-guidance emit sites are routed through it, so a producer that ends with '...' will be returned as '..' after trim; no fixture emits '...' for a labelled list item today, but a future producer could regress.
Refuted
- trim_field_period would eat ellipses and corrupt existing fixtures.; refuted because: trim only fires at labelled-field/list-item emit points; free-standing Note:/Prose prose keeps its clause witness; nearest ellipsis strings in the changed corpus are prose not labelled lines; fixtures re-blessed in lockstep with the helpers.
- Changing the producer strings at the call sites (e.g.,
format!("an{}oracle", ...)hard-coded) would also fix the a/an agreement without a new helper.; refuted because: Producer strings are explicitly kept unchanged; the PR body and work item scope require the human-render emit boundary to own the grammatical transformation, not the producer. Hard-codinga/anin producers would still ship the same human text but lose the shared helper boundary and the unit-test regression net it gives.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
…PR-SPEC-0002) Fixtures added on main while this branch was open (rust_ffi_attribute_literals, test_cast_to_integer_not_exact, test_compared_with_non_literal_not_exact, test_from_trait_conversion_not_exact, typescript_rewritten_local_whole_result) still carried pre-#7755/#7756 expected bytes; their drift only surfaces on a fresh full golden run. Bless the formatting_only flips after merging main.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Confirmed findings
- Ellipsis/abbreviation guard for
trim_field_periodis a 2-line check (ends_with('..')); a future helper that strips only ASCII period and not Unicode middle dot could regress without a fixture. Worth a focused test that passes a Unicode non-ellipsis period-only string and a Unicode-ellipsis-like string, but no current regression.
Verification questions
- Confirm indefinite_article and count_noun are pure functions returning owned String/&'static str, so they cannot be captured across an await point or by a worker handle.
- Confirm crates/ripr/src/output/human.rs:476 —
Counts:line keeps trailing period in all fixtures (Counts: 1 changed file(s), ...). Same heading-only question as #1. If #7756 is intended to cover this prose line, fixtures need another re-bless; if not, fine. - Confirm trim_field_period strips only a single terminal period; ellipsis and abbreviations (e.g., 'JSON', 'ts') are preserved because ends_with(".") is followed by !ends_with("..").
- Confirm no source-route issues. The four changes are localized to render helpers and one fixture-wide re-bless; producers and JSON are untouched. Reviewer-thread concerns (#7752 vowel/consonant agreement, #7755 double-colon, #7756 trailing-period, #7753 plural) are answered by the new helpers and their unit tests. Recommend a single workspace-level
cargo test --locked --workspaceafter the bless to confirm the 1192 fixtures still match before merge. - Confirm trim_field_period strips only single trailing '.'; the function's own test pins '.' stripped and '..' / '...' preserved.
- Confirm all new render strings in crates/ripr/src/output/human/{sections.rs,shared.rs,triage.rs} are produced as owned Strings or returned &str slices that borrow from caller-owned buffers, so no allocation escapes across worker boundaries.
- Confirm emit-boundary trimming (trim_field_period/next_step_prefix in sections.rs, catalog lines in shared.rs, safe-action line in triage.rs) all operate on &str into caller-owned String buffers; no static text is mutated and no leaked references escape.
Refuted
- Concern: describe_entries in cli/commands/cache.rs that now uses count_noun could allocate, drop, and reallocate a large String per call, leading to allocator churn that resembles a use-after-detach pattern under high call rate. Rejected: count_noun is a one-shot format! call that owns its String and returns it into the caller's format buffer; it cannot be captured by a worker, and the caller is the synchronous describe function called once per cache read.; refuted because: no async capture; no aliasing; owned-and-fully-dropped; bounded to a single call stack.
- Concern that next_step_prefix heuristic (NESTED_LABEL_MAX=40) may misclassify long prose.; refuted because: The heuristic is bounded by
idx <= NESTED_LABEL_MAXwith colon-space; mid-sentence colons beyond 40 chars keep the colon form per unit test (plain_prose_and_late_colon_keep_the_colon_form). The repair is bounded by tests. - trim_field_period keeps ellipses:
TypeScript preview advisory: ...and abbreviations likee.g.are left intact.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Lane A of the #7842 triage plan: four human-copy/grammar frictions from the 2026-10-13 UX audit wave, one commit each, in re-bless-minimizing order.
#7755 — double-colon label collisions in human render
language = countinstead oflanguage: countunder theChanged file(s) by language:field labelTypeScript preview advisory: ...,Static limit ...) renders under a dash (Next step — ...) instead of stacking a second colon; plain prose keeps the colon form#7752 — wrong a/an article before oracle-kind labels
indefinite_articlehelper in the domain layer decides the article from the first alphanumeric character, with unit tests pinning the vowel-initialOracleKindmembersexact_valueoracle", "anexact_error_variantoracle"#7756 — trailing punctuation inconsistency
Note:advisory) keep theirsAnalysis outcome:,Counts:, the language breakdown,Safe next action:values, discriminator/next-step values and evidence/weakness bullets updated#7753 — count-of-one pluralization
count_noun(count, singular, plural)helper in the output layer owns the singular/plural decisionripr cachedescribe_entries ("1 entry"), next-action selector ("one of 1 attempt"), artifact summaries, gap-ledger warnings and publish-plan blockers migrated; the cache dry-run pin now asserts the correct formGoldens: fixture expected outputs re-blessed for the render changes (separate commit).
Closes #7755
Closes #7752
Closes #7756
Closes #7753