Skip to content

BUG-10: Capacity is simulated, so the auto-approval capacity guard always passes; delete thresholds lack requestToPeakRatio and openRequestOnNamespace #62

Done

Description

@ephico2real2

Part of #21

What is wrong: core/capacity_backend.py answers fits/fresh from clusters.yaml sizes; reserve and release are no-ops; requestToPeakRatio and openRequestOnNamespace facts are never set. Phase 3 (cmapi-capacity) closes this; until then auto-approval on CRC does not test the guard. Raised by Opus (C10).

Where: cmapi/src/cmapi/core/capacity_backend.py:59 (reserve) and :62 (release). The lines exist at ecc5cb3.

How to prove it: Ask for more capacity than a cluster has free. The capacity guard of auto-approval must refuse. A new test in cmapi/tests/service/ shows it, not written yet.

Measured or inferred: Measured by reading the code. Nobody ran the guard against real capacity data.

Severity: Medium. The guard is a weak control, with no direct loss.

What must hold after the fix: The capacity answer comes from stored snapshots of cmapi-capacity. reserve and release change the reservations. The two delete facts are set from measured data.

Research: Not done yet.

Solution: Not written. Wave 7 ships cmapi-capacity and the real capacity guard (build-tracker.md).

Class: INV and TDT. The fix is the new service cmapi-capacity. The simulated backend is an earlier shortcut.

Activity

  1. added
    Backlog
    bug
    class:INV
    class:TDT
    sev:medium
    status:open
    on Nov 13, 2026
  2. changed the title [-]Open: capacity is simulated, so the auto-approval capacity guard always passes; delete thresholds lack requestToPeakRatio and openRequestOnNamespace[/-] [+]BUG-10: Capacity is simulated, so the auto-approval capacity guard always passes; delete thresholds lack requestToPeakRatio and openRequestOnNamespace[/+] on Nov 13, 2026
  3. added
    In-Progress
    status:partly-fixed
    and removed
    status:open
    Backlog
    on Nov 19, 2026
  4. ephico2real2 commented on Nov 19, 2026

    @ephico2real2
    OwnerAuthor

    Work tag In-Progress. Evidence: merged part(s) of this issue: #394. The issue stays open for the rest; status:partly-fixed. Moved up from Backlog (records sweep 2026-11-19).

  5. added 4 commits that reference this issue on Nov 26, 2026
  6. added a commit that references this issue on Nov 26, 2026
  7. ephico2real2 commented on Nov 27, 2026

    @ephico2real2
    OwnerAuthor

    Found under this issue's migration 0011 by OB1 run 45 on CRC (2026-11-27): #744, the image has no time zone data, so psycopg logs a non-JSON warning in the migrate container and falls back to UTC. Low.

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

    In-Progressbugclass:INVclass:TDTsev:mediumstatus:partly-fixed

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions