Skip to content

Correct version prerelease ordering (#107) + de-stale corpus counts (#88)#114

Merged
mobileskyfi merged 2 commits into
mainfrom
chore/0.11.0-version-compare-and-counts
Jul 17, 2026
Merged

Correct version prerelease ordering (#107) + de-stale corpus counts (#88)#114
mobileskyfi merged 2 commits into
mainfrom
chore/0.11.0-version-compare-and-counts

Conversation

@mobileskyfi

@mobileskyfi mobileskyfi commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Two small 0.11.0-milestone cleanups, closing #107 and #88. Neither is a blocker; both are "get it right before latest" fixes.

#107 — shared version comparator ignores prerelease number

compareVersions() (src/version-compare.ts) stripped beta\d*/rc\d* wholesale, so 7.24beta1, 7.24beta2, 7.24beta3 all compared equal (likewise 7.20rc1 vs 7.20rc2). Ordering was deterministic only because callers (changelog.tsv, command_versions / routeros_command_diff) add a secondary sort key.

  • Fold the prerelease number into the sort so it's strict and total for one base: beta1 < beta2 < beta3 < rc1 < 7.24. A bare beta/rc (no digit) sorts as N=0, below its numbered siblings.
  • Module stays dependency-free — the DB-only export.ts boundary is unaffected (asserted by the existing pure-module import test).
  • Removes the honesty disclosure this bug forced into rosetta export's changelog.tsv manifest and the KNOWN LIMITATION note in the source.
  • New src/version-compare.test.ts pins the precedence chain.

#88 — stale Confluence-era counts in agent-facing text

src/mcp.ts's schema-guide resource + routeros_search tool description, and MANUAL.md's Tables section, still advertised frozen Confluence figures (pages 317, properties 4,860, callouts 1,034) and drifted counts (command_versions 1.67M — actual ~2.2M; ros_versions 46 — actual ~85) even though the Docusaurus extractor has been the default prose source since T-0035.

Rather than re-bake exact numbers that drift every extraction (the recurrence @mobileskyfi flagged on the issue), these surfaces now:

  • state order-of-magnitude counts only,
  • correct the "March 2026 Confluence export" provenance wording to the live Docusaurus corpus, and
  • point at routeros_stats — already the live single source of truth — for exact figures.

Drops the #87 caveat note in MANUAL.md.

Scope note

#89 and #98 were triaged and split on-issue (comments): the low-risk slices (video title search via the existing videos_fts; a structural import-hazard guard) are earmarked for 0.11.0 as separate PRs, and the higher-blast-radius parts (shared-extractTerms version tokenization / stop-words; guard-message + --isolate work) deferred to a deliberate later effort.

Verification

  • bun test — 904 pass / 0 fail (comparator callers: changelog + command-version ordering stay green; export.test.ts green).
  • bun run typecheck clean; biome check clean on changed TS; markdownlint-cli2 clean on MANUAL.md + CHANGELOG.md.
  • Live counts used to set magnitudes were read from a current rc.102 (schema v10) DB.

Summary by CodeRabbit

  • Bug Fixes

    • Improved version sorting so numbered beta and release-candidate versions are ordered consistently and deterministically.
    • Clarified command-version reporting to reflect how stored command data is represented.
  • Documentation

    • Updated database table descriptions with current, approximate corpus sizes.
    • Added guidance to use routeros_stats for exact, live counts.
    • Clarified documentation coverage, supported RouterOS versions, and current corpus details.

)

#107: compareVersions() collapsed same-base prereleases (7.24beta1 ==
beta2 == beta3) because normalize() stripped beta\d*/rc\d* wholesale.
Fold the prerelease number into the sort key so ordering is strict and
total for one base (beta1 < beta2 < rc1 < 7.24). Module stays
dependency-free (DB-only export boundary unaffected). Drops the honesty
disclosure this bug forced into export's changelog.tsv manifest and the
KNOWN LIMITATION note; adds src/version-compare.test.ts pinning it.

