Skip to content

fix(#560): drop unused mermaid npm dep to end CDN version drift - #564

Merged
robnester-rh merged 1 commit into
mainfrom
agent/560-mermaid-cdn-drift
Sep 14, 2026
Merged

robnester-rh merged 1 commit into
mainfrom
agent/560-mermaid-cdn-drift

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Removes the unused mermaid runtime dependency from antora/package.json so that npm version bumps (dependabot / renovate) no longer misleadingly appear to update the mermaid runtime.

Why

antora/supplemental-ui/js/mermaid-init.js loads Mermaid from a hardcoded jsDelivr URL:

script.src = 'https://cdn.jsdelivr.net/npm/mermaid@11.10.1/dist/mermaid.min.js';

Meanwhile antora/package.json declared "mermaid": "^11.10.1" under dependencies, and nothing in the repo's JavaScript actually imports it — the Asciidoctor extension in antora/extensions/mermaid.js only wraps mermaid block macros in a <div class="mermaid"> for the CDN-loaded runtime to render. That meant npm bumps of mermaid were runtime no-ops (see the recently closed-unmerged PRs #557, #530, #542, #543, #544).

Change (option 3 from the issue)

  • Remove mermaid from antora/package.json dependencies.
  • Regenerate antora/package-lock.json (removes ~1400 transitive lockfile lines that were never shipped or executed).
  • Add a comment in antora/supplemental-ui/js/mermaid-init.js documenting that the CDN URL is the sole source of truth for the runtime mermaid version, so future contributors don't reintroduce the drift.

Option 3 was chosen because the npm install truly was unused at runtime — no code path required it — so removing it is the smallest correct change and aligns with the repo's "Simplicity first" / "Surgical changes" guidance in AGENTS.md. Options 1 (bundle from npm via an Antora build extension) and 2 (template the version from package.json into the supplemental JS) would each add moving parts to keep two version sources in sync; option 3 collapses to one source.

Notes on renovate / dependabot ignore rules

The issue's option 3 mentions .github/dependabot.yml, but this repo uses renovate.json (which extends github>conforma/.github//config/renovate/renovate.json). Once mermaid is no longer declared as an npm dependency, Renovate's npm manager has nothing to look at, so no explicit ignore rule is needed to stop the noise. If a future Renovate regex manager is added that also parses the CDN URL, an ignore rule can be added at that point.

Testing

  • npm ci --dry-run in antora/ succeeds, confirming package.json and package-lock.json are consistent after the removal.
  • node --check antora/supplemental-ui/js/mermaid-init.js passes.
  • Grep confirms no require('mermaid') / from 'mermaid' anywhere in the repo, so nothing depended on the removed package.
  • Full end-to-end confirmation of the validation criteria (a mermaid diagram continues to render on a Cloudflare Pages preview build) will happen on the PR preview URL.

Closes #560

Post-script verification

  • Branch is not main/master (agent/560-mermaid-cdn-drift)
  • Secret scan passed (gitleaks — e88d36d43b7eba170addb0520e776a42b263eb66..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

antora/supplemental-ui/js/mermaid-init.js loads Mermaid from a
hardcoded jsDelivr URL (mermaid@11.10.1), while antora/package.json
declared mermaid ^11.10.1 as a runtime dependency. Nothing in the
site code imports the npm package -- the Asciidoctor extension in
antora/extensions/mermaid.js only wraps mermaid block macros in
<div class="mermaid"> for the CDN-loaded runtime to render -- so
npm bumps of mermaid never affected what visitors executed.

The two version sources drifted independently, which triggered
recurring dependency-bump PRs (e.g. #557, #530, #542, #543, #544)
that were runtime no-ops and were closed unmerged.

Option 3 from the issue: remove mermaid from antora/package.json
and regenerate antora/package-lock.json so the npm dep no longer
misleads reviewers, dependabot, renovate, and the fullsend review
agent. Add a comment in mermaid-init.js noting that the CDN URL is
now the sole source of truth for the runtime version, so future
contributors do not reintroduce the drift.

Closes #560
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner September 10, 2026 15:28
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 10, 2026
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: fb3e0e6f-4da1-465d-9543-c0d19ed8ddc3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 10, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:30 PM UTC · Completed 3:44 PM UTC

Commit: cd01138 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-7 · Effort: high · Cost: $8.13

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview is available at https://dc1a96f8.enterprise-contract.pages.dev

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Sep 10, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Docs-site cleanup removing an unused npm dependency; large diff is almost entirely lockfile noise, the functional change in mermaid-init.js is small, files are cold with no recent collisions, and the PR cleanly implements the linked issue chosen option.

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Sep 10, 2026

@robnester-rh robnester-rh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@robnester-rh
robnester-rh merged commit 5e3c39f into main Sep 14, 2026
12 checks passed
@fullsend-ai-retro

fullsend-ai-retro Bot commented Sep 14, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 1:42 PM UTC · Completed 1:50 PM UTC

Commit: cd01138 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-7 · Effort: high · Cost: $2.08

@fullsend-ai-retro

Copy link
Copy Markdown

Retro for PR #564

Workflow outcome: clean pipeline. Triage → code → review → two human approvals → merge, ~4 days, one commit, zero rework. Agent review verdict (Looks good to me, risk 2/5) aligned with both human approvers (robnester-rh LGTM, joejstuart approve-and-merge). No regressions found.

No proposals filed — every improvement this retro could raise is already tracked upstream. Evidence collected below is for those existing issues; per retro-analysis guidance, evidence-for issues are not filed as new proposals.

Evidence for existing open issues

  • Review cost anomaly — fullsend-ai/fullsend#6891 (pre-flight scope heuristic) and fullsend-ai/agents#513 (short-circuit lightweight mode on mechanical bumps). Review run 34495939560 cost $8.13 at opus/high to conclude "looks good" on a single-file functional change (drop unused mermaid dep) surrounded by ~1400 lines of lockfile churn. Seven other recent conforma/.fullsend review runs in the same window landed at $2.18–$6.23, including a 2100-line go module bump at $3.92. harness/review.yaml in fullsend-ai/agents@v0.41.0 pins model: opus, effort: high unconditionally — no diff-size, label, or generated-file gating. Also supports fullsend-ai/agents#1143 (filter lockfiles from review diff) and fullsend-ai/fullsend#3240 (fast-path for trivially safe bot PRs).
  • Actions-tab disambiguation — fullsend-ai/fullsend#6406 (add run-name to shim workflows). Four back-to-back Triage runs (34494707849, 34494760541, 34494909382, 34495010076) in ~3 min all displayed as Triage in the conforma/.fullsend Actions tab. Payload inspection confirmed they were four legitimately distinct issues (Antora mermaid CDN pin makes dependabot updates a no-op #560fullsend-ai-review approvals never trigger auto-merge — wire the reviewer allowlist so Renovate PRs actually merge #563 filed in a burst by fullsend-ai-retro), not duplicates — dispatch.yml and triage.yml concurrency groups are correctly keyed per-issue. But the identical display titles created a false-duplicate impression that took a subagent investigation to disprove; #6406 would have made this a glance.
  • Superseded review dispatch — fullsend-ai/fullsend#6957 (steer in-flight agent instead of cancelling). Review run 34495345293 was cancelled by concurrency ~30s before run 34495939560 started for the same PR head SHA. Small cost, but consistent with the pattern #6957 tracks.

Positive signal

Triage on #560 correctly flagged that the retro-agent-filed issue text referenced "Dependabot" while the repo uses Renovate; the code agent used the right tool anyway. Human reviewers added no inline comments and the two approvals came within minutes of each other — an autonomy-readiness data point in favor of the lightweight-review-path proposals cited above (issue-body wording drift is worth watching if it recurs, but a single instance is not a pattern).

Agents repo discovered from run logs: fullsend-ai/agents@v0.41.0 (commit 10560252b0ad).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate size: XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Antora mermaid CDN pin makes dependabot updates a no-op

2 participants