Skip to content

exec: optional passthrough to centrs for richer validation #39

Description

@mobileskyfi

The decision

Whether quickchr should grow an optional, opt-in path that routes an exec
(and possibly other command-shaped calls) through tikoci/centrs'
validate → explain → run so callers get richer validation, warnings, and tips —
or defer that surface wholly to centrs and keep quickchr QEMU/lifecycle-focused.

This issue exists to track the concept formally (so it is no longer a note in a
backlog) and to be the anchor for the cluster of items that drove centrs' design.
It does not design --via-centrs — the name and shape are out of scope until decided.

Options

  • A — Optional passthrough (--via-centrs, better name TBD). quickchr stays the
    VM-lifecycle owner; when the flag/option is set, the command is handed to centrs for
    validation before running over the existing transport. Off by default; no new hard
    dependency on the common path.
  • B — Defer entirely to centrs. quickchr exposes only the raw transport
    (exec.ts/REST); centrs consumes quickchr and adds validation on its side.
  • C — Thin validator seam. quickchr exposes a hook/interface that centrs (or any
    validator) plugs into, without quickchr depending on centrs.

Recommended default

B, leaning C. The validation-heavy items below are more involved than
QEMU-focused quickchr
— that is why they drove centrs' design. Keeping them in centrs
avoids duplicating a validator here. Revisit A only if a first-party consumer needs the
richer surface through quickchr's CLI rather than centrs' own.

What it changes

Public CLI/library API surface (a new opt-in flag/option on exec, or a validator
seam). No persisted-state or port change. Option A needs a soft/optional-dependency
story so the common path doesn't pull in centrs.

Done-when

The direction is recorded here, and either a follow-up Task issue is filed to implement
the chosen shape or this is closed as "defer to centrs."


Centrs-owned cluster (tracked here, not as separate quickchr issues)

These are "in a sense done — they live in centrs." Revisit in quickchr only if the
passthrough (option A) happens. Full prior notes: git log -p -- BACKLOG.md.

  • exec() soft-error detection — HTTP-200-with-error corpus → opt-in
    throwOnCliError / isRouterOSError(). Previously flagged "may be subsumed by a
    centrs validation path."
  • Protocol-adapter reuse spike — compare centrs' REST/native-api seam with
    rest.ts / exec.ts before quickchr adds SSH/native-api paths (coordinate with the
    SSH-transport issue).
  • MAC-Telnet bidirectionalsocket-connect proven for MNDP
    (test/lab/mndp/REPORT.md); the same request/reply technique for MAC-Telnet is
    centrs' domain.

The REST-timeout contract reconciliation (60s ceiling inherited from centrs) is a
grounding task, tracked in the REST lab-grounding umbrella — the durable rule lives
in routeros-rest.instructions.md "REST Timeout Ceiling".

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3research / investigation — needs grounding firstarea:library-apiQuickCHR/ChrInstance public API for consumersarea:restRouterOS REST client behaviourneeds-decisionmaintainer call required before work (changes a persisted/port/API contract)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions