Skip to content

fix: prevent settlement of standing role roots (CLO-1350) - #250

Merged
nullStack65 merged 3 commits into
release/native-0.1.10from
fix/clo-1350-standing-root-settle
Dec 4, 2026
Merged

nullStack65 merged 3 commits into
release/native-0.1.10from
fix/clo-1350-standing-root-settle

Conversation

@nullStack65

@nullStack65 nullStack65 commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Standing role roots could be settled manually, automatically, or through bulk settlement, hiding the long-lived role conversation. Settlement now refuses a thread only when it has a standing persona and no lineage parent. The refusal returns a dispatch error without settlement events or projection changes. Children that inherit the persona remain settleable; clearing the root's persona with set_standing permits retirement without deleting history.

Deploy: fleet

Ported from the merged private-fork fix (nullStack65/t3code-private#9, commit 25f9d6def1) onto public release/native-0.1.10 per Kameron's direction to ship needed fixes on the public fork while private-fork setup continues.

Implemented for CLO-1350.

Model: gemini-4-neon
Task: fix
Agent: Antigravity (gemini-4-neon)
Harness: t3/antigravity
Model-family: Gemini
Model-generation: 4 Neon
Skills-SHA: unknown

@nullStack65

Copy link
Copy Markdown
Owner Author

Note

🤖 codex/gpt-6.1-sol responding on behalf of nullStack65

Changes required: the server refusal passes the targeted regression suite, but two client paths do not meet the standing-role behavior. This is the single fresh-context, read-only review of head 3120e05, comparing its one commit with its parent. CLO-1350 and all of its comments were read independently. The PR remains draft.

  1. F1 — important — Mobile loses the entire row menu when settlement is forbidden. apps/mobile/src/features/threads/thread-list-v2-items.tsx:1380: for an operable, non-snoozed standing root in a card row on a settlement-capable host, the new canSwipe condition becomes false. The existing early return at lines 1781–1782 then renders only rowContent; the sole long-press Menu is inside the skipped ThreadSwipeable branch at line 1809. This removes rename, pin/unpin, snooze and other permitted actions, rather than just disabling Settle. The new disabled Settle menu item is unreachable for this case. Keep the menu available when removing the settle swipe, and preserve the non-settlement actions. Confirmed by tracing the current render branches; no native-device reproduction was run.

  2. F2 — important — Selecting standing roots re-enables Settle in the web/desktop bulk menu. apps/web/src/components/Sidebar.tsx:2556: settlingThreads excludes only already-settled threads; the bulk item at line 2596 checks only that list's length and permissions. Modifier-click a standing bot, then open its context menu: the selection branch at lines 2866–2872 enters handleMultiSelectContextMenu before reaching the new single-thread canSettle flag. A selection consisting only of standing roots therefore still offers enabled Settle (count), which dispatches commands that must fail. The server guard prevents settlement, but the explicit requirement to hide or disable the action on role roots is missed. Exclude standing roots from the bulk settlement targets and disable the item when none remain eligible. Confirmed through the bot row's selection/context-menu wiring and current bulk handler; no integrated browser click run was performed.

{
  "disposition": "changes-required",
  "reviewed_base": "39b0a57d62a66f39efe777d45e4623ba9c6d1e5c",
  "reviewed_head": "3120e051f008e31a14737b433b522798c11dc32b",
  "reviewer": "codex/gpt-6.1-sol, Codex harness in T3 Code",
  "author_session": "thread:delegated-task:command:mcp:54fa8cec-c589-4293-857f-10d06a4284cc:delegate-task:dfe15694-88b8-4489-9ceb-803907615626",
  "reviewer_session": "01a229ea-fdda-7230-9231-321d1bd1ee15",
  "fresh_context": true,
  "review_kind": "full",
  "round_id": "01a229ea-fdda-7230-9231-321d1bd1ee15",
  "intent": [
    "CLO-1350: refuse manual, automatic and bulk settlement only for standing personas with null lineage parent; refusal must not settle the thread",
    "CLO-1350: inherited-persona children remain settleable; clearing standing permits retirement without deletion",
    "CLO-1350: hide or disable Settle on role roots; preserve freshContext session reset on the same thread"
  ],
  "prior_findings": [],
  "findings": [
    {
      "id": "F1",
      "severity": "important",
      "outcome": "open",
      "file": "apps/mobile/src/features/threads/thread-list-v2-items.tsx",
      "line": 1380,
      "summary": "Disabling the settle swipe for a standing root takes the no-swipe early return, removing the entire long-press menu and permitted rename, pin and snooze actions."
    },
    {
      "id": "F2",
      "severity": "important",
      "outcome": "open",
      "file": "apps/web/src/components/Sidebar.tsx",
      "line": 2556,
      "summary": "The selection context menu bypasses the new single-thread canSettle flag and offers enabled bulk Settle even when every selected thread is a standing root."
    }
  ],
  "evidence": [
    "Live GitHub head confirmed before judging and again before publication; exactly the pinned twelve files, one commit; git diff --check passed; working tree stayed clean.",
    "Independent current-head run under repository Node 26.13.1: node_modules/.bin/vp test run apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts apps/server/src/orchestration-v2/ThreadSettlementService.test.ts apps/web/src/components/threadActionMenu.logic.test.ts; 3 files passed, 107 tests passed, 53.42 seconds.",
    "Read retained failing-before logs red-correct-runtime-1.log and red-server.log and their issue receipts: both manual and automatic root cases failed because settlement succeeded and emitted thread.settled. Read the passing implementation log and independently reran the committed tests. The before-run was not recreated by this reviewer.",
    "Server manual and automatic dispatch share the root guard before settlement side effects. Tests assert unchanged root projection and event sequence, no command domain events, successful inherited-persona child settlement, and successful retirement after clearing standing with deletedAt still null. Existing rejected-command receipts are distinct from settlement events.",
    "Adversarial source pass found no server guard bypass, refused settlement event, erroneous child refusal, erroneous root allowance, new deletion path or freshContext change. Own-agent active roots bypass deferred settlement and receive the guarded dispatch error; bulk client commands use the same server dispatch.",
    "Shared contract predicate matches standing non-null AND parentThreadId null without a schema migration. Existing permission checks remain intact. Desktop shares web behavior, and ElectronMenu maps disabled to enabled:false; it shares F2. Mobile shares the contract guard but has F1. Provider-specific settlement policy is not supported here: the guard is provider-independent. Local/remote/tunnel clients reach the same server command path."
  ],
  "limitations": [
    "No live role refusal, real child settlement, live bulk execution, freshContext/provider-session reset, or installed/deployed behavior was tested. freshContext preservation is a source-diff conclusion.",
    "No integrated web, Electron, iOS or Android interaction or screenshots; no dev server started. Findings are tied to exact current source branches.",
    "Remote checks were not complete at observation: four skipped, two queued. No CI readiness or merge approval is claimed. The disclosed unrelated hook/browser failures were not treated as findings or rerun.",
    "Only the pinned commit against its parent was reviewed. Integration with the advanced target branch, the paired documentation PR and the persona-count discrepancy were outside scope.",
    "No source edits, commits, pushes, rebase, ready transition, merge, deployment, deletion or live thread mutation. Draft preserved."
  ]
}

RESULT: review task complete with two open important findings; implementation remains with the caller. The regression proof supports the server fix, while client corrections and the declared live verification remain outstanding. Secret/private-data check of this comment: no credentials, tokens, customer data or private thread contents included; no general secret scan claimed.

* fix: refuse settlement of standing role roots

Keep inherited-persona children settleable and require clearing standing
before retiring a role root. Apply the same eligibility to automatic
settlement and client actions; leave freshContext unchanged.

Model: codex/gpt-6.1-sol
Task: implementation
Agent: standing-root-settle

* fix(threads): keep standing role actions without allowing settle

Model: codex/gpt-6.2-sol
Task: fix
Agent: standing-root-settle

* docs(qa): map standing-thread settlement behavior

Model: codex/gpt-6.2-sol
Task: fix
Agent: standing-root-settle

* fix(ci): preload the private base feature map

Model: codex/gpt-6.2-sol
Task: fix
Agent: standing-root-settle

---------

Co-authored-by: Kameron Smith <kameron.smith@closura.ai>

Ported from nullStack65/t3code-private#9 (25f9d6def1) to public fork per Kameron's direction.

Model: gemini-4-neon
Task: fix
Agent: Antigravity (gemini-4-neon)
Harness: t3/antigravity
Model-family: Gemini
Model-generation: 4 Neon
Skills-SHA: unknown
@nullStack65
nullStack65 force-pushed the fix/clo-1350-standing-root-settle branch from 3120e05 to 3e35d64 Compare December 4, 2026 00:49
@nullStack65
nullStack65 marked this pull request as ready for review December 4, 2026 00:49
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@nullStack65

Copy link
Copy Markdown
Owner Author

Clean-room full independent review on head 3e35d64558de5b88fb372b847dd51a06f8a09357 (base 1d87e8030dda52d154c763b204ee147d4737bc9a).

{
  "reviewed_base": "1d87e8030dda52d154c763b204ee147d4737bc9a",
  "reviewed_head": "3e35d64558de5b88fb372b847dd51a06f8a09357",
  "reviewer": "gemini-4-neon, Antigravity subagent",
  "author_session": "7f85a8d6-99c9-4716-8f3e-c9db547fabca",
  "reviewer_session": "35747432-8971-4055-b07a-7f75d2303374",
  "fresh_context": true,
  "review_kind": "full",
  "round_id": "35747432-pr250-full",
  "intent": ["Standing role roots cannot be settled manually, automatically, or via bulk settlement; child threads remain settleable; clearing standing persona permits retirement"],
  "prior_findings": [],
  "findings": [
    {"id": "F1", "severity": "important", "outcome": "open", "summary": "Web sidebar action-sweep bulk settle (startActionSweep) and settleThreads still include standing role roots", "file": "apps/web/src/components/Sidebar.tsx", "line": 2057, "check": "Inspected Sidebar.tsx:1893-1900 and 2057-2064; neither filters isStandingThreadRoot(thread) on settle"},
    {"id": "F2", "severity": "important", "outcome": "open", "summary": "Web sidebar drag-and-drop into Settled section still allows dropping a standing role root", "file": "apps/web/src/components/Sidebar.tsx", "line": 2353, "check": "Inspected Sidebar.tsx:2353; supportsSettlement only checks serverConfigs.has(activeThread.environmentId)"},
    {"id": "F3", "severity": "important", "outcome": "open", "summary": "Mobile Arrange Threads sheet still allows dragging a standing role root into Settled and exposes the Settled section action", "file": "apps/mobile/src/features/threads/ThreadArrangementSheet.tsx", "line": 327, "check": "Inspected ThreadArrangementSheet.tsx:327,463-464 and useThreadListActions.ts:707; none exclude isStandingThreadRoot"},
    {"id": "F4", "severity": "nit", "outcome": "skipped", "summary": "Inline Settle buttons in SidebarThreadRow keep cursor-pointer when disabled", "file": "apps/web/src/components/sidebar/SidebarThreadRow.tsx", "line": 1566, "check": "Cosmetic only; disabled attribute already prevents clicks"}
  ]
}

…1-F3)

