[proposal] design: add LSP interactive refactoring proposals

15 views
Skip to first unread message

Hongxiang Jiang (Gerrit)

unread,
Apr 10, 2026, 6:05:00 AMApr 10
to goph...@pubsubhelper.golang.org, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
Attention needed from Alan Donovan, Madeline Kalil and Peter Weinberger

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
  • Madeline Kalil
  • Peter Weinberger
Submit Requirements:
  • requirement is blockingCode-Review
  • requirement satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: proposal
Gerrit-Branch: master
Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
Gerrit-Change-Number: 765240
Gerrit-PatchSet: 1
Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
Gerrit-Reviewer: Peter Weinberger <p...@google.com>
Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Attention: Madeline Kalil <mka...@google.com>
Gerrit-Attention: Alan Donovan <adon...@google.com>
Gerrit-Attention: Peter Weinberger <p...@google.com>
Gerrit-Comment-Date: Fri, 10 Apr 2026 10:04:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
blocking_requirement
satisfied_requirement
open
diffy

Hongxiang Jiang (Gerrit)

unread,
Apr 10, 2026, 6:05:43 AMApr 10
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Alan Donovan, Madeline Kalil and Peter Weinberger

Hongxiang Jiang uploaded new patchset

Hongxiang Jiang uploaded patch set #2 to this change.
Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
  • Madeline Kalil
  • Peter Weinberger
Submit Requirements:
  • requirement is blockingCode-Review
  • requirement satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: proposal
Gerrit-Branch: master
Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
Gerrit-Change-Number: 765240
Gerrit-PatchSet: 2
blocking_requirement
satisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
Apr 28, 2026, 6:37:10 AMApr 28
to Hongxiang Jiang, goph...@pubsubhelper.golang.org, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
Attention needed from Hongxiang Jiang, Madeline Kalil and Peter Weinberger

Alan Donovan added 23 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Alan Donovan . resolved

Many thanks for writing this down.

File design/76331-lsp-interactive-refactoring.md
Line 1, Patchset 2 (Latest):# Proposal: Language Server Protocol (LSP) Interactive Refactoring
Alan Donovan . unresolved

It's more general than this: interactive code actions. They could be for analysis too, not just refactoring.


Worth stating up front, even if the document is primarily framed around refactoring.

Line 3, Patchset 2 (Latest):Author(s): Hongxiang Jiang (hxj...@golang.org), Alan Donovan (adon...@google.com)
Alan Donovan . unresolved

You can put me on the second line; you did nearly all the work.

