Skip to content

fix: quieter dashboard and PR bodies, and never mention anyone from tool output - #109

Merged
sweepies merged 8 commits into
mainfrom
fix/dashboard-noise
Oct 31, 2026
Merged

sweepies merged 8 commits into
mainfrom
fix/dashboard-noise

Conversation

@sweepies

@sweepies sweepies commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

The Count's first live dashboard (#106) and PR bodies (#105, #104, #94) were noisy, and the dashboard @-mentioned a real person (mise by @jdx, from raw tool output).

Never mention anyone

  • notes::inert (next to the release-note sanitise, sharing its joiner) neutralises plain third-party text: @name, @name and #123 get a zero-width joiner; GitHub issue/PR/commit URLs go through redirect.github.com.
  • Applied to everything third-party on the dashboard (tool output, lookup errors, advisory summaries, PR titles, warnings), to advisory summaries and batch item titles in PR bodies, and to the failure blocks. Package names on the dashboard are code spans.
  • Package names in PR table cells and bodyNotes stay as they are: the existing generated_tables_policy_text_and_markers_do_not_gain_joiners test pins that, and I left it alone.

Dashboard

  • Lockfile/tool failures: a one-line summary, plus the decisive lines (from the first error, at most 10 lines / 1000 chars, no ANSI, progress bars or installer chatter) in a collapsed <details> with a fenced block. The full output is still in the JSON report and CLI log.
  • Known vulnerabilities: one bullet per package@version listing its files, advisories as a counted link list with summaries collapsed, the fix stated once (fixed by #93, fixed in X, not proposed, no fixed release yet), severity only when known, most severe first.
  • Lookup warnings: one box per failing package and source. The retry key is now per package (retry_key), so one tick retries every file that declares it (engine matches it in forced_catalog_keys).
  • Held updates: eligible 31 Oct 08:29 UTC. "catalog fetched at" is gone: whether the catalog was reused flips between runs, so showing it made an unchanged repo rewrite its dashboard on the second run.
  • Warnings already shown under a lookup aren't repeated under "Report warnings"; per-file dependency lists fold under one line; "1 dependency" is singular.

PR bodies

  • Release notes per package sit in one <details> (Release notes: 4.151.3 → 4.156.0 (5 releases), or 3 of 5). One release of at most 8 lines / 600 bytes stays expanded. Upstream headings are demoted below the version headings.
  • Truncation lands on a paragraph, list item or heading, never inside a link, code span or fence; open fences and <details> are closed; one notice per package. Per-package budget logic in pull_requests.rs is unchanged.
  • Text another tool appends after the ownership marker (cubic's block) is kept when the Count rewrites a body; a body he leaves alone is untouched. The body render key is bumped to v5 so existing PRs re-render.

Docs: guide/dashboard.md, guide/pull-requests.md, guide/release-notes.md.

Tests

crates/update/tests/dashboard_noise.rs (a realistic dashboard from the #106 data, snapshot in snapshots/dashboard-first-run.md, plus mention, grouping, ordering, retry and date tests), text.rs unit tests, notes.rs tests for inert, folding, demotion, safe cuts, single notice and the #105 wrangler notes. Existing assertions about the old wording were updated; none were removed.

Markdown API: the old #106 body renders one live @jdx mention; the new first-run snapshot renders none.

View guided diff Turn on auto-fix

@deepsource-io

deepsource-io Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in f3952e5...3bf0ca9 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Rust Oct 31, 2026 12:46a.m. Review ↗
JavaScript Oct 31, 2026 12:46a.m. Review ↗
Shell Oct 31, 2026 12:46a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
count-patchula cbd7b76 Commit Preview URL

Branch Preview URL
Oct 31 2026, 12:21 AM

Comment thread crates/datasource/src/notes.rs Outdated
Comment on lines +659 to +661
version
.chars()
.filter(|c| c.is_alphanumeric() || ".+-_~^:/".contains(*c))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Called `.chars().filter(..)` when `.matches(..)` would suffice


Using .chars().filter(..) requires additional logic and complexity compared to using .matches(..)
Using matches(..) allows for much greater flexibility such as using Pattern trait bound types,
and matching string expressions directly.

Comment on lines +992 to +998
SEVERITIES
.iter()
.position(|s| {
Some(*s) == severity.as_deref()
|| (*s == "moderate" && severity.as_deref() == Some("medium"))
})
.unwrap_or(SEVERITIES.len())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of `unwrap_or` followed by function call, prefer `unwrap_or_else` instead


Calls to unwrap_or followed by a function call should be replaced with
unwrap_or_else or unwrap_or_default, to increase laziness. The argument to
unwrap_or is evaluated eagerly and unconditionally. unwrap_or_else or
unwrap_or_default are evaluated lazily and only if required, sometimes
leading to lower overhead and fewer allocations.

Comment on lines +1003 to +1008
let rank = self
.advisories
.values()
.map(|(a, _)| severity_rank(a.severity.as_deref()))
.min()
.unwrap_or(SEVERITIES.len());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of `unwrap_or` followed by function call, prefer `unwrap_or_else` instead


Calls to unwrap_or followed by a function call should be replaced with
unwrap_or_else or unwrap_or_default, to increase laziness. The argument to
unwrap_or is evaluated eagerly and unconditionally. unwrap_or_else or
unwrap_or_default are evaluated lazily and only if required, sometimes
leading to lower overhead and fewer allocations.

) -> Value {
let mut metadata = json!({"source":source,"kinds":[],"locations":[],"advisories":advisories});
for (key, value) in extra.as_object().into_iter().flatten() {
metadata[key] = value.clone();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling `.clone()` for assignment to variable


Consider using .clone_from() instead of assigning the result of .clone().

clone_from() may perform better in some cases because some structs may have custom implementations of clone_from(), which improve performance by avoiding needless allocations.

@context7

context7 Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Docs7 for sweepies/count-patchula

Result Status Action
Deployment ➖ Not used —
Content review ➖ Did not run. This site has no agent runs available this month. Wait for the monthly reset or check your Docs7 plan. —

Commit 3bf0ca9

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 20 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread crates/update/src/pull_requests.rs Resolved
Comment thread crates/datasource/src/notes/markdown.rs Resolved
Comment thread crates/datasource/src/notes/markdown.rs Resolved
Comment thread crates/update/src/pull_requests.rs Resolved
Comment thread crates/update/src/dashboard.rs Resolved
Comment thread crates/datasource/src/notes/markdown.rs Resolved
Comment thread crates/engine/src/catalogs.rs Resolved
Comment thread crates/update/tests/dashboard.rs Resolved
Comment thread crates/update/tests/dashboard_noise.rs Resolved
Add notes::inert for text that is not Markdown prose (tool output, registry
errors, advisory summaries): @mentions and #refs get a zero-width joiner and
GitHub reference links go through redirect.github.com. sanitise shares its
joiner.
… anyone from tool output

Third-party text on the dashboard (tool output, lookup errors, advisory
summaries, PR titles) goes through notes::inert, so it can't mention anyone
or link back to an issue; package names are code spans.

- Lockfile and tool failures show a short summary, with the decisive lines
  (from the first error, at most 10 lines / 1000 chars, without ANSI,
  progress bars or installer chatter) in a collapsed block. The full output
  stays in the report.
- Known vulnerabilities: one bullet per package and version listing its files,
  advisories as a counted link list with summaries collapsed, the fix status
  once (fixed by #N, fixed in X not proposed, no fixed release yet), severity
  only when known, most severe first.
- Lookup warnings: one box per failing package and source; the retry key is
  now per package, so it retries every file that declares it.
- Held updates read "eligible 31 Oct 08:29 UTC"; the catalog timestamp is gone
  (whether a catalog was reused flips between runs and rewrote the dashboard).
- Warnings already shown under a lookup are not repeated, the per-file lists
  fold under one line, and counts are pluralised.
… block ends

Per package the notes sit in one <details> whose summary says what is inside
(a single short release stays expanded). Upstream headings move below the
version headings. Truncation lands on a paragraph, list item or heading, never
inside a link, code span or code block, closes an open fence or <details>, and
leaves one notice per package. Advisory summaries in PR bodies and batch item
titles are neutralised. A body rewrite keeps text another tool appended after
the ownership marker. The body render key is bumped so existing PRs re-render.
… the rest

The Count's part of a PR description now opens with <!-- patchula-begin --> and
closes with his ownership marker. Everything outside it, before or after, is
whoever else wrote it, and every write takes it from the freshly fetched body,
so it is never doubled, lost or rewritten: an unchanged publish is byte for
byte the same and patches nothing. An edit inside his part loses to his rewrite.
Closing a PR no longer truncates the body to 31,900 bytes.
… &commat;

- <details> inside inline code no longer counts as an open or closing tag
- fences in list items and block quotes are recognised, so headings in them
  aren't demoted
- PEP 440 epochs keep their ! in the range summary
- &commat;name is read as the mention it renders
- docs describe the line-end fallback when one paragraph exceeds the room
…eutralise advisory ids

- the 1000-character cap applies to the neutralised text
- a Rust 'thread … panicked at' line starts the excerpt
- advisory IDs and CVE aliases go through the neutraliser
- tests: fetch times can't change the dashboard; equal severities sort by name
- docs: vulnerability rows list five files then a count
@sweepies
sweepies force-pushed the fix/dashboard-noise branch from 7b20ae5 to cbd7b76 Compare October 31, 2026 00:20

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 12 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread crates/update/src/pull_requests.rs Resolved
Comment on lines +659 to +661
version
.chars()
.filter(|c| c.is_alphanumeric() || ".+-_~^:/!".contains(*c))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Called `.chars().filter(..)` when `.matches(..)` would suffice


Using .chars().filter(..) requires additional logic and complexity compared to using .matches(..)
Using matches(..) allows for much greater flexibility such as using Pattern trait bound types,
and matching string expressions directly.

…e his own

Text others wrote above his section may quote the start marker. His
section cannot hold one, since rendered upstream text never keeps an HTML
comment, so the last start marker before his ownership marker is his.
@sweepies
sweepies merged commit 0bb3abf into main Oct 31, 2026
16 checks passed
@sweepies
sweepies deleted the fix/dashboard-noise branch October 31, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant