Skip to content

fix(chat): refuse /note before sending to a server without humanNote (CLO-1105) - #236

Merged
nullStack65 merged 3 commits into
release/native-0.1.10from
fix/clo-1105-humannote-capability
Nov 28, 2026
Merged

nullStack65 merged 3 commits into
release/native-0.1.10from
fix/clo-1105-humannote-capability

Conversation

@nullStack65

@nullStack65 nullStack65 commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Problem

Audit finding A-P1-01 in the /note privacy issue (CLO-1105). A 0.1.10 client sends a founder /note as message.dispatch with humanNote: true and start_immediately. A server built before humanNote (fleet t3code 3ad1bfdd, Jeff's Air 0.1.9-assemblyai.2) decodes without the field, drops the flag, keeps the start, and sends the private note to the AI provider.

What already existed on release/native-0.1.10

What this PR changes

The UI half of scope item 2: /note is disabled with a visible reason when the server lacks the capability.

  • ChatView computes noteDisabledReason from the server config. It fails closed while the config is unknown.
  • The /note slash-menu item shows that reason as its description, and picking it does not insert /note.
  • Sending a typed /note shows a "Note not sent" toast with the reason, keeps the draft and dispatches nothing.
  • serverSupportsHumanNote in composer-logic.ts is the single predicate.

Tests (acceptance tests 1 and 2, offline)

New in packages/client-runtime/src/operations/commands.test.ts: a fake server decodes every received command with the pre-humanNote message.dispatch schema (the current struct minus humanNote; 3ad1bfdd's contracts have no humanNote at all, which I checked with git show 3ad1bfdd:packages/contracts/src/orchestrationV2.ts).

  • Old server: the test first shows the hazard (that decoder strips humanNote and keeps start_immediately). It then shows the client sends nothing, so no provider-bound turn, and fails with "Update the server to use /note".
  • Advertising server: the note is delivered with humanNote: true, so it is never a startable turn.
  • Mutation check: with the capability guard in commands.ts disabled, the old-server case and the existing capability tests fail (4 failures). With the guard restored they pass.

apps/web/src/composer-logic.test.ts: serverSupportsHumanNote is true only for an explicit true. A missing key, false, null and undefined are all false.

CI: this PR adds HumanNote.test.ts to the ARC server test list, and composer-logic.test.ts and client-runtime/src/operations/commands.test.ts to the ARC web list. None of the three ran in ARC CI before.

Run locally on Node 26.13.1: vp test run apps/web/src/composer-logic.test.ts packages/client-runtime/src/operations/commands.test.ts apps/server/src/orchestration-v2/HumanNote.test.ts: 3 files, 95 tests passed. The client-runtime typecheck is clean. The apps/web typecheck shows errors only in Sidebar.logic.test.ts and botOrgTree.test.ts, which this PR does not touch, and none in the changed files. vp lint and vp fmt --check pass on the changed files.

Browser proof

None. I did not drive the composer in a browser. The menu and toast change is covered by the unit tests and typecheck only.

Not covered

  • Acceptance test 3 (live: no provider turn after deploy) needs the release rollout, which is audit finding A-P1-02 and out of scope.
  • An older client talking to an older server is unaffected by any client change. Only the rollout closes that.

Model: claude-opus-5-5
Task: fix
Deploy: fleet

Linear: https://linear.app/closura/issue/CLO-1105

🤖 Generated with Claude Code

…(CLO-1105)

An older server (fleet t3code 3ad1bfd, Jeff's Air 0.1.9) drops the unknown
humanNote flag but keeps start_immediately, so a private founder note would run
as a provider turn. The client-runtime guard from #171 already refuses to
dispatch a note unless the server advertises the humanNote capability; this
closes the UI half of audit finding A-P1-01:

- ChatView computes a noteDisabledReason from the connected server config
  (fails closed while the config is unknown).
- The /note slash item shows that reason and does not insert /note.
- Sending /note shows the reason, keeps the draft and sends nothing.
- Offline test: a fake server decodes with the pre-humanNote message.dispatch
  schema (the current struct minus humanNote, matching 3ad1bfd). It shows the
  old decoder strips the flag and keeps start_immediately, and that the client
  sends no startable turn; against an advertising server the note goes through
  with humanNote intact.

Model: claude-opus-5-5
Task: fix
Agent: Builder
Lane: CLO-1105
Harness: t3/claude-code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 27, 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 and others added 2 commits November 27, 2026 04:56
Adds the client-runtime command tests, composer-logic tests and the server
HumanNote tests to the ARC CI lists so the CLO-1105 guard stays covered.

Model: claude-opus-5-5
Task: fix
Agent: Builder
Lane: CLO-1105
Harness: t3/claude-code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review nit: choosing /note from the slash menu on a server without humanNote
returned silently; it now shows the reason in a toast.

Model: claude-opus-5-5
Task: fix
Agent: Builder
Lane: CLO-1105
Harness: t3/claude-code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nullStack65

Copy link
Copy Markdown
Owner Author

Independent review record for the /note private-notes leak fix (CLO-1105). One full review, from a fresh-context reviewer subagent. It found nits only: one fixed, two skipped and one withdrawn.

{"reviewed_base": "b64e48d52718896b379866bfa4099dbaa908abb8",
 "reviewed_head": "ef4566b2e79982dced65b397a086679d113f492d",
 "reviewer": "claude-opus-5-5, t3/claude-code general-purpose subagent",
 "author_session": "cbcc04a1-1921-405e-8a2e-e43f39020df5",
 "reviewer_session": "ae3a7031aaf8b431e",
 "fresh_context": true, "review_kind": "full", "round_id": "ae3a7031aaf8b431e",
 "intent": ["CLO-1105 AC1: offline test with 3ad1bfdd-style decoder shows no provider-bound turn and a disabled reason", "CLO-1105 AC2: with humanNote capability the note is stored and no turn starts", "Client fails closed: /note disabled with visible reason"],
 "prior_findings": [],
 "findings": [
  {"id": "F1", "severity": "nit", "summary": "Picking a disabled /note silently did nothing", "outcome": "fixed", "file": "apps/web/src/components/chat/ChatComposer.tsx", "line": 2123, "check": "ef4566b2e7 adds a warning toast with the reason; reviewer re-read diff and confirmed"},
  {"id": "F2", "severity": "nit", "summary": "Same 'not ready' wording for missing config and dropped connection", "outcome": "skipped", "file": "apps/web/src/components/ChatView.tsx", "line": 3210, "check": "cosmetic; both states correctly fail closed"},
  {"id": "F3", "severity": "nit", "summary": "No component test for the UI-level noteDisabledReason guard or toast", "outcome": "skipped", "file": "packages/client-runtime/src/operations/commands.test.ts", "check": "the leak itself is covered by the old-server dispatch test; mutation of the dispatchMessage guard fails 4 tests"},
  {"id": "F4", "severity": "nit", "summary": "Confirm HumanNote.test.ts exists for the new CI list entry", "outcome": "skipped", "file": "apps/server/src/orchestration-v2/HumanNote.test.ts", "check": "file exists on base b64e48d527; withdrawn by reviewer"}
 ]}

@nullStack65

Copy link
Copy Markdown
Owner Author

Cross-family review record for the /note private-notes leak fix (CLO-1105). This is a fresh-context Gemini 4 Neon review on Antigravity. Verdict: clean, with one nit (skipped).

{"reviewed_base": "b64e48d52718896b379866bfa4099dbaa908abb8",
 "reviewed_head": "ef4566b2e79982dced65b397a086679d113f492d",
 "reviewer": "gemini-4-neon, antigravity",
 "reviewer_family": "gemini",
 "author_session": "cbcc04a1-1921-405e-8a2e-e43f39020df5",
 "reviewer_session": "delegate-task:86398771-2e5b-45c4-8d7b-b8899da64d05",
 "fresh_context": true, "review_kind": "full", "round_id": "delegate-task:86398771-2e5b-45c4-8d7b-b8899da64d05",
 "intent": ["CLO-1105 AC1: offline test with 3ad1bfdd-style decoder shows no provider-bound turn and a disabled reason", "CLO-1105 AC2: with humanNote capability the note is stored and no turn starts", "Client fails closed: /note disabled with visible reason"],
 "prior_findings": [],
 "findings": [
  {"id": "G1", "severity": "nit", "summary": "UI disabled-reason strings and refusal paths have no direct UI test", "outcome": "skipped", "file": "apps/web/src/composer-logic.test.ts", "line": 612, "check": "reviewer ran 4 test files (97/97 passed) and web + client-runtime typecheck; the leak is covered at the dispatchMessage level"}
 ]}

@nullStack65

Copy link
Copy Markdown
Owner Author

Note

🤖 grok-4.7 responding on behalf of nullStack65

Independent review of the /note private-note leak fix (audit finding A-P1-01, Linear issue CLO-1105). One full read of head ef4566b2e79982dced65b397a086679d113f492d against merge-base b64e48d52718896b379866bfa4099dbaa908abb8. Fresh context. No code changes.

Verdict: clean. A private note is refused before it can reach a server that would drop humanNote and keep start_immediately.

Checked on this head:

  • dispatchMessage in packages/client-runtime/src/operations/commands.ts returns HumanNoteUnavailableError unless session.initialConfig has capabilities.humanNote === true, and the note is sent only on that same session.
  • serverSupportsHumanNote is true only for an explicit true. ChatView sets noteDisabledReason when the server config is missing or the flag is not true.
  • The slash menu shows that reason. Picking /note toasts and does not insert the command. Sending a typed /note toasts "Note not sent", returns before startThreadTurn, and leaves the draft.
  • The new command test shows a pre-humanNote decoder strips the flag and keeps start_immediately, then shows the client sends no command and fails with "Update the server to use /note". An advertising server receives humanNote: true.
  • HumanNote.test.ts, now on the ARC server list, records a note and asserts no run. That is the server half of acceptance item 2, already on this base.
  • No other client builds message.dispatch with humanNote. Mobile has no /note send. git merge-tree against current release/native-0.1.10 (4 commits ahead) produced a tree with no conflicts, and those commits do not touch these files.

Limits, not findings: I did not re-run the tests in this worktree. The pull request's checks on this head are 6 passed, 0 failed, 0 pending, including the required Voice + founder inbox job. Browser proof is absent, as the pull request body says. A live /note with an empty provider log is the rollout, which the issue leaves out of scope. An older client against an older server is unchanged until that rollout.

{
  "reviewed_base": "b64e48d52718896b379866bfa4099dbaa908abb8",
  "reviewed_head": "ef4566b2e79982dced65b397a086679d113f492d",
  "reviewer": "grok-4.7, T3 Code Grok harness",
  "author_session": "unobserved; commit trailers name Harness t3/claude-code, Model claude-opus-5-5, Agent Builder",
  "reviewer_session": "01a2207c-fd82-7b92-bfb9-3d66c4134d11",
  "fresh_context": true,
  "review_kind": "full",
  "round_id": "01a2207c-fd82-7b92-bfb9-3d66c4134d11",
  "intent": [
    "CLO-1105 scope 2: the client fails closed. When the connected server lacks humanNote, /note is disabled with a visible reason and a note is never sent with start_immediately.",
    "CLO-1105 acceptance 1: an offline test against a server without the capability produces no provider-bound turn, and the UI shows the disabled reason.",
    "CLO-1105 acceptance 2: against a server that advertises the capability, the note is stored and no turn starts."
  ],
  "prior_findings": [],
  "findings": []
}

@nullStack65
nullStack65 merged commit a7ed817 into release/native-0.1.10 Nov 28, 2026
6 checks passed
@nullStack65
nullStack65 deleted the fix/clo-1105-humannote-capability branch November 28, 2026 06:05
nullStack65 added a commit that referenced this pull request Nov 28, 2026
Defer to upstream #236 (CLO-1105) for the web /note capability gate; keep the
server, mobile, client-runtime and contracts parts of CLO-1087.

Model: claude/claude-sonnet-5-5
Task: bugfix
Agent: Claude Code
Lane: claude

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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