Line 32, Patchset 2 (Latest):This design puts the language server at the center of the logic—making it the "brain"—while leaving the responsibility of rendering the UI entirely to the language client. To prove the value and viability of this interactive approach, we have successfully built a working prototype based on one of these proposals, which is already released in [gopls v0.22.0](https://github.com/golang/tools/releases/tag/gopls%2Fv0.22.0) and [vscode-go v0.54.0](https://github.com/golang/vscode-go/releases/tag/v0.54.0).
Alan Donovan . unresolved

This line (with its m-dashes and clunky metaphor) sounds like an LLM wrote it.

Line 32, Patchset 2 (Latest):This design puts the language server at the center of the logic—making it the "brain"—while leaving the responsibility of rendering the UI entirely to the language client. To prove the value and viability of this interactive approach, we have successfully built a working prototype based on one of these proposals, which is already released in [gopls v0.22.0](https://github.com/golang/tools/releases/tag/gopls%2Fv0.22.0) and [vscode-go v0.54.0](https://github.com/golang/vscode-go/releases/tag/v0.54.0).
Alan Donovan . unresolved

one of which?

Line 37, Patchset 2 (Latest):
Alan Donovan . unresolved

join paragraphs

Line 40, Patchset 2 (Latest):A key component of the design is that the communication mechanism between the language client and the server should be stateless. Consider a metaphor suggested by Alan Donovan: Imagine you go to the DMV to submit an application. You fill in a form full of questions. The officer sees a missing answer and asks you to go back, fill that in, and come back. When you come back to the DMV, you bring the **entire form** instead of only the missing answer.
Alan Donovan . unresolved

Not my invention, so don't credit me.

Line 40, Patchset 2 (Latest):A key component of the design is that the communication mechanism between the language client and the server should be stateless. Consider a metaphor suggested by Alan Donovan: Imagine you go to the DMV to submit an application. You fill in a form full of questions. The officer sees a missing answer and asks you to go back, fill that in, and come back. When you come back to the DMV, you bring the **entire form** instead of only the missing answer.
Alan Donovan . unresolved

Other relevant parts of the DMV metaphor are that
(a) the teller (= server) being stateless permits you to come back later to _any other teller_ (= potentially even a new server process after a restart);
(b) the teller is not tied up while you fill in the form; they can serve another customer; consequently
(c) the teller imposes no time limit (= max RPC duration) on the customer filling in the form.

Line 45, Patchset 2 (Latest):
Alan Donovan . unresolved

You should draw the analogy with HTML/HTTP forms, which are traditionally also stateless (though not always in practice).

Line 195, Patchset 2 (Latest):### Context: How Code Actions Work
Alan Donovan . unresolved

Background:

Line 200, Patchset 2 (Latest):1. Code action that eventually resolves to a code action with **edits**: The edits are applied directly to the user's workspace by the client.
Alan Donovan . unresolved

actions ... resolve

ditto in (2)

Line 200, Patchset 2 (Latest):1. Code action that eventually resolves to a code action with **edits**: The edits are applied directly to the user's workspace by the client.
Alan Donovan . unresolved

Active voice: "The client applies the edits..."

Line 204, Patchset 2 (Latest):2. Code action that eventually resolves to a code action with a **command**: For a code action that resolves to a command, that command will be executed, and eventually that command could call `workspace/applyEdit` to ask the client to apply the edit to the workspace.
Alan Donovan . unresolved

delete

Line 204, Patchset 2 (Latest):2. Code action that eventually resolves to a code action with a **command**: For a code action that resolves to a command, that command will be executed, and eventually that command could call `workspace/applyEdit` to ask the client to apply the edit to the workspace.
Alan Donovan . unresolved

perhaps "with a possible side effect of making a server->client `workspace/applyEdit` request"

Line 214, Patchset 2 (Latest):The proposals below go through these layers from bottom to top to help the reader better understand the thinking logic.
Alan Donovan . unresolved

approach

Line 216, Patchset 2 (Latest):### WorkspaceEdit layer (Recommended)
Alan Donovan . unresolved

Sorry for not raising this question earlier, but let's assume I want to make a non-refactoring feature that is interactive. For example, let's say I want to summon a web-based report about the currently selected code, and the server needs to ask me an additional question. If resolution is done at the edit layer (not code actions or commands), how would this work?

Line 319, Patchset 2 (Latest):The client re-colllect user input and call `workspaceEdit/resolve` with the new answers.
Alan Donovan . unresolved

typo

"again collects"

Line 350, Patchset 2 (Latest):*Note: The original placeholder edits allows [aggressive language clients](https://github.com/microsoft/vscode/issues/106410#issuecomment-690610121) to render a preview of the changes (e.g., when a user hovers over a code action). The actual finalized edit is re-computed by the server by reading `InteractiveParams.data` once the user provides the required input.*
Alan Donovan . unresolved

eager

"aggressive" means having a tendency to violence. I don't know why it has become a virtuous term in business. (Actually I kinda do.)

Line 350, Patchset 2 (Latest):*Note: The original placeholder edits allows [aggressive language clients](https://github.com/microsoft/vscode/issues/106410#issuecomment-690610121) to render a preview of the changes (e.g., when a user hovers over a code action). The actual finalized edit is re-computed by the server by reading `InteractiveParams.data` once the user provides the required input.*
Alan Donovan . unresolved

allow

Line 354, Patchset 2 (Latest):**Cons:** The main problem with this proposal involves the server-to-client `workspace/applyEdit` request. In LSP, it is generally not a good idea to embed a server-to-client request (up-call) within a client-to-server request (down-call), especially if the up-call may be blocking. When executing a command, the server often holds a non-trivial file system snapshot for static analysis. Holding this snapshot while waiting for user interaction during the back-and-forth communication is inefficient. Additionally, most client-server communications have timeouts, and the request will likely timeout while the user is still deciding on an answer.
Alan Donovan . unresolved

Up and down here are reversed from how I usually use them (a typical server, on the Internet, is higher than my lowly client computer). Of course, in LSP, the server is often a child process of (hence lower than) the client. I polled pjw for his guess as to the meaning of up and down in LSP, and he refused to play the game on the grounds that the terms are ambiguous. :)

Server-to-client is perfectly clear. Let's use only that style from now on.

Line 354, Patchset 2 (Latest):**Cons:** The main problem with this proposal involves the server-to-client `workspace/applyEdit` request. In LSP, it is generally not a good idea to embed a server-to-client request (up-call) within a client-to-server request (down-call), especially if the up-call may be blocking. When executing a command, the server often holds a non-trivial file system snapshot for static analysis. Holding this snapshot while waiting for user interaction during the back-and-forth communication is inefficient. Additionally, most client-server communications have timeouts, and the request will likely timeout while the user is still deciding on an answer.
Alan Donovan . unresolved

It's ok (and quite routine) to do this for nonblocking calls such as applyEdit. The problem comes from making applyEdit a blocking call.

Line 624, Patchset 2 (Latest):**Cons:** The main problem with this proposal is that it requires embedding a server-to-client request (`window/collectInput`) within an ongoing client-to-server request (such as `workspace/executeCommand` or `codeAction/resolve`). In LSP, it is generally not a good idea to embed a blocking up-call within a down-call. When executing a command or resolving a code action, the server often holds a non-trivial file system snapshot for static analysis. Holding this snapshot while waiting for the user to provide input is inefficient. Furthermore, most client-server communications have timeouts, and the request will likely timeout while the user is still deciding on an answer.
Alan Donovan . unresolved

time out (noun = 1 word, verb = 2)

File design/76331/.DS_Store
File-level comment, Patchset 2 (Latest):
Alan Donovan . unresolved

delete?

Open in Gerrit

Related details

Attention is currently required from:
  • Hongxiang Jiang
  • Madeline Kalil
  • Peter Weinberger
Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 2
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Tue, 28 Apr 2026 10:37:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 13, 2026, 4:44:24 PMMay 13
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #3 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 3
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    SLSA Policy Verification Service (Gerrit)

    unread,
    May 13, 2026, 4:44:28 PMMay 13
    to Hongxiang Jiang, goph...@pubsubhelper.golang.org, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    SLSA Policy Verification Service voted SLSA-Policy-Verified+1

    SLSA-Policy-Verified+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 3
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Wed, 13 May 2026 20:44:22 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 13, 2026, 4:49:05 PMMay 13
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #4 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 4
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 13, 2026, 5:33:40 PMMay 13
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #5 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 5
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 13, 2026, 5:36:40 PMMay 13
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #6 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 6
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 13, 2026, 5:46:59 PMMay 13
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #7 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 7
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 13, 2026, 6:00:39 PMMay 13
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #8 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 8
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 13, 2026, 6:03:31 PMMay 13
    to goph...@pubsubhelper.golang.org, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang voted and added 22 comments

    Votes added by Hongxiang Jiang

    Commit-Queue+1

    22 comments

    File design/76331-lsp-interactive-refactoring.md
    Line 1, Patchset 2:# Proposal: Language Server Protocol (LSP) Interactive Refactoring
    Alan Donovan . unresolved

    It's more general than this: interactive code actions. They could be for analysis too, not just refactoring.


    Worth stating up front, even if the document is primarily framed around refactoring.

    Hongxiang Jiang

    I don't fully understand the required doc change to resolve this comment. Could you take a look and let me know is the change is intended.

    Our thinking logic start by focusing on "code actions" and then we kind of expand a little bit to other LSP operations. Could you elaborate (possibly with a quick example) more about what "analysis" UX will looks like?

    Line 3, Patchset 2:Author(s): Hongxiang Jiang (hxj...@golang.org), Alan Donovan (adon...@google.com)
    Alan Donovan . resolved

    You can put me on the second line; you did nearly all the work.

    Hongxiang Jiang

    Acknowledged

    Line 32, Patchset 2:This design puts the language server at the center of the logic—making it the "brain"—while leaving the responsibility of rendering the UI entirely to the language client. To prove the value and viability of this interactive approach, we have successfully built a working prototype based on one of these proposals, which is already released in [gopls v0.22.0](https://github.com/golang/tools/releases/tag/gopls%2Fv0.22.0) and [vscode-go v0.54.0](https://github.com/golang/vscode-go/releases/tag/v0.54.0).
    Alan Donovan . resolved

    This line (with its m-dashes and clunky metaphor) sounds like an LLM wrote it.

    Hongxiang Jiang

    And the fact is, it is LLM wrote. :D

    I write the first draft and it give me a feeling of "unprofessional" so I decided to ask LLM to refactor this for me.

    PTAL.

    Line 32, Patchset 2:This design puts the language server at the center of the logic—making it the "brain"—while leaving the responsibility of rendering the UI entirely to the language client. To prove the value and viability of this interactive approach, we have successfully built a working prototype based on one of these proposals, which is already released in [gopls v0.22.0](https://github.com/golang/tools/releases/tag/gopls%2Fv0.22.0) and [vscode-go v0.54.0](https://github.com/golang/vscode-go/releases/tag/v0.54.0).
    Alan Donovan . resolved

    one of which?

    Hongxiang Jiang

    Done

    Line 37, Patchset 2:
    Alan Donovan . resolved

    join paragraphs

    Hongxiang Jiang

    Done

    Line 40, Patchset 2:A key component of the design is that the communication mechanism between the language client and the server should be stateless. Consider a metaphor suggested by Alan Donovan: Imagine you go to the DMV to submit an application. You fill in a form full of questions. The officer sees a missing answer and asks you to go back, fill that in, and come back. When you come back to the DMV, you bring the **entire form** instead of only the missing answer.
    Alan Donovan . resolved

    Other relevant parts of the DMV metaphor are that
    (a) the teller (= server) being stateless permits you to come back later to _any other teller_ (= potentially even a new server process after a restart);
    (b) the teller is not tied up while you fill in the form; they can serve another customer; consequently
    (c) the teller imposes no time limit (= max RPC duration) on the customer filling in the form.

    Hongxiang Jiang

    Done. I added this "benefit" section after the "result" section.

    However, I think (a) is not really applicable in the context of LSP. Once the server disconnect, the client will have to re-connect, and I assume the client will also automatically cancel any pending requests.

    Line 40, Patchset 2:A key component of the design is that the communication mechanism between the language client and the server should be stateless. Consider a metaphor suggested by Alan Donovan: Imagine you go to the DMV to submit an application. You fill in a form full of questions. The officer sees a missing answer and asks you to go back, fill that in, and come back. When you come back to the DMV, you bring the **entire form** instead of only the missing answer.
    Alan Donovan . resolved

    Not my invention, so don't credit me.

    Hongxiang Jiang

    Done

    Line 45, Patchset 2:
    Alan Donovan . resolved

    You should draw the analogy with HTML/HTTP forms, which are traditionally also stateless (though not always in practice).

    Hongxiang Jiang

    I just mentioned "modeled after stateless HTML/HTTP forms". I'm not sure if there is anything else you want to mention.

    Line 195, Patchset 2:### Context: How Code Actions Work
    Alan Donovan . resolved

    Background:

    Hongxiang Jiang

    Done

    Line 200, Patchset 2:1. Code action that eventually resolves to a code action with **edits**: The edits are applied directly to the user's workspace by the client.
    Alan Donovan . resolved

    Active voice: "The client applies the edits..."

    Hongxiang Jiang

    Done

    Line 200, Patchset 2:1. Code action that eventually resolves to a code action with **edits**: The edits are applied directly to the user's workspace by the client.
    Alan Donovan . resolved

    actions ... resolve

    ditto in (2)

    Hongxiang Jiang

    Done

    Line 204, Patchset 2:2. Code action that eventually resolves to a code action with a **command**: For a code action that resolves to a command, that command will be executed, and eventually that command could call `workspace/applyEdit` to ask the client to apply the edit to the workspace.
    Alan Donovan . resolved

    perhaps "with a possible side effect of making a server->client `workspace/applyEdit` request"

    Hongxiang Jiang

    Done

    Line 204, Patchset 2:2. Code action that eventually resolves to a code action with a **command**: For a code action that resolves to a command, that command will be executed, and eventually that command could call `workspace/applyEdit` to ask the client to apply the edit to the workspace.
    Alan Donovan . resolved

    delete

    Hongxiang Jiang

    Done

    Line 214, Patchset 2:The proposals below go through these layers from bottom to top to help the reader better understand the thinking logic.
    Alan Donovan . resolved

    approach

    Hongxiang Jiang

    Done

    Line 216, Patchset 2:### WorkspaceEdit layer (Recommended)
    Alan Donovan . resolved

    Sorry for not raising this question earlier, but let's assume I want to make a non-refactoring feature that is interactive. For example, let's say I want to summon a web-based report about the currently selected code, and the server needs to ask me an additional question. If resolution is done at the edit layer (not code actions or commands), how would this work?

    Hongxiang Jiang

    Short answer is, it will not work...

    The solution only works if there is an "edit" because the interactive layer is right before the edit got applied to the workspace. The input and output of interactive refactoring are both "edit".

    However, the command layer, on the other hand, the input and output is "command" and potentially expanding to other operations like "rename"... That will be able to cover your use case.

    To compare command layer and edit layer, I think only con is the command layer does not cover code action resolve to edits. We can discuss this offline further on this topic.

    Line 319, Patchset 2:The client re-colllect user input and call `workspaceEdit/resolve` with the new answers.
    Alan Donovan . resolved

    typo

    "again collects"

    Hongxiang Jiang

    Done

    Line 350, Patchset 2:*Note: The original placeholder edits allows [aggressive language clients](https://github.com/microsoft/vscode/issues/106410#issuecomment-690610121) to render a preview of the changes (e.g., when a user hovers over a code action). The actual finalized edit is re-computed by the server by reading `InteractiveParams.data` once the user provides the required input.*
    Alan Donovan . resolved

    eager

    "aggressive" means having a tendency to violence. I don't know why it has become a virtuous term in business. (Actually I kinda do.)

    Hongxiang Jiang

    Done

    Line 350, Patchset 2:*Note: The original placeholder edits allows [aggressive language clients](https://github.com/microsoft/vscode/issues/106410#issuecomment-690610121) to render a preview of the changes (e.g., when a user hovers over a code action). The actual finalized edit is re-computed by the server by reading `InteractiveParams.data` once the user provides the required input.*
    Alan Donovan . resolved

    allow

    Hongxiang Jiang

    Done

    Line 354, Patchset 2:**Cons:** The main problem with this proposal involves the server-to-client `workspace/applyEdit` request. In LSP, it is generally not a good idea to embed a server-to-client request (up-call) within a client-to-server request (down-call), especially if the up-call may be blocking. When executing a command, the server often holds a non-trivial file system snapshot for static analysis. Holding this snapshot while waiting for user interaction during the back-and-forth communication is inefficient. Additionally, most client-server communications have timeouts, and the request will likely timeout while the user is still deciding on an answer.
    Alan Donovan . resolved

    It's ok (and quite routine) to do this for nonblocking calls such as applyEdit. The problem comes from making applyEdit a blocking call.

    Hongxiang Jiang

    Done

    Line 354, Patchset 2:**Cons:** The main problem with this proposal involves the server-to-client `workspace/applyEdit` request. In LSP, it is generally not a good idea to embed a server-to-client request (up-call) within a client-to-server request (down-call), especially if the up-call may be blocking. When executing a command, the server often holds a non-trivial file system snapshot for static analysis. Holding this snapshot while waiting for user interaction during the back-and-forth communication is inefficient. Additionally, most client-server communications have timeouts, and the request will likely timeout while the user is still deciding on an answer.
    Alan Donovan . resolved

    Up and down here are reversed from how I usually use them (a typical server, on the Internet, is higher than my lowly client computer). Of course, in LSP, the server is often a child process of (hence lower than) the client. I polled pjw for his guess as to the meaning of up and down in LSP, and he refused to play the game on the grounds that the terms are ambiguous. :)

    Server-to-client is perfectly clear. Let's use only that style from now on.

    Hongxiang Jiang

    When I first join the team, I find soooo confusing regarding "up" and "down" because my mental model tells me server is up in the cloud...

    Later after working in gopls for 1 year, I start to get used to the mental model like yours. The server is running below the IDE (client).

    I have removed the "up" and "down" to avoid any confusion.

    Line 624, Patchset 2:**Cons:** The main problem with this proposal is that it requires embedding a server-to-client request (`window/collectInput`) within an ongoing client-to-server request (such as `workspace/executeCommand` or `codeAction/resolve`). In LSP, it is generally not a good idea to embed a blocking up-call within a down-call. When executing a command or resolving a code action, the server often holds a non-trivial file system snapshot for static analysis. Holding this snapshot while waiting for the user to provide input is inefficient. Furthermore, most client-server communications have timeouts, and the request will likely timeout while the user is still deciding on an answer.
    Alan Donovan . resolved

    time out (noun = 1 word, verb = 2)

    Hongxiang Jiang

    Done

    File design/76331/.DS_Store
    File-level comment, Patchset 2:
    Alan Donovan . resolved

    delete?

    Hongxiang Jiang

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 8
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Wed, 13 May 2026 22:03:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Alan Donovan <adon...@google.com>
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 13, 2026, 6:05:23 PMMay 13
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #9 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 9
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 27, 2026, 4:18:30 PM (10 days ago) May 27
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #10 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 10
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 27, 2026, 4:26:11 PM (10 days ago) May 27
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #11 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 11
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 27, 2026, 4:39:39 PM (10 days ago) May 27
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #12 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 12
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Danny Tuppeny (Gerrit)

    unread,
    May 28, 2026, 8:49:39 AM (10 days ago) May 28
    to Hongxiang Jiang, goph...@pubsubhelper.golang.org, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Danny Tuppeny added 2 comments

    Patchset-level comments
    File-level comment, Patchset 12 (Latest):
    Danny Tuppeny . resolved

    Thank you for working on this! The changes all look good to me, with one small question.

    File design/76331-lsp-interactive-refactoring.md
    Line 185, Patchset 12 (Latest): filters?: string[];
    Danny Tuppeny . unresolved

    In the VS Code APIs, the filters have labels and sets of extensions like:

    ```js
    {
    'Images': ['png', 'jpg'],
    'TypeScript': ['ts', 'tsx']
    }
    ```

    Should we do the same?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 12
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Thu, 28 May 2026 12:49:31 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Madeline Kalil (Gerrit)

    unread,
    May 28, 2026, 9:55:38 AM (10 days ago) May 28
    to Hongxiang Jiang, goph...@pubsubhelper.golang.org, Danny Tuppeny, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang and Peter Weinberger

    Madeline Kalil added 2 comments

    File design/76331-lsp-interactive-refactoring.md
    Line 98, Patchset 12 (Latest): optional?: boolean;
    Madeline Kalil . unresolved

    Did you consider calling this "required" instead? It would make it a little bit easier to understand the default value in my opinion. Or is it preferred to have the default be that the form field is required if you don't specify it (and not having to always specify "required": true)?

    Line 348, Patchset 12 (Latest): {id: "tags", descript: "tags to add", kind: string},
    Madeline Kalil . unresolved

    description?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 12
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Thu, 28 May 2026 13:55:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 28, 2026, 1:50:29 PM (9 days ago) May 28
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #13 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 13
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 28, 2026, 1:52:54 PM (9 days ago) May 28
    to goph...@pubsubhelper.golang.org, Danny Tuppeny, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Danny Tuppeny, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang added 4 comments

    Patchset-level comments
    File-level comment, Patchset 13 (Latest):
    Hongxiang Jiang . unresolved

    Update the imagines after the patch. TODO(hxjiang).

    File design/76331-lsp-interactive-refactoring.md
    Line 98, Patchset 12: optional?: boolean;
    Madeline Kalil . resolved

    Did you consider calling this "required" instead? It would make it a little bit easier to understand the default value in my opinion. Or is it preferred to have the default be that the form field is required if you don't specify it (and not having to always specify "required": true)?

    Hongxiang Jiang

    I'm a little bit struggling to decide which way is better. I would imagine most of the questions are required.

    But finally, I think required might be better just to avoid double negative.

    Line 185, Patchset 12: filters?: string[];
    Danny Tuppeny . resolved

    In the VS Code APIs, the filters have labels and sets of extensions like:

    ```js
    {
    'Images': ['png', 'jpg'],
    'TypeScript': ['ts', 'tsx']
    }
    ```

    Should we do the same?

    Hongxiang Jiang

    Hi Danny, I read the vscode api and decide not to use the same struct layer simply because we are defining the protocol not UI. I can see the value of having the grouping filters (images for png and jpg)... But the goal of the filter is to tell the user, these are the files that can be selected. I can imagine for other LSP clients, the label `Imagines` or `Typescript` is not going to be useful as they may choose to use a search based solution.

    I personally want to keep the protocol as "simple" as possible and avoid any UI elements in the protocol definition.

    Line 348, Patchset 12: {id: "tags", descript: "tags to add", kind: string},
    Madeline Kalil . resolved

    description?

    Hongxiang Jiang

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Danny Tuppeny
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 13
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Thu, 28 May 2026 17:52:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Madeline Kalil <mka...@google.com>
    Comment-In-Reply-To: Danny Tuppeny <da...@tuppeny.com>
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Danny Tuppeny (Gerrit)

    unread,
    May 28, 2026, 2:37:08 PM (9 days ago) May 28
    to Hongxiang Jiang, goph...@pubsubhelper.golang.org, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Danny Tuppeny added 2 comments

    File design/76331-lsp-interactive-refactoring.md
    Line 98, Patchset 12: optional?: boolean;
    Madeline Kalil . resolved

    Did you consider calling this "required" instead? It would make it a little bit easier to understand the default value in my opinion. Or is it preferred to have the default be that the form field is required if you don't specify it (and not having to always specify "required": true)?

    Hongxiang Jiang

    I'm a little bit struggling to decide which way is better. I would imagine most of the questions are required.

    But finally, I think required might be better just to avoid double negative.

    Danny Tuppeny

    I don't feel strongly, but I do think `optional` is better if questions are required if the field is omitted. Otherwise, the field is required "if true or omitted" which I think is confusing.

    Another option is to make the field required to avoid any ambiguity (I don't think payload size is a concern here, the number of fields is low), although if you've already shipped something for Go you'd need to handle it missing for compatibility even if not in-spec.

    Line 185, Patchset 12: filters?: string[];
    Danny Tuppeny . resolved

    In the VS Code APIs, the filters have labels and sets of extensions like:

    ```js
    {
    'Images': ['png', 'jpg'],
    'TypeScript': ['ts', 'tsx']
    }
    ```

    Should we do the same?

    Hongxiang Jiang

    Hi Danny, I read the vscode api and decide not to use the same struct layer simply because we are defining the protocol not UI. I can see the value of having the grouping filters (images for png and jpg)... But the goal of the filter is to tell the user, these are the files that can be selected. I can imagine for other LSP clients, the label `Imagines` or `Typescript` is not going to be useful as they may choose to use a search based solution.

    I personally want to keep the protocol as "simple" as possible and avoid any UI elements in the protocol definition.

    Danny Tuppeny

    That's fine, I just wanted to check it wasn't overlooked.

    It does mean we need to decide what to pass to the VS Code API though - I believe it shows as "Images (*.bmp, *.jpg)" so we'd need to decide what to put in place of "Images" (we could use the extensions, but then they'd be duplicated).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 13
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Thu, 28 May 2026 18:37:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Madeline Kalil <mka...@google.com>
    Comment-In-Reply-To: Danny Tuppeny <da...@tuppeny.com>
    Comment-In-Reply-To: Hongxiang Jiang <hxj...@golang.org>
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 28, 2026, 6:47:19 PM (9 days ago) May 28
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #14 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 14
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 28, 2026, 6:47:42 PM (9 days ago) May 28
    to goph...@pubsubhelper.golang.org, Danny Tuppeny, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Danny Tuppeny, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang added 1 comment

    File design/76331-lsp-interactive-refactoring.md
    Line 98, Patchset 12: optional?: boolean;
    Madeline Kalil . resolved

    Did you consider calling this "required" instead? It would make it a little bit easier to understand the default value in my opinion. Or is it preferred to have the default be that the form field is required if you don't specify it (and not having to always specify "required": true)?

    Hongxiang Jiang

    I'm a little bit struggling to decide which way is better. I would imagine most of the questions are required.

    But finally, I think required might be better just to avoid double negative.

    Danny Tuppeny

    I don't feel strongly, but I do think `optional` is better if questions are required if the field is omitted. Otherwise, the field is required "if true or omitted" which I think is confusing.

    Another option is to make the field required to avoid any ambiguity (I don't think payload size is a concern here, the number of fields is low), although if you've already shipped something for Go you'd need to handle it missing for compatibility even if not in-spec.

    Hongxiang Jiang

    I just turn the "required" field required. :D

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Danny Tuppeny
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 13
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Thu, 28 May 2026 22:47:38 +0000
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 28, 2026, 7:51:49 PM (9 days ago) May 28
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Danny Tuppeny, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang uploaded new patchset

    Hongxiang Jiang uploaded patch set #15 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Danny Tuppeny
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 15
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Danny Tuppeny (Gerrit)

    unread,
    May 29, 2026, 2:51:09 AM (9 days ago) May 29
    to Hongxiang Jiang, goph...@pubsubhelper.golang.org, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Danny Tuppeny added 1 comment

    File design/76331-lsp-interactive-refactoring.md
    Line 73, Patchset 15 (Latest): // The client must include answers for all required fields (where `required`
    // is true). Answers for optional fields (where `required` is false)
    Danny Tuppeny . unresolved

    Is this bit necessary? Since the server can re-present fields that are incomplete and validation can only occur on a round trip to the server, would it be better to allow a client to re-resolve after each question is answered, so validation can be done for each question instead of just once at the end?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 15
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Fri, 29 May 2026 06:50:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 29, 2026, 11:04:57 AM (9 days ago) May 29
    to goph...@pubsubhelper.golang.org, Danny Tuppeny, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Danny Tuppeny, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang added 1 comment

    File design/76331-lsp-interactive-refactoring.md
    Line 73, Patchset 15 (Latest): // The client must include answers for all required fields (where `required`
    // is true). Answers for optional fields (where `required` is false)
    Danny Tuppeny . unresolved

    Is this bit necessary? Since the server can re-present fields that are incomplete and validation can only occur on a round trip to the server, would it be better to allow a client to re-resolve after each question is answered, so validation can be done for each question instead of just once at the end?

    Hongxiang Jiang

    I think it should be ok. I have changed the description accordingly.

    Basically, this will be a "keen" applicant who keeps ask officer to valid their form and resubmit it after each answer he fills in.

    But I have one case, imagine the server have 5 questions, the last question is optional.

    The clinet take the strategy to ask one question at a time and resolve after each time the user fill in the answer. After 4 answers collected, the client call resolve, the server notice all the "required" questions are answered. And the optional question is not answered. So the server think all required is collected. but the client never show the user the optional question.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Danny Tuppeny
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 15
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Fri, 29 May 2026 15:04:49 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Danny Tuppeny <da...@tuppeny.com>
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 29, 2026, 11:06:16 AM (9 days ago) May 29
    to goph...@pubsubhelper.golang.org, Danny Tuppeny, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Danny Tuppeny, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang added 1 comment

    File design/76331-lsp-interactive-refactoring.md
    Line 73, Patchset 15 (Latest): // The client must include answers for all required fields (where `required`
    // is true). Answers for optional fields (where `required` is false)
    Danny Tuppeny . unresolved

    Is this bit necessary? Since the server can re-present fields that are incomplete and validation can only occur on a round trip to the server, would it be better to allow a client to re-resolve after each question is answered, so validation can be done for each question instead of just once at the end?

    Hongxiang Jiang

    I think it should be ok. I have changed the description accordingly.

    Basically, this will be a "keen" applicant who keeps ask officer to valid their form and resubmit it after each answer he fills in.

    But I have one case, imagine the server have 5 questions, the last question is optional.

    The clinet take the strategy to ask one question at a time and resolve after each time the user fill in the answer. After 4 answers collected, the client call resolve, the server notice all the "required" questions are answered. And the optional question is not answered. So the server think all required is collected. but the client never show the user the optional question.

    Hongxiang Jiang

    On the other hand, the server may execute the flow below to achieve step by step validation.

    ```
    Server -> Client: Q1
    Client -> Server: A1
    Server -> Client: Q1, Q2, A1
    Client -> Server: Q1, Q2, A1, A2
    ```

    Gerrit-Comment-Date: Fri, 29 May 2026 15:06:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Danny Tuppeny <da...@tuppeny.com>
    Comment-In-Reply-To: Hongxiang Jiang <hxj...@golang.org>
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    May 29, 2026, 11:07:14 AM (9 days ago) May 29
    to goph...@pubsubhelper.golang.org, Danny Tuppeny, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Danny Tuppeny, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang added 1 comment

    File design/76331-lsp-interactive-refactoring.md
    Line 73, Patchset 15 (Latest): // The client must include answers for all required fields (where `required`
    // is true). Answers for optional fields (where `required` is false)
    Danny Tuppeny . unresolved

    Is this bit necessary? Since the server can re-present fields that are incomplete and validation can only occur on a round trip to the server, would it be better to allow a client to re-resolve after each question is answered, so validation can be done for each question instead of just once at the end?

    Hongxiang Jiang

    I think it should be ok. I have changed the description accordingly.

    Basically, this will be a "keen" applicant who keeps ask officer to valid their form and resubmit it after each answer he fills in.

    But I have one case, imagine the server have 5 questions, the last question is optional.

    The clinet take the strategy to ask one question at a time and resolve after each time the user fill in the answer. After 4 answers collected, the client call resolve, the server notice all the "required" questions are answered. And the optional question is not answered. So the server think all required is collected. but the client never show the user the optional question.

    Hongxiang Jiang

    On the other hand, the server may execute the flow below to achieve step by step validation.

    ```
    Server -> Client: Q1
    Client -> Server: A1
    Server -> Client: Q1, Q2, A1
    Client -> Server: Q1, Q2, A1, A2
    ```

    Hongxiang Jiang

    So the server can trust the client have shown all the questions to the user, the server controls how the questions get rolled out to the user. The client is simply follow order to show the questions and collect the answers.

    Gerrit-Comment-Date: Fri, 29 May 2026 15:07:07 +0000
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Danny Tuppeny (Gerrit)

    unread,
    May 29, 2026, 11:13:56 AM (9 days ago) May 29
    to Hongxiang Jiang, goph...@pubsubhelper.golang.org, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Danny Tuppeny added 1 comment

    File design/76331-lsp-interactive-refactoring.md
    Line 73, Patchset 15 (Latest): // The client must include answers for all required fields (where `required`
    // is true). Answers for optional fields (where `required` is false)
    Danny Tuppeny . unresolved

    Is this bit necessary? Since the server can re-present fields that are incomplete and validation can only occur on a round trip to the server, would it be better to allow a client to re-resolve after each question is answered, so validation can be done for each question instead of just once at the end?

    Hongxiang Jiang

    I think it should be ok. I have changed the description accordingly.

    Basically, this will be a "keen" applicant who keeps ask officer to valid their form and resubmit it after each answer he fills in.

    But I have one case, imagine the server have 5 questions, the last question is optional.

    The clinet take the strategy to ask one question at a time and resolve after each time the user fill in the answer. After 4 answers collected, the client call resolve, the server notice all the "required" questions are answered. And the optional question is not answered. So the server think all required is collected. but the client never show the user the optional question.

    Hongxiang Jiang

    On the other hand, the server may execute the flow below to achieve step by step validation.

    ```
    Server -> Client: Q1
    Client -> Server: A1
    Server -> Client: Q1, Q2, A1
    Client -> Server: Q1, Q2, A1, A2
    ```

    Hongxiang Jiang

    So the server can trust the client have shown all the questions to the user, the server controls how the questions get rolled out to the user. The client is simply follow order to show the questions and collect the answers.

    Danny Tuppeny

    After 4 answers collected, the client call resolve, the server notice all the "required" questions are answered. And the optional question is not answered. So the server think all required is collected. but the client never show the user the optional question.

    That's a good point. One possible fix is to require the client to add an entry to `formAnswers` with no `value` to indicate the user had been presented with the question and chose not to answer it, but I don't know if it's worth it.


    > On the other hand, the server may execute the flow below to achieve step by step validation.

    That works for sequential clients, but I think wouldn't woek well for "whole dialog" clients, because they wouldn't get to show everything at once?


    I don't have a strong preference either way here, I think our use will be simple enough that the difference probably isn't large, so I'm happy to go with what you think is best (I just thought it was worth raising in case it hadn't been considered).

    Thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 15
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Fri, 29 May 2026 15:13:48 +0000
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Hongxiang Jiang (Gerrit)

    unread,
    Jun 5, 2026, 11:18:56 AM (2 days ago) Jun 5
    to goph...@pubsubhelper.golang.org, Danny Tuppeny, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Danny Tuppeny, Madeline Kalil and Peter Weinberger

    Hongxiang Jiang added 1 comment

    File design/76331-lsp-interactive-refactoring.md
    Line 73, Patchset 15 (Latest): // The client must include answers for all required fields (where `required`
    // is true). Answers for optional fields (where `required` is false)
    Danny Tuppeny . resolved

    Is this bit necessary? Since the server can re-present fields that are incomplete and validation can only occur on a round trip to the server, would it be better to allow a client to re-resolve after each question is answered, so validation can be done for each question instead of just once at the end?

    Hongxiang Jiang

    I think it should be ok. I have changed the description accordingly.

    Basically, this will be a "keen" applicant who keeps ask officer to valid their form and resubmit it after each answer he fills in.

    But I have one case, imagine the server have 5 questions, the last question is optional.

    The clinet take the strategy to ask one question at a time and resolve after each time the user fill in the answer. After 4 answers collected, the client call resolve, the server notice all the "required" questions are answered. And the optional question is not answered. So the server think all required is collected. but the client never show the user the optional question.

    Hongxiang Jiang

    On the other hand, the server may execute the flow below to achieve step by step validation.

    ```
    Server -> Client: Q1
    Client -> Server: A1
    Server -> Client: Q1, Q2, A1
    Client -> Server: Q1, Q2, A1, A2
    ```

    Hongxiang Jiang

    So the server can trust the client have shown all the questions to the user, the server controls how the questions get rolled out to the user. The client is simply follow order to show the questions and collect the answers.

    Danny Tuppeny

    After 4 answers collected, the client call resolve, the server notice all the "required" questions are answered. And the optional question is not answered. So the server think all required is collected. but the client never show the user the optional question.

    That's a good point. One possible fix is to require the client to add an entry to `formAnswers` with no `value` to indicate the user had been presented with the question and chose not to answer it, but I don't know if it's worth it.


    > On the other hand, the server may execute the flow below to achieve step by step validation.

    That works for sequential clients, but I think wouldn't woek well for "whole dialog" clients, because they wouldn't get to show everything at once?


    I don't have a strong preference either way here, I think our use will be simple enough that the difference probably isn't large, so I'm happy to go with what you think is best (I just thought it was worth raising in case it hadn't been considered).

    Thanks!

    Hongxiang Jiang

    One possible fix is to require the client to add an entry to formAnswers with no value to indicate the user had been presented with the question and chose not to answer it, but I don't know if it's worth it.

    I feel this is a little bit over-engineered.

    That works for sequential clients, but I think wouldn't woek well for "whole dialog" clients, because they wouldn't get to show everything at once?

    Yes, this is also my concern. We can't tell the language client what to do to collect the answer. But we can put a clear recommendation to ask language client to show the missing answer question or the invalid answer question.

    In addition, I think even for vscode, we can turn an "enum" selection to an answer selection. Instead of automatically showing only the question missing answer, we can show a enum selection with all the questions

    ```

    • Q1: what is the tags? Invalid.
    • Q2: what is the transformation? Valid.
    • Submit
    • ```

    and let the user select which question they want to re-answer. So as long as a client support "enum", the client should be able to show the "whole dialog".

    The idea just came across my mind and I have not yet spent enough time to implement it. But I imagine for simple questions with only one or two questions, displaying the entire dialog is not the perfect UX for the user.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Danny Tuppeny
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 15
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Fri, 05 Jun 2026 15:18:50 +0000
    blocking_requirement
    unsatisfied_requirement
    open
    diffy

    Danny Tuppeny (Gerrit)

    unread,
    Jun 6, 2026, 2:39:51 PM (11 hours ago) Jun 6
    to Hongxiang Jiang, goph...@pubsubhelper.golang.org, Alex Putman, SLSA Policy Verification Service, Alan Donovan, Madeline Kalil, Peter Weinberger, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
    Attention needed from Alan Donovan, Hongxiang Jiang, Madeline Kalil and Peter Weinberger

    Danny Tuppeny added 1 comment

    File design/76331-lsp-interactive-refactoring.md
    Danny Tuppeny

    In addition, I think even for vscode, we can turn an "enum" selection to an answer selection. Instead of automatically showing only the question missing answer, we can show a enum selection with all the questions

    That's an interesting idea, and actually similar to the "settings editor" we have for the "Flutter: New Project" settings:

    https://dartcode.org/releases/v3-26/#settings-for-flutter-new-project

    Although I think doing this from the server would result in a sub-optimal experience for clients that _could_ show a whole dialog. I wonder whether we should add a flag to capabilities for a client to indicate whether it's a single-input or multi-input client so the server can provide the best experience for each?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Hongxiang Jiang
    • Madeline Kalil
    • Peter Weinberger
    Submit Requirements:
    • requirement is blockingCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: proposal
    Gerrit-Branch: master
    Gerrit-Change-Id: If049dcddfac1af00d660728f13154000b061fb65
    Gerrit-Change-Number: 765240
    Gerrit-PatchSet: 15
    Gerrit-Owner: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Peter Weinberger <p...@google.com>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-CC: Alex Putman <apu...@golang.org>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Hongxiang Jiang <hxj...@golang.org>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Peter Weinberger <p...@google.com>
    Gerrit-Comment-Date: Sat, 06 Jun 2026 18:39:44 +0000
    blocking_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages