Repository navigation
v0.4.22
Fork-only release on top of v0.4.21 (no upstream sync). One change: Copilot usage recovery and retry cost merging (PR #104, merge commit b275b0aa3).
Fork notes
- Copilot usage recovery (PR #104): every Copilot invocation now gets a private OpenTelemetry file exporter (
COPILOT_OTEL_EXPORTER_TYPE=filewith a per-run temp path) so completed model requests are on disk while the process runs. When neither the stdoutsession.shutdowntotal nor the session snapshot is usable, typically after a cancellation, a crash before the session id appeared, or a resumed session with a stale baseline, the daemon recovers this process's completed requests from that export. Existing source precedence is unchanged, spans are de-duplicated by trace and span id,invoke_agentand metric rows are ignored, and only this invocation's requests are counted so resumed history is never billed again. - Provider cost from telemetry:
github.copilot.nano_aiuis converted tocost_usd_ticks(1 AI credit = $0.01) and becomes the authoritative price for recovered rows. When a model has even one request without a quote, the whole row is left unpriced so the pricing table estimates all of its tokens.github.copilot.costis a premium request multiplier and is never used as currency. - Cancellation: Copilot is now stopped with a group-wide SIGTERM, a two-second grace period, then SIGKILL, and cleanup is joined before usage is read, so spans already exported survive the cancel.
- Cache counters above input: output, cache and cost are kept as measured, only the uncached input remainder is clamped to zero, and a diagnostic is logged instead of dropping the request.
- Operator telemetry: when
OTEL_EXPORTER_OTLP_*orCOPILOT_OTEL_*is already configured, the daemon skips its private exporter at Debug level with a redacted reason. Real exporter failures still log at Warn. - Daemon usage merge (fresh-session retries): when two same-model operands both carry tokens but only one has a provider quote, the partial quote is cleared and every merged token is estimated, so a priced failed attempt no longer hides an unpriced retry's tokens. Fully priced operands still sum, and cost-only records are preserved.
Rollout
Requires updating the daemon binary. Historical usage is not recalculated. The new real-agent smoke test needs the agentintegration build tag, MULTICA_RUN_REAL_AGENT_SMOKE=1, and an absolute MULTICA_COPILOT_SMOKE_EXECUTABLE path.
Commits since v0.4.21
b275b0aa3Merge pull request #104 from furtherref/codex/copilot-live-usage