]> git.hungrycats.org Git - bees/commit
scan_next: log selection-time refs_created on the plan: line
authorZygo Blaxell <bees@furryterror.org>
Thu, 9 Jul 2026 02:22:22 +0000 (22:22 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sat, 10 Oct 2026 19:00:03 +0000 (15:00 -0400)
commitc53acdf0af94b7d09fd2de2ea4f8b1817b3df810
tree3fad2e5fbe97116a2e74fe13f96007e5bbe39356
parent005a0641c22058e7ddd55f304868efd3d2e29b36
scan_next: log selection-time refs_created on the plan: line

The debt on the plan: line showed that fat whole-extent drains are admitted with
a strongly negative debt, i.e. the refs_created * ref_op_cost term is absent even
though ref-op-cost is configured non-zero and wired into both plan orientations.
The remaining unknown is whether refs_created was itself ~0 at selection — the
planner pricing the dst against a stale or reduced reference view — versus the
weight being lost.

Add m_sel_refs_created to DstPlan, captured from the winning plan's cost() at
build time, and log it as "rc" beside the build-time "refs":

  ... [Dddddd] refs 4125 rc 0 debt -6708.0

refs is read fresh at build; rc is what the cost model actually charged.  rc far
below refs on a fat drain pins the cause to a stale/reduced ref count reaching
scan_next_dst_debt at cost time, not the weight or the wiring.

Assisted-by: Claude-Code:claude-opus-4-8
Assisted-by: Claude-Code:claude-opus-5-5
src/bees-scan-next.cc