Skip to content

fix: respect nonadditive token counters, finer importance steps, galaxy live-limit guard - #169

Merged
Coding-Dev-Tools merged 2 commits into
mainfrom
fix/w153-packer-galaxy-salvage
Aug 25, 2026
Merged

fix: respect nonadditive token counters, finer importance steps, galaxy live-limit guard#169
Coding-Dev-Tools merged 2 commits into
mainfrom
fix/w153-packer-galaxy-salvage

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Three small fixes salvaged from local review-worktree iteration (uncommitted work in the w153 orca worktree), re-based onto main's current transactional graph pipeline:

…xy live-limit guard

Three small fixes salvaged from local review-worktree iteration:

- core/context.py: the compact-header retry path recomputed available budget
  as `budget - self._count(base)` without guarding against nonadditive custom
  token counters (a header-aware counter can make base grow after compaction,
  driving `available` negative). Clamp to zero and skip the excerpt when no
  positive room remains; also propagate `compact_available` after adopting a
  compact header so subsequent accounting stays truthful. Covered by a new
  deterministic regression test.
- dashboard editor: importance slider step 0.05 -> 0.025 for finer memory
  weighting; asserted in test_dashboard_v2.
- ledger.js: galaxy engine selection now requires the scene to be within
  GRAPH_INITIAL_NODE_LIMIT/EDGE_LIMIT before engaging full physics; oversized
  complete scenes fall back to the lightweight Every renderer. Folded into
  main's transactional candidate pipeline (scene-marker keyed detection kept;
  the stale pre-refactor graphIsGalaxy() condition dropped).
@Coding-Dev-Tools
Coding-Dev-Tools force-pushed the fix/w153-packer-galaxy-salvage branch from e948fb8 to a3e9668 Compare August 25, 2026 15:38
@Coding-Dev-Tools
Coding-Dev-Tools merged commit ec3f1e1 into main Aug 25, 2026
23 checks passed
@Coding-Dev-Tools
Coding-Dev-Tools deleted the fix/w153-packer-galaxy-salvage branch August 25, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant