Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a5c098f
(MOT-4327) feat(harness): persist a per-generation context snapshot a…
rohitg00 Aug 3, 2026
fc81335
(MOT-4327) feat(harness): injectable console UI with a live context c…
rohitg00 Aug 3, 2026
2c7f908
(MOT-4327) fix(harness): context chip shows the catalog window pre-tu…
rohitg00 Aug 3, 2026
5d19d1a
(MOT-4327) fix(harness): stream mid-turn context updates over the sta…
rohitg00 Aug 3, 2026
81ded54
(MOT-4329) feat(harness): provider-exact context snapshot via router …
rohitg00 Aug 3, 2026
00907ce
(MOT-4329) fix(harness): context panel says exact when provider-counted
rohitg00 Aug 3, 2026
0cb2c94
(MOT-4327) refactor(harness): adopt the shared console-ui crate and s…
rohitg00 Aug 4, 2026
bc5da20
Merge remote-tracking branch 'origin/main' into feat/harness-context-…
rohitg00 Aug 4, 2026
6a5988b
(MOT-4327) fix(harness): review fixes for snapshot accounting edges
rohitg00 Aug 4, 2026
3b0dcd5
(MOT-4327) fix(eval): follow harness onto iii-sdk 0.21.8
rohitg00 Aug 4, 2026
6aeebd8
(MOT-4327) fix(harness): teach the lifecycle wire contract the contex…
rohitg00 Aug 4, 2026
697007c
(MOT-4327) feat(harness): show prompt cache read, write, and hit rate…
rohitg00 Aug 4, 2026
850b11f
(MOT-4327) style(harness): context panel footer reads at full weight
rohitg00 Aug 4, 2026
085fac7
(MOT-4327) fix(harness): review fixes for snapshot lifetime, provenan…
rohitg00 Aug 5, 2026
f19141f
(MOT-4327) fix(eval): refresh goldens for the snapshot doc change
rohitg00 Aug 5, 2026
47fad90
(MOT-4327) fix(harness): the chip's actuals row is one step, not the …
rohitg00 Aug 5, 2026
9c26a2f
Merge branch 'main' into feat/harness-context-snapshot
rohitg00 Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions crates/console-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ repository = "https://github.com/iii-hq/workers"
publish = false

[dependencies]
# Same exact pin the workers carry — path-linking this crate must never be
# what drags a worker onto a different SDK build.
iii-sdk = "=0.21.6"
# Range, not an exact pin: workers on this repo's SDK line carry their own
# exact pins (0.21.6 for state, 0.21.8 for the harness) and cargo must be able
# to unify them with this crate. Path-linking this crate must never be what
# drags a worker onto a different SDK build, nor what blocks one.
iii-sdk = ">=0.21.6, <0.22"
tokio = { version = "1", features = ["rt", "sync", "time", "fs"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
11 changes: 6 additions & 5 deletions eval/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions eval/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ path = "src/lib.rs"

[dependencies]
harness = { path = "../harness" }
iii-sdk = "=0.21.6"
iii-helpers = "=0.21.6"
iii-sdk = "=0.21.8"
iii-helpers = "=0.21.8"
iii-console-ui = { path = "../crates/console-ui" }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "signal", "time"] }
serde = { version = "1", features = ["derive"] }
Expand Down
1 change: 1 addition & 0 deletions eval/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ fn send_options(job: &EvalJobRecordV1, variant: &crate::contract::EvalVariantV1)
output: Some(job.request.output.clone()),
functions: Some(job.request.functions.clone()),
metadata: job.request.metadata.clone(),
max_validation_retries: None,
}
}

Expand Down
232 changes: 232 additions & 0 deletions eval/tests/golden/schemas/eval.assert.exact.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,104 @@
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ContextSnapshotV1": {
"description": "One generation's context accounting. `free = usable - total`, floored at zero: once provider usage lands, `total` is what was billed, which can exceed the `usable` budget the window was fit into — that budget was derived before the generation from an estimate.",
"properties": {
"categories": {
"$ref": "#/definitions/SnapshotCategoriesV1"
},
"compacted": {
"type": "boolean"
},
"effective_max_output_tokens": {
"description": "Output allocation `usable` was derived against.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"estimator": {
"description": "Which estimator produced the numbers (`heuristic` until the context-manager resolves a real tokenizer). Absent when the context-manager predates the breakdown response.",
"type": [
"string",
"null"
]
},
"free": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"model": {
"type": "string"
},
"provider": {
"type": [
"string",
"null"
]
},
"session_id": {
"type": "string"
},
"step": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"summarized_head_tokens": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"timestamp": {
"format": "int64",
"type": "integer"
},
"total": {
"description": "Final request estimate: categories plus post-assembly growth.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"turn_id": {
"type": "string"
},
"usable": {
"description": "The input budget the window was fit into.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"usage": {
"anyOf": [
{
"$ref": "#/definitions/Usage"
},
{
"type": "null"
}
],
"description": "Actual provider usage for this generation, stamped after the terminal frame; absent when the provider returned none (or the generation never completed)."
}
},
"required": [
"categories",
"compacted",
"effective_max_output_tokens",
"free",
"model",
"session_id",
"step",
"timestamp",
"total",
"turn_id",
"usable"
],
"type": "object"
},
"SessionMetricsResponseV1": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -229,6 +327,17 @@
"null"
]
},
"context": {
"anyOf": [
{
"$ref": "#/definitions/ContextSnapshotV1"
},
{
"type": "null"
}
],
"description": "The session's latest per-generation context snapshot (categories, budget, usage) — absent for sessions that have not generated since snapshots landed."
},
"cost_usd": {
"format": "double",
"type": [
Expand Down Expand Up @@ -299,6 +408,129 @@
],
"type": "object"
},
"SnapshotCategoriesV1": {
"description": "Where the request's tokens sit. Categories are assembly-time estimates; `hook_guidance` is the measured growth after assembly (pre-generate hook appends and orphan-repair patches), 0 when the request left assembly unchanged.",
"properties": {
"hook_guidance": {
"default": 0,
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"messages": {
"$ref": "#/definitions/SnapshotMessagesV1"
},
"overhead": {
"description": "Provider framing plus response_format / provider_options fields.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"system_prompt": {
"description": "Final assembled system prompt: mode paragraph, identity, per-step aids, and any compaction summary section.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"tools": {
"description": "Function schemas exposed to the model.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
"messages",
"overhead",
"system_prompt",
"tools"
],
"type": "object"
},
"SnapshotMessagesV1": {
"description": "Estimated tokens of the assembled window's messages, by role.",
"properties": {
"assistant": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"custom": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"function_result": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"user": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
"assistant",
"custom",
"function_result",
"user"
],
"type": "object"
},
"Usage": {
"properties": {
"cache_read": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"cache_write": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"cost_usd": {
"format": "double",
"type": [
"number",
"null"
]
},
"input": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"output": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"reasoning": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"type": "object"
},
"VariantRoleV1": {
"enum": [
"control",
Expand Down
Loading
Loading