@soleur/opencode 3.354.11 → 3.354.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleur/opencode",
3
- "version": "3.354.11",
3
+ "version": "3.354.12",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -204,12 +204,13 @@ This is the migration verb (#4617), not a routine flip — it moves a feature of
204
204
  - `0` — success (or `--dry-run` clean).
205
205
  - `1` — fallback-fidelity rule violated (caller error), or the operator did not type `yes` (`SOLEUR_BOOTSTRAP_ABORTED stage=ack`; nothing written).
206
206
  - `2` — prerequisite missing (Doppler not authed, FLAGSMITH_MANAGEMENT_API_KEY unset, flag not in RUNTIME_FLAGS), a usage error, or an unknown flag (including the removed prompt-skip flag).
207
- - `3` — Flagsmith API error (network, 5xx, auth).
207
+ - `3` — Flagsmith API error (network, 5xx, auth). On a write run this can fire AFTER the WORM audit row was appended (append-before-flip), so a failed write leaves an audit row with no matching change, and the dev env may already be flipped when the prd call fails: read the state back with `soleur:flag-list --json`, then re-run the same command (a retry appends a second, later audit row) and record the orphan row (what, when, why) in the issue. A `feature_states_to_update … segment: This field is required` response on an existing-override flip means a checkout older than the 2026-10-23 fix: update the branch and re-run.
208
208
  - `4` — Doppler write failed (skill aborts — Flagsmith state is now ahead of Doppler; operator must reconcile), or the WORM audit append failed before any write.
209
209
  - `64` — a write run with no TTY (`SOLEUR_BOOTSTRAP_INPUT_REQUIRED`): nothing was fetched or changed; hand the command to the operator (above).
210
210
 
211
211
  ## Sharp edges
212
212
 
213
+ - Agent-runnable regression for the existing-override update arm: `bash "${CLAUDE_PLUGIN_ROOT}/test/flip-update-existing-override.test.sh"` (no TTY, stubbed network). The pty-driven suites (`flag-detach-shared`, `flag-org-scoping-pr2`) cannot run inside an agent session because the ack guard refuses a typed `yes` there. The stubbed run proves the request body shape; only the operator's typed-yes run followed by the `soleur:flag-list` read-back proves Flagsmith accepts it live.
213
214
  - The cache TTL in `apps/web-platform/lib/feature-flags/server.ts` is 30s per role. After a flip, the new state propagates per replica within 30s. Skill prints this hint after a successful flip.
214
215
  - The `dev off` rejection (Step 4) catches the case where prd is currently on AND you want to remove the dev cohort's preview. The correct sequence is: flip `prd off` first (which auto-flips both segments off via env-var mirror semantics, sort of), then leave dev where you want it. The plan's `dev off / prd on` case is intentionally unreachable.
215
216
  - Doppler mirror writes (Step 8) happen sequentially: dev first, then prd. If dev write fails, prd is not attempted (avoids cross-config divergence). Exit code 4.
@@ -309,6 +309,8 @@ print('missing')
309
309
  flip_segment_in_env() {
310
310
  local env_id="$1" feature_id="$2" segment_id="$3" enabled="$4"
311
311
  [[ "$feature_id" =~ ^[0-9]+$ ]] || { echo "invalid feature id (expected an integer)" >&2; return 1; }
312
+ [[ "$segment_id" =~ ^[1-9][0-9]*$ ]] || { echo "invalid segment id (expected an integer)" >&2; return 1; }
313
+ [[ "$enabled" == "true" || "$enabled" == "false" ]] || { echo "invalid enabled value (expected true or false)" >&2; return 1; }
312
314
 
313
315
  local existing_fs_id
314
316
  existing_fs_id=$(read_feature_segment_id "$env_id" "$feature_id" "$segment_id")
@@ -318,8 +320,10 @@ flip_segment_in_env() {
318
320
  # First-time override: feature_states_to_create.
319
321
  body=$(printf '{"feature_states_to_create":[{"feature_segment":{"segment":%d},"enabled":%s,"feature_state_value":{"type":"unicode","string_value":null,"integer_value":null,"boolean_value":null}}],"feature_states_to_update":[],"segment_ids_to_delete_overrides":[],"publish_immediately":true}' "$segment_id" "$enabled")
320
322
  else
321
- # Existing override: feature_states_to_update referencing the fs_id.
322
- body=$(printf '{"feature_states_to_create":[],"feature_states_to_update":[{"feature_segment":{"id":%d},"enabled":%s,"feature_state_value":{"type":"unicode","string_value":null,"integer_value":null,"boolean_value":null}}],"segment_ids_to_delete_overrides":[],"publish_immediately":true}' "$existing_fs_id" "$enabled")
323
+ # Existing override: feature_states_to_update referencing the fs_id. Flagsmith requires BOTH
324
+ # feature_segment.id and feature_segment.segment here: an {id}-only body was rejected live on
325
+ # 2026-10-23 with "segment: This field is required.".
326
+ body=$(printf '{"feature_states_to_create":[],"feature_states_to_update":[{"feature_segment":{"id":%d,"segment":%d},"enabled":%s,"feature_state_value":{"type":"unicode","string_value":null,"integer_value":null,"boolean_value":null}}],"segment_ids_to_delete_overrides":[],"publish_immediately":true}' "$existing_fs_id" "$segment_id" "$enabled")
323
327
  fi
324
328
 
325
329
  local resp