feat(w0-pr6): json-to-profile.py -- auto-write node profile from probe JSON - #1486
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9732b8caf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ) | ||
| p.add_argument( | ||
| "--out-dir", | ||
| default="pmoves/config/profiles/", |
There was a problem hiding this comment.
Resolve default profile output path from script location
The default --out-dir is a relative string (pmoves/config/profiles/), so it is resolved against the caller’s current working directory rather than the repository root. When operators run the script as documented from deploy/provision (python json-to-profile.py ...), it writes to deploy/provision/pmoves/config/profiles/... instead of the real pmoves/config/profiles/..., and the generated profile is silently missed by profile-loading tooling. Compute the default from __file__ (or require an explicit absolute/normalized path) to avoid this miswrite.
Useful? React with 👍 / 👎.
…e JSON Reads glances-autodetect JSON output and emits a PMOVES node profile YAML with full mapping: arch normalisation, tailscale role, GPU single/multi, nic_collision warnings, platform-hint notes, arm64 compose override. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…quality fixes
- Add validate_probe() with _REQUIRED_PROBE_FIELDS check (cpu, ram_gb, suggested_node_type); exits 1 on missing fields
- _build_gpu_block now always returns {"gpus": [...]} list — never singular {"gpu": {...}} key
- write_profile accepts pre-rendered yaml_text str; _dump_yaml called once in main (no double-render)
- build_tags loops all GPUs for vendor tags, not just gpus[0]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
c3fcf38 to
24feee8
Compare
- json-to-profile.py: pass unifi_topology through to node profile YAML (consumed from glances-autodetect output after W0-PR5 unifi probe) - SKILL.md: remove BLOCKED notice (feat/w0-pr4-ghost-detector merged #1591) add actual script paths, profile auto-write pipeline, PR references - TAC node-4090-laptop: n4090.shift-crew.probe-wire status future → done Closes W0 substrate chain: PR #1591 (PR-4) → #1588 (PR-5) → #1486 (PR-6) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Release Note: W0-PR6 adds deploy/provision/json-to-profile.py converter (probe JSON → node profile YAML). Not a suit change; converter only. Tagged for §6.4 gate satisfaction — suit-policy regex false-positive on "profile" substring in filename.
Summary
deploy/provision/json-to-profile.py— convertsglances-autodetect.sh/.ps1JSON probe output into a PMOVES node profile YAMLgpu: {}) and multi-GPU (gpus: []) shapes matching existing profile conventions--json,--node-id,--out-dir(defaultpmoves/config/profiles/),--dry-run,--force--forcepassedMapping implemented
arch: x86_64arch: amd64arch: aarch64arch: arm64+compose_overrides: [docker-compose.arm64.override.yml]suggested_node_type: gpu-5090/gpu-4090/rdna4-workstation/dgx-sparktailscale.role: gpu-nodesuggested_node_type: pve-member/pve-member-freshtailscale.role: pve-membersuggested_node_type: desktop-workstationtailscale.role: desktop-workstationnic_collisionsnon-emptyghost_adapter_warning: true+ collision details innotesplatform_hints.has_docker: falsesuggestion_confidence: lowos.distro: windowsdocker-compose.windows.override.ymlTest plan
--helpexits 0 with full usagerdna4-workstation/ AMD / x86_64) — correctgpu: {}shape,amd64arch,gpu-noderolegpus: []list, all warning notes emitted,ghost_adapter_warning: trueaarch64/dgx-spark—arm64arch,docker-compose.arm64.override.ymlincompose_overrides,dgxtag--force🤖 Generated with Claude Code