Skip to content

Fix Jev settings, routing limits, and save transactions - #51

Merged
BunsDev merged 24 commits into
TypeSafeAI:mainfrom
CompleteTech-LLC-AI-Research:jev-integration
Oct 3, 2026
Merged

BunsDev merged 24 commits into
TypeSafeAI:mainfrom
CompleteTech-LLC-AI-Research:jev-integration

Conversation

@CompleteDotTech

@CompleteDotTech CompleteDotTech commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Auto routing now honors explicit CLI-only transport, refreshes saved judge configuration, preserves existing CLI sessions, and stops before execution when effort or premium limits cannot be guaranteed. Default-model routing, discovery retries, learning-write failures, and blocked receipts are also corrected.

Settings separates drafts from immediate key/reset actions, identifies the configuration tested, preserves failed saves for retry, and exposes routing controls in four accessible sections with persistent Save and Cancel. The refresh-failure regression now saves a value different from its fixture, so it detects a stale renderer snapshot.

Review evidence covers issues #40–#50 and all maintainer findings in the issue checklist and the revision review.

Current head d132a95 incorporates main at 1c3ec6f, including #61, #60, #62, and the #67 status update. Its required macOS check passed on that exact head.

Validation:

  • Final head d132a95 passed unit + e2e (macOS): build, 195 unit tests, and all 75 Electron tests, with no skips. All 24 PR commits have verified signatures.
  • The final combined code passed the local build and normal full unit command: core 15/15 and desktop 180/180, with no skips. All 13 Git tests, the focused native Electron send/approve/Changes test, and an isolated offline worktree create/remove smoke test also passed. The subsequent docs: record #61, #60, #62 and #39 under "On main, not yet released" #67 reconciliation changed documentation only; typecheck passed during the initial review.
  • The corrected save/refresh test passed, and failed at the expected agent/chat assertion when the saved-state update was temporarily removed. Production source was restored unchanged.
  • Earlier local runs hit unchanged terminal-cleanup failures and the full Electron run timed out during app.close in the unchanged persistence test. Those failures remain documented; no assertions or timeouts were weakened. The complete hosted suite remains the merge gate.

Checks use offline fixtures. Coding turns remain CLI-only; live-provider health and human VoiceOver acceptance are not claimed.

Closes #40
Closes #41
Closes #42
Closes #43
Closes #44
Closes #45
Closes #46
Closes #47
Closes #48
Closes #49
Closes #50

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@BunsDev BunsDev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, it's a substantial piece of work. These findings come from reading the code at ac1c1dc; I didn't run the scenarios. I traced (1) and (10) through the code myself. They're grouped by impact.

Routing behaviour

  1. Turns Auto "keeps" can be raised to the effort ceiling (policy.ts:80). When the thread has no stored effort, pinnedEffort targets EFFORTS[Math.min(requested ?? cap, cap)], which is the cap itself, and the default max_effort is xhigh. Claude threads hit this all the time, because ClaudeBackend.MODELS lists efforts but no defaultEffort, so thread.effort is usually undefined. A turn Jev is unsure about then runs at xhigh, the reason reads "lowered to xhigh", the effort is saved on the thread (runner.ts:270), and the turn counts as premium (router.ts:224). Using the candidate's default, or a moderate level, when nothing was requested would avoid this.
  2. Threads on the CLI default model can be blocked turn after turn (policy.ts:76). New threads can have model: "". That isn't a ladder entry, so currentCandidate is undefined, and every low-confidence turn returns "Cannot honor the … ceiling". The blocked decision doesn't change the thread, so it stays blocked. The ladder already marks the CLI default with isDefault, so "" could resolve to that candidate.
  3. A failed model list blocks Auto for 60 seconds (router.ts:151). ladderFor caches an empty list together with its error. Under the new rules an empty current ladder blocks every non-mock Auto turn, so one transient model/list failure, for example while the Codex app-server is restarting, blocks Auto on that backend for a minute. The message blames effort capabilities and drops the real error. Not caching failures, or surfacing the error, would fix it.
  4. Any routing exception now blocks the turn (runner.ts:277). That includes failures unrelated to safety, such as Fit.write throwing inside recordRoute (disk full, read-only home) after a safe decision was already made. The in-memory premium count has already gone up by then, so the budget fills with turns that never ran. Saving fit data could be best-effort and kept out of the decision.
  5. Blocked turns still read "Auto kept …" (router.ts:227). The route item has pinned: true and no blocked flag, so ThreadView shows "Auto kept Codex · " right next to an "Auto routing stopped" error. The stop reason only appears when the receipt is expanded.
  6. A manual fix after a blocked turn teaches the wrong preference (runner.ts:405). After a block, the user picks a model that supports the ceiling. noteOverride records that against the thread's previous successful route and moves its task tier down, although the change was about effort support, not tier.

Settings dialog

  1. The jev executable hint mixes the draft with saved status (SettingsDialog.tsx:323). With http saved and the draft changed to auto, it reports "Auto selected HTTPS; the jev CLI was not selected", but the CLI was never probed. Change the draft to cli instead and it shows "Checking the selected transport…" until the dialog closes, because no check runs for a draft.
  2. The "settings changed while this test ran" warning shows too often (SettingsDialog.tsx:310). It appears whenever testResultCurrent is false, including when routing:test itself rejected (no tested) or routing is null.
  3. Clicking Test judge right after opening can leave the panel stuck (SettingsDialog.tsx:107). runTest, keyAction and resetLearning bump routingStatusRequestRef before the first routing:status returns, so its result is discarded. If the follow-up refresh then fails, which is swallowed, routing stays null and the panel sits on "Checking the judge…".

Text

  1. Doubled punctuation in the fallback reason (router.ts:210). unavailableReason already ends with a period, so receipts read "…are all empty.; used the built-in heuristic." The e2e test was split into two assertions instead of fixing the string.
  2. The save-error banner repeats itself (SettingsDialog.tsx:404). It appends "Your draft is still here; retry or cancel." to saveError, whose fallback already contains that sentence. Real IPC errors also arrive with Electron's "Error invoking remote method 'settings:update': Error:" prefix.

Smaller cleanups

  • The "Jev is off for this session" message and the generation === this.setupGeneration && (auth || billing) guard are repeated in test(), route() and followUp() (router.ts:135). A disableOn(err, generation) helper would keep the three copies in step.
  • The judge-identity comparison (jev_transport / jev_bin / jev_model) exists in settings-update.ts:10 and again as sameJudgeDraft, savedTestMatches and testResultCurrent in the dialog. One helper in shared/ would keep main and renderer agreeing.
  • The no-candidate branch (policy.ts:133-138) nearly duplicates the confidence-gate branch (94-98), and the premium ceiling is computed both in pinnedEffort and in step 5.
  • RoutingTest.tested.transport always equals RoutingTest.transport, a stored lastTest.current is always true, and savingRef is always set together with operationRef (types.ts:128). Each pair could become one field.

Before merge

  • This branch conflicts with main in apps/desktop/src/main/engine/store.ts, where #54 added the approval-rule settings. main also requires branches to be up to date, so please rebase.
  • All 19 commits are verified on GitHub. CI passed on the last run, but that run tested against the older main.

@BunsDev BunsDev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rechecked issues #40–#50, all eleven maintainer findings, and the four smaller cleanups against final head f869f91. No remaining findings in the reviewed scope. There are no inline review threads to resolve.

The remaining verification gap was a save/refresh test that saved the fixture's existing value. f869f91 now changes chat to agent and requires agent after reopening. The corrected test passed with the fix and failed at the expected assertion when the saved-state update was removed; production source was restored unchanged.

The final required macOS check passed: build, 190 unit tests, and all 75 Electron tests, with no skips: https://github.com/TypeSafeAI/modex/actions/runs/37137204299. All 21 PR commits have verified signatures. Local typecheck passed; local terminal/persistence timing failures and the serial unit validation are recorded in the review evidence.

The four P1 constraints are enforced without weakening the CLI-only execution architecture or approval rules. Approval is for this exact head and remains subject to the repository's protected-branch checks.

@BunsDev BunsDev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rechecked issues #40–#50, all eleven maintainer findings, and the four smaller cleanups against final head d132a95. No remaining findings in the reviewed Jev/Settings scope; there are no inline review threads to resolve.

The additional verification gap was a save/refresh test that saved the fixture's existing value. It now changes chat to agent and requires agent after reopening. The corrected test passed with the implementation and failed at the expected assertion when the saved-state update was removed; production source was restored unchanged.

The branch incorporates current main 1c3ec6f, including #61, #60, #62 and the reconciled #67 status page. The final required macOS check passed: build, 195 unit tests and all 75 Electron tests, with no skips: https://github.com/TypeSafeAI/modex/actions/runs/37139856243. All 24 PR commits have verified signatures. The combined code also passed the normal local build/unit commands, all 13 Git tests, the focused native send/approve/Changes test and an offline worktree smoke test. Earlier local timing failures remain documented; no checks were weakened.

The four P1 constraints are enforced while preserving CLI-only coding execution and approval-rule settings. Approval is for this exact tested head and remains subject to the protected-branch checks.

@BunsDev
BunsDev merged commit d9414b5 into TypeSafeAI:main Oct 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment