-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Problem
readProjectConfig() eagerly reads all resources (entities, functions, agents) via Promise.all. If any single resource has invalid data on disk (e.g., a malformed agent config file), the entire function throws — blocking every command, including ones that don't need that resource.
For example, if I have an invalid agent configuration file, base44 entities push fails even though it only needs entities.
Current behavior
readProjectConfig()
├── reads config.jsonc ✓
├── Promise.all([
│ entityResource.readAll(...) ✓
│ functionResource.readAll(...) ✓
│ agentResource.readAll(...) ✗ ← invalid file
│ ])
└── throws SchemaValidationError ← ALL commands fail
Commands and what they actually need
| Command | What it reads |
|---|---|
entities push |
entities only |
agents push |
agents only |
agents pull |
project metadata only (configPath, agentsDir) |
functions deploy |
functions only |
site deploy |
project metadata only (root, site config) |
deploy |
everything (entities, functions, agents, site) |
types generate |
everything (entities, functions, agents, project root) |
Desired behavior
Each command should only read the resources it needs. Invalid agent configs should not block entities push. Invalid entity files should not block agents push.
The deploy and types generate commands still need all resources — those should continue to fail if any resource is invalid.
Scope
- Extract a function that reads just the project config file (no resources)
- Add per-resource reader helpers that can be called independently
- Refactor existing
readProjectConfigto compose these helpers (no breaking change) - Update individual commands to use only the readers they need
- Update tests to cover the new isolation behavior
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels