"""Exact implementation functions exercised by the portable teaching harness.

Precondition: type(requested) is int (bool excluded). No parser/type validator is
implemented here. The new fictional contract permits negative requests.
"""


def workers_upper_only(requested):
    """Historical arithmetic body: the required lower clamp is missing."""
    return min(requested, 20)


def workers_corrected(requested):
    """Candidate correction; tests provide bounded evidence, not a proof."""
    return max(1, min(requested, 20))


def workers_constant_one(requested):
    """Deliberately wrong: always in the output range, wrong for many requests."""
    return 1


def workers_cap_nineteen(requested):
    """Deliberately wrong upper cap; challenge the upper-edge expectations."""
    return max(1, min(requested, 19))


def workers_interior_hole(requested):
    """Seeded variant: agrees at selected boundaries, wrong at interior input 7."""
    if requested == 7:
        return 8
    return max(1, min(requested, 20))
