docs(spec): xcecli-presets: one file per preset, same layout on client and server

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-12 10:15:34 +00:00
parent 1a5ddc2642
commit c0bd701f48
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
3 changed files with 28 additions and 5 deletions

View file

@ -366,7 +366,7 @@ Not part of this spec, recorded here because they replace profile defaults:
limits). The client expands it; a command-line flag replaces the preset's
value for that option as a whole. The submit carries only the expanded
values.
- Personal presets live in `~/.config/xce/presets.yaml`.
- Personal presets live one file per preset under `~/.config/xce/presets/`.
- The apiserver **only shares**: admin-deployed preset files served
read-only (`GET /api/v1/presets`, `GET /api/v1/presets/{name}`). Pulling
copies a preset into the local file, so a server preset being removed

View file

@ -23,12 +23,35 @@ configuration level.
or scheduler, own no attribute, are not a configuration level and carry
no privilege: `app:use`, `queue:submit`, the profile's essentials, queue
ceilings and project quotas still apply at submit.
- **Personal presets** live in `~/.config/xce/presets.yaml`; users change
them on the fly (`xcecli preset set / edit / show / list / delete`).
- **One file per preset** (user, 2026-10-12), the same layout on client
and server:
```
~/.config/xce/presets/ # client (personal + pulled)
openfoam-large.yaml
cfd-team/openfoam-large.yaml # pulled from a namespace keeps its path
<apiserver presets dir>/ # server (admin-deployed, read-only)
openfoam.yaml
cfd-team/openfoam-large.yaml # served as "cfd-team/openfoam-large"
```
- The file name is the preset name (no `name:` inside); names use
`[A-Za-z0-9._-]`; namespaces are one level of subdirectory.
- Writes are atomic (temp file + rename); a syntax error breaks one
preset only; xcecli rewrites only the file it changes, so other files
keep their comments.
- `preset export a b c` writes a multi-document YAML bundle (`---`, each
with its name); `preset import` splits it back into files.
- `preset pull <ns>/<name>` keeps the namespace path; `--as <name>`
renames locally.
- Why not one `presets.yaml`: concurrent xcecli runs would overwrite each
other, one syntax error breaks all presets, rewriting loses comments,
and server-side add/remove becomes editing a shared file.
- **Personal presets** are files under `~/.config/xce/presets/`; users
change them on the fly (`xcecli preset set / edit / show / list / delete`).
- **The server only shares.** The apiserver serves admin-deployed preset
files read-only: `GET /api/v1/presets` (list) and
`GET /api/v1/presets/{name}` (fetch). Team presets are namespaced
(`<team>/<name>`). No database, no HA; with several apiservers the files
(`<team>/<name>`, a subdirectory). No database, no HA; with several apiservers the files
are deployed to each, like `rbac.yaml`. Every authenticated user may see
them.
- **Pull copies.** `xcecli preset pull <name>` writes a complete, standalone

View file

@ -122,7 +122,7 @@ Direction: `.kiro/steering/resource-model.md`. Decisions, proposals (PR-1 generi
- [ ] project-guarantee — NEW 2026-10-09 (configuration layering, backlog). Project-owned guarantees (resource amount or host pool), borrowing of idle guaranteed capacity, reclaim through preemption. Brief: `.kiro/specs/project-guarantee/brief.md`. Dependencies: project-config, scheduler-preemption.
- [ ] job-resize — NEW 2026-10-10 (from long-running services discovery; not on the services path). Grow/shrink a running parallel job's allocation (LSF resizable jobs, `bresize`) for elastic applications. Brief: `.kiro/specs/job-resize/brief.md`. Dependencies: parjob-placement, host-failure-job-recovery.
- [ ] project-delegated-membership — NEW 2026-10-10 (from project-config requirements, user decision: future). Project managers edit their project's (and subtree's) members at runtime without an admin config push; needs a durable store that coexists with `xceadmin` config pushes (e.g. a separate delegated member list) and audit. Dependencies: project-config, rbac-persistence.
- [ ] xcecli-presets — NEW 2026-10-12 (from application-profile discussion, user decisions). Client-side presets replace convenience defaults in profiles: a preset is a set of job options (`--app`, `--queue`, `-R`, `-n`, env, limits) expanded by the client, a flag replacing the preset's value for that option; personal presets in `~/.config/xce/presets.yaml`; the apiserver only shares admin-deployed presets read-only (`GET /api/v1/presets[/{name}]`), and `preset pull` copies one locally so server-side removal never affects users (`preset diff`, `pull --force` user-initiated); user-to-user sharing by `preset export`/`import`; presets carry no privilege and are not a configuration level; optional preset-name job label; the portal does the same expansion. Brief: `.kiro/specs/xcecli-presets/brief.md`. Dependencies: application-profile.
- [ ] xcecli-presets — NEW 2026-10-12 (from application-profile discussion, user decisions). Client-side presets replace convenience defaults in profiles: a preset is a set of job options (`--app`, `--queue`, `-R`, `-n`, env, limits) expanded by the client, a flag replacing the preset's value for that option; one file per preset (`~/.config/xce/presets/<ns>/<name>.yaml`, same layout in the apiserver's presets dir), env capture by name (`pass:`; `XCE_*` and secret-looking names excluded); the apiserver only shares admin-deployed presets read-only (`GET /api/v1/presets[/{name}]`), and `preset pull` copies one locally so server-side removal never affects users (`preset diff`, `pull --force` user-initiated); user-to-user sharing by `preset export`/`import`; presets carry no privilege and are not a configuration level; optional preset-name job label; the portal does the same expansion. Brief: `.kiro/specs/xcecli-presets/brief.md`. Dependencies: application-profile.
- [ ] profile-usage-insight — NEW 2026-10-12 (from application-profile discussion, backlog; no brief yet). Per-profile report over recent jobs comparing the profile's defaults with actual use (requested vs. peak memory, CPU efficiency, OOM kills, pend time, runtime by variant) and suggesting better values for site presets (or a profile essential), e.g. "preset openfoam rusage mem 4000, p95 peak 1600 → suggest 2000" (Kubernetes VPA recommender precedent). **Advisory only** (user decision): the admin applies changes to site presets or `applications.yaml`; nothing tunes itself. Optional user hint ("used 1.4G of 4G requested"). Dependencies: application-profile, run usage in job records.
- [ ] lsf-config-migration — NEW 2026-10-09 (user idea, backlog; no brief yet). A tool (likely an `xceadmin` subcommand) that converts LSF configuration (`lsb.queues`, `lsb.applications`, `lsb.resources` Limit sections, `lsb.users`/`lsb.hosts` groups, `lsb.params` defaults, project settings) into XCE `configs/*.yaml`, with a report of what does not map: queue `RES_REQ` (XCE queues are policy only; move into a profile or drop), LSF's full per-section merge rules vs XCE's simplified ones, compound/alternative resreqs, unsupported parameters. Dependencies: job-config-merge, application-profile, project-config, parjob-placement (span), admin-config-tool. Promote via `/kiro-discovery` when those land.