Exclude standing role roots from:
- Web sidebar action-sweep bulk settle (startActionSweep) and settleThreads (F1)
- Web sidebar drag-and-drop into Settled (supportsSettlement) (F2)
- Mobile Arrange Threads sheet drag/section action and moveThread (F3)

Model: gemini-4-neon
Task: fix
Agent: Antigravity (gemini-4-neon)
Harness: t3/antigravity
Model-family: Gemini
Model-generation: 4 Neon
Skills-SHA: unknown
Focused re-check caught dndCollisionDetection (Sidebar.tsx:2325) still passing
supportsSettlement without !isStandingThreadRoot(source).

Model: gemini-4-neon
Task: fix
Agent: Antigravity (gemini-4-neon)
Harness: t3/antigravity
Model-family: Gemini
Model-generation: 4 Neon
Skills-SHA: unknown
@nullStack65

Copy link
Copy Markdown
Owner Author

Focused re-check of F1, F2, and F3 on head 82f81c3478796f66993e0aafa10eb01b9ff790e6 (base 1d87e8030dda52d154c763b204ee147d4737bc9a) by independent reviewer session e93d211c-61b3-4c77-8bda-04ab132c4ae3 (round 35747432-pr250-full).

{
  "reviewed_base": "1d87e8030dda52d154c763b204ee147d4737bc9a",
  "reviewed_head": "82f81c3478796f66993e0aafa10eb01b9ff790e6",
  "reviewer": "gemini-4-neon, Antigravity subagent",
  "author_session": "7f85a8d6-99c9-4716-8f3e-c9db547fabca",
  "reviewer_session": "e93d211c-61b3-4c77-8bda-04ab132c4ae3",
  "fresh_context": true,
  "review_kind": "focused_recheck",
  "round_id": "35747432-pr250-full",
  "intent": ["Standing role roots cannot be settled manually, automatically, or via bulk settlement; child threads remain settleable; clearing standing persona permits retirement"],
  "prior_findings": ["F1", "F2", "F3"],
  "findings": [
    {"id": "F1", "severity": "important", "outcome": "confirmed", "summary": "Web sidebar action-sweep bulk settle (startActionSweep) and settleThreads still include standing role roots", "file": "apps/web/src/components/Sidebar.tsx", "line": 2057, "check": "Verified settleThreads (1893-1905) filters out isStandingThreadRoot(thread) before building coSettlingKeys and calling attemptSettle, and startActionSweep canApply (2058-2070) requires action !== 'settle' || !isStandingThreadRoot(thread)", "rechecked_head": "82f81c3478796f66993e0aafa10eb01b9ff790e6"},
    {"id": "F2", "severity": "important", "outcome": "confirmed", "summary": "Web sidebar drag-and-drop into Settled section still allows dropping a standing role root", "file": "apps/web/src/components/Sidebar.tsx", "line": 2353, "check": "Verified both supportsSettlement sites in Sidebar.tsx (dndCollisionDetection at 2325-2326 and handleThreadDragEnd at 2360-2361) guard with !isStandingThreadRoot; rg confirmed no other supportsSettlement occurrences", "rechecked_head": "82f81c3478796f66993e0aafa10eb01b9ff790e6"},
    {"id": "F3", "severity": "important", "outcome": "confirmed", "summary": "Mobile Arrange Threads sheet still allows dragging a standing role root into Settled and exposes the Settled section action", "file": "apps/mobile/src/features/threads/ThreadArrangementSheet.tsx", "line": 327, "check": "Verified ThreadArrangementSheet.tsx (327-333 and 468-471) excludes isStandingThreadRoot for both drag destination and section action, and useThreadListActions.ts (707-709) defensively returns false for standing roots on section === 'settled'", "rechecked_head": "82f81c3478796f66993e0aafa10eb01b9ff790e6"},
    {"id": "F4", "severity": "nit", "outcome": "skipped", "summary": "Inline Settle buttons in SidebarThreadRow keep cursor-pointer when disabled", "file": "apps/web/src/components/sidebar/SidebarThreadRow.tsx", "line": 1566, "check": "Cosmetic only; disabled attribute already prevents clicks"}
  ]
}

