Skip to content

Fix null entry on transform build spend-ledger rows - #284

Open
lesbass wants to merge 1 commit into
exmergo:mainfrom
lesbass:fix/issue-277-spend-ledger-entry-null
Open

Fix null entry on transform build spend-ledger rows#284
lesbass wants to merge 1 commit into
exmergo:mainfrom
lesbass:fix/issue-277-spend-ledger-entry-null

Conversation

@lesbass

@lesbass lesbass commented Aug 11, 2026

Copy link
Copy Markdown

Fixes #277.

Problem

transform build writes its spend directly to .dex/spend.jsonl through _record_build_spend, bypassing the cost gate's _append which always includes "entry": kind. As a result, every transform build row carried "entry": null while maintain check and explore query rows correctly carried "entry": "settlement".

Filtering on entry == "settlement" therefore drops every transform build row, which is the single largest spender in a normal session.

Fix

Add "entry": "settlement" to the dict passed to append_spend_log in _record_build_spend so all settlement rows are self-describing.

Files changed

  • packages/dex-core/src/exmergo_dex_core/transform/commands.py: +1 line

Verification

uv run pytest tests/transform/test_build.py tests/transform/test_apply.py tests/transform/test_deps.py tests/transform/test_init.py tests/transform/test_parse.py tests/transform/test_validate.py -x

123 passed, 7 skipped.

_transform build_ writes its spend directly to the ledger through
_record_build_spend, bypassing the cost gate's _append which always
includes entry: kind. As a result, every transform build row carried
entry: null while maintain check and explore query rows correctly
carried entry: settlement.

Add entry: settlement to the dict passed to append_spend_log so
all settlement rows are self-describing and filtering on
entry == settlement produces the full picture.

Fixes exmergo#277
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.

Spend-ledger rows carry entry: "settlement" on some commands and null on transform build

1 participant