Skip to content

Validate Fledgling config and avoid stale module-level config state #20

Description

@nick-pape

Summary

Fledgling config is parsed with a direct cast and cached in a module-level promise, so invalid config shape is not diagnosed clearly and config cannot be reloaded during a process lifetime.

Evidence

  • packages/acp-agent/src/config.ts: loadConfig() uses JSON.parse(...) as FledglingConfig without schema validation.
  • packages/acp-agent/src/mcp-session-tools.ts: configPromise is initialized at module load.

Expected Work

  • Add schema validation for config files.
  • Produce useful diagnostics for invalid MCP server entries.
  • Decide whether config should be loaded once or per session.
  • Add tests for valid config, invalid config, missing config, and duplicate server names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions