]> git.hungrycats.org Git - bees/commit
plan: reject impossible coverings before the search
authorZygo Blaxell <bees@furryterror.org>
Thu, 24 Sep 2026 03:17:06 +0000 (23:17 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sun, 11 Oct 2026 00:48:00 +0000 (20:48 -0400)
commitc72b81fe5878d7a8bdedc01d5edc90f9cbff3ffc
tree3209fbb100ff067905dfde1f320c2902c979096f
parentddb95c9aba7528da5cf42b0db0c2b41c8a3fd275
plan: reject impossible coverings before the search

Every data region needs at least one dedupe or copy edge, since a copy
run never crosses the hole between regions, and every hole is already
one op.  When that floor exceeds rewrite.total-max no covering exists,
but the search only found out after walking the whole extent, which is
O(V^2) in its boundary count.

With total-max = 10, a reference run on a disk-image corpus counted
582,604 searches ending with no covering under the limit (270 at
total-max = 100).  Check the floor up front and count the rejection the
same way.

Assisted-by: Claude-Code:claude-opus-5-5
src/bees-plan.cc