Correct version prerelease ordering (#107) + de-stale corpus counts (#88)#114
Conversation
) #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>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe 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. ChangesVersion comparison and corpus metadata
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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_statsas 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. |
…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>
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) strippedbeta\d*/rc\d*wholesale, so7.24beta1,7.24beta2,7.24beta3all compared equal (likewise7.20rc1vs7.20rc2). Ordering was deterministic only because callers (changelog.tsv,command_versions/routeros_command_diff) add a secondary sort key.beta1 < beta2 < beta3 < rc1 < 7.24. A barebeta/rc(no digit) sorts as N=0, below its numbered siblings.export.tsboundary is unaffected (asserted by the existing pure-module import test).rosetta export'schangelog.tsvmanifest and theKNOWN LIMITATIONnote in the source.src/version-compare.test.tspins the precedence chain.#88 — stale Confluence-era counts in agent-facing text
src/mcp.ts's schema-guide resource +routeros_searchtool description, andMANUAL.md's Tables section, still advertised frozen Confluence figures (pages317,properties4,860,callouts1,034) and drifted counts (command_versions1.67M — actual ~2.2M;ros_versions46 — actual ~85) even though the Docusaurus extractor has been the default prose source sinceT-0035.Rather than re-bake exact numbers that drift every extraction (the recurrence @mobileskyfi flagged on the issue), these surfaces now:
routeros_stats— already the live single source of truth — for exact figures.Drops the
#87caveat note inMANUAL.md.Scope note
#89and#98were triaged and split on-issue (comments): the low-risk slices (video title search via the existingvideos_fts; a structural import-hazard guard) are earmarked for 0.11.0 as separate PRs, and the higher-blast-radius parts (shared-extractTermsversion tokenization / stop-words; guard-message +--isolatework) deferred to a deliberate later effort.Verification
bun test— 904 pass / 0 fail (comparator callers: changelog + command-version ordering stay green;export.test.tsgreen).bun run typecheckclean;biome checkclean on changed TS;markdownlint-cli2clean onMANUAL.md+CHANGELOG.md.Summary by CodeRabbit
Bug Fixes
Documentation
routeros_statsfor exact, live counts.