YAML lab 40 bonus XP

Define a metric that survives a question

Objectives

The patching tile reads 99% and has for two quarters. It is computed as patched hosts over hosts the scanner reported on, with no window and no age, and the security lead insists it is accurate because "every host it measured really was patched".

Rewrite the definition so a stranger could recompute it: an authoritative denominator, an explicit window, a freshness threshold, and exception health expressed as aging rather than a count.

Current tile, and what the sources can provide

current: patched_hosts / hosts_scanner_reported_on   -> 99%

available sources:
  asset_inventory   : authoritative list of hosts that exist (4,180)
  scanner_output    : hosts the scanner could reach this month (2,910)
  exception_register: open exceptions with opened_at and approved_expiry

notes:
  a host whose agent stops reporting disappears from scanner_output
  the tile currently renders the last successful result with no timestamp

Checks the server runs (5)

  • Denominator is the population the control claims
  • Denominator comes from an authoritative source
  • The measurement window is explicit
  • A staleness threshold is set
  • Exception health is aging, not a count

Check names are all you see here: the expectations that decide pass or fail, and the reference solution, stay on the server.

Step-by-step hints

The guided walkthrough, in full. It is free: no XP cost, and it does not touch the paid hint ladder or the reveal gate.

  1. Step 1

    Fix the denominator before anything else

    Both sides of the current fraction come from the scanner, which is why an unreachable host improves the score. Point the denominator at the list of hosts that exist rather than the list the tool could see, and set the source field to match.

    Denominator is the population the control claimsDenominator comes from an authoritative source

  2. Step 2

    Say when the number was true

    Give the metric an explicit window as a start and end date rather than a frequency word, so the figure can be recomputed against the same period.

    Then set the maximum age in hours after which the tile must stop showing the last successful result: a daily check with a generous allowance is still far better than none.

    The measurement window is explicitA staleness threshold is set

  3. Step 3

    Measure exposure, not tidiness

    An open-item count falls whenever someone closes records, including in a bulk migration. Change the exception metric to the one that measures how long items have been open against their approved expiry.

    Exception health is aging, not a count

Rules summary

  • XP on pass

    40 bonus XP the first time every check goes green.

  • Paid hints

    2 available. Each costs 25% of the lab XP (about 10 XP).

  • Reveal solution

    Scores 0 XP and unlocks only after 3 check runs.

  • Attempt cap

    60 check runs per learner. The runner warns you in the last 10.

  • Drafts

    Your editor content is saved in this browser, so a reload will not lose work.

  • Walkthrough

    Always free and never penalised: use it before spending a hint.