Repository navigation
[WRONG BRANCH] release: promote 2.66.0 to main - #5855
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…5773) * fix(lab): rewrite raw POSIX path regex without ambiguous alternation Code scanning flagged RAW_POSIX_PATH_RE as polynomial ReDoS (alert #1): the `(?:\/|[^/\0\r\n]+)+` alternation can repartition a run of path segments combinatorially on client-supplied event fields. Rewrite the segment run as an unambiguous `[^/]+(?:\/+[^/]+)*\/*` sequence so the match stays linear. The exec-side sibling regex was already rewritten on dev; this closes the remaining flagged pattern. Co-Authored-By: Epinephrine <[email protected]> * test(lab): pin the POSIX-path contract with discriminating inputs and a timeout * test(lab): correct regex test comment to match measured behavior --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: luvs01 <[email protected]>
…hutdown sweep (#5791) * fix(lab): keep manual Lab runs and late scheduler starts inside the shutdown sweep * fix(lab): cancel queued manual run when shutdown lands after enqueue --------- Co-authored-by: luvs01 <[email protected]> Co-authored-by: luvs01 <[email protected]>
* fix(gui): hide unavailable key rotation controls * fix(gui): keep rotation status and secret copy visible without callable actions * fix(gui): report rotation-secret copy failures without parent handler When the host does not wire onCopyRotationSecret, the clipboard fallback swallowed both failure paths: a missing Clipboard API returned early and a rejected write hit an empty catch, leaving the Copy button to imply the one-time secret was on the clipboard. Surface the same api.key.copyFailed alert the parent copy handler uses, and keep the badge off until a write actually resolves. --------- Co-authored-by: luvs01 <[email protected]> Co-authored-by: luvs01 <[email protected]>
…bilities (#5759) * fix(desktop): attest proxy before sending admin token Rebased onto dev's RuntimeBinding flow: the attestation challenge and proof now ride the same /healthz round-trip that re-confirms the bound identity, and the MAC is keyed with the Base64URL text's UTF-8 bytes to match the server primitive. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(desktop): authorize management reads with a single-use capability The attested /healthz and the credential-bearing request were separate round-trips, so a process could take the port in between and receive the admin token. The token is also a reusable credential: once it left the client, the holder could replay it for anything. Requests now carry the existing local-read capability instead of the token: a single-use HMAC over the nonce, method, path+query, recorded pid and port, and a ten-second expiry, keyed by the attestation secret only the recorded runtime can read. A listener that took the port after the bound child exited cannot satisfy it, a captured grant is useless for any other request, and the admin token never leaves the client. The read contract widens to the desktop management paths and signs the query into the grant rather than refusing query-bearing requests, so a capability minted for one range cannot be replayed against another. A pid that no longer matches the record reports Foreign instead of Unauthorized, matching the widget's not-our-instance state. * fix(desktop): keep the auth test file under the size cap The added query-binding cases pushed server-management-auth.test.ts over the repository's 2000-line ratchet. The block is condensed to the same assertions in fewer lines. * fix(desktop): allowlist tray config and active-auth reads for local capabilities * fix(desktop): rebase on dev, restore token path for the snapshot publish The dev branch gained post_desktop_snapshot (#5765), a POST whose server route accepts only the admin-token principal. Keep the re-confirming authorised_token for that one write while reads stay on single-use capabilities, format the capability signature, and keep the Method::POST literal out of the file so the exit-ownership source assertion holds. * style(desktop): rustfmt the capability vector assertion * fix(desktop): sign the parsed URL target so a bare query marker does not break the capability CodeRabbit on #5759: the capability retry signed the raw path, but the server verifies pathname + url.search, which drops a bare ?. timeline(") produced exactly that shape and failed the capability check with Unauthorized. Derive the signed target from the parsed URL and cover bare ?, a populated query, and percent-encoding in tests. * fix(desktop): bind snapshot writes to single-use body capabilities Remove the remaining reusable admin-token transport from ProxyClient. Use a separate exact-route POST grant bound to raw body SHA-256, nonce, PID, port and ten-second expiry. Consume once and validate the bounded body before parsing or storing. Preserve read-v1 and existing admin publishers; reject GUI/origin writers. Add 22 regression cases and update the desktop/management contracts. Validation: 26 cases passed under a Node compatibility harness using the actual admission, route and badge-store code; unrelated dependencies stubbed. Bun/full project typecheck, privacy/structure gates and Rust build/tests were unavailable locally and require CI. * fix(desktop): complete tray grants and repair review gates Restore PATCH in the OAuth pool API documentation and document the query-bound native tray reads. Allow the actual OAuth-account and provider-key GET routes while preserving exact queries and read-only scope. Add six regression cases for admission, replay, selector/method binding, native source coverage, and removal of unused admin loading. Repair the digest-to-subtle Cargo.lock dependency edge without changing any package version, fix the two rustfmt failures, and remove the now unused reusable-token loader after checking for remaining callers. Validated the identical source tree 08d56be on isolated GitHub Actions: 106 native Bun tests passed across four files; project typecheck, privacy scan and structure checks passed. The helper workflow is absent from this tree and from this commit's ancestry. --------- Co-authored-by: luvs01 <[email protected]> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…cher hijack (#5789) * fix(service): pin launchd to package-local Bun/CLI to avoid PATH-launcher hijack * test(service): assert supplied launcher stays out of launchd command * docs(service): scope ADR-0030 to the systemd launcher; launchd follows ADR-0100 * test(service): exercise the launchd stale-launcher diagnostic on every platform --------- Co-authored-by: luvs01 <[email protected]> Co-authored-by: luvs01 <[email protected]>
* fix(update): stop deleting stale staging paths * docs(update): match the troubleshooting page to the stale-stage policy The page still claimed a later update removes owned staging folders. The install now reports marked stages older than half an hour as ESTALE and leaves them in place, so the table and the closing note tell the user to delete a leftover by hand only after confirming nothing runs from it. * fix(update): drop the stale sweep log and dead removed list The sweep no longer deletes anything, so the discardStage message must not promise the next update removes a locked stage, and the result type drops a list nothing fills. * docs(update): qualify stale-stage ownership, links, and disk claims * fix(update): say later updates will not remove a leftover stage either * fix(update): describe staging removal failures neutrally --------- Co-authored-by: luvs01 <[email protected]>
* fix(service): pin elevated scheduler staging paths * fix(service): reject traversal segments in elevated staging paths The shared-staging-directory guard used a raw startsWith prefix check, so a predecessor path containing '..' (e.g. <stageDir>\..\elsewhere\expected.xml) passed while resolving outside the pinned directory. Reject '..' segments on either separator for both payloads before comparing prefixes. Co-Authored-By: Epinephrine <[email protected]> * docs(service): distinguish ancestor delete-share from payload write/delete-share * test(windows): assert staged-path lock calls precede elevation * fix(windows): pin staging parent dir and assert lock ordering --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: luvs01 <[email protected]>
…ring systemEnv upgrade (#5792) * fix(claude): clear legacy _CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL during systemEnv upgrade * fix(server): unset legacy Claude base-url env whenever it reads 1 --------- Co-authored-by: luvs01 <[email protected]> Co-authored-by: luvs01 <[email protected]>
* fix(release): fail closed when draft state lookup fails * fix(release): fail on any draft state other than an explicit false A successful draft-state query that answers neither true nor false — an empty body or an unexpected shape — used to skip the publish step and leave the release a silent draft. Only an explicit false may pass now; anything else fails the step. The contract test covers the unexpected value alongside the existing failing-query case. * test(release): cover fail-closed publication with portable isolated Bash regressions Keep the existing release workflow fix unchanged. Separate static contracts from shell execution, find native Git Bash on Windows, and refuse silently skipped shell coverage on CI. Mock only the expected gh commands in an empty working directory with no inherited credentials or executable search path. Assert success paths, command order, six malformed states, and upload/view/edit failure propagation. Add subprocess time and output bounds. Local preliminary validation: TypeScript syntax and 12 checks through a Node adapter invoking actual Bash passed; restoring the original bug or making the script always fail was detected. Native Bun cross-platform validation pending. --------- Co-authored-by: luvs01 <[email protected]>
#5786) * fix(release): isolate dev data from bump credentials * fix(release): keep bump push credentialed and run version checks from trusted root * ci(version-bump): fail when the chosen version already has a release tag --------- Co-authored-by: luvs01 <[email protected]>
* fix(ci): scan markdown fences in linear time * fix(ci): handle CRLF line endings when matching closing markdown fences * fix(ci): pair fence openers by index so an unmatched opener cannot hide a later block Co-Authored-By: Epinephrine <[email protected]> * fix(ci): let a shorter closing fence match the way the backreference did Co-Authored-By: Epinephrine <[email protected]> * docs(ci): pin closeFor parent-link contract and the fence parity choice * test(ci): exercise close-length parent chain in fence scan --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: luvs01 <[email protected]>
* fix(hooks): stop executing pulled code after merges The managed post-merge hook ran bun run postmerge on every contributor's machine after every merge, executing whatever the just-pulled commits put in package.json. There is no way to keep the feature without keeping that auto-executed-code path, so the hook is removed outright: - package.json drops the postmerge script and both hook files (post-merge.sh, build-gui-if-changed.ts) are deleted. - setup-hooks.ts no longer installs hooks at all; it now also retires an already-installed post-merge shim by exact content match, the same way the retired pre-push shim is handled, so existing contributors lose the vector on their next setup run. - CONTRIBUTING.md, the eight localized docs-site contributing pages, and structure/ops/docs-and-release.md describe the retirement and point at bun run build:gui for a manual dashboard rebuild. - The setup-hooks test covers shim retirement for both line endings, custom-hook preservation, and no-hook fresh installs. * test(hooks): cover retiring a stale post-merge from a shared hooksPath The configured-hooksPath case only placed a stale pre-push. A post-merge shim copied into a shared directory keeps executing pulled code in every repo that resolves it, so the test now installs one and asserts setup removes it. * fix(hooks): process both managed hooks when one removal fails A failed read or unlink of pre-push aborted the script before the post-merge retirement ran, leaving the shim that executes pulled code in place. Each retirement now warns and continues. * fix(hooks): exit nonzero after attempting every managed hook removal * docs(contributing): note the manual GUI rebuild after merges * fix(hooks): bound hook-retirement diagnostics and gate the POSIX failure test --------- Co-authored-by: luvs01 <[email protected]>
* fix(openai-chat): suppress raw freeform MiMo call echoes * openai-chat: guard raw tool echo matching * fix(openai-chat): match JSON freeform echoes safely * fix(openai-chat): use declared identity for echo matching * docs: explain MiMo tool-call echo visibility --------- Co-authored-by: Vadevious <[email protected]>
… quantifiers (#5774) * fix(exec): rewrite empty-output wrapper regex without repartitionable quantifiers Adjacent \n+/\s* quantifiers in EMPTY_EXEC_OUTPUT_REGEX could repartition a newline block combinatorially — 'Script completed\n' + 200k newlines + '!' takes ~34s to reject on the old pattern. Each wildcard run is now pinned to its maximal match via the lookahead-capture idiom; acceptance is unchanged (25 tests incl. section combinations and a pathological whitespace case pass, mutation-checked against the old pattern). Co-Authored-By: Epinephrine <[email protected]> * test(adapters): pin trimmed empty-output path and reject-input timing --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: luvs01 <[email protected]>
…tion (#5775) * fix(providers): compare rename-migration endpoints with URL normalization Co-Authored-By: Epinephrine <[email protected]> * test(providers): pin default-port normalization in rename migration --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: luvs01 <[email protected]>
* fix(ollama): bound pending native tool calls * test(ollama): lower budget cap so name charges alone overflow * fix(ollama): charge tool-name metadata to shared budget, not per-call allowance --------- Co-authored-by: luvs01 <[email protected]>
…#5762) * fix(responses): resolve a closed wrapper from the scan's member table Once an object closed, every later whitespace-only prefix held forever, so a non-wrapper body's trailing whitespace never reached the client while completion kept it — and a close plus whitespace arriving in one chunk previewed nothing at all. Parsing the growing buffer on each whitespace delta was also provider-controlled quadratic work. The scan already walks every member, so record each top-level member's name and string-valuedness (last occurrence winning, JSON.parse's own duplicate rule) and consult the table once at the close: exactly one string fallback field is the wrapper's value, anything else streams the raw text byte-exact through its trailing whitespace. progressiveFreeform Input never calls JSON.parse on the accumulated buffer anymore — the classification is entirely the scan's own bounded work — and the 'parse' flag on hold is gone with it. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(responses): reject a closing brace after a top-level comma A comma promises another member, so the scan must require a member name rather than accepting a closing brace as the object close. A trailing comma is not a completed object: JSON.parse rejects it and completion hands the text back unchanged, while the member table would have unwrapped the preview. Require the next non-whitespace character after a top-level comma to open a member name, matching the nested-member rule, and cover the case in the fallback-keys test. --------- Co-authored-by: luvs01 <[email protected]> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(anthropic): bound retained image position keys * fix(anthropic): order image-key cache clearing and bound position memory lifetime * fix(anthropic): keep invalid media types distinct and snapshot emitted positions --------- Co-authored-by: luvs01 <[email protected]> Co-authored-by: luvs01 <[email protected]>
Remote Link stack layer, squash-merged into dev at the maintainer's request so the stack can be reviewed on dev. Exact-head CI at 8c41cec: all 23 checks passed.\n\nPlan and audits: devlog/_plan/260925_remote_home_child_link/.
Remote Link stack layer, squash-merged into dev at the maintainer's request so the stack can be reviewed on dev. Exact-head CI at 093e1aa (before the restack onto dev): all 23 checks passed. Restacked onto dev after the parent squash with an identical diff.\n\nPlan and audits: devlog/_plan/260925_remote_home_child_link/.
Remote Link stack layer, squash-merged into dev at the maintainer's request so the stack can be reviewed on dev. Exact-head CI at 767dcda (before the restack onto dev): all 23 checks passed. Restacked onto dev after the parent squash with an identical diff.\n\nPlan and audits: devlog/_plan/260925_remote_home_child_link/.
…5803) Remote Link stack layer, squash-merged into dev at the maintainer's request so the stack can be reviewed on dev. Exact-head CI at a0a5a24 (before the restack onto dev): all 23 checks passed. Restacked onto dev after the parent squash with an identical diff. Security review of the link routes is still owed after merge.\n\nPlan and audits: devlog/_plan/260925_remote_home_child_link/.
Remote Link stack layer, squash-merged into dev at the maintainer's request so the stack can be reviewed on dev. Exact-head CI at 2b47b70 (before the restack onto dev): all 23 checks passed. Restacked onto dev after the parent squash with an identical diff.\n\nPlan and audits: devlog/_plan/260925_remote_home_child_link/.
Co-authored-by: Ingwannu <[email protected]>
Remote Link stack layer, squash-merged into dev at the maintainer's request so the stack can be reviewed on dev. Exact-head CI at 30ff19b: all 24 checks passed. Two GUI commits followed without a fresh CI run at the maintainer's request (CI backlog): the sheet opens centered on desktop, and the SSH alias field uses the shared .input and .field-label styles. Before the merge, the restacked head was checked locally on top of dev: tsc, structure:check, 285 link and gate tests, 41 Remote Link GUI tests, and lint:i18n all passed. Security review of the SSH join, key handling, and the revoke change is still owed after merge.\n\nPlan and audits: devlog/_plan/260925_remote_home_child_link/.
…5802) * fix(catalog): stop routed rows inheriting the template's comp_hash Routed rows are cloned from whichever native row a rebuild picks as the template, and they kept its comp_hash. The template can change between rebuilds that touch nothing routed, and Codex compacts a thread whenever the comp_hash of consecutive turns differs, so every active routed thread compacted on its next turn. The clone now drops comp_hash beside the context window, and normalization gives the row the "opencodex" marker. Codex-forward capability aliases and account-bound native rows keep the native value. Closes #5796 * fix(catalog): reset comp_hash on routed rows kept from disk A provider whose discovery is degraded keeps its routed rows from the catalog on disk. Those rows skip deriveEntry, so one written before the previous commit could still carry a template's comp_hash until the provider recovered. The merge now sets "opencodex" on the opencodex rows it keeps. Custom rows, Codex-forward aliases included, are rebuilt from config and never reach that pass, and rows written by other tools keep their own value.
…5822) Moves the freeform-tool lookup #5804 added out of openai-chat.ts so the adapter is back at its 822-line cap and dev's file-size ratchet passes. No behavior change. Squash-merged without waiting for PR CI at the maintainer's request; locally: file-size ratchet plus 29 openai-chat/chat-compat/MiMo test files (462 pass), tsc, structure:check, privacy:scan.
…only outside quotes) (#5787) * fix(omp): allow quoted hashes in managed YAML * fix(integrations): only open YAML quote mode where a scalar may begin Co-Authored-By: Epinephrine <[email protected]> * fix(integrations): carry YAML scalar state across lines in the owned-range comment scan Co-Authored-By: Epinephrine <[email protected]> * fix(integrations): reset scalar state per sequence item and keep separator blanks - A '- ' indicator opens a new node: carrying scalarStarted across it made a ' #' inside a later quoted item read as a comment and refuse the patch - A blank after a plain scalar folds only when deeper content follows; a shallower next line means the blank is a separator and stays outside the leaf range instead of being deleted on refresh/remove Co-Authored-By: Epinephrine <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…est sandbox (#5830) Keeps a developer's live OpenCodex credentials (OPENCODEX_API_AUTH_TOKEN, OPENCODEX_ADMIN_AUTH_TOKEN, OCX_API_TOKEN_FILE) out of the test sandbox, and skips POSIX mode-bit checks on Windows in two link tests. Found by running the CI Windows leg sequentially on a Windows 11 machine with OpenCodex installed; every file that failed there passes on this branch with the token still set, and a clean rerun passed shards 1-4 (12,739 tests). Squash-merged without waiting for PR CI at the maintainer's request.
…#4779, #3661) (#5825) * test(providers): add failing regression coverage for DeepSeek reasoning replay (#5421) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(providers): backfill reasoning_text for DeepSeek plaintext replay and preserve reasoning on v4-pro (#5421) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(responses): cover periodic orphan spill sweep before it exists Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(responses): reclaim orphaned spill files on the liveness tick The only orphan GC pass ran once inside ensureLoaded(), so orphans created while the process kept running — crash leftovers, failed best-effort unlinks, stubs the snapshot budget cut — survived until the next restart. sweepOrphanedResponseSpills now rides the responses-continuation liveness tick alongside the abandoned-temp sweep. Its referenced set covers live spill stubs, pendingSpillUnlinks, and every queued/in-flight publication name from the spill queue, and it runs under tighter periodic bounds (scan 512 / cleanup 64 / 25 ms deadline) since the tick is synchronous on the serving event loop. It is a no-op before the lazy load runs. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(responses): hoist in-flight destination name out of try scope Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs(structure): periodic liveness-tick orphan spill reclaim in codex-home Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(google): cover the call-turn-opens-request 400 shape (#5008) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(google): prepend a user nudge when a request opens on a functionCall turn (#5008) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(google): update adjacency expectations for the opening-turn nudge (#5008) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(responses): cover dry-run spill directory inspection Regression coverage for a read-only inspector over responses-state-spill: totals vs store-owned vs orphan candidates past the orphan grace, report/ reclaim agreement, scan-cap truncation, and the snapshot-ownership path a separate doctor process relies on. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * feat(responses): add dry-run spill directory inspection Operators cannot tell owned spill bytes from orphaned ones on disk. inspectResponseSpillDir walks responses-state-spill with the same name/ stat orphan predicate as recoverOrphanedResponseSpills — extracted into shared helpers so the report and the unlink cannot disagree — and counts totals, store-owned files, and orphan candidates past the grace window without ever unlinking. inspectResponseSpillStorage supplies the referenced set as the union of live spill stubs, pending unlinks, and names the persisted snapshot still references, so a separate doctor process sees the same ownership a restart would. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * feat(cli): surface spill storage in doctor and /api/system/memory ocx doctor gains a "Response-state spill files" section via formatResponseSpillLines: totals on disk, bytes still owned by the store or persisted snapshot, and orphan candidates past the grace window — report only, never unlink. /api/system/memory gains a scalar-only responseSpill sibling of the pinned responseState block with the same counts. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs(troubleshooting): document response-state spill files Explain what responses-state-spill/ holds, its three bounds (1 GiB payloads, 1000 entries, 24h TTL), why a restart re-owns every referenced file, and that the orphan reclaim handles unreferenced leftovers — so operators should not delete spill files by hand. Points at the new "Response-state spill files" section in ocx doctor and the responseSpill block on /api/system/memory for the owned-vs-orphan split. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(responses): share one owned-spill reference set between reclaim and doctor (#5369) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(responses): cover send-to-first-response-event timing on the WS stage record (#4191) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * feat(responses): measure send-to-first non-control Responses event in the WS stage record (#4191) The stage record could already tell a silent socket from one that carried only quota control frames, but send->first-frame is measured on ANY inbound frame: a peer that answers quota metadata then stalls on the turn itself reads identically to one that answered and started immediately. The reporter's remaining unmeasured axis is the wait for the first real Responses event (response.created and friends). firstResponseMs is stamped on the first non-control response.*/error frame the relay observes, feeds the failure message suffix and the durable stage record, and survives the usage-log drop-guard like its sibling durations. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(usage): legacy ws stage records without firstResponseMs still hydrate (#4191) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(usage): read ws stage records predating firstResponseMs as unmeasured (#4191) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(responses): pin Windows spill ACL timeout-memo recovery (#3522) Cover the consumed stable-directory timeout memo: after the re-arm window the spill queue's caller-owned retry must get one bounded recovery attempt, and a still-stalled runner must get at most one bounded probe per window instead of instant refusals forever. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(windows-secret-acl): re-arm consumed ACL timeout memo after a quiet window (#3522) Once the spill directory's "required:<dir>" timeout memo was consumed, retryTimedOutOnce callers were refused forever: the memo only clears on a successful harden, which the refusal makes unreachable. On Windows a single stalled icacls then bricked every continuation spill write for the life of the process -- successes froze, write failures accumulated, and readiness stayed healthy (2.39.0 incident signature). A consumed memo now re-arms after TIMEOUT_MEMO_REARM_MS (5min) of quiet -- strictly above the per-harden deadline cap so a stalled run produces at most one bounded probe per window, and only for callers carrying retryTimedOutOnce. Flagless callers keep the instant refusal; a successful harden still deletes the memo outright. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(service): pin the elevated-staging ACL shape for alternate-credential UAC (#4779) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(service): let an alternate-credential elevation read staged scheduler payloads (#4779) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(windows-secret-acl): never treat an owner-only ACL as compliant for the elevated-stage shape (#4779) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(responses): pin bounded transient-retry cases for encrypted task recovery (#3661) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(responses): opt-in bounded retry for encrypted task recovery on transient upstream failures (#3661) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs(responses): document opt-in bounded recovery retries (#3661) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(responses): cover spill stubs dropped when residents fill the snapshot budget Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(responses): select spill stubs and tombstones before residents in the bounded snapshot Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs(structure): note that snapshot stubs and tombstones are selected before residents Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(responses): resume periodic spill sweep past the first scan window (#5369) The liveness-tick sweep restarted at the directory head every tick, so orphans behind the first scanMax owned entries were never reached on a long-lived hub. Carry a resume offset between ticks and reset it after a full pass. Snapshot entry selection moves to state/snapshot-select.ts to keep state.ts under its file-size ratchet cap. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * perf(management): cache the spill report on /api/system/memory (#5369) inspectResponseSpillStorage reads the snapshot and walks the spill directory synchronously; reuse one result per 30 s window instead of rescanning per request. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(windows-acl): skip the owner-only compliance shortcut for read-ACE shapes on the async path (#4779) Mirrors the synchronous hardenEntry guard so an async caller of the elevated staging shape cannot accept an owner-only ACL as already compliant. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(responses): keep the periodic spill sweep's directory iterator open across ticks (#5369) The offset cursor re-skipped from a fresh opendir each tick, and that skip spent the 25 ms deadline, so a slow enumeration left scanned=0 and pinned the cursor at the same prefix forever. Hold the real iterator instead, never read a name the tick will not process, and drop it at EOF, on an iteration error, or when the spill directory changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(doctor): do not report a truncated spill scan as clean (#5369) Zero orphans in the first RESPONSE_SPILL_SCAN_MAX entries says nothing about the unscanned tail; warn instead of printing the ok line and swallowing the truncation notice. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(agent-task-recovery): honour Retry-After as a floor within the recovery deadline (#3661) The retry helper clamped Retry-After to the 2 s backoff cap, so a Retry-After: 30 resent after 2 s. Pass retryAfterIsLowerBound and end with the current failure when the required wait would outlive the shared recovery deadline. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: jun <[email protected]> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: JUN <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Add an optional, credential-only TypeSafe JEV provider and a `jev` Combo strategy that picks the first eligible target and reasoning effort for an opt-in Combo, with per-target effort allowlists, a JEV Stats tab, and fail-open to ordinary Combo fallback. Direct models, the picker, and every other strategy are unchanged. Maintainer integration: merged current dev (19 conflicts, both sides kept), applied cooldownWaitPolicy "before-last-resort" to JEV choices, fixed gate failures (retired screenshot dir, structure doc budget, README locale sync, preset counts), and documented per-request cache trade-offs and TypeSafe retention terms. Closes #5626 Co-authored-by: JUN <[email protected]>
…5847) * fix(protocols): relay heartbeat keepalives from the direct encoders #5806 made the Chat converter answer typed heartbeats with an SSE comment; the direct Chat encoder still only ensured the role frame, so direct and bridged streams diverged. Keepalives also stop counting as relayed events, matching the bridge's uncounted heartbeat. Parity tests now compare comment-only blocks and cover heartbeats on both wires. * docs(structure): note direct-encoder heartbeat keepalives Record that direct encoders deliver the converters' keepalive frames without counting them.
…#5006) * feat(cli): accept an account alias and "auto" in the Codex pool verbs `ocx account alias` could name a pool account but nothing else could use the name: `use`, `priority`, `pause`, `resume`, `clear-cooldown`, `remove` and `alias` all wanted the generated `chatgpt-<digits>` id. And the CLI had no way to clear a manual selection, although the route accepts `{ accountId: null }`; the only way back to automatic placement was the dashboard. A small `account-target` module resolves the argument against the pool list: an id as given, `main` as before, otherwise the alias set by the operator. An exact alias wins, a case-insensitive one is taken when it names exactly one account, and two accounts sharing a name is an error rather than a guess. `use <provider> auto` sends the null pin and says so instead of printing the "auto-switch may override this pin" caveat about a pin that no longer exists. `priority` and `remove` keep the wording their existing tests assert for an unknown id. The two suites that mock the proxy with one answer for every path now serve the account list, and the pause tests find the write by path rather than assuming it is the first call. Docs: the `use` section and help block in all eight locales. * fix(cli): preserve account alias compatibility
* perf: make fragmented stream work linear * fix: normalize split surrogate byte accounting * docs(usage): state retained-window refresh cost --------- Co-authored-by: Ingwannu <[email protected]> Co-authored-by: JUN <[email protected]>
* fix: release bounded response resources * docs: assign bounded response ADR sequence * fix: align stream read result typing * fix: derive bounded reader result type --------- Co-authored-by: Ingwannu <[email protected]> Co-authored-by: JUN <[email protected]>
#5826) * fix(claude): mark native Claude tiers 1M without an anthropic provider Claude Code accounts a gateway model id without [1m] at 200k. ocx claude only added the marker when a configured anthropic provider row supplied the window, so --model sonnet, opus and fable ran at 200k on installs that reach Claude through the Claude Code login alone. The registry's 1M windows for native Claude ids now fill the window map when no configured anthropic row speaks for the id, locally and on a connected client. An unset Opus, Sonnet or Fable slot gets the native id Claude Code resolves that alias to, marked [1m]. Configured tiers and exported variables still win, and Haiku is never filled or marked. Closes #5755 * fix(claude): fill native Claude windows only on the passthrough A bare Claude id goes straight to Anthropic only on a local subscription launch with nativePassthrough on. The router is never consulted there, so the registry window now takes the bare id ahead of any routed row that shares it. Under proxy auth, with passthrough off and on a connected client, which authenticates to its hub with an admission token, the router decides and the map stays as it was. A modelMap entry routes its id elsewhere, so that id is skipped too. * fix(claude): leave system env tier slots empty System env reaches every Claude client on the machine, including an ocx claude launch that goes through a hub, where the router decides. The native tier fill now reaches only GET /api/claude-code, which the local launch reads, and system env and the shell file leave unset tier slots empty as before. --------- Co-authored-by: JUN <[email protected]>
* fix: make management mutations durable * fix(config): preserve published provider state --------- Co-authored-by: Ingwannu <[email protected]> Co-authored-by: JUN <[email protected]>
* fix(claude-intercept): authenticate local proxy clients * fix(claude-intercept): migrate owned legacy proxy envs and harden token handling - migrate an owned legacy unauthenticated HTTPS_PROXY env on intercept startup so service-style restarts do not strand Claude Code on 407s - keep status/inspection routes read-only: readClaudeInterceptProxyToken never mints; only apply and runtime startup create the token - publish the proxy token via an atomic no-replace link so concurrent creators converge on the single committed value - update first-party tests, docs guides (en/fr/ja/ko) and structure notes Co-Authored-By: Epinephrine <[email protected]> * fix(claude-intercept): harden token ACLs on Windows and degrade unreadable reads - read collapses every failure to null so status routes classify a broken token file as stale instead of erroring the request - ensure re-pins an existing token owner-only before trusting it, and publication now goes through the repo's icacls hardener on Windows - settings.json writes use the hardened atomic writer so the embedded credential gets a real per-user ACL off POSIX Co-Authored-By: Epinephrine <[email protected]> * test(claude-intercept): authenticate dev test clients against the local proxy * fix(claude-intercept): keep picker egress unauthenticated and resolve rollback env lazily The picker CONNECT proxy serves Desktop's egressProxyUrl, which cannot present proxy credentials, so it stays an unauthenticated loopback relay until the profile format can carry one; ConnectProxyOptions.authToken is optional again for that listener only. captureClaudeInterceptSettingsRollback now resolves the expected env at rollback time: the apply mints the proxy token, so capturing it eagerly both minted on paths that never apply and threw EEXIST when the claude-intercept directory was unavailable — surfacing as a 500 instead of the ca_unavailable the apply reports. applyDesktopFirstParty also builds its target inside the CA try so a token-mint failure maps to the same reason. * fix(claude-intercept): byte-compare the proxy credential and repair test encoding - proxyAuthorized compared string lengths before timingSafeEqual, but the head decodes latin1 while Buffer.from re-encodes utf-8: a non-ASCII header could match in characters and differ in bytes, making timingSafeEqual throw out of the connection handler. Compare byte lengths instead. - The first-party test file carried a UTF-8 BOM, two em dashes mangled to ??, and two over-indented helpers from the port. Rewritten as plain UTF-8 with the original punctuation and indentation. - A failed settings migration is now logged instead of swallowed, so an upgraded client that keeps getting 407 leaves a cause. - The Korean guide now documents the per-install proxy token, matching the English guide. * docs(claude-intercept): document the proxy token in the fr and ja guides The commit message already claimed the fr/ja guides were updated; only the English page actually described the per-install token. Both pages now explain the authenticated proxy URL and the owner-only token file, matching the English and Korean guides. * fix(claude): validate bounded no-follow proxy credentials before use * fix(claude): keep live CONNECT authority aligned with persisted token * fix(claude): challenge proxy authentication and preserve publication outcomes --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: luvs01 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: JUN <[email protected]>
* web-search: run the sidecar loop for runTurn adapters Upstream only drives the web-search sidecar over the buildRequest/fetch/parseStream transport, so adapters that own their turn loop (devin, cursor, qoder, codebuddy) silently drop Codex's hosted web_search declaration — the model answers "no web search capability". Add src/web-search/run-turn-loop.ts, replaying the same interception contract over the runTurn event stream: inject the synthetic web_search function tool, intercept its calls, execute through the configured sidecar backend, append assistant toolCall + toolResult to the OcxMessage history, and re-dispatch runTurn. Wired via small edits to request-sidecar-auth (resolve the OpenAI helper credential for runTurn turns too) and run-turn-execution (hook both streaming and buffered paths). Notable details: iteration-local turnParsed mirrors route-binding fields back and forth with parsed (clones would lose cursor conversation state); visible text before a tool call is folded into replayed history; aborts close any open search cell; a silent forced-answer gets one tool-free recovery pass; the empty-completion guard is bypassed while the search loop owns the turn (its raw retry would lose the synthetic tool). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(web-search): harden runTurn search lifecycle and buffering * fix(web-search): preserve dev combo preflight protections * fix(web-search): release probe lease, bound empty retry, rotate on post-search 429 * fix(web-search): guard stale route-state copy-back and release probe lease on pacing failure - release the OpenAI sidecar probe lease when the initial admission wait fails, matching every other pre-response exit - skip route-state copy-back from runTurn attempts superseded by a 429 preflight rotation so the failed account's cursor/continuation cannot overwrite the rotation's rebind - add a streaming regression test that lands the superseded attempt's copy-back inside the replay's copy-in window - drop the unsupported saveCredential addAccount option in the fixture setup - document that post-search answer requests rotate on a first-event OAuth 429 too * test(images): update runTurn dual-tool priority for web-search support The dispatch-priority test asserted the pre-change contract that the image bridge wins on runTurn adapters because the search loop could not drive them. With runTurn search support, search now keeps priority there too: the image bridge stays deferred and the turn dispatches through runTurn. * test(web-search): expect the planned search helper on runTurn routes PR #5754 makes runTurn adapters plan the OpenAI web-search helper, so the bearer-admission test that treated "search-runTurn" as "no planned helper" was stale. Remove that scenario from the switchable list and add a focused regression that mirrors the existing vision-auth harness: while the Cursor upstream is held, the primary wire still carries only the caller Cursor bearer, the stored main auth never reaches it, native-main profile request count is 1 because the helper credential is claimed, and the count returns to 0 after the upstream settles. --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: JUN <[email protected]>
* fix(settings): report observed external Codex ownership on reads GET /api/settings and switch-free PUTs passed reason "not_requested", so describeCodexDesktopSwitches reported boolean effective state and an OpenCodex-derived sign-in requirement even while an external model_provider owned config.toml. observedCodexDesktopSwitchApply now consults the same currentExternalCodexModelProvider predicate the injector uses, so read reports describe observed ownership (effective: null, external_provider, external auth source) instead of re-deriving it only from a completed apply. Documents the reporting contract in structure/config.md and the public guide. Co-Authored-By: Epinephrine <[email protected]> * fix(settings): keep settings reads alive on config.toml ownership-read failures currentExternalCodexModelProvider throws when config.toml exists but cannot be read (permissions, or deletion racing existsSync), which broke every settings GET and unrelated PUT. observedCodexDesktopSwitchApply now reports not_requested/retryable instead, matching how it treats undetermined ownership. Co-Authored-By: Epinephrine <[email protected]> * fix(settings): report external ownership for gated applies and drop sync advice applyCodexConfigInjection's integration and runtime gates returned before the injector could classify external config.toml ownership, so a switch PUT disagreed with the settings GET. The gates now consult the same ownership predicate and report external_provider. The sidecar CLI also stops advising 'ocx sync' on that outcome — a sync re-runs the injection the external provider owns. Co-Authored-By: Epinephrine <[email protected]> * fix(settings): carry external-ownership reporting through the renamed apply path Adapted to dev: applyCodexDesktopSwitches is now applyCodexConfigInjection and desktopSwitchApplyReason lives in runtime-api. The CLI reports external ownership instead of advising ocx sync, and injectCodexConfig marks preserved external config with configApplied:false. * test(settings): share the isolated-subprocess settings harness * test(settings): include child status and error in isolated request failure * fix(settings): withhold effective state when Codex ownership is undetermined * docs(codex): point ownership report readers at the JSON settings output * docs(config): restore structure line-budget compliance Replace the desktop-switch historical preamble with its current contract and remove surplus blank lines. Keep headings, links, examples, and ownership semantics unchanged while reducing config.md from 603 to 598 lines. Fixes the shared cause of structure gate and test 3/4 failures on PR #5776. The 600-line limit, grace entries, and tests are unchanged. * docs(guide): fix malformed sentence in external-ownership note * fix(settings): retain unknown ownership after injection failures * fix(cli): describe all ownership read errors in recovery guidance * docs(structure): keep config.md within its line budget Merging current dev put structure/config.md at 601 lines against the 600-line budget. Tighten the two paragraphs this PR added without changing what they state. --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: luvs01 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: JUN <[email protected]>
* fix(cursor): bound foreground shell lifetime * fix(cursor): default foreground timeout * docs: register cursor shell ownership decision * fix(cursor): fail closed without shell containment * fix(cursor): keep the default bridge redirect without a catalog hint The fail-closed foreground refusal fell back to a bare 'Use the client shell tool instead.' when no catalog hint was supplied, dropping the shell_command/exec_command naming and retry guidance the other native refusals carry (#604). Pass the default bridge wording after the reason. Live transport always supplies a hint, so this only affects direct callers; covered by the synchronous shellArgs test. --------- Co-authored-by: Ingwannu <[email protected]> Co-authored-by: JUN <[email protected]>
* fix(uninstall): remove only recorded catalog backups * fix(uninstall): record pre-existing hashed catalog backups in the ledger writePristineCatalogBackup and publishHashedCodexCatalogBackup returned early when the backup file already existed, so a backup written by a run that predates the ownership ledger was never recorded and uninstall could not remove it. Adopt the existing file into the ledger on the early-return/preserved path too. * fix(uninstall): never adopt preserved catalog backups Do not record an existing pristine backup or a preserved no-replace publication as newly owned. Keep previously recorded ownership intact, and preserve unrecorded matching regular files and directories through uninstall. Document conservative handling of pre-ledger hashed backups without migrating existing fixed-name manifest entries. Replace the unsafe adoption expectations and add successful-creation, identical-content preservation, failed-write and repeated-owned-write regressions in the two existing test files. Validation: native Bun 1.4.0 ran 34 tests with no failures on Linux, macOS and Windows. Restoring the two old writers made all four targeted regular-file preservation regressions fail as expected. Typecheck and privacy scan passed. The only subsequent edits were to two structure documents; structure and privacy checks passed on this exact final tree. Code validation: luvs01/opencodex/actions/runs/36093023282 Final documentation validation: luvs01/opencodex/actions/runs/36093222830 Full repository and required PR CI remain separate. Isolated validation workflow files and commits are not included in this commit's ancestry. * fix(uninstall): record created backups before temporary cleanup * docs(structure): keep config.md and catalog.md within their line budgets With current dev merged in, structure/config.md reached 603 and structure/catalog.md 603 lines against the 600-line budget. Fold the config.md pointer into the existing residual sentence and tighten the catalog.md paragraph; every stated rule is kept. * docs(structure): qualify catalog backup ownership recording recordOwnedConfigPath returns false for a non-empty root with missing or invalid ownership metadata, and the writers ignore that result, so publication attempts registration rather than guaranteeing it. State the residual outcome. --------- Co-authored-by: luvs01 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: JUN <[email protected]>
* fix(combos): retry single targets only after cooldown * fix(combos): gate single-target retry on this failure's cooldown scope A concurrent request can cool the shared target while this request's own failure recorded no cooldown (scope "none"), so isComboTargetInCooldown alone was enough to arm the exclusion-free retry and replay a refused request. Require a cooldown-producing scope alongside the shared-state check, and cover the interleaving with a synchronized two-request test. Co-Authored-By: Epinephrine <[email protected]> * docs(combos): cover the single-target post-cooldown retry * docs(combos): translate the single-target retry exception * docs(server): align single-target cooldown retry comment with behavior * docs(server): shorten cooldown retry comment to stay under size ratchet * test(server): raise combo-failover e2e size cap for the new refusal tests * fix(combos): require this failure to record the retried cooldown * test(combos): explicitly admit the isolated loopback fixture * test(combos): move single-target cooldown cases to the recording suite PR #5778 added two single-target cooldown/recording tests to server-combo-failover-e2e.test.ts, pushing it past its file-size cap. Move them byte-for-byte into the already-registered server-combo-cooldown-recording.test.ts and restore the cap to the origin/dev value (4166) without raising it. * test(combos): explain the tolerated cancel failure in cleanup The moved helper carried an empty catch, which the PR hygiene gate rejects. The cleanup deliberately tolerates cancel on an already drained turn; say so. * test(combos): drop the duplicated helper block in the recording suite The move in b06f589 copied serve, baseUrl, comboConfig and post twice; the second, identical declarations silently replaced the first. Keep one copy. --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: luvs01 <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: JUN <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedToo many files! This PR contains 616 files, which is 316 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (616)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Summary
Promote the verified 2.66.0 tree to
main. The branch starts at the candidate and mergesorigin/mainwith theoursstrategy, so the promoted tree is byte-identical to the candidate, which already carries 2.66.0 in all four version sources.Verification
dev82cb66e82da2f4bbcd094086ad2970d19c1612cd. Cross-platform CI lane=all run 36142367892 (workflow_dispatch, attempt 1) finished with every jobsuccessat that SHA; onlyprivacy gatewas skipped, by design onworkflow_dispatch.git diff --stat 82cb66e82d HEADis empty.bun scripts/release-version-sources.ts check 2.66.0: 4 version sources carry 2.66.0.release.ymlon push-event Cross-platform CI and Service lifecycle at the merge SHA.Checklist