feat/fix/ci/test: context_window, tuple streaming, CI gate, E2E coverage, keepalive scheduler#604
Closed
icebear0828 wants to merge 9 commits into
Closed
feat/fix/ci/test: context_window, tuple streaming, CI gate, E2E coverage, keepalive scheduler#604icebear0828 wants to merge 9 commits into
icebear0828 wants to merge 9 commits into
Conversation
…arden affinity - wantReasoning/wantThinking now derived from codexRequest.reasoning?.effort after translation; previously only explicit client fields were checked, so effort injected via model suffix (e.g. gpt-5.4-high) or default_reasoning_effort config was sent upstream but the returned reasoning deltas were silently dropped - SessionAffinityMap stores instructions as SHA-256 hash instead of raw string to bound per-entry memory usage; implicit-resume comparison updated to match - developer role in Codex requests now mapped to system for OpenAI-compatible backends that reject the developer role; CodexInputItem type updated accordingly - Proxy host field now accepts a full URL directly to avoid double-prefix when user pastes http://... or socks5://... into the host input - Dashboard proxy panel adds "Paste URL" mode as alternative to field-by-field entry; i18n strings added for zh/en - Config version bump to 26.519.81530 / build 3178
- [CRITICAL] null instructions → hash regression: record() now accepts
string|null|undefined and uses sha256(instructions ?? "") so that
no-system-prompt sessions store sha256("") instead of undefined,
matching the comparison side in proxy-session-context; callers no
longer coerce null→undefined via ?? undefined
- [HIGH] ProxyPool handleAdd useCallback missing urlMode/newRawUrl deps
caused URL paste mode to always see stale empty values and never
submit; also reset urlMode in resetForm()
- [MEDIUM] proxy name credential leak: when name is empty and falls back
to the full URL, strip username/password before using as display name
Cover three missing paths from PR review: - empty name with credential URL → name has creds stripped - full URL pasted into host field → accepted as-is - explicit name takes precedence over URL fallback
…ls response Clients such as OpenCode read context_window from the model list to determine the usable context size. The field was absent, causing them to fall back to hardcoded defaults that didn't match actual model limits. Closes #578
…tal decoder Previously, any structured-output request using prefixItems (tuple schemas) caused the entire response text to be held in memory until response.completed, then emitted as a single chunk — the client saw nothing until the response finished. TupleStreamDecoder tracks JSON depth character-by-character and emits each top-level array element as soon as its boundary is found, giving progressive output for both the OpenAI and Gemini streaming paths. Closes #379
This was referenced May 27, 2026
Closed
…coverage 47 new tests across 3 files covering the full HTTP pipeline: - accounts.test.ts: list/add/delete/reset-usage/label/cookies/batch ops/export - admin-settings.test.ts: rotation/settings/general/quota GET+POST + auth gating - dashboard-login.test.ts: login/logout/status + rate-limit enforcement Partially closes #376
- Config schema: account_keepalive section (enabled, mode, fixed_times, interval_minutes, concurrency, per_account_delay_ms) with defaults - KeepaliveScheduler: fixed_times and interval modes, batch concurrency, per-batch stagger delay, single-run guard, deactivated-account detection - Admin routes: GET /admin/keepalive-status, POST /admin/keepalive-config, POST /admin/keepalive-run - Wired into server startup (keepaliveScheduler.start()) and shutdown - 14 unit tests: computeNextRun + executeAll edge cases Partially closes #512 (Dashboard UI to follow)
Owner
Author
|
Closing: core changes (tuple-schema, context_window, CI gate, session-affinity) already landed via subsequent PRs. Keepalive scheduler overlaps with #624's ActiveQuotaRefresher. E2E tests can be cherry-picked in a follow-up if needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/v1/modelsnow returnscontext_windowandmax_output_tokensfrommodels.yaml(closes 最大上下文问题 #578)TupleStreamDecoder— emits each array element at its JSON boundary (closes perf: Tuple Schema streaming buffers entire response before emitting #379)test-build-typecheckjob toci-quality.yml— full unit/integration/e2e suite (242 files),tsc --noEmit,npm run build:webon every PR (closes ci: no automated validation for Docker/Electron/Web build artifacts #378)fixed_times/intervalmodes, admin routes (GET/POST /admin/keepalive-status/config/run), 14 unit tests (partial feat: add scheduled account keepalive renewal #512)Test Plan
npm test— 243 test files, 2431 tests passed, 1 skippednpx tsc --noEmit— 0 errorsnpm run build:web— builds in ~600msNotes
TupleStreamDecoder
State machine (
await-open → skip-key → collect-value → done) tracks JSON depth character-by-character, callsreconvertTupleValueson each emitted element. Handles nested tuples, objects, arrays, and escaped strings.KeepaliveScheduler
Calls
/codex/usageper active account on schedule to refresh quota window state. Deactivated/banned accounts are auto-markedexpired. Dashboard UI left for follow-up.New E2E test pattern
admin-settings.test.tsanddashboard-login.test.tsare self-contained (noe2e-setup.ts), following the pattern established inproxy-routes.test.ts.