feat(admin-config-tool): task 2.1 - xcecommon.validation
Validate operator-authored YAML against the 7 bundled JSON schemas, enforce reserved-name and duplicate-name rejection, and flag undefined group/resource cross-references as non-blocking warnings.
This commit is contained in:
parent
798f19b83a
commit
12b13a54a6
3 changed files with 862 additions and 1 deletions
|
|
@ -22,7 +22,7 @@
|
|||
- _Requirements: 5.5, 8.1, 8.2, 8.6_
|
||||
|
||||
- [ ] 2. Core: xcecommon shared library
|
||||
- [ ] 2.1 (P) Validate operator-authored YAML against the bundled schemas
|
||||
- [x] 2.1 (P) Validate operator-authored YAML against the bundled schemas
|
||||
- Each of the seven config file types can be checked against its own bundled validation schema, independent of anything the operator supplies
|
||||
- Reserved queue/host names are rejected even when otherwise schema-valid
|
||||
- Duplicate names within a single file/section are rejected
|
||||
|
|
@ -146,3 +146,4 @@
|
|||
- **1.3**: nix's bare `python3` does not put `pip` on PATH — `python3Packages.pip` had to be added to `nativeBuildInputs` alongside the packages design.md's Technology Stack table lists; not a spec gap, just an operational dependency the table didn't need to spell out.
|
||||
- **1.3**: Claude Code `PostToolUse` hooks receive tool input via stdin JSON (`tool_input.file_path`), not a `$FILE_PATH` env var — brief.md's ruff-hook sketch used the env-var form, which would have silently no-op'd. The actual hooks added to `.claude/settings.json` follow this repo's existing `.wolf/hooks/post-write.js` stdin-JSON convention instead. Any future hook work in this repo should follow the same pattern, not brief.md's original sketch.
|
||||
- **1.3**: `src/xceadmin/src/xcecommon/schema_files/` (synced capnp + JSON schema copies) is a build artifact, regenerated every `xce-build.sh xceadmin` run — never hand-edit it, never commit it (`src/xceadmin/.gitignore` excludes it).
|
||||
- **2.1**: `check_undefined_refs` deliberately does not parse resource names out of `res_req`/`gpu_req` free-form LSF-style expression strings (e.g. `"mem>1000 rusage[mem=1000]"`) — design.md's `xcecommon.validation` component scopes this check to queue→host-group and limit→group/`resname` only. `limits.yaml`'s `projects` field and `scaler.yaml` name collisions are likewise out of scope — no `projects.yaml` catalog exists among the 7 config types, and Requirement 4.3 only enumerates queue/host/resource/group/limit names. `src/configs/hosts.yaml` has 2 pre-existing undefined refs (resource `mg`, host `h3`) that now surface as warnings — expected, not a regression; fixing the example fixture is outside this task's boundary.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue