Skip to content

fix(lsp): long-poll workspace/diagnostic instead of answering idle pulls - #424

Merged
owenlamont merged 3 commits into
mainfrom
408-longpoll-workspace-diagnostics
Sep 6, 2026
Merged

fix(lsp): long-poll workspace/diagnostic instead of answering idle pulls#424
owenlamont merged 3 commits into
mainfrom
408-longpoll-workspace-diagnostics

Conversation

@owenlamont

@owenlamont owenlamont commented Sep 6, 2026

Copy link
Copy Markdown
Owner

vscode-languageclient re-issues workspace/diagnostic a fixed 2 s after every response,
with no client-side knob, and ryl answered each one with a full walk and lint of every YAML
file. Closes #408. Bumped to 0.22.0 with a refreshed benchmark chart.

What changed

  • Reports carry result_ids, so an unchanged file answers unchanged. When every file
    would, the pull is not answered: it is held open and resumed by the next edit,
    watched-file or config change.
  • partialResultToken streams changed files as $/progress batches; unchanged ones
    come back in the response.

Where to focus review

  • Watchers now cover **/*.{yaml,yml} as well as config names, so a git checkout can
    wake a held pull rather than leaving the Problems panel stale.
  • A change during an in-flight scan supersedes it, so typing rescans where idle does not.
    ty behaves the same; worth confirming with the reporter after release.
Skills used
Skill Version
docs v0.12.3
pr-review v0.12.0
release v0.21.0
software-engineering v0.12.0

— Claude

https://claude.ai/code/session_01L2XE37GUJWcHp7hPKMdHU8

Result ids let an unchanged file answer `unchanged`; an all-unchanged report is
held open and resumed on the next state change, so an idle workspace costs
nothing. A `partialResultToken` streams changed files as `$/progress` batches.
Bumps to 0.22.0.

Claude-Session: https://claude.ai/code/session_01L2XE37GUJWcHp7hPKMdHU8
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@owenlamont owenlamont self-assigned this Sep 6, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 6, 2026

Copy link
Copy Markdown

Deploying ryl-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 66983fb
Status: ✅  Deploy successful!
Preview URL: https://f0732c15.ryl-docs.pages.dev
Branch Preview URL: https://408-longpoll-workspace-diagn.ryl-docs.pages.dev

View logs

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Test Coverage (nextest + cargo-llvm-cov)

Filename                                Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cli_support.rs                              168                 0   100.00%           7                 0   100.00%          95                 0   100.00%           0                 0         -
conf/mod.rs                                  10                 0   100.00%           1                 0   100.00%           7                 0   100.00%           0                 0         -
config.rs                                  1793                 0   100.00%         176                 0   100.00%        1281                 0   100.00%           0                 0         -
config_schema.rs                            491                 0   100.00%          46                 0   100.00%         389                 0   100.00%           0                 0         -
config_schema/serialization.rs              631                 0   100.00%          36                 0   100.00%         410                 0   100.00%           0                 0         -
config_schema/validation.rs                 171                 0   100.00%          21                 0   100.00%         146                 0   100.00%           0                 0         -
decoder.rs                                  482                 0   100.00%          35                 0   100.00%         321                 0   100.00%           0                 0         -
directives.rs                               284                 0   100.00%          24                 0   100.00%         174                 0   100.00%           0                 0         -
discover.rs                                  63                 0   100.00%           5                 0   100.00%          40                 0   100.00%           0                 0         -
fix.rs                                      602                 0   100.00%          39                 0   100.00%         385                 0   100.00%           0                 0         -
lint.rs                                     310                 0   100.00%          22                 0   100.00%         195                 0   100.00%           0                 0         -
lsp/actions.rs                              244                 0   100.00%          17                 0   100.00%         188                 0   100.00%           0                 0         -
lsp/analysis.rs                             109                 0   100.00%          11                 0   100.00%          83                 0   100.00%           0                 0         -
lsp/encoding.rs                             299                 0   100.00%          21                 0   100.00%         168                 0   100.00%           0                 0         -
lsp/hover.rs                                 39                 0   100.00%           3                 0   100.00%          28                 0   100.00%           0                 0         -
lsp/mod.rs                                 1345                 0   100.00%         104                 0   100.00%        1017                 0   100.00%           0                 0         -
lsp/rename.rs                               158                 0   100.00%          11                 0   100.00%         111                 0   100.00%           0                 0         -
main.rs                                    1451                 0   100.00%          94                 0   100.00%         976                 0   100.00%           0                 0         -
markdown_embed/lint.rs                      109                 0   100.00%           6                 0   100.00%          75                 0   100.00%           0                 0         -
markdown_embed/mod.rs                       185                 0   100.00%          14                 0   100.00%         133                 0   100.00%           0                 0         -
migrate.rs                                  351                 0   100.00%          27                 0   100.00%         255                 0   100.00%           0                 0         -
report.rs                                   350                 0   100.00%          11                 0   100.00%         206                 0   100.00%           0                 0         -
rules/anchors.rs                            184                 0   100.00%          11                 0   100.00%         155                 0   100.00%           0                 0         -
rules/block_scalar_chomping.rs               94                 0   100.00%          11                 0   100.00%          60                 0   100.00%           0                 0         -
rules/colons.rs                             299                 0   100.00%          20                 0   100.00%         228                 0   100.00%           0                 0         -
rules/commas.rs                             350                 0   100.00%          15                 0   100.00%         246                 0   100.00%           0                 0         -
rules/comments.rs                           194                 0   100.00%          12                 0   100.00%         125                 0   100.00%           0                 0         -
rules/comments_indentation.rs               380                 0   100.00%          20                 0   100.00%         230                 0   100.00%           0                 0         -
rules/document_end.rs                       197                 0   100.00%          15                 0   100.00%         133                 0   100.00%           0                 0         -
rules/document_start.rs                     122                 0   100.00%          11                 0   100.00%          82                 0   100.00%           0                 0         -
rules/empty_lines.rs                        196                 0   100.00%          10                 0   100.00%         128                 0   100.00%           0                 0         -
rules/empty_values.rs                       155                 0   100.00%          12                 0   100.00%         139                 0   100.00%           0                 0         -
rules/float_values.rs                       270                 0   100.00%          24                 0   100.00%         170                 0   100.00%           0                 0         -
rules/hyphens.rs                            150                 0   100.00%           8                 0   100.00%         105                 0   100.00%           0                 0         -
rules/indentation.rs                        682                 0   100.00%          45                 0   100.00%         587                 0   100.00%           0                 0         -
rules/key_duplicates.rs                     684                 0   100.00%          47                 0   100.00%         464                 0   100.00%           0                 0         -
rules/key_ordering.rs                       208                 0   100.00%          23                 0   100.00%         142                 0   100.00%           0                 0         -
rules/line_length.rs                        193                 0   100.00%          15                 0   100.00%         132                 0   100.00%           0                 0         -
rules/merge_keys.rs                          49                 0   100.00%           2                 0   100.00%          32                 0   100.00%           0                 0         -
rules/new_line_at_end_of_file.rs             29                 0   100.00%           3                 0   100.00%          19                 0   100.00%           0                 0         -
rules/new_lines.rs                           92                 0   100.00%           7                 0   100.00%          61                 0   100.00%           0                 0         -
rules/octal_values.rs                       104                 0   100.00%          11                 0   100.00%          70                 0   100.00%           0                 0         -
rules/quoted_strings.rs                    1229                 0   100.00%          95                 0   100.00%         879                 0   100.00%           0                 0         -
rules/support/comments_scan.rs               21                 0   100.00%           2                 0   100.00%          16                 0   100.00%           0                 0         -
rules/support/flow_collection.rs            613                 0   100.00%          36                 0   100.00%         501                 0   100.00%           0                 0         -
rules/support/line_syntax.rs                254                 0   100.00%          21                 0   100.00%         181                 0   100.00%           0                 0         -
rules/support/mapping_key_walker.rs          89                 0   100.00%          15                 0   100.00%          87                 0   100.00%           0                 0         -
rules/support/merge_key.rs                   13                 0   100.00%           2                 0   100.00%          12                 0   100.00%           0                 0         -
rules/support/punctuation.rs                158                 0   100.00%          16                 0   100.00%         107                 0   100.00%           0                 0         -
rules/support/span_utils.rs                  74                 0   100.00%          11                 0   100.00%          62                 0   100.00%           0                 0         -
rules/support/yaml_version.rs                67                 0   100.00%          10                 0   100.00%          45                 0   100.00%           0                 0         -
rules/tags.rs                               119                 0   100.00%           9                 0   100.00%          90                 0   100.00%           0                 0         -
rules/trailing_spaces.rs                     73                 0   100.00%           3                 0   100.00%          35                 0   100.00%           0                 0         -
rules/truthy.rs                             241                 0   100.00%          16                 0   100.00%         186                 0   100.00%           0                 0         -
rules/unicode_line_breaks.rs                 29                 0   100.00%           5                 0   100.00%          23                 0   100.00%           0                 0         -
yaml_dom/loader.rs                          186                 0   100.00%           6                 0   100.00%         121                 0   100.00%           0                 0         -
yaml_dom/scalar.rs                          142                 0   100.00%          11                 0   100.00%          71                 0   100.00%           0                 0         -
yaml_dom/tag.rs                              23                 0   100.00%           3                 0   100.00%          15                 0   100.00%           0                 0         -
yaml_dom/yaml_owned.rs                       69                 0   100.00%          14                 0   100.00%          53                 0   100.00%           0                 0         -
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                     17677                 0   100.00%        1328                 0   100.00%       12475                 0   100.00%           0                 0         -

Missed Lines (per file)

`says_nothing` already returns false once anything has streamed, so the extra
`streamed ||` in `scan_answer` read as an independent condition it was not. The
sink's final flush only ran when a batch happened not to have flushed on the
timer, so a deleted-file test now pins it deterministically.

Claude-Session: https://claude.ai/code/session_01L2XE37GUJWcHp7hPKMdHU8
An audit of every comment the branch adds, against this repo's "comments earn
their place" bar: seven doc comments restated their own signature or duplicated
the type's doc, and two test comments duplicated their assertion message. The
rest are why-comments the code cannot convey on its own.

Claude-Session: https://claude.ai/code/session_01L2XE37GUJWcHp7hPKMdHU8
@owenlamont
owenlamont merged commit b74190a into main Sep 6, 2026
3 checks passed
@owenlamont
owenlamont deleted the 408-longpoll-workspace-diagnostics branch September 6, 2026 13:11
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.

[Issue] VSCode extension - LSP workspace/diagnostic pulling in an infinite loop on idle

1 participant