chore: post-0.1.2 follow-up — codex P3 fix + README#21
Merged
Conversation
PR #20 shipped to the v0.1.2 prerelease without a codex-cli review pass. Re-ran codex on the squashed merge (commit 2b20dfa) and captured one P3 finding plus a README gap. ## Codex P3 fix: extend usage tracing to background paths Before this change, `pipeline::run`'s `openrouter: call completed` tracing block only fired for the foreground chat path because the log was inline in `run()`'s `match chat_req` arm. The two background call sites — `pipeline::dreaming::classify_session` and `pipeline::post_process::{extract_facts, extract_structured_insights}` — call `state.openrouter.execute(req)` directly and only read `resp.reply`, discarding `usage` / `generation_id` / `model`. `docs/llm-audit.md` already promised that background paths emit usage via tracing fields; the implementation didn't match that claim. Fix: - Extract `log_openrouter_usage(task, session_id, &resp)` as a `pub(super) fn` in `pipeline/mod.rs`. - Call it from all 4 OpenRouter call sites with the appropriate task label (`chat_companion`, `memory_extraction`, or `insight_extraction`). - Thread `session_id: Uuid` through `extract_insights` → `extract_facts` / `extract_structured_insights` so insight extraction logs also carry session correlation. ## README `README.md` and `README.zh.md`: - The `/message[_async]` bullet now lists both `prompt_traits` and `audit` (with a link to `docs/llm-audit.md` / `.zh.md`). - Configuration table gains `OPENROUTER_APP_REFERER` and `OPENROUTER_APP_TITLE` rows. ## Out of scope - crates.io publish skipped (still on 0.1.1 across registry). - No new tag, no GHCR rebuild — deploy is straight from local source to fly. This follow-up plus the upcoming `model_config.toml` fallback-array support will both fold into the 0.1.3 cut. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Context
PR #20 (OpenRouter audit passthrough) shipped to the v0.1.2 prerelease without a codex-cli code review. This follow-up captures the codex review pass plus a README gap that landed alongside #20.
Both this follow-up and the upcoming
model_config.tomlfallback-array support will fold into the v0.1.3 cut. v0.1.2 stays as the audit-feature prerelease; v0.1.3 will be where the audit code matures (codex review applied + fallback array).Codex review of 2b20dfa
`codex review --commit 2b20dfa` reported one P3:
Fix:
log_openrouter_usage(task, session_id, &resp)aspub(super) fninpipeline/mod.rs.chat_companion,memory_extraction, orinsight_extraction).session_id: Uuidthroughextract_insights→extract_facts/extract_structured_insightsso insight extraction logs carry session correlation.`docs/llm-audit.md`'s claim is now honest. No tracing payload format change for the foreground chat path; just the helper extraction.
README
README.mdandREADME.zh.md:/message[_async]bullet now lists bothprompt_traitsandauditwith a link todocs/llm-audit.md/.zh.md.OPENROUTER_APP_REFERERandOPENROUTER_APP_TITLE.Out of scope
Test plan
cargo build --workspacecleancargo fmt --all -- --checkcleancargo clippy --workspace --all-targets -- -D warningscleancargo test -p eros-engine-core -p eros-engine-llm --lib— 51/51 greenflyctl deploy --remote-only -a eros-enginefrom local sourceopenrouter: call completedlog line appears withtask = "memory_extraction"ortask = "insight_extraction"(previously onlytask = "chat_companion"appeared)🤖 Generated with Claude Code