Prevent Agentk remote_development module from processing new config if rails agent_config validation fails
MR: Pending
Description
Fix issue with missing workspace's agent config (#553324 - closed) presented us with a case where, after failing to save the agent_config in Rails, we still have a configuration that the agent sees as "valid", e.g dns_zone validation in rails prevents values like example-.com
, but the agent does not validate at such a level.
This led to the workspace module starting and calling the /prerequisite
endpoint in Rails, expecting the agent to have an associated configuration record, leading to runtime errors when not found (we not guard against this).
The real and long-term fix for this class of errors is to have a proper configuration update flow, but that might not be possible right now (link settings epic). Alternatively, we could also look into adding similar validation in Rails on the remote_development protobuf schema in the agent and reject config updates that likely failed in Rails ( agentk uses https://buf.build/bufbuild/protovalidate I believe, maybe explore that?)
Acceptance criteria
TBD