Skip to content
Draft
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
52 changes: 30 additions & 22 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,44 +291,52 @@ jobs:
# 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,
# to link the CLI Reference instead: 554 / 5,659 / 1,763; 2026-12-01, after Bridging,
# Bridge IGMP/MLD snooping, legacy CAPsMAN and Wi-Fi CAPsMAN moved: 531 / 5,289 / 1,414).
# These floors retain roughly 10-12% 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 500 ]; then
echo "::error::DB has only ${PAGE_TABLES} page_tables rows — expected ≥500."
if [ "${PAGE_TABLES:-0}" -lt 475 ]; then
echo "::error::DB has only ${PAGE_TABLES} page_tables rows — expected ≥475 (531 on 2026-12-01)."
fail=1
fi
if [ "${PAGE_TABLE_DATA_ROWS:-0}" -lt 5100 ]; then
echo "::error::DB has only ${PAGE_TABLE_DATA_ROWS} generic table data rows — expected ≥5100."
if [ "${PAGE_TABLE_DATA_ROWS:-0}" -lt 4750 ]; then
echo "::error::DB has only ${PAGE_TABLE_DATA_ROWS} generic table data rows — expected ≥4750 (5,289 on 2026-12-01)."
fail=1
fi
if [ "${TABLE_PROPERTIES:-0}" -lt 1600 ]; then
echo "::error::DB has only ${TABLE_PROPERTIES} properties linked to source table rows — expected ≥1600."
# Table-linked prose properties shrink as MikroTik moves property tables into the
# CLI Reference (3,357 Sept → 1,763 at 0.12.1 → 1,414 on 2026-12-01, after Bridging
# and CAPsMAN moved). This floor catches a parser loss, not the migration: lower it
# when a live page confirms another move. The CLI-Reference floors below and
# MIGRATED_FIELDS carry the property contract for the moved menus (#269).
if [ "${TABLE_PROPERTIES:-0}" -lt 1250 ]; then
echo "::error::DB has only ${TABLE_PROPERTIES} properties linked to source table rows — expected ≥1250."
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)
# headroom, so losing every table on one large page would still pass them. These pin
# pages that still carry their tables. Bridging was the pin until it moved to the CLI
# Reference on 2026-11-30 (158 → 0); Ethernet (155 on 2026-11-28) replaces it. If
# MikroTik moves this page too, confirm that on the live page and pin another.
ETHERNET_PROPS=$(sqlite3 ros-help.db "SELECT COUNT(*) FROM properties r JOIN pages p ON p.id = r.page_id WHERE (p.url LIKE '%/docs/wired-connections/ethernet' OR p.url LIKE '%/docs/wired-connections/ethernet/') 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?"
echo "✓ spot checks: wired-connections/ethernet ${ETHERNET_PROPS} properties, user-manager ${UM_TABLES} tables"
if [ "${ETHERNET_PROPS:-0}" -lt 100 ]; then
echo "::error::wired-connections/ethernet has only ${ETHERNET_PROPS} table-linked properties — expected ≥100 (155 on 2026-11-28). Did its property tables stop parsing, or did MikroTik move them to the CLI Reference (check the live page)?"
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."
# Properties that left the prose pages must still answer from the default
# CLI-Reference tree, with a description (routeros_lookup_property's overlay). One field
# per moved menu: November 2026 (User Manager, HotSpot, queues) and 2026-11-30
# (Bridging, legacy CAPsMAN, Wi-Fi CAPsMAN), whose descriptions MikroTik moved too.
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') OR (e.source_path = 'interface/bridge' AND f.name = 'ageing-time') OR (e.source_path = 'caps-man/manager' AND f.name = 'enabled') OR (e.source_path = 'interface/wifi/capsman' AND f.name = 'enabled'))" 2>/dev/null || echo 0)
echo "✓ spot checks: ${MIGRATED_FIELDS}/6 migrated properties answer from the default CLI-Reference tree"
if [ "${MIGRATED_FIELDS:-0}" -lt 6 ]; then
echo "::error::Only ${MIGRATED_FIELDS}/6 of user-manager/user shared-users, ip/hotspot/user/profile rate-limit, queue/simple max-limit, interface/bridge ageing-time, caps-man/manager enabled, interface/wifi/capsman enabled 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
2 changes: 2 additions & 0 deletions BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Drop one-line thoughts here. Promote later — to an issue if it gains shape, to
- Extractor rebuild isn't atomic: an insert error mid-rebuild leaves a wiped DB, and the naive fix (wrap in a transaction) silently re-enables FK enforcement because `PRAGMA foreign_keys` is a no-op inside a transaction. Moved here from the closed #95 umbrella. Separate failure mode [#178](https://github.com/tikoci/rosetta/issues/178) is fixed: per-version extraction failures now fail the build (#179). That fail-closed release behavior does not make local rebuilds atomic.
- `routeros_command_tree` path ergonomics: requires exact slash-delimited REST-like paths (e.g. `/ip/address/add/address`) and rejects natural forms like `ip address`; shape is tightly bound to `inspect.json`'s parts, some of which (e.g. `page_title`/`page_url`/`dir_role`/`data_type`/`_arch`/`completion`, often all `null`) may not carry their weight. Surfaced while reviewing B-0004 (2026-07-14), which is otherwise superseded/resolved — not yet scoped as its own issue.

- Video quality signals: transcript-source classification and whether `view_count`/`upload_date` should affect ranking (closed #21 as not planned, 2026-12-01). Reopen if a retrieval or eval result shows they would change answers.
- Manual doc-changes watcher: Docusaurus extraction has landed, so the old prerequisite is satisfied. Decide whether RSS-driven refresh adds value before scheduling it; reverify the feed before implementation.

## Triggers
Expand All @@ -44,6 +45,7 @@ Items waiting on a specific external event. Not tracked as issues because the wa
| Video extraction retry | At each scheduled transcript refresh — re-run consistent-fail videos after 48–72h gaps; add to `known-bad.json` after repeated failures. |
| LSP consumer artifacts | When `lsp-routeros-ts` is ready for static manifests. The path→URL/title half is now [#173](https://github.com/tikoci/rosetta/issues/173) (publish `rosetta export` output); a `verbs.json` manifest (#5 H4) would ride the same publishing path. |
| bench-routeros-tools merge | When `agents/grounded-data-collection-agents` and the pending Claude matrix work land, review benchmark reports for stable external-eval fixtures and decide whether to promote a rosetta task. |
| Per-version manual prose (closed [#186](https://github.com/tikoci/rosetta/issues/186)) | When a concrete version-scoped prose question appears that the default tree plus per-version CLI Reference and `command_versions` cannot answer. |
| Overlay-as-base path vocabulary (B-0024 step 8) | When `centrs`' `explain` canonicalization work settles whether the CLI-Reference path vocabulary can host inspect's verbs without a new alias layer. Until then rosetta keeps the overlay beside `schema_nodes`, not under it. Do not preempt with a rosetta-local alias scheme. |

Fired 2026-10-20: **versioned manual** — `/docs/7.24/` and `/docs/7.25/` now serve `llms.txt` + `.md`, and the default tree declares itself 7.26 (development), not stable. Delivered: [#187](https://github.com/tikoci/rosetta/issues/187) (stamp the ingested manual version) and [#188](https://github.com/tikoci/rosetta/issues/188) (per-version CLI Reference as a published dataset for centrs). Remaining: [#186](https://github.com/tikoci/rosetta/issues/186) (per-version prose).
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ uses [Semantic Versioning](https://semver.org/).

## [Unreleased]

### Changed

- **QA content floors follow MikroTik's move of property tables into the CLI Reference.** On 2026-11-30 the Bridging, Bridge IGMP/MLD snooping, legacy CAPsMAN and Wi-Fi CAPsMAN pages lost their property tables, and their descriptions moved to the CLI Reference. The table floors now sit about 10% under the current corpus (≥475 page tables, ≥4,750 data rows, ≥1,250 table-linked properties). The page spot check pins Ethernet instead of Bridging. The migrated-property check now requires six moved menus, adding `interface/bridge`, `caps-man/manager` and `interface/wifi/capsman`, to answer from described CLI Reference fields.
- **`routeros_explain_command`'s `model` argument no longer promises a future feature.** Its description and the `model-context-unused` warning now say that rosetta has no per-device command data, and point to `routeros_device_lookup` for hardware and to centrs for validation against a real router.

## [0.12.1] — 2026-11-28

### Changed
Expand Down
2 changes: 1 addition & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This pattern is used across several `tikoci` projects (forum archives, documenta
- **Identity:** `pages.rosetta_id` — a lowercased, trailing-slash-stripped, `.md`/`.mdx`-suffix-stripped, version-prefix-tolerant URL path (e.g. `docs/network-management/dhcp`). See "H7 — Identity / rosetta-id design" in `briefings/B-0012-docusaurus-manual-migration.md` for the full derivation rationale and the T-0034 spike that validated it before T-0035 built on it. Legacy Confluence-sourced `pages` rows keep `rosetta_id = NULL` and their original Confluence-numbered `id`; the two identity shapes coexist in the schema but a single build populates one or the other, never both.
- **Parsing:** Every Markdown pipe table is retained generically in normalized `page_tables` → rows → cells storage (raw Markdown remains alongside decoded cells); table-derived properties consume that shared parse and link to the exact source row, while bullet properties stay a separate path. The property classifier remains intentionally narrow (`| Property |` or `| Parameter |`, both seen live) and tolerant of dhcp.md's malformed `check-gateway` emphasis (B-0012 H4). `:::type ... :::` admonitions → `callouts`; non-empty prose before the first real h1–h3 heading becomes a synthetic lead section (`level = 0`, `anchor_id = "_lead"`), followed by the ordinary h1–h3 `sections`. The parser excludes a real source quirk where the raw `.md` repeats the page's H1 title after the AI-generated summary blockquote. Relative Markdown links inside property descriptions are rewritten to live `manual.mikrotik.com` URLs (anchor fragment preserved) instead of left as broken relative paths.
- **CLI Reference:** handled by the separate, shipped `src/extract-cliref.ts` extractor and inspect crosswalk. It preserves menus, fields, flags, source Markdown and the landing page for each manual tree. The source-faithful overlay stays separate from inspect identity; see "CLI-Reference overlay: source vs inspect identity" below and MANUAL's data-source/export reference.
- **Remaining surface work:** CLI Reference and `/hardware` extraction have landed, and property lookup/explain already consume the overlay. Broader tool consolidation remains a separate decision in B-0011/B-0025, informed by #54's current-surface inventory. Standard landing-page rows are exported but not yet consumed by runtime answers (#203).
- **Remaining surface work:** CLI Reference and `/hardware` extraction have landed, and property lookup/explain already consume the overlay. Aligning answers, derived datasets and the tool surface with the new manual (CLI Reference first, MikroTik's own prose→CLI-Reference links) is tracked in #269, which supersedes the open B-0011/B-0025 questions. Standard landing-page rows are exported but not consumed by runtime answers (#203).

Directional options and the full research trail are recorded in `briefings/B-0012-docusaurus-manual-migration.md`.

Expand Down
Loading
Loading