Skip to content

Ground routing-filter rule-language tables and decide safe property attachment #100

Open

Description

@mobileskyfi

Current scope — 2026-10-23

The 2026-10-04 maintainer decision in the comments supersedes the broad 27-table proposal below. Remaining candidate: one routing-filter rule-language page, two tables. DNS Adlist is covered by CLI Reference; QKD is excluded unless new grounding justifies it. Do not build a generic accept/exclude registry from the old census.

Before implementation, refresh the corpus evidence, probe representative readable/writeable names on CHR, and decide how rule-language properties attach without masquerading as add menu arguments. Still discussion-stage; the old corpus counts and WAL-opening caveat below describe the historical artifact, not current managed release DB behavior. This is outside the bounded release unless that grounding exposes a concrete regression.

Historical audit

Found by the B-0022 DB-only export audit, re-grounded on the CI artifact v0.11.0-rc.99 (schema v10, source_commit 67edb80). Filed as research/discussion — the measurement is settled, the disposition is not, so this is deliberately not agent-ready.

The gap

parseProperties (src/extract-docusaurus.ts) gates a table on its header:

/^\|.*\b(property|parameter)\b.*\|$/i

and then requires each row's first cell to yield a name via parsePropertyCell:

const nameMatch = cellText.match(/\*\*([a-z0-9][a-z0-9-]*)\*\*/i);
if (!nameMatch) return null;

That second gate demands a bold, kebab-case name. 27 tables pass the header gate and produce zero properties, because the corpus writes property names in at least three other conventions:

Convention Rows Example
`backticked` 70 route-selection-and-filtering — `dst-len`, `bgp-med`
plain kebab, no emphasis 91 dns [Adlist] — url, ssl-verify, match-count
bold with spaces 45 css106 [PoE] — **PoE Out**
other / mixed 108 mikrotik-tag-advertisement-formats packet-structure tables

314 rows in total sit in these 27 tables.

Why this is worth a decision rather than a regex tweak

These are not all properties. Both halves are verified against rc.99:

Real and missing:

  • route-selection-and-filtering has zero rows in properties, despite two tables headed Property | Type | Description ("Only Readable Properties" = 37 rows, "Writeable Properties" = 33 rows) holding genuine routing-filter properties. 57 of those names appear nowhere in the properties corpus — dst-len, bgp-path-len, bgp-med, bgp-local-pref, scope, ospf-metric, …
  • dns [Adlist] — url, ssl-verify, match-count are absent from that page's 42 properties.

Correctly rejected:

  • disks [Flags] — documents CLI flags (**X - disabled**), not properties.
  • css106 / css610 / gpen21 — WebFig UI labels (**PoE Out**, **PoE Priority**) on switch product pages, not CLI properties.
  • profiler [Classifiers] — 76 rows listing classifier values (bgp, bfd, backup), not properties.

Loosening the name gate naively would import all of the second group as fake properties. So the work is classification, and it is tractable for the same reason #92's ragged tables were: 27 tables is small enough to enumerate and decide by hand.

Why this was invisible until now

Two reasons, both worth recording:

  1. Store Docusaurus tables generically; derive table-backed properties from the shared parse #92 is what made it measurable. The tables are only in the DB because Store Docusaurus tables generically; derive table-backed properties from the shared parse #92 stores tables whether or not they became properties. Before that, a skipped table left no trace.
  2. Properties: 165 rows silently destroyed on insert; section identity stored as heading text (properties + callouts) #90's parsed == stored assert cannot catch this class. That assert compares what the parser produced against what SQLite holds. These rows are never parsed, so nothing is dropped and nothing fires. This is a coverage gap, not a loss gap — a different failure mode needing a different check.

Reproduce

gh release download v0.11.0-rc.99 --pattern 'ros-help.db.gz' && gunzip ros-help.db.gz

Tables with a property-shaped header that produced no properties (uses properties.source_table_row_id, added by #92):

SELECT t.id, pg.slug, t.source_heading, t.data_row_count
FROM page_tables t JOIN pages pg ON pg.id = t.page_id
WHERE NOT EXISTS (
  SELECT 1 FROM page_table_rows r JOIN properties p ON p.source_table_row_id = r.id
  WHERE r.table_id = t.id)
ORDER BY t.data_row_count DESC;

Note: bun:sqlite cannot open a downloaded release DB with { readonly: true } (SQLITE_CANTOPEN — WAL wants a -shm sidecar). Use the sqlite3 CLI or a read-write open on a scratch copy.

Homework before this is agent-ready

  • Walk the 27 tables and label each property table / not a property table. The list is short and in the DB; the output is the spec.
  • Decide whether the accepted conventions become part of parsePropertyCell or a per-convention parser, and how rawType / defaultVal are recovered when the name is not bold (e.g. route-selection-and-filtering carries type in a separate column, which the current 2-column shape assumption does not model).
  • Decide the anti-regression check. A parsed==stored assert is the wrong shape; something closer to "a table with a property-shaped header either yields properties or is on a reviewed exclusion list" would actually hold the line — and the exclusion list is the classification output, so it costs little extra.
  • Confirm no accepted table double-counts a property already captured from a sibling table on the same page.

Boundary with #61

#61 covers properties with no table at all — firewall matchers/actions as prose bullets, dotted wifi names — and the wider doc-property ↔ inspect-schema alignment question. This issue is the narrower complement: a property-shaped table exists and the cell gate skips it. They should stay separate; this one is a bounded corpus-classification task, #61 is a design question.

Grounding: briefings/B-0022-runtime-sqlite-dataset-exports.md ("New finding: property tables the cell gate silently skips"). Part of #95.

Activity

  1. added
    bug
    export-audit
    on Jul 16, 2026
  2. mobileskyfi commented on Jul 17, 2026

    @mobileskyfi
    ContributorAuthor

    Homework done — re-grounded on v0.11.0-rc.102 (schema v10, source_commit a153888)

    The corpus has moved forward since this was filed (rc.99 / 67edb80), so I re-ran everything against the current release artifact. Headline: nothing has drifted in a way that closes the gap, and the classification homework is now complete.

    Current state

    • The extraction code is byte-identical to what this issue quotes. Only Give pages a lead (H0) section so section coverage is total (B-0023) #105 (H0 lead sections) landed near it; parseProperties / parsePropertyCell are unchanged. Both gates still stand.
    • Applying the exact parser gate (header /^\|.*\b(property|parameter)\b.*\|$/i and separator /^\|[\s:|-]+\|$/) to rc.102: 589 tables pass, 27 yield zero properties. The count matches this issue exactly.

    Classification of all 27 (the spec this issue asked for)

    Walked every table. 4 are genuine property tables; 23 are correctly rejected.

    ACCEPT — real properties being dropped (4 tables, 3 pages):

    Table Page Convention Names → absent from corpus
    "Only Readable Properties" route-selection-and-filtering backtick `dst-len` 33 → 29
    "Writeable Properties" route-selection-and-filtering backtick 30 → 28
    "Adlist" dns plain kebab url 7 → 5
    "QKD Key Manager" qkd-integration-in-routeros-ipsec-ppk plain kebab cache-size 5 → 3

    The two route-selection tables reproduce this issue's "57 names appear nowhere" figure exactly (29 + 28). qkd is new — it wasn't in the original writeup; it entered the corpus as the docs moved forward, which is a small argument for the anti-regression check below.

    REJECT — correctly skipped (23 tables), by reason:

    • Not RouterOS CLI properties: netinstall-linux ×4 (host-tool CLI flags --reboot), css106/css610/gpen21 ×5 (WebFig switch UI labels **PoE Out**), mikrotik-tag-advertisement-formats ×6 (BLE packet byte-layout), beacon-manager iOS/Android ×2 (mobile-app settings), troubleshooting (serial-console settings), cake (Title-Case prose concepts, not kebab CLI names).
    • Values / commands, not properties: profiler Classifiers (76 classifier values), disks Flags (**X - disabled**), device-mode (get/print/update).
    • False gate: list-of-menus-with-sensitive-parameters — header | Menu | Parameter names | Page link | trips the gate on the word "Parameter", but column 1 is a menu path; it's a cross-ref index, not a property table.

    Two hazards a naive fix hits (both verified against rc.102)

    1. Divider rows. The route-selection tables carry ***Numeric properties*** / ***Flag properties*** group-divider rows with empty type/desc cells — must be skipped, not imported.
    2. Separate type column. route-selection-and-filtering is 3-column (Property | Type | Description); the current code hardcodes cells[0]=name, cells[1]=description, so rawType would land in the wrong field without per-table column mapping.

    No double-counting: route-selection and qkd pages have 0 properties today; the dns page has 42 but none collide with the 7 adlist names. Clean gain.

    Why "plain kebab" can't be a global cell rule

    Loosening parsePropertyCell to accept bare name would swallow profiler's 76 classifier values, device-mode's get/print, etc. as fake properties. The accept decision is per-table, not per-cell — this stays classification work, not a regex tweak.

    Proposed design + anti-regression check

    • Keep the existing bold-kebab auto-path (covers the other 562 gated tables untouched).
    • ACCEPT registry keyed by (slug, source_heading) for the 3 pages, each carrying {convention: backtick|plain, nameCol, typeCol, descCol} + divider-row skip.
    • EXCLUDE registry of the 23 reviewed tables.
    • Check: every gate-passing table must either yield ≥1 property, be in ACCEPT, or be in EXCLUDE — else CI fails. New property-shaped tables then force a human accept/exclude decision instead of silently vanishing. The exclusion list is the classification output, so the check is nearly free to add once the registries exist.

    Complexity vs. gain — is this actually agent-ready?

    Now that the false positives are squeezed out, the honest accounting is worth stating, because it bears on the label:

    Gain is small and concentrated. 65 net-new property names, but 57 of them sit on a single page (route-selection-and-filtering, which has 0 properties today). dns adlist adds 5, qkd adds 3. This is "one important routing-filter page + two small tables," not a broad recovery.

    Cost is more than a regex tweak. The fix introduces two hand-maintained registries (accept + exclude), per-table column-mapping metadata, divider-row handling, a 3-column table shape the current 2-column code doesn't model, and a new CI invariant that must key tables stably across rebuilds (table id is unstable — has to be (slug, heading)). It also adds ongoing overhead: every future property-shaped table trips the gate and demands a human decision. That's the check working as intended, but it's a standing tax.

    So the tradeoff is real: a bounded-but-not-trivial mechanism (registries + invariant) for a gain concentrated almost entirely on one page. Two ways to read that:

    • Reduced scope (cheap, ~88% of the value): accept only route-selection-and-filtering (backtick, 3-col) and skip the registry/CI machinery entirely. Gets 57 of 65 names for a fraction of the complexity — but buys no protection against the next silently-skipped table.
    • Full scope (as designed): the registries + invariant, which is where most of the cost lives and most of the durability lives.

    Meta-point — this is one of several bespoke table parsers. Between #92/#99 (generic table storage), this issue (property tables), and B-0007 Track B (device-capability tables), we now have three separate efforts each interpreting doc tables their own way. The registry proposed here is a fourth bespoke layer. If the direction is a coherent overall table-extraction scheme — a single "given a stored table, classify it and route it to the right typed extractor" pass over page_tables — then this issue is better framed as one input to that scheme than as a standalone agent-ready patch. The classification above is the reusable artifact either way; it's the 27-row ground truth that scheme would need.

    Recommendation: hold off on agent-ready. The measurement is settled and the spec is written, but the disposition genuinely forks on (a) reduced vs. full scope and (b) whether to fold this into a unified table-classification pass rather than build a fourth bespoke parser. Those are decisions for a human, not a mechanical implementation.


    Grounding: bun re-run of the exact parser gate over gh release download v0.11.0-rc.102 ros-help.db.gz; per-table cell samples and per-name corpus-absence checks confirm every row above.

  3. mobileskyfi commented on Jul 31, 2026

    @mobileskyfi
    ContributorAuthor

    Sequencing constraint found 2026-07-31 — this is now blocked on #132

    A census of all 589 property/parameter tables in the corpus (recorded in briefings/B-0024-command-prose-join.md) found that the two | Property | Type | Description | tables in user-guides/routing-and-networking-protocols/route-selection-and-filtering.md hold 70 data rows that currently yield zero properties because of the bold-kebab name gate this issue targets.

    They are also three-column. parseProperties() hardcodes description: row.cells[1] (src/extract-docusaurus.ts:375), so if this issue loosens the name gate before #132 fixes column resolution, those 70 rows ingest with the Type cell stored as their description — the same bug #132 is fixing, 70 rows wider.

    Land #132 first. Its header-name column primitive also makes this issue's work easier: once columns resolve by header name, the remaining question here is purely name recognition.

  4. mobileskyfi commented on Jul 31, 2026

    @mobileskyfi
    ContributorAuthor

    Addendum — why this audit could not have caught the device-mode case (#132)

    Worth recording alongside the sequencing note above, since it's a limitation of this issue's method, not its conclusions.

    The 27-table classification enumerated tables that pass the header gate and yield zero properties, then judged each accept/reject. It correctly rejected a device-mode table on that basis.

    But system-information-and-utilities/device-mode.md:85 — a five-column feature matrix whose header cell reads **Feature / Property** — yields 14 rows, so it was never in the zero-yield set and was structurally invisible to the audit:

    | **Containers** (/container) | No | No | No | Yes |
       -> name=Containers  type="/container"  description="No"   (the *Home* column)
    

    "Which property-headed tables yield nothing?" and "which property-headed tables yield garbage?" are two different coverage questions. Only the first has been asked. A census by header shape asks the second — full results in briefings/B-0024-command-prose-join.md; the fix rides on #132.

    This doesn't change this issue's classification work, which stands. It does suggest that whatever CI invariant comes out of this issue should cover both directions rather than zero-yield alone.

  5. mobileskyfi commented on Oct 2, 2026

    @mobileskyfi
    ContributorAuthor

    Point-release triage — old dependency cleared; disposition still open

    The July comment's sequencing dependency on #132 is satisfied: #132 closed via #133 and its column-resolution fix is shipped in 0.11.2. That prerequisite is no longer a reason to defer this issue.

    The existing classification/spec discussion still asks for a real choice between accepting a few known tables and maintaining a broader classification registry. Keep this out of the core 0.11.3 patch and leave it without agent-ready until that choice is settled. A new release should not broadly loosen the name gate just to increase property counts; that would also import flags/UI labels/classifier values as properties. The old measured coverage figures must be re-grounded on the current artifact before implementation.

  6. mobileskyfi commented on Oct 5, 2026

    @mobileskyfi
    ContributorAuthor

    Re-grounded on 0.11.3-next.115 (2026-10-04 sweep): the scope shrank, and the next step is grounding, not parsing

    Since the July classification, MikroTik moved a lot of property tables into the CLI Reference (B-0025). Re-checked the 4 ACCEPT tables:

    Table Status now
    dns "Adlist" Covered by the CLI Reference. ip/dns/adlist has url, ssl-verify and match-count, all with descriptions, and explain_command / lookup_property answer from there since #170 / #171. Drop from scope.
    qkd-integration-… "5.3 QKD Key Manager" Mostly superseded: the CLI Reference has system/keymat-provider/qkd-* entries (17 fields, 3 described). Small, low value. Drop unless grounding says otherwise.
    route-selection-and-filtering "Only Readable Properties" (37 rows) + "Writeable Properties" (33 rows) Still the real gap. 0 properties rows on the page. These are routing-filter rule-language properties (dst-len, bgp-med, bgp-path-len, scope), not menu arguments, so the CLI Reference (routing/filter/rule has a rule text field) will never cover them.

    So this is now the cheaper option from the July comment: one page, two tables (backticked names, 3 columns, ***Numeric properties*** divider rows), with no accept/exclude registry machinery.

    Grounding first (maintainer, 2026-10-04)

    The CLI Reference is generated from RouterOS itself, so its field names can be trusted as real. These two tables are hand-written prose. Before extracting them as properties, confirm the manual is right:

    • Check a sample of both tables against a real router. On a quickchr CHR at the current stable, /routing/filter/rule add chain=t rule="if (dst-len > 24) { accept }" (and the set bgp-med … / set distance … forms for the writeable table) should be accepted, and a deliberately wrong name rejected. Record which names fail.
    • Note that several "writeable" rows have empty descriptions (scope), and every Type cell is blank in the source. The gain is the names plus a description where there is one, not types.
    • Decide where these rows attach. They belong to the rule language of /routing/filter/rule, not to /routing/filter/rule as menu arguments. lookup_property("dst-len", "/routing/filter/rule") returning them as if they were arguments of add would be the Property lookup: command-path→page→property links broken on core menus (BL-1/2/3 from #53) #58 mistake again. They probably need their own marker (rule-language property vs menu argument) or should be reachable only by name.

    Still not agent-ready: the grounding run and the "where do rule-language rows attach" call settle the acceptance criteria. Once those are settled it's small (one page, no registry), so it could ride a 0.11.x -next if it changes no tool shape.

  7. changed the title [-]Property tables the cell gate silently skips: 27 property-headed tables yield zero properties (backticked/plain-text names)[/-] [+]Ground routing-filter rule-language tables and decide safe property attachment[/+] on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docusaurusbugexport-audit

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions