Field coverage for plugins, monitors, alerts, categories (live-data gaps) #12

Merged
john merged 0 commits from refs/pull/12/head into main 2026-11-17 00:47:32 +00:00
john commented 2026-11-17 00:39:28 +00:00 (Migrated from code.yawn.dev)

A capture of the live xyOps found values these resources could not represent, which blocked adopting 6 plugins, 14 monitors, 1 alert and 3 categories.

Resource Change
xyops_plugin icon, notes, kill (none/parent/all), runner, read-only stock. script_file optional (stock plugins have none). Breaking: uid/gid are strings (xyOps stores a numeric id or an account name; numeric ones are still sent as numbers); state upgrades automatically. Reads tolerate enabled 0/1 and uid/gid text or empty. Unconfigured empty groups stay null.
xyops_monitor sort_order, divide_by_delta
xyops_alert limit_jobs
xyops_category sort_order

Every new attribute is unmanaged while omitted: never sent, read back as null, so existing configurations and state see no change. Import seeds a field only when xyOps holds it, so a matching config plans empty.

Tests: import contract extended with the live shapes (stock plugin with numeric enabled and no script; custom plugin with a uid name and empty gid; monitor with sort_order/divide_by_delta), create sends only configured fields, flexible decoding, the plugin state upgrader. Local check.sh: all pass (56 unit, 55 acceptance skipped), govulncheck 0 reachable, docs build.

Field semantics are from the xyOps docs/data.md.

A capture of the live xyOps found values these resources could not represent, which blocked adopting 6 plugins, 14 monitors, 1 alert and 3 categories. | Resource | Change | |---|---| | `xyops_plugin` | `icon`, `notes`, `kill` (`none`/`parent`/`all`), `runner`, read-only `stock`. `script_file` optional (stock plugins have none). **Breaking:** `uid`/`gid` are strings (xyOps stores a numeric id or an account name; numeric ones are still sent as numbers); state upgrades automatically. Reads tolerate `enabled` 0/1 and `uid`/`gid` text or empty. Unconfigured empty `groups` stay null. | | `xyops_monitor` | `sort_order`, `divide_by_delta` | | `xyops_alert` | `limit_jobs` | | `xyops_category` | `sort_order` | Every new attribute is **unmanaged while omitted**: never sent, read back as null, so existing configurations and state see no change. Import seeds a field only when xyOps holds it, so a matching config plans empty. Tests: import contract extended with the live shapes (stock plugin with numeric `enabled` and no script; custom plugin with a `uid` name and empty `gid`; monitor with `sort_order`/`divide_by_delta`), create sends only configured fields, flexible decoding, the plugin state upgrader. Local `check.sh`: all pass (56 unit, 55 acceptance skipped), govulncheck 0 reachable, docs build. Field semantics are from the xyOps `docs/data.md`.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
john/tofu-provider-xyops!12
No description provided.