Skip to content

heavy facts (D6): leftovers from the #786 reviews #800

Done

Description

@scuttletoby

Leftovers from the two reviews of #786 (heavy facts, D6), not fixed in its fix round:
lens A #786 (comment) and
lens B #786 (comment).

  1. A job owes its kind's cost, not heavy's own reservation for it (lens A 1, lens B 1 "related"). A ticket's mb (heavy's --mb or its learned peak for that kind) is only read for job-server. A job of a kind the rule does not know owes job-default's cost, even when heavy learned a much higher peak for that kind. Fixing this means a change to the shared rule (a per-piece cost floor) in both the TypeScript and the Python evaluator, plus vectors. For now it is stated in the kit README and in heavy_facts.py.
  2. Other users' reservations are not seen (lens A 4). Other users' heavy jobs and agent scopes are now counted from the cgroups, but each user's reserve.d stays private. This is stated in the README.
  3. Strict agent-scope matching (lens A 6). An escaped scope label, or agents under a slice not named app-t3code*, give 0 agents. Add a note when scopes are found outside the pattern, or count any *.scope under the agents slice.
  4. Test-only environment hooks are read in production paths (lens A 9): HEAVY_FACTS_ROOT, AGENT_SLOTS_ALIVE, T3_CAPACITY_HEAVY, AGENT_SLOTS_HEAVY. Honour them only when a test flag is also set.
  5. The module loader is copied 4 times (lens B 8): heavy_facts.py, t3-capacity, agent-slots and the tests. It is how each file finds the kit before anything is loaded, so one shared copy needs a small bootstrapping change.
  6. Some rule numbers are held in one direction only (lens B 9). For example, margin.minMb ±1, jobCoresPercent +1 and calm.* +1 change no vector. Add vectors so each number goes red in both directions.
  7. A backwards clock jump drops the pressure carry (lens A 8, noted as acceptable). Recorded here only.

Recommendation: do item 1 first, because it is the only one that can make a "fits" too large. Items 3 and 4 are small; the others can wait.

Activity

  1. scuttletoby commented on Nov 21, 2026

    @scuttletoby
    OwnerAuthor

    Orchestrator check of the #786 fix round (6bdf78d): OK to merge. One more item for this list: the basic tier is now never free. That is the safe choice, but a machine without a systemd user manager (for example a WSL distro without systemd, or a CI user with no lingering session) will always get "not free" from heavy facts. Check this before the PC agents work relies on heavy facts there. (The machine-wide t3-capacity that CI calls today is a separate script and is not changed by #786.)

  2. added
    area:machines
    size:small
    type:tech-debt
    on Nov 29, 2026
  3. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Claim: a writer from the minors sweep is taking this, branch fix/heavy-facts-minors (one PR with #844 and #800 items 3 and 4).

    🤖 Generated with Claude Code

  4. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Done on main: items 1 (cost floor), 3 (scope note), 4 (HEAVY_TESTING=1 gate), 5 (one loader in heavy_facts.py) and 6 (±1 vectors) by 75df5da (#981), item 2 (every person's reservations) by a984384 (#945); item 7 was record-only.

    🤖 Generated with Claude Code

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:machinessize:smalltype:tech-debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions