Skip to content

Cache IDE diagnostic probes per IDE #509

@codeforester

Description

@codeforester

Finding

The IDE diagnostics path repeats expensive probes inside a single check run:

  • check_ide_extensions calls <ide-cli> --list-extensions once per declared extension.
  • check_ide_settings reads and parses the IDE settings.json once per declared setting.

That is fine for one or two settings, but VS Code/Cursor manifests can naturally grow to dozens of extensions and settings. Repeated CLI launches and repeated JSON reads will make basectl check and basectl doctor feel slower than they need to.

Project fields

  • Priority: P2
  • Size: M
  • Initiative: IDE Bootstrapping

Expected outcome

Each IDE should be probed once per diagnostic run, then individual extension and setting findings should be computed from that cached state.

Suggested implementation

  • Introduce an IDE diagnostic snapshot per IDE containing CLI availability, installed extensions, settings path, and parsed settings.
  • Reuse the snapshot to produce all extension and setting ArtifactCheck results.
  • Preserve one finding per declared extension/setting so output remains actionable.
  • Keep failure behavior explicit: if extension listing fails, report one clear failure per affected extension or a grouped failure if the schema is updated.

Validation

  • Add tests that mock list_ide_extensions and verify it is called once per IDE per check run.
  • Add tests that mock settings reads and verify settings are parsed once per IDE per check run.
  • Keep existing IDE diagnostic output deterministic.
  • Run env -u BASE_HOME ./bin/base-test.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions