Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 65 additions & 10 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ jobs:
# fail on any floor a pre-built published DB predates.
- name: Validate DB has expected content (db-content)
if: inputs.test_scope == 'db-content' || (inputs.test_scope == 'all' && (inputs.db_source == 'local-build' || inputs.db_source == 'artifact'))
env:
DB_SOURCE: ${{ inputs.db_source }}
FULL_VERSIONS: ${{ inputs.full_versions }}
run: |
set -euo pipefail
PAGES=$(sqlite3 ros-help.db "SELECT COUNT(*) FROM pages")
Expand Down Expand Up @@ -253,6 +256,19 @@ jobs:
EXPECTED_VERSIONS=$(sqlite3 ros-help.db "SELECT value FROM db_meta WHERE key = 'command_versions_expected'" 2>/dev/null || echo "")
echo "✓ DB: $PAGES pages ($SECTIONS sections, $CALLOUTS callouts), $COMMANDS commands, $DEVICES devices ($BLOCK_DIAGRAMS block diagrams), $TEST_RESULTS test_results, $CHANGELOGS changelogs, $VIDEOS videos, $DUDE_PAGES dude_pages, $SKILLS skills, $PROPERTIES properties ($TABLE_PROPERTIES table-linked), $PAGE_TABLES page_tables ($PAGE_TABLE_DATA_ROWS data rows), $HARDWARE_CATALOG hardware_catalog, $DEVICE_ALIASES device_aliases, $CLIREF_ENTRIES cliref_entries ($CLIREF_FIELDS fields, $CLIREF_FLAGS flags, $CLIREF_LINKS links)"
fail=0
# A full-versions build (every release, per release.yml's latest guard) must carry the
# command tree and the version stamp; without them the coverage gate and the
# crosswalk check below would have nothing to check.
if [ "$FULL_VERSIONS" = "true" ] && [ "$DB_SOURCE" != "published" ]; then
if [ -z "$EXPECTED_VERSIONS" ]; then
echo "::error::full_versions build has no command_versions_expected in db_meta — did extract-all-versions run?"
fail=1
fi
if [ "${SCHEMA_CMD_NODES:-0}" -lt 1 ]; then
echo "::error::full_versions build has an empty command tree (schema_nodes dir/cmd = ${SCHEMA_CMD_NODES:-0}) — the crosswalk and per-version answers would be missing."
fail=1
fi
fi
if [ "${PAGES:-0}" -lt 200 ]; then
echo "::error::DB has only ${PAGES} pages — expected ≥200 (Docusaurus /docs export is ~365)."
fail=1
Expand All @@ -272,20 +288,47 @@ jobs:
# Generic table floors (#92/#139): MikroTik keeps moving inline property-reference
# sections into /docs/cli-reference/ (September 2026: 718 tables / 7,109 data rows /
# 3,357 linked property rows; October 2026, after 26 more pages — DNS, NTP, user,
# services, packet-sniffer, cloud, … — lost their tables: 661 / 6,764 / 2,745).
# services, packet-sniffer, cloud, … — lost their tables: 661 / 6,764 / 2,745;
# November 2026, after User Manager, HotSpot, certificates, PPP AAA, dot1x, RADIUS,
# queues, connection tracking, containers, VXLAN, MACVLAN, MACsec, … were rewritten
# to link the CLI Reference instead: 554 / 5,659 / 1,763).
# These floors retain roughly 9-11% headroom while proving the prose parser,
# normalized storage, and property provenance all reached the artifact. CLI-Reference
# has separate floors and exact discovery/link integrity gates below.
if [ "${PAGE_TABLES:-0}" -lt 600 ]; then
echo "::error::DB has only ${PAGE_TABLES} page_tables rows — expected ≥600."
if [ "${PAGE_TABLES:-0}" -lt 500 ]; then
echo "::error::DB has only ${PAGE_TABLES} page_tables rows — expected ≥500."
fail=1
fi
if [ "${PAGE_TABLE_DATA_ROWS:-0}" -lt 6100 ]; then
echo "::error::DB has only ${PAGE_TABLE_DATA_ROWS} generic table data rows — expected ≥6100."
if [ "${PAGE_TABLE_DATA_ROWS:-0}" -lt 5100 ]; then
echo "::error::DB has only ${PAGE_TABLE_DATA_ROWS} generic table data rows — expected ≥5100."
fail=1
fi
if [ "${TABLE_PROPERTIES:-0}" -lt 2450 ]; then
echo "::error::DB has only ${TABLE_PROPERTIES} properties linked to source table rows — expected ≥2450."
if [ "${TABLE_PROPERTIES:-0}" -lt 1600 ]; then
echo "::error::DB has only ${TABLE_PROPERTIES} properties linked to source table rows — expected ≥1600."
fail=1
fi
# Page-level spot checks (0.12.1 review): the corpus-wide table floors keep ~10%
# headroom, so losing every table on one large page (Bridging alone is ~20 tables /
# ~160 properties) would still pass them. These pin pages that kept their tables
# through the November 2026 rewrite. If MikroTik later moves one of them into the
# CLI Reference too, confirm that on the live page and update the check.
BRIDGE_PROPS=$(sqlite3 ros-help.db "SELECT COUNT(*) FROM properties r JOIN pages p ON p.id = r.page_id WHERE (p.url LIKE '%/docs/bridging-and-switching' OR p.url LIKE '%/docs/bridging-and-switching/') AND r.source_table_row_id IS NOT NULL" 2>/dev/null || echo 0)
UM_TABLES=$(sqlite3 ros-help.db "SELECT COUNT(*) FROM page_tables t JOIN pages p ON p.id = t.page_id WHERE p.url LIKE '%/docs/authentication-authorization-accounting/user-manager' OR p.url LIKE '%/docs/authentication-authorization-accounting/user-manager/'" 2>/dev/null || echo 0)
echo "✓ spot checks: bridging-and-switching ${BRIDGE_PROPS} properties, user-manager ${UM_TABLES} tables"
if [ "${BRIDGE_PROPS:-0}" -lt 100 ]; then
echo "::error::bridging-and-switching has only ${BRIDGE_PROPS} table-linked properties — expected ≥100 (158 on 2026-11-28). Did its property tables stop parsing?"
fail=1
fi
if [ "${UM_TABLES:-0}" -lt 3 ]; then
echo "::error::user-manager has only ${UM_TABLES} generic tables — expected ≥3 (7 on 2026-11-28). Did its State/Meaning-style tables stop parsing?"
fail=1
fi
# Properties that left the prose pages in November 2026 must still answer from the
# default CLI-Reference tree, with a description (routeros_lookup_property's fallback).
MIGRATED_FIELDS=$(sqlite3 ros-help.db "SELECT COUNT(DISTINCT e.source_path || ' ' || f.name) FROM cliref_fields f JOIN cliref_entries e ON e.id = f.entry_id JOIN cliref_pages p ON p.id = e.page_id JOIN cliref_trees t ON t.manual_version = p.manual_version WHERE t.is_default = 1 AND length(trim(f.description_markdown)) > 20 AND ((e.source_path = 'user-manager/user' AND f.name = 'shared-users') OR (e.source_path = 'ip/hotspot/user/profile' AND f.name = 'rate-limit') OR (e.source_path = 'queue/simple' AND f.name = 'max-limit'))" 2>/dev/null || echo 0)
echo "✓ spot checks: ${MIGRATED_FIELDS}/3 migrated properties answer from the default CLI-Reference tree"
if [ "${MIGRATED_FIELDS:-0}" -lt 3 ]; then
echo "::error::Only ${MIGRATED_FIELDS}/3 of user-manager/user shared-users, ip/hotspot/user/profile rate-limit, queue/simple max-limit have a described default-tree CLI-Reference field. Their prose property tables are gone, so this is their only answer."
fail=1
fi
# Hardware overlay floors (B-0017/B-0018, PR #41 / issue #38): the tables
Expand Down Expand Up @@ -329,7 +372,16 @@ jobs:
echo "::error::DB has only ${CALLOUTS} callouts — expected ≥600. Did extract-docusaurus parse admonitions?"
fail=1
fi
if [ "${CHANGELOGS:-0}" -lt 4000 ]; then
# Changelog coverage follows the command-version set: a full build (extract-all-versions
# stamps command_versions_expected) fetches every version, 7,649 entries on 2026-11-28.
# Only a single-version local-build REHEARSAL (full_versions=false, ~12 versions, 1,451
# entries) gets the lower "it ran" floor; a release artifact always needs 4,000.
if [ "$DB_SOURCE" = "local-build" ] && [ -z "$EXPECTED_VERSIONS" ]; then
if [ "${CHANGELOGS:-0}" -lt 1000 ]; then
echo "::error::DB has only ${CHANGELOGS} changelog entries — expected ≥1000 for a single-version local-build rehearsal. Did extract-changelogs run?"
fail=1
fi
elif [ "${CHANGELOGS:-0}" -lt 4000 ]; then
echo "::error::DB has only ${CHANGELOGS} changelog entries — expected ≥4000. Did extract-changelogs run, or did download.mikrotik.com fail?"
fail=1
fi
Expand Down Expand Up @@ -393,11 +445,14 @@ jobs:
# release build (which populated the links) — rehearsable here against the artifact.
- name: CLI-Reference link drift (db-content)
if: inputs.test_scope == 'db-content' || (inputs.test_scope == 'all' && (inputs.db_source == 'local-build' || inputs.db_source == 'artifact'))
env:
FULL_VERSIONS: ${{ inputs.full_versions }}
run: |
set -euo pipefail
# The crosswalk only exists on the full-versions path (see the floor step). Skip
# the byte-compare for a single-version local-build that built no schema_nodes.
if [ "$(sqlite3 ros-help.db "SELECT COUNT(*) FROM schema_nodes WHERE type IN ('dir','cmd')")" -gt 0 ]; then
# the byte-compare only for a single-version build that built no schema_nodes; a
# full-versions build always runs it, and link-cliref fails on an empty tree.
if [ "$FULL_VERSIONS" = "true" ] || [ "$(sqlite3 ros-help.db "SELECT COUNT(*) FROM schema_nodes WHERE type IN ('dir','cmd')")" -gt 0 ]; then
make link-cliref-check
else
echo "schema_nodes has no command tree (single-version build) — skipping V-cliref-link-drift."
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,22 @@ jobs:
fi
echo "✓ CHANGELOG.md has a [$PKG_VERSION] heading"

# A latest release ships the whole corpus: every RouterOS version's command tree,
# changelogs and the CLI-Reference crosswalk. full_versions=false skips
# extract-all-versions, which leaves command_versions_expected unset and link-cliref
# skipped, so qa.yml's full-build floors and V-cliref-link-drift would not apply.
# Single-version builds stay available for the next channel and qa.yml rehearsals.
# No republish_assets exemption: a republish rebuilds the DB and re-uploads it as the
# latest release's asset, so it owes the same full-version build.
- name: Require a full-version build for latest-channel release
run: |
set -euo pipefail
if [ "${{ steps.channel.outputs.channel }}" = "latest" ] && [ "${{ inputs.full_versions }}" != "true" ]; then
echo "::error::A latest-channel release needs full_versions=true (every RouterOS version, changelogs and the CLI-Reference crosswalk). Re-dispatch with full_versions enabled."
exit 1
fi
echo "✓ full_versions=${{ inputs.full_versions }} for channel ${{ steps.channel.outputs.channel }}"

# inputs.version's equality check below only applies cleanly to
# latest-channel runs. For prerelease runs, package.json's version was
# already rewritten above to include $GITHUB_RUN_NUMBER — a value that
Expand Down Expand Up @@ -435,10 +451,15 @@ jobs:
# extract-commands, which fills the legacy `commands` table, not schema_nodes). Gate
# on the actual node count so the link runs only when a crosswalk can form, matching
# `make extract` (no link-cliref) vs `make extract-full` (link-cliref).
# A full-versions build must ALWAYS link: an empty schema_nodes there means the command
# tree failed to load (e.g. a legacy-inspect fallback filled only `commands`), and
# link-cliref refuses an empty tree loudly instead of the build skipping quietly.
- name: Link CLI-Reference to inspect
env:
FULL_VERSIONS: ${{ inputs.full_versions }}
run: |
set -euo pipefail
if [ "$(sqlite3 ros-help.db "SELECT COUNT(*) FROM schema_nodes WHERE type IN ('dir','cmd')")" -gt 0 ]; then
if [ "$FULL_VERSIONS" = "true" ] || [ "$(sqlite3 ros-help.db "SELECT COUNT(*) FROM schema_nodes WHERE type IN ('dir','cmd')")" -gt 0 ]; then
bun run src/link-cliref.ts
else
echo "schema_nodes has no command tree (single-version build) — skipping link-cliref."
Expand Down Expand Up @@ -641,6 +662,9 @@ jobs:
test_scope: all
db_source: artifact
artifact_name: ros-help-db
# Tells qa which gates the artifact owes: a full-versions build must carry a command
# tree, command_versions_expected, and a crosswalk that link-drift checks (no skip).
full_versions: ${{ inputs.full_versions }}

publish:
needs: [build, qa]
Expand Down
1 change: 1 addition & 0 deletions BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

Drop one-line thoughts here. Promote later — to an issue if it gains shape, to a briefing if it needs thinking-first, or delete if it doesn't survive a re-read.

- Property lookup ignores `cliref_flags`: since the November 2026 manual rewrite, former Bridge Hosts properties such as `disabled` and `dynamic` are described only as CLI-Reference print flags (`/interface/bridge/host`), so `routeros_lookup_property` can't answer them (0.12.1 Codex review, #255). CLI-Reference defaults also stay inside description text while `default_val` is null.
- Keep merging `actions/setup-node`, `actions/upload-artifact`, and Docker action Dependabot bumps before GitHub's forced runtime transitions turn warnings into failures.
- Benchmark feedback loop: periodically compare retrieval/explain changes against `~/GitHub/bench-routeros-tools`; promote `route-blackhole`, version-new Wi-Fi `ssid=`, and skill-vs-raw-doc packaging into rosetta fixtures when the benchmark corpus stabilizes.
- Future `routeros_validate_command`: carry explicit static-vs-runtime provenance and include a bare-flag `blackhole` regression fixture because `/console/inspect` can accept forms that RouterOS runtime rejects.
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ uses [Semantic Versioning](https://semver.org/).

- **Product matrix refreshed to the 2026-11-28 snapshot.** `devices` and the hardware overlay now read `matrix/2026-11-28/matrix.csv` (155 products). It adds LtAP LTE12 ax (`LtAP-5HaxT2HaxD&EG120K-EA`), and corrects RDS2216-2XG-4S+4XS-2XQ's CPU frequency to 2400 MHz (previously 2000 MHz). The hardware and product-page assessments were re-scraped the same day. FTC21-ups, KNOT Gateway HL9 and KNOT Gateway LR8 now have their own `/hardware` pages, so `routeros_device_lookup` links them instead of reporting them as www-only, and their curated exceptions are gone. Closes the scheduled device-map drift (#252).
- **YouTube transcript cache refreshed to the 2026-11-28 snapshot.** 749 videos (3 new): the LtAP LTE12 ax launch video and the RouterOS 7.24 and 7.25 changelog walkthroughs. All 746 earlier entries are unchanged.
- **MikroTik's new `/hardware` Quick Guides stay out of the device catalog.** The manual added about 120 "Quick Guide - …" pages, one per product that already has a `/hardware` page, plus a TG-LR82 / TG-LR92 user manual. They are documents about devices, not devices, so they claim no matrix row and `hardware_catalog` and `device_aliases` skip them. Otherwise each would show up as a second, unlinked device that competes for the real device's model codes.
- **MikroTik's new `/hardware` Quick Guides stay out of the device catalog.** The manual added about 120 "Quick Guide - …" pages, one per product that already has a `/hardware` page, plus a TG-LR82 / TG-LR92 user manual. They are documents about devices, not devices, so they claim no matrix row and `hardware_catalog` and `device_aliases` skip them. Otherwise each would show up as a second, unlinked device that competes for the real device's model codes. `hardware-unmatched.tsv` lists them as `series-or-doc`, so its device spec-gap worklist shrinks from 108 pages to 4.
Comment thread
mobileskyfi marked this conversation as resolved.
Resolved

### Fixed

- **The release content floors follow MikroTik's November manual rewrite.** User Manager, HotSpot, certificates, PPP AAA, dot1x, RADIUS, queues, connection tracking, containers, VXLAN, MACVLAN and MACsec now link the CLI Reference instead of carrying property tables. That leaves 554 page tables, 5,659 table rows and 1,763 table-linked properties (0.12.0 shipped 643 / 6,574 / 2,462). The floors drop to 500 / 5,100 / 1,600, keeping about 10% headroom. Because a floor that loose would not notice one large page losing its tables, new spot checks also require ≥100 properties on Bridging, ≥3 tables on User Manager, and described default-tree CLI-Reference fields for User Manager `shared-users`, HotSpot profile `rate-limit` and simple queue `max-limit`. Known gap: Bridge Hosts `disabled` and `dynamic` are now described only as CLI-Reference print flags, which `routeros_lookup_property` doesn't read yet.
- **A latest release requires a full-version build, and only a rehearsal gets the lower changelog floor.** The release workflow now fails a latest-channel dispatch with `full_versions=false`, since that build skips every older version's command tree, most changelogs and the CLI-Reference crosswalk check. A full-version build must also produce a command tree and its version stamp: the CLI-Reference link step and the link-drift gate no longer skip quietly when `schema_nodes` is empty, they fail. The changelog floor stays at 4,000 entries for any release artifact. Only a single-version `qa.yml` local-build rehearsal, which fetches about 12 versions' changelogs, needs just 1,000, so it no longer fails by default.
- **The CLI-Reference crosswalk baseline is refreshed for the 7.26 manual.** It adds 9 manual-only entries (`app/check-update`, `container/check-update`, `system/sync-e` and its `monitor` and `port`, `routing/bgp/evpn/esi`, `interface/wifi/meshpoint-paths`, and two `reset-counters` commands) and drops `/iot/lora/send`, which the 7.26 manual no longer documents (the 7.24 and 7.25 trees still do).
- The hardware assessment no longer counts the manual's new tag index pages (`/hardware/tags`, `/hardware/tags/lora` and so on) as hardware pages. They failed to cache, which left every live run partial so its cache was never pruned.
- The README `/app` install steps now cover the storage-disk prerequisite (`/app/setup` or `/app/settings`, with sizing guidance): without a selected disk `/app/add` succeeds but the app sits idle with no error. The steps also note that the inline YAML's inner quotes must stay backslash-escaped. Phase 1 of #245.
- Release OCI images are smoke-tested with a real MCP session on both architectures before any version or floating tag moves. Each release runs `scripts/smoke-oci.ts` (initialize → tools/list → provenance match → search → chained get_page → command_tree → device_lookup) against the pushed image on native amd64 and arm64 Docker, asserting each leg pulled its own architecture; `:latest` / `:next` promote only after both legs pass. Previously only the amd64 image ran, and any non-404 HTTP response passed (#246).
Expand Down
Loading
Loading