Repository navigation
fix(backend): refresh task intelligence desktop owner paths after #12607 - #12788
Merged
Merged
Conversation
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. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_99d2de8c-c338-4656-8f25-4b6be613226a) |
#12607 removed WhatMattersNowSection.swift and DashboardPage.swift; the desktop_manual source still listed those owner paths and stale createTask/deleteTask anchors on DesktopAutomationActivationActions. Register DashboardViewModel goal writers under goal_manual_api so the contract freeze matches the one-chat-shell layout.
undivisible
force-pushed
the
fix/desktop-manual-stale-owner-paths
branch
from
September 5, 2026 12:16
830bc7d to
e4f66fd
Compare
undivisible
added a commit
that referenced
this pull request
Sep 7, 2026
🎯 **What:** The vulnerability fixed was the use of `ast.literal_eval` to parse `state_data_str` when retrieving OAuth state data from Redis.⚠️ **Risk:** While safer than `eval()`, `ast.literal_eval` can still cause a denial-of-service (crashing the process) if provided deeply nested structures. 🛡️ **Solution:** Changed the serialization of `state_data` to use `json.dumps` and deserialization to use `json.loads`. Also updated the mocked `redis` payloads in tests to match the new `json.dumps` format. In-flight pre-migration `str(dict)` payloads (single quotes, 10-minute TTL) are still accepted by mapping them to JSON. Failure-Class: none **Rebase note (2026-09-07):** the branch was rebased onto current `main`; the former head commit `99d2c4cbca` (desktop_manual config sync) was dropped because it was fully superseded by #12788 (`e02d56da68`, same intent + newer dashboard paths). **Verification:** rebased-branch unit tests: `70 passed` (`test_task_integrations_oauth_atomic`, `test_merge_validation`, `test_batch_upload_storage`). --- *PR created automatically by Jules for task [5719183998940294315](https://jules.google.com/task/5719183998940294315) started by @undivisible* <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches OAuth CSRF state parsing on the task-integrations callback path; behavior change is mostly format-safe with a brittle legacy fallback, so mis-parsed state could reject valid in-flight logins briefly. > > **Overview** > Task integration OAuth CSRF state in Redis is now written with **`json.dumps`** and read with **`json.loads`**, replacing **`str(dict)`** plus **`ast.literal_eval`**. That removes a DoS class from maliciously nested literal structures while keeping the existing atomic **`GETDEL`** consume path. > > **`validate_and_consume_oauth_state`** also rejects non-dict payloads and, for a short migration window, still accepts legacy single-quote **`str(dict)`** values by normalizing quotes before **`json.loads`** (no **`ast`**). > > Unit tests were updated: OAuth atomic tests use JSON fixtures; merge/batch upload import stubs set **`PROJECTION_FAMILY_FIELDS`** on the mocked **`models.client_processing`** module. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f767a71. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> ## Product invariants affected - INV-TASK-2
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
desktop_manualowner paths for files removed in One chat shell: every content block renders everywhere, plus chat ergonomics (#12598) #12607 (WhatMattersNowSection.swift,DashboardPage.swift).client.createTask/client.deleteTaskwriter anchors onDesktopAutomationActivationActions.swift.DashboardViewModelgoal writers undergoal_manual_apiso discovered anchors stay owned.Unblocks Backend unit suite red on main (
test_task_intelligence_contract_freezemissing-owner-path).Product invariants affected
Test plan
BACKEND_UNIT_TEST_FILE_LIST=… bash test.shfortests/unit/test_task_intelligence_contract_freeze.py— 29 passed locallyFailure-Class: none
Note
Low Risk
Config-only changes to task intelligence ownership metadata; no runtime task or goal logic is modified.
Overview
Updates
task_intelligence_sources_v1.jsonso the task-intelligence contract freeze matches the current desktop codebase after #12607.For
desktop_manual, it removes owner paths for deleted dashboard files (WhatMattersNowSection.swift,DashboardPage.swift) and drops discovered writer anchors onDesktopAutomationActivationActions.swiftforclient.createTask/client.deleteTaskthat no longer belong there.For
goal_manual_api, it addsDashboardViewModel.swiftas an owner and registers itsclient.createGoal,deleteGoal,updateGoal, andupdateGoalProgresswriters so goal mutations from the dashboard stay covered by the manifest.The rest of the diff is JSON formatting (multi-line
writer_anchors/owner_paths); behavior of those entries is unchanged aside from the edits above. This unblockstest_task_intelligence_contract_freezefailures for missing owner paths and unowned writers on main.Reviewed by Cursor Bugbot for commit 830bc7d. Configure here.