Repository navigation
fix(langfuse): review fixes 3 - branch-quiet notify, 1h cache-write price, lean scorer, trigger label, memory byte budget - #1232
Merged
Conversation
…rice, lean scorer, trigger label, memory byte budget From the 2026-10-16 Langfuse review of aeon-agent and miroshark-aeon. 1. Send pending notifications runs on the default branch only (repo var NOTIFY_ON_BRANCH=1 opts a test branch in). verify/* test dispatches of holdings sent 4 real Telegram messages. 2. Usage rows send langfuse.observation.usage_details with the 1h/5m cache-write split from usage.cache_creation, so 1-hour writes get the 1h price (2x input). Langfuse priced them at the 5m rate, ~35% under per Sonnet run. fleet-scorecard prices cache writes at the 1h rate too. 3. The claude scorer runs with run-harness --no-tools (new, claude only) from an empty scratch dir, like the feed render: no tool schemas, no repo CLAUDE.md. 4. trigger metadata: the Scheduler passes trigger=cron and chain-runner trigger=chain (new aeon.yml input; retried without it on an older aeon.yml), langfuse-otel.sh maps them to cron / chain / manual. 5. memory-flush holds MEMORY.md to a byte budget (8 KB, no line over 300 chars); memory_prep.py window prints the measured size and the long lines.
This comment has been minimized.
This comment has been minimized.
aaronjmars
added a commit
to aeonfun/aeon-agent
that referenced
this pull request
Oct 16, 2026
…dings windows in code (#267) * fix(notify): deliver only from the default branch; add the trigger input Instance copy of the aeon.yml hunks in aeonfun/aeon#1232. Send pending notifications now needs the default branch (repo var NOTIFY_ON_BRANCH=1 opts a test branch in); verify/* test dispatches of holdings sent real Telegram messages. The optional trigger input and AEON_DISPATCH_TRIGGER env are inert until the Scheduler / chain-runner / langfuse-otel.sh changes arrive with aeon-update. * fix(holdings): pick the 7d/30d windows in holdings.py The model did the nearest-snapshot math by hand and broke its own +/-2 day rule on an off-schedule run (sent 7d vs a 10-day-old snapshot). holdings.py now reads the HOLDINGS_STATE lines (memory/logs and logs/archive) and prints growth.<symbol>.{last,7d,30d} or null; step 2 only renders it. --no-history for a one-off var wallet. The notify card gains a one-line sources footer, which the scorer docked the bare stat line for.
aaronjmars
added a commit
to MiroShark/miroshark-aeon
that referenced
this pull request
Oct 16, 2026
…dings windows in code (#214) * fix(notify): deliver only from the default branch; add the trigger input Instance copy of the aeon.yml hunks in aeonfun/aeon#1232. Send pending notifications now needs the default branch (repo var NOTIFY_ON_BRANCH=1 opts a test branch in); verify/* test dispatches of holdings sent real Telegram messages. The optional trigger input and AEON_DISPATCH_TRIGGER env are inert until the Scheduler / chain-runner / langfuse-otel.sh changes arrive with aeon-update. * fix(holdings): pick the 7d/30d windows in holdings.py The model did the nearest-snapshot math by hand and broke its own +/-2 day rule on an off-schedule run (sent 7d vs a 10-day-old snapshot). holdings.py now reads the HOLDINGS_STATE lines (memory/logs and logs/archive) and prints growth.<symbol>.{last,7d,30d} or null; step 2 only renders it. --no-history for a one-off var wallet. The notify card gains a one-line sources footer, which the scorer docked the bare stat line for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from the 2026-10-16 Langfuse review of aeon-agent and miroshark-aeon (follow-up to #1230).
github.ref_name == github.event.repository.default_branch, like the health-issue step fix(langfuse): branch-gated health issues, traced feed render, prices, usage-row timing #1230 gated.workflow_dispatchruns of holdings onverify/langfuse-models/verify/langfuse-slicingdelivered 4 real Telegram messages ("Delivered 1/1" in aeon-agent runs 38778704213, 38789847709 and miroshark-aeon runs 38779134169, 38789854033). Repo variableNOTIFY_ON_BRANCH=1opts a test branch back in. Skipped payloads live in$RUNNER_TEMP, so nothing is redelivered later. Documented indocs/CONFIGURATION.md.usage <model>row now also sendslangfuse.observation.usage_detailswith the Langfuse price keys (input,output,input_cache_read,input_cache_creation_1h,input_cache_creation_5m). Langfuse takes that attribute overgen_ai.usage.*, which has one cache-write count it priced at the 5-minute rate (1.25x input). Claude Code on a subscription writes 1h caches (2x), so cost read ~35% low on every Sonnet run (the reportedaeon.cost_usd_reportedfit $4/M writes on 7 of 7 runs). The split comes from the envelope'susage.cache_creation.ephemeral_1h_input_tokens/ephemeral_5m_input_tokens(checked in a real Claude Code 2.1.301--output-format jsonresult;modelUsagehas no split, so with more than one model each gets the run's 1h share). No split in the envelope = oneinput_cache_creationcount, as before.gen_ai.usage.*stays for other OTLP backends.fleet-scorecard.mjsprices cache writes at 2x input too (token-usage.csv has no TTL column).--no-tools(claude:--tools ""; other harnesses ignore it). The claude scorer uses it and runs from an empty scratch dir, the way fix(langfuse): branch-gated health issues, traced feed render, prices, usage-row timing #1230 runs the feed render, so a 1-turn text grade no longer loads tool schemas and the repoCLAUDE.md(~18.7k read + ~18k write per call on both instances). Other harnesses keep their current call.workflow_dispatch, sotriggerwasworkflow_dispatchfor cron, chain and manual runs alike. New optional aeon.yml inputtrigger: the Scheduler passescron, chain-runnerchain;langfuse-otel.shmaps them tocron/chain/manual(only those values, the input is free text). Both dispatchers retry once without the field when an older aeon.yml answers "Unexpected inputs", so a fork that syncs the Scheduler before its aeon.yml keeps running.memory_prep.py windowprints the measured size plus the longest lines so the model trims by numbers.CLAUDE.md(andAGENTS.md) say the same.Verified:
usage_detailsrow sent to the aeon-agent Langfuse project (environmentfix-test): 100k 1h writes priced $0.40 (input_cache_creation_1h), total $0.422 for the row.claude -p --output-format jsonenvelope fields checked locally;run-harness claude --no-toolsfrom a scratch dir returns a valid envelope (48.5k -> 19.6k context tokens on a laptop with a large global CLAUDE.md; on a runner the drop is to the bare system prompt).test_otel_span.sh(1h/5m split per model + no-split fallback),test_langfuse_otel.sh(cron / chain / manual / free-text / non-dispatch),test_memory_prep.py(size report),test_fleet_scorecard.mjs,test_chain_runner*.sh, the full ci-tests list (onlytest_chain_runner.shfails on macOS, same on main: BSD grep has no-P),validate-config.js,gen-agents-md.js --check,actionlint, shellcheck error gate.Instances: aeon-agent and miroshark-aeon get the aeon.yml hunks for 1 and the
triggerinput now (instance PRs), so the Monday aeon-update brings the Scheduler / chain-runner / script changes onto a workflow that already has the input. The scorer hunk (3) needs the new run-harness flag, so it arrives with that sync.Need help on this PR? Tag
@codesmith-botwith what you need.