#88: schema-guide resource + routeros_search tool description in
src/mcp.ts and MANUAL.md's Tables section still advertised frozen
Confluence-era counts (317 pages / 4,860 properties / 1,034 callouts)
and drifted figures (command_versions 1.67M vs actual ~2.2M) though the
Docusaurus extractor is the default prose source since T-0035. Restate
as order-of-magnitude, fix provenance wording, and point at
routeros_stats (the live source of truth) instead of re-baking exact
numbers that drift every extraction. Drops the #87 caveat note.

Closes #107
Closes #88

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 17, 2026 19:17
@mobileskyfi mobileskyfi added this to the 0.11.0 milestone Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e064cc5c-9cd3-4a21-ab91-84ba2334f841

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
📝 Walkthrough

Walkthrough

The comparator now orders same-base prereleases by numeric suffix. Documentation and MCP messaging replace stale corpus counts with approximate figures and live-stat references, while export disclosures describe command version storage semantics.

Changes

Version comparison and corpus metadata

Layer / File(s) Summary
Prerelease comparison ordering
src/version-compare.ts, src/version-compare.test.ts
compareVersions compares prerelease numbers after channel precedence, with tests covering ordering, numeric comparison, equality, and symmetry.
Corpus messaging and disclosures
MANUAL.md, src/mcp.ts, src/export.ts, CHANGELOG.md
Corpus documentation and MCP descriptions use approximate live-data guidance, while export disclosures describe the architecture-blind commands version value and the changelog records both corrections.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

  • tikoci/rosetta#103 — Its export ordering tests are affected by the updated comparator.
  • tikoci/rosetta#109 — Both changes update export disclosures related to prerelease ordering.

Suggested labels: area:docusaurus

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately names the two main changes: prerelease version ordering and stale corpus-count cleanup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/0.11.0-version-compare-and-counts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copilot AI 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.

Pull request overview

This PR improves correctness and reduces documentation drift ahead of the 0.11.0 “latest” release by (1) fixing RouterOS prerelease version ordering in the shared comparator and (2) replacing stale, baked-in corpus counts/provenance text with “order-of-magnitude + routeros_stats” guidance across agent-facing surfaces.

Changes:

  • Make compareVersions() strictly order same-base prereleases by channel and number (betaN < rcN < final).
  • Add focused regression tests for prerelease ordering.
  • Update MCP/schema/docs surfaces to avoid frozen Confluence-era counts and point to routeros_stats as the live source of truth; remove now-unneeded export disclosure; add changelog bullets.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/version-compare.ts Fixes prerelease ordering by incorporating prerelease number into the comparator while staying dependency-free.
src/version-compare.test.ts Adds tests to pin prerelease precedence and ensure strict ordering.
src/mcp.ts Updates schema-guide resource text and routeros_search tool description to reflect Docusaurus corpus and avoid stale exact counts.
src/export.ts Removes the changelog prerelease-ordering disclosure now that the comparator is strict.
MANUAL.md Updates the Tables reference to use approximate counts and direct readers to routeros_stats for live figures.
CHANGELOG.md Records the user-visible fixes for version ordering and de-staling agent-facing corpus counts.

Comment thread src/mcp.ts Outdated
Comment thread src/mcp.ts Outdated
Comment thread MANUAL.md Outdated
…grammar

- mcp.ts schema-guide note: "no exact count is baked in" (the table below
  intentionally carries approximate magnitudes, so "no number" was
  self-contradictory).
- Align mcp.ts magnitudes with MANUAL.md so the two surfaces agree and
  read as coarse orders of magnitude, not near-stale exacts:
  command_versions ~1.7M -> ~2M+, devices ~145 -> ~155,
  device_test_results ~2.9K -> ~3K.
- MANUAL.md Tables note: comma after "legacy Confluence rows" so the
  clause parses.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mobileskyfi
mobileskyfi merged commit 4402464 into main Jul 17, 2026
9 of 11 checks passed
@mobileskyfi
mobileskyfi deleted the chore/0.11.0-version-compare-and-counts branch July 17, 2026 19:27
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.

2 participants