Skip to content

feat(vscode): not-installed state for config imports, recover by polling - #51

Merged
fi3ework merged 44 commits into
mainfrom
feat/not-installed-config-imports-and-recovery
Sep 8, 2026
Merged

feat(vscode): not-installed state for config imports, recover by polling#51
fi3ework merged 44 commits into
mainfrom
feat/not-installed-config-imports-and-recovery

Conversation

@fi3ework

@fi3ework fi3ework commented Sep 7, 2026

Copy link
Copy Markdown
Member

Closes #30.

What

A config that imports a package which is not installed now produces the uniform not-installed state for every stack, and the extension recovers from that state on its own once dependencies are installed.

Scenario Before After
Rslint config imports an absent package folder reports running, no diagnostics, nothing logged (measured on @rslint/core 0.9.0; #30's "crashed" description was from an older core) disabled + one warn line, no stack, never crashed
rstack.config.* imports an absent package (fmt) red toast from rs fmt --lsp on every format disabled + one warn line, no toast; unrelated server messages still pass through
Dependencies installed while VS Code is open, lockfile unchanged manual restart command shell polls every 60 s while any raw folder/project/runtime is disabled, crashed or version-mismatched, through the existing serialized queue; stops when no failed state remains
Lint node_modules/@rslint/core/package.json watcher fired for npm, never for pnpm (isolated or hoisted) removed

How

  • Shared classifier. shared/missingDependency.ts splits into a message classifier (bare specifier + physical node_modules walk-up for subpaths) and the existing code-gated wrapper Rstest uses.
  • Rslint. The lint worker is the last place that still sees structured loadConfigs results with code. It classifies there and sends a dedicated rstack/rslintConfigDependency notification to the editor on both fulfilled and rejected rslint/configRefresh. The Go server stays alive (upstream's unavailable-boundary recovery model), so a later refresh can clear the state in place. A classified rejection during start keeps the initialized client instead of letting RuntimeManager tear it down. Recorded in adaptation refactor(vscode): split tests out of src into sibling tests/ and e2e/ trees #7.
  • fmt. rs fmt --lsp (rstack 0.7.2, a Node process, not Go) loads config lazily on the first format and reports failure only as window/showMessage text. The stack registers its own ShowMessageNotification handler: the exact rs fmt cannot format this workspace: Error is classified; a hit becomes disabled and is not shown; everything else is re-presented exactly as vscode-languageclient's default handler would. Recorded as a gotcha.
  • Polling. One shell-owned recursive 60-second timer, active while any raw folder/project/runtime state is disabled, crashed or version-mismatched; it stops when none remains. Real errors keep polling, so a mid-install retry that reads half-written node_modules can recover on the next tick. A tick enters enqueue and forces the same detection notification a lockfile event does, so each stack reuses its existing dependency-change path. Rstest retries a failed config evaluation in place (single-flight) instead of dispose/recreate; recorded as ahead-of-upstream feat: per-stack restart commands and a hover-only status bar #4.
  • Docs. ADR 0005 records the decision, the watcher experiment (npm 2/2 fired, pnpm isolated 0/2, pnpm hoisted 0/2, VS Code 1.136.1, lockfile verified unchanged), and the rejected alternatives. ADR 0002/0003 and AGENTS.md corrected: VS Code's default files.watcherExclude does not exclude node_modules; the real limitation is that pnpm installs produce no per-file events.

Known limitations (documented in ADR 0005 / AGENTS.md)

  • After a polling restart, fmt reports running before the config is proven: the server only loads config on the next format request. Eager config load in rs fmt --lsp is a small separate upstream change that would remove this.
  • A fmt format that returns no edits cannot be told apart from a silent failure, so the warn-dedup latch only resets on a format that produced edits.

Verification

  • pnpm lint && pnpm test:unit: 176 files type-checked, 33 test files / 286 tests passed.
  • VSCODE_CLI=1 pnpm test:e2e lint vscode rstest: 20/20 isolated VS Code launches passed (lint 17, vscode 2, rstest 1) on VS Code 1.136.1, Node 26.5.0, pnpm 11.20.0.
  • New E2E: lint config importing an absent package → disabled, never crashed, exactly one warn; fmt same, no toast; pnpm --frozen-lockfile install inside the test → status recovers without any restart command, lockfile bytes and mtime verified unchanged.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T08:03:11.536036Z 27ec8f5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4699bf7062

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/lint/Rslint.ts Outdated
Comment thread packages/vscode/src/stacks/test/project.ts
Comment thread packages/vscode/src/stacks/lint/index.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c0a9f0697

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/test/project.ts Outdated
Comment thread packages/vscode/src/stacks/lint/Rslint.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 710a530b6a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/detection.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e960657c8b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/test/project.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f255d618c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/lint/index.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc5f80fe29

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/lint/worker/index.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6593c86550

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/fmt/sessionError.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e364fd133a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/lint/index.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cc33d1b22

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/fmt/sessionError.ts Outdated
Comment thread packages/vscode/src/stacks/test/project.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d4dfba136

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/test/index.ts Outdated
Comment thread packages/vscode/src/stacks/lint/index.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cda9a06276

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/test/project.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 653184fa92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/test/project.ts Outdated
Comment thread packages/vscode/src/stacks/test/project.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 972f8de421

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vscode/src/stacks/test/project.ts
Comment thread packages/vscode/src/stacks/test/master.ts Outdated
@fi3ework
fi3ework merged commit 72b3184 into main Sep 8, 2026
3 checks passed
@fi3ework
fi3ework deleted the feat/not-installed-config-imports-and-recovery branch September 8, 2026 09:10
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.

Classify config-import missing dependencies for lint and fmt

1 participant