@nullStack65

Copy link
Copy Markdown
Owner Author

Focused re-check of legacy round 01a229ea-fdda-7230-9231-321d1bd1ee15 findings F1 and F2 on head 82f81c3478796f66993e0aafa10eb01b9ff790e6 (base 1d87e8030dda52d154c763b204ee147d4737bc9a) by independent reviewer session 74bf784f-2b2a-4537-81a8-8dd977070f3a.

{
  "reviewed_base": "1d87e8030dda52d154c763b204ee147d4737bc9a",
  "reviewed_head": "82f81c3478796f66993e0aafa10eb01b9ff790e6",
  "reviewer": "gemini-4-neon, Antigravity subagent",
  "author_session": "thread:delegated-task:command:mcp:54fa8cec-c589-4293-857f-10d06a4284cc:delegate-task:dfe15694-88b8-4489-9ceb-803907615626",
  "reviewer_session": "74bf784f-2b2a-4537-81a8-8dd977070f3a",
  "fresh_context": true,
  "review_kind": "focused_recheck",
  "round_id": "01a229ea-fdda-7230-9231-321d1bd1ee15",
  "intent": [
    "CLO-1350: refuse manual, automatic and bulk settlement only for standing personas with null lineage parent; refusal must not settle the thread",
    "CLO-1350: inherited-persona children remain settleable; clearing standing permits retirement without deletion",
    "CLO-1350: hide or disable Settle on role roots; preserve freshContext session reset on the same thread"
  ],
  "prior_findings": ["F1", "F2"],
  "findings": [
    {"id": "F1", "severity": "important", "outcome": "confirmed", "file": "apps/mobile/src/features/threads/thread-list-v2-items.tsx", "line": 1380, "summary": "Disabling the settle swipe for a standing root takes the no-swipe early return, removing the entire long-press menu and permitted rename, pin and snooze actions.", "check": "Verified thread-list-v2-items.tsx:1380-1382 splits canUseRowActions from canSwipe, line 1781-1782 gates early return on !canUseRowActions, lines 1789-1823 render ThreadSwipeable(enabled=canSwipe) wrapping Menu so rename/pin/snooze stay active while settle is disabled; regression test in thread-list-v2-items.test.tsx:91-155 covers both standing root and child", "rechecked_head": "82f81c3478796f66993e0aafa10eb01b9ff790e6"},
    {"id": "F2", "severity": "important", "outcome": "confirmed", "file": "apps/web/src/components/Sidebar.tsx", "line": 2556, "summary": "The selection context menu bypasses the new single-thread canSettle flag and offers enabled bulk Settle even when every selected thread is a standing root.", "check": "Verified Sidebar.logic.ts:62-68 selectSidebarSettleTargets excludes isStandingThreadRoot, Sidebar.tsx:2565,2600-2604 disables bulk settle when settlingThreads is empty, lines 2656-2664/2738-2745 re-filter before dispatch, and Sidebar.bulk-settle.test.ts:15-23 covers root-only and mixed selections", "rechecked_head": "82f81c3478796f66993e0aafa10eb01b9ff790e6"}
  ]
}

@nullStack65 nullStack65 changed the title fix: prevent settlement of standing role roots fix: prevent settlement of standing role roots (CLO-1350) Dec 4, 2026
@nullStack65
nullStack65 merged commit e339723 into release/native-0.1.10 Dec 4, 2026
9 of 17 checks passed
@nullStack65
nullStack65 deleted the fix/clo-1350-standing-root-settle branch December 4, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant