-
Notifications
You must be signed in to change notification settings - Fork 2
Fix corpus reds: relink provenance, unstamped tier fixtures, slot reaping, wire-receipt cost #4591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
31eb868
42bcda9
f6c3be6
352a52e
7a821f4
082d821
f42dfe4
2310390
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,14 +114,25 @@ class ProviderCost: | |
|
|
||
|
|
||
| def _write_provider_cost(conn: sqlite3.Connection, session_id: str, model_name: str, cost: ProviderCost) -> None: | ||
| """Pass through a provider dollar value without catalog computation.""" | ||
| """Pass through a provider dollar value without catalog computation. | ||
|
|
||
| The value is one exact dollar total for the whole session, so it lives on | ||
| exactly one model row. A merge-append that switches models carries the | ||
| total to the new row; leaving it on the superseded one would double-count | ||
| it in every sum over the session. | ||
| """ | ||
| if not isinstance(cost, ProviderCost): | ||
| raise TypeError("provider cost writes require ProviderCost") | ||
| conn.execute( | ||
| """UPDATE session_model_usage SET provider_cost_usd = ? | ||
| WHERE session_id = ? AND model_name = ?""", | ||
| (cost.value, session_id, model_name), | ||
| ) | ||
| conn.execute( | ||
| """UPDATE session_model_usage SET provider_cost_usd = NULL | ||
| WHERE session_id = ? AND model_name <> ?""", | ||
| (session_id, model_name), | ||
|
Comment on lines
+131
to
+134
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a live Claude Code JSONL file first records a $1 assistant turn on model A and later appends a $2 turn on model B, the append route parses only the tail bytes and AGENTS.md reference: AGENTS.md:L44-L45 Useful? React with 👍 / 👎. |
||
| ) | ||
|
|
||
|
|
||
| logger = get_logger(__name__) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If SIGINT, SIGTERM, or SIGHUP arrives after
pueue addhas created the task but before this context installs its handlers—including while parsing the task ID or writing the waiting message—the process terminates under the previous handler and leaves both the task and launch file behind. Because the repository uses one host-wide pytest slot, that orphan can still block every later managed run; block these signals before adding the task and arm/unblock them once its ID is known.AGENTS.md reference: AGENTS.md:L147-L149
Useful? React with 👍 / 👎.