Skip to content

Isolate unparseable prompts instead of poisoning workspace commands #44

Description

@omridevk

Context

During the parallel ::: test migrations, one temporarily unparseable prompt caused every workspace-level napl command to fail before it could present any module view. This made an ordinary mid-edit state look like total workspace corruption and stalled unrelated module work.

Issue #36 covers the analogous LSP failure mode. This issue covers CLI discovery, compilation, query, and status behavior.

Problem

Workspace discovery currently couples prompt parsing too early and too globally. A syntax error in one module poisons commands whose useful result could still be produced for every other module, including commands needed to diagnose and repair the broken module.

Required behavior

  • Discovery identifies prompt files and module candidates without requiring every prompt to parse successfully.
  • Parse failures are retained as module-scoped diagnostics with the offending prompt path and exact location.
  • Workspace commands continue to expose valid modules and include the invalid module as an error-bearing entry where the command shape permits it.
  • A command that explicitly requires the invalid module fails for that module with its parse diagnostic.
  • Global invariants that cannot be decided safely under partial parsing fail honestly and explain which invalid modules block the decision.
  • No command silently omits an invalid prompt or fabricates committed state for it.

Acceptance criteria

  • With one valid prompt and one unparseable prompt, napl status and napl q still expose the valid module and a scoped diagnostic for the invalid prompt.
  • Module-targeted operations on the valid module remain usable when their invariants do not depend on the invalid module.
  • Module-targeted operations on the invalid module fail with the pinned parse diagnostic.
  • Fixing the prompt restores the full workspace view without repair of unrelated state.
  • Conformance covers mid-edit invalid syntax, duplicate names under partial parsing, dependency uncertainty, and recovery.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions