Skip to content

Allow an explicit demand-bounded exception to percentage-only capacity refusal #1142

Description

@chubes4

Problem

Worktree admission currently uses the maximum of absolute and percentage free-space floors. On a large filesystem, the percentage floor can require roughly 93 GiB free and block a roughly 40 MiB worktree even while 26-48 GiB and healthy inode capacity remain available.

The unrestricted --force escape hatch works, but it discards more policy than this case requires. --remediate-capacity can also be disproportionate when the requested demand is tiny and the refusal is percentage-only.

Acceptance

  • Add an explicit admission mode limited to refusals caused solely by the percentage-byte floor.
  • Preserve absolute-byte, inode, lock, freshness, lifecycle, and containment protections.
  • Require projected demand below a small configured ceiling and a trusted demand source.
  • Return typed evidence naming the waived percentage floor, retained hard floors, projected post-create capacity, and explicit operator intent.
  • Keep --force as the unrestricted override and --remediate-capacity as reclaim-and-retry.
  • Cover large-filesystem/small-worktree admission and reject large or unknown demand.

Related completed work: #1044, #1045, #1000, and #1118. None provides a narrow percentage-only exception.

AI assistance

OpenAI GPT-5.6 Sol via OpenCode analyzed DMC capacity evidence from a blocked worktree creation, reviewed existing capacity trackers, and drafted this report. Chris Huber reviewed and remains responsible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions