Commit Graph

87 Commits

Author SHA1 Message Date
Teknium 61d690acf6 test: publish credential-free fallback wire reproduction 2026-09-07 07:08:25 -07:00
Teknium 78e0d296d6 test: publish credential-free fallback wire reproduction 2026-09-07 07:06:58 -07:00
teknium1 2019c0a60f test(tui-gateway): add isolated websocket orphan reconnect probe 2026-09-07 07:05:21 -07:00
Teknium 026e3e84ea fix: reject unavailable desktop profile and session targets 2026-09-07 06:26:22 -07:00
Teknium 12891ea3bd fix(desktop): scope tool changes and commit rebuild ownership together 2026-09-07 06:26:22 -07:00
Teknium 3d8c492baf docs: record native output-cap save validation 2026-09-07 06:15:43 -07:00
Teknium 27f32bd50b test: exercise output-cap removal across native and child surfaces 2026-09-07 06:15:43 -07:00
Teknium fd3565deec fix: remove dedicated user-facing output cap controls 2026-09-07 06:15:43 -07:00
Teknium f4f691c6cc fix(desktop): retain restored offsets through deferred layout
Observe post-settle transcript resizes until reader input or a live run takes ownership. Keep parked upward-wheel cancellation and namespace capture intact. Extend the maintained Chromium restoration probe with long reload and streaming controls; retain the two existing component invariants.
2026-09-07 06:14:35 -07:00
Teknium 3329b38bf3 fix(desktop): retain scroll ownership and honor hydration wheel intent 2026-09-07 06:14:35 -07:00
Teknium 9a78d5ac2b test(desktop): document and probe reading-position restoration 2026-09-07 06:14:35 -07:00
Teknium 8ed86c05af test(sessions): exercise pressure eviction and recovery boundaries 2026-09-07 06:10:54 -07:00
Teknium 9c53128cc8 test(sessions): verify gateway status after timer removal 2026-09-07 06:10:54 -07:00
Teknium 23a4bd8f0c test(sessions): preserve live persistence and eviction controls 2026-09-07 06:10:54 -07:00
Teknium 0d86694fa7 test(desktop): make MCP renderer relay regressions executable 2026-09-07 06:10:28 -07:00
Teknium f914c9b070 fix(mcp): enforce profile ownership throughout OAuth sessions 2026-09-07 06:10:28 -07:00
Teknium cf1222482c test: publish credential-free fallback wire reproduction 2026-09-07 06:07:16 -07:00
Teknium 1e65d6d861 test: distinguish completion capture from model metadata HTTP 2026-09-07 06:06:46 -07:00
Teknium a39067f67b test: clarify named-route parity wire evidence and held dialect scope 2026-09-07 06:06:46 -07:00
Teknium be633b23c4 test: handle localhost model metadata probe without fixture error 2026-09-07 06:06:46 -07:00
Teknium 5d4f76b50e test: preserve reusable localhost provider wire A/B probe 2026-09-07 06:06:46 -07:00
Teknium edf8e5d987 test: preserve reusable localhost provider wire A/B probe 2026-09-07 06:04:44 -07:00
Teknium f9523c20e7 test: preserve reusable localhost provider wire A/B probe 2026-09-07 06:02:22 -07:00
Teknium c0c6b31543 fix(update): stream build progress without concealing silent stalls
Retain partial-line output, UTF-8 decoding, failure output and cancellation cleanup. Based on streaming investigations by Artemonim (#101850) and lEWFkRAD (#104843); gateway tee adapted from fangliquanflq (#97402). Live Linux child/tee probe: withheld or dropped on base, visible in 0.02 seconds after. Campaign-locked tests and native Windows proof are pending.
2026-09-07 05:56:50 -07:00
Teknium f6a4a5adde fix: keep multiline delegation goals out of Desktop report bodies
Recognize the full producer task header when a batch goal spans lines,
so the next task goal and preceding transcript footer cannot become part
of the displayed result. Extend the existing invariant and real SQLite
producer probe with that case.

Make the live probe artifact path explicit, run Chromium headlessly, and
document its synthetic fixtures and integration fidelity limits.
2026-09-07 05:06:39 -07:00
Teknium 8e73e51e6c test: record real async report producer-to-renderer proof 2026-09-07 05:06:39 -07:00
Teknium 583ff8b6b1 test(desktop): render Markdown whitespace probe with production styles 2026-09-07 04:57:11 -07:00
Teknium d599865a53 test(desktop): isolate Markdown ingress and real code-copy probe 2026-09-07 04:57:11 -07:00
Teknium 5db3d4b6bd test(desktop): probe Markdown ingestion and generated completion delivery 2026-09-07 04:57:11 -07:00
Teknium 0ec65ee514 test: record live Desktop Markdown hard-break reproduction 2026-09-07 04:57:11 -07:00
Teknium 3cb64cdcbc test(desktop): add isolated live history projection witness 2026-09-07 04:56:22 -07:00
Teknium d87d7657c0 test(desktop): require successful isolated hook turns and exact calls 2026-09-07 04:55:48 -07:00
Teknium 3094cde513 fix(desktop): honor configured shell hooks for each chat profile
Wire the existing consent-aware, profile-keyed hook registrar at agent
construction, where the correct session home is already bound. This covers
serve and TUI agent construction without a startup-only registration or a
new helper that swallows registration failures.

Live isolated serve/WebSocket probes reproduce the missing registration on
base for both write_file and terminal, then verify each consented profile
blocks its configured tool while the unapproved profile still runs normally.
Repeated alpha construction does not duplicate hook callbacks.

Slim implementation of the agent-build placement proposed in #57020;
thanks also to the profile-scoped analysis in #102691.

Co-authored-by: grimmjoww578 <willies578@gmail.com>
2026-09-07 04:55:48 -07:00
Teknium 18955c35b5 fix(sessions): repair closed lanes through canonical disconnect cleanup
The real closed-WebSocket resident variant still wedges after the missing-timer repair. Re-enter existing transport cleanup before rearming orphan timers, preserving viewer transfer and the reconnect/delegation fence rather than deleting registry rows from a stale snapshot. Extend the same invariant to both dead-transport shapes. Live class investigation informed by #104710; no direct-vouch reclaim machinery imported.
2026-09-07 04:55:32 -07:00
fangliquanflq 919584e971 fix(sessions): rearm lost detached chat teardown timers
Salvage #104704 (e9423d2d0bbe3e795c5eaccb86a913f1d95444ba, 5fa2b98fc833fc4e1ee7f1aaa7eb45cdd3cd7cde). Reuse guarded orphan teardown instead of deleting ownership fences. Real two-backend WebSocket probe reproduces the missing-timer wedge on base and proves reconnect/delegation protection and recovery. Add reusable probe and user documentation.
2026-09-07 04:55:32 -07:00
Teknium 93fef377df test(desktop): retain native launcher and backend campaign probes 2026-09-07 04:55:17 -07:00
Teknium 94ff4fe8f9 test: verify profile rebuild persistence through live serve 2026-09-07 04:54:49 -07:00
Teknium 285829c3fe test(kanban): exercise acceptance races through real run lifecycle 2026-09-07 04:46:54 -07:00
Teknium ac07da2674 fix(kanban): enforce declared PR acceptance at completion boundary 2026-09-07 04:46:54 -07:00
Teknium 0d8bba885c test: reproduce flood-refused delivery through local Telegram wire 2026-09-07 04:46:20 -07:00
Teknium 780aee0deb test(acp): verify existing empty metadata over native session load 2026-09-07 04:46:04 -07:00
Teknium 8f7640b622 fix(acp): retain only ephemeral-new-session persistence guard
Keep two invariants covering empty create/cwd/save/fork, genuine content and existing-row metadata. Preserve original authorship and avoid source-only legacy pruning: an empty ACP row does not prove its owner is dead. Native ACP wire plus a local streaming model fixture verifies the first turn and nonempty fork remain durable.
2026-09-07 04:46:04 -07:00
Teknium 0ee524a3d6 test(acp): reproduce empty session persistence on the native wire 2026-09-07 04:46:04 -07:00
Teknium 9da8df8d26 fix(prompt): preserve shared project prefixes across worktrees
Slim salvage of #104688: place project context before workspace state and
keep cwd outside the stable prefix. Put runtime hints behind a final
renderer-owned boundary so quoted operator, memory, plugin and embedder
examples cannot override the persisted runtime cwd or identity fields.

Retain legacy unmarked prompt validation, add two invariant tests and a
credential-free real-AIAgent/git-worktree replay harness. No provider
cache-hit or billing measurements are claimed.

Co-authored-by: joaomarcos <joaomarcosdias444@gmail.com>
Co-authored-by: HexLab98 <liruixinch@outlook.com>
2026-09-07 04:45:48 -07:00
Teknium fc8d15d779 test: retain a reproducible CLI goal parity oracle 2026-09-07 00:51:41 -07:00
Teknium 3be1b87af1 fix(gateway): keep heartbeat admission on its watched route 2026-09-07 00:34:12 -07:00
Teknium be58c276ee feat(compression): per-image token cost learned from the provider's own usage (#70328, supersedes #70463)
A flat per-image constant (1500 in the trigger estimator, 1600 in the tail-budget walk) is wrong in
both directions: a screenshot costs ~1,100 tokens on one provider and 4,000+ on a local mmproj
model. In a GUI loop on a 64K window the estimate sat at ~20K while the real prompt passed 80K,
so compaction never fired and the provider rejected every request (#70328).

The provider prices every image exactly on the request that carries it, so the cost is
observable from usage alone, with no vendor formula: with a fresh usage anchor, the residual
between the next real prompt_tokens and anchor + text-only delta is the price of the N images
that delta introduced.

- agent/image_token_cost.py: calibrate_from_usage() runs in record_response_usage before the new
  anchor is captured; the learned value (EMA, plausibility-banded) is kept per model@host in
  ~/.hermes/cache/image_token_costs.json and bound per turn through a ContextVar.
- estimate_messages_tokens_rough, _content_length_for_budget (tail walk) and gateway hygiene all
  read the same bound value, so trigger and walk agree; the per-message memo now caches text
  tokens and image COUNT so a recalibration re-prices cached rows.
- One flat default (1500) remains only until the first vision turn; the duplicate 1600 is gone.

evals/token_accounting/ab_image_cost_calibration.py (real AIAgent, fake provider pricing images
at 4,000, one screenshot per turn, 64K window): main learns nothing (1500) and the tail walk
under-prices its own protected tail by 56.5%; this branch learns 4,374 after one vision turn
and the walk's error is +8.5%.

Reporter and first-fix credit: @JonthanaHanh (#70328, #70463).
2026-09-06 14:19:42 -07:00
Teknium 6d2645e64e feat(logging): the API call line carries cache write count, the provider's response id, and the serving upstream
Diagnosing the 1,393-agent run's cache misses took a state.db join and a live
probe because none of the three were on the one line we log per call:

  write=<n>    cache_creation tokens; a write costs 50x a read, so this is the
               money, and "read stuck, write large" on consecutive lines is a
               routing miss visible without a probe
  id=<id>      the provider's response id (Anthropic msg_..., OpenRouter/Nous
               gen-...): what a provider needs to look a request up
  upstream=<n> who actually served, when the route reports it (OpenRouter's
               `provider`); how we learned GMI was not serving

Fields are appended to the existing line and omitted when absent, so every
existing parser (evals/postmortem, the two cache_prefix probes) keeps
matching; the forensics parser reads them when present.

The streamed chat path fabricated `id="stream-<uuid>"` and dropped the
chunks' id/provider on the floor; it now keeps the first chunk's id and
provider, falling back to the fabricated id only when the stream never sent
one. Nothing depended on the prefix.

Live (Nous, Fable 5.1, both wires): chat -> `write=3759
id=gen-1788727882-... upstream=Anthropic`; native -> `id=gen-1788727891-...`
(the Anthropic Message object's id was already real). Tests: fields present
and omitted, prefix unchanged; forensics parser reads new and old lines.
2026-09-06 13:52:15 -07:00
Teknium 1d06f7a95a docs+evals(compression): token-accounting replay harness and developer-guide section (#104462)
evals/token_accounting/replay_gates.py runs the REAL AIAgent turn loop against a local fake
chat-completions server with scripted usage.prompt_tokens, in three shapes (CLI same-object
history, gateway JSON-reloaded history, SessionDB close/reopen + fresh agent) x two arms
(transcript 3x threshold by bytes/4 while real usage is under; transcript tiny while real usage is
over). Acceptance: no gate fires when real usage is under threshold regardless of estimate
inflation; every gate fires once real usage is over.

origin/main 5f406d88ea: cli/gateway/restore inflated all FAIL (1 local compaction each on the
estimate). This branch: 6/6 PASS, anchor restored in the fresh process.
2026-09-06 13:21:17 -07:00
Teknium 8f2167342f evals(postmortem): notice probes target a grouped unit (per-group split on main; ungrouped tasks already report individually) 2026-09-06 12:12:09 -07:00