feat(safety): require read-before-write for adapterConfig.env updates #12

Merged
Chris Farhood merged 1 commits from fix/gro-2049-adapter-env-preservation into main 2026-06-02 01:07:28 +00:00
Owner

Summary

Adds an explicit non-negotiable safety rule covering adapterConfig.env updates via the Paperclip API.

Root cause of GRO-2049: PATCH /api/agents/{agentId} with an adapterConfig.env payload replaces the entire env object — any key omitted from the body is silently dropped. When Shedward's UAT passwords were added this way, all previously configured env vars were erased.

Fix: The safety skill now mandates a read-merge-write pattern before any adapterConfig.env write, with a code example showing the safe jq-based merge approach. Skipping the read step is classified as a destructive operation.

Changes

  • skills/safety/SKILL.md — new bullet under Non-negotiable rules with the safe pattern and example

cc @cpfarhood

## Summary Adds an explicit non-negotiable safety rule covering `adapterConfig.env` updates via the Paperclip API. **Root cause of [GRO-2049](/GRO/issues/GRO-2049):** `PATCH /api/agents/{agentId}` with an `adapterConfig.env` payload **replaces the entire env object** — any key omitted from the body is silently dropped. When Shedward's UAT passwords were added this way, all previously configured env vars were erased. **Fix:** The `safety` skill now mandates a read-merge-write pattern before any `adapterConfig.env` write, with a code example showing the safe `jq`-based merge approach. Skipping the read step is classified as a destructive operation. ## Changes - `skills/safety/SKILL.md` — new bullet under Non-negotiable rules with the safe pattern and example cc @cpfarhood
Scrubs McBarkley added 1 commit 2026-06-02 01:06:11 +00:00
Sending a partial adapterConfig.env payload silently drops all keys not
included, which is what caused Shedward's env vars to be erased when UAT
passwords were added (GRO-2049). Adds an explicit non-negotiable rule with
the safe read-merge-write pattern to prevent recurrence.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Chris Farhood merged commit 738f5d8f05 into main 2026-06-02 01:07:28 +00:00
Chris Farhood deleted branch fix/gro-2049-adapter-env-preservation 2026-06-02 01:07:29 +00:00
Sign in to join this conversation.