Skip to content

Test: assert exact preview rows and validation for every editable config key #3397

Open

Description

@VijitSingh97

What's the problem

Nothing pins the exact rows the host preview shows for each editable setting. The existing preview checks (for example previewed_with in tests/stack/control/control-sensitive-preview.sh) pass when any one row contains the expected words, so an extra false row, a missing row or a wrong effective value still passes. Combined edits, nulls, DIY-versus-appliance differences and dependent settings are not enumerated.

Defects found in 2.0.0 RC testing that slipped through this gap, all since fixed with narrow regression tests:

The v2.1.0 configuration model (#3557) changes the key set, adds the profile key and moves previews to plain sentences, so the exact-row test is built on the retained key list, not on today's 111 reference leaves.

What it impacts

Everyone who confirms a change in the Settings preview (#2530) or in ./pithead apply --dry-run, on appliance and DIY. A wrong or missing row means a user approves a change after being told something false: a scary warning for a safe edit, or silence for a disruptive one. It is also the net for the #3557 work, which rewrites many preview rows and must show nothing else moved.

This adds no dashboard control and changes no host validation, typed confirmation or secret handling. No test is added against the current dashboard's modules; that UI is deleted at the cutover (#2547).

How I found it

How important is it

Medium. It is test debt, not a user-facing defect, and it cannot finish until the key model exists, so it must not gate v2.1.0. It is still required by the 2026-10-11 rule, and the release that rewrites the previews is the cheapest moment to pin them. Cost M: seconds of runtime.

Acceptance criteria

Possible solutions

Earlier scope, kept as evidence only (superseded 2026-10-27; do not implement from it)

What's the problem

Test debt from 2.0.0 RC testing, for 2.0.1 (owner, 2026-10-11: every defect an RC cut finds must be caught by automated tests going forward).

What slipped
Preview and validation are tested per key with containment checks: previewed_with (tests/stack/control/control-sensitive-preview.sh:10-14) passes if any row holds the needles, so a false extra row passes. Combined candidates, nulls and DIY-versus-appliance differences are not enumerated.

what it impacts

Where it runs
Tier-1 CI: the driver in a tests/stack/run.sh block (required "Shell tests (pithead suite)"); node cases in required "Frontend logic tests (node --test)".

How I found it

Discovery details are not separately established in the existing report; preserve and verify the evidence already recorded.

how important is it

Cost
M. Seconds of runtime; at least 111 rows.

acceptance criteria

Done when

possible solutions

Test to build

  1. tests/stack/control/editable-keys.tsv plus driver tests/stack/control/test-editable-keys.sh: at least one row per leaf of config.reference.json (111 today, _docs excluded), spanning the editable, confirm and approval classes (lib/pithead/42-control-policy-and-host-checks.sh:51, :75, :113). A leaf with no row or exemption fails the driver.
  2. Columns: baseline (DIY, or appliance via the is_appliance override at lib/pithead/10-installer-preseed.sh:165-168), candidate edit, expected exit, and the EXACT set of FLAG/KEY/MSG rows from apply --dry-run --porcelain (template tests/stack/control/test-control-core.sh:98-105), compared for equality, not containment. The control preview must give the same rows where that channel accepts the key.
  3. Rows cover invalid and boundary values, null for optional keys, and dependent pairs: tari.mode off with tari.*, p2pool.clearnet with a network.subnet change, a remote-Tari baseline (tests/stack/test-sync-gate-rearm.sh:28).
  4. Node cases: PreviewModal wording for null (dashboard/mining_dashboard/web/static/config/configpreview.mjs:41-42); local_miner.enabled with appliance false and true, per the Dashboard exposes appliance-only local miner toggle on DIY without guidance #3357 decision. docs/configuration.md:243 must say what null means.

Activity

  1. added this to the v2.x - post-GA milestone on Oct 11, 2026
  2. added
    dashboard
    testing
    on Oct 11, 2026
  3. pithead-developer commented on Oct 21, 2026

    @pithead-developer
    Contributor

    Parked in Icebox under the lean roadmap (owner, 2026-10-21): this tests a surface that v2.1.0 reshapes, so writing it now means rewriting it; the feature PRs carry their own tests.

  4. added
    operator-action
    on Oct 27, 2026
  5. added
    blocked
    and removed
    operator-action
    on Oct 27, 2026
  6. pithead-developer commented on Nov 16, 2026

    @pithead-developer
    Contributor

    Blocked on #2530.
    Blocked on #3557.

    Parked until the lean UI lands (see the park comment above). The native blocked-by links already hold it, and the tick removes blocked when every listed issue closes.

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

    blockeddashboardtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions