docs(research): HPC setup-agent feasibility study#59
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive feasibility study for an HPC initial-setup agent, detailing architectural requirements, proposed tool schemas, and SSH security strategies. The review feedback identifies several improvement opportunities, including refactoring the Executable loader to support in-memory validation, implementing filename sanitization to prevent path traversal vulnerabilities, and noting Slurm version constraints for JSON output support.
| ] | ||
| } | ||
| ``` | ||
| ### Tool 7 — `validate_server_yaml` |
There was a problem hiding this comment.
The proposed validation tool aims to verify compatibility with Executable.from_servername(...). However, as noted in Section 2, Point H, this method is currently hardcoded to read from user_settings.user_server_dir. To avoid side effects (like writing temporary files to the user's config directory) during validation, the feasibility study should consider recommending a refactor of the Executable loader to support dictionary-based instantiation, which would allow the validation tool to operate purely in memory.
| "type": "object", | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "server_name": { "type": "string" }, |
There was a problem hiding this comment.
The write_server_yaml tool takes a server_name string. Since this is used to construct a file path under ~/.chemsmart/server, the feasibility study should explicitly mention the need for filename sanitization to prevent path traversal attacks (e.g., if an attacker-controlled planner provides a name like ../../.bashrc).
| ### Command-to-field mapping table | ||
| | Scheduler | Command | Verified source | Parse target | YAML field(s) populated | Confidence class | Notes | | ||
| |---|---|---|---|---|---|---| | ||
| | SLURM | `sinfo --json` | Official Slurm docs confirm JSON output and that filtering still applies (https://slurm.schedmd.com/sinfo.html) | Partitions, partition states, max time, node counts | `SCHEDULER`, candidate `QUEUE_NAME`, candidate `NUM_HOURS` | High | Best first probe when available because it is machine-readable | |
There was a problem hiding this comment.
The report mentions sinfo --json as the best first probe for SLURM. It would be beneficial to note that JSON output was introduced in Slurm 20.11. Many older HPC clusters still in production (e.g., running CentOS 7 with older Slurm versions) will not support this flag, making the text-based fallback (scontrol --oneliner) the primary path in those environments.
Summary
docs/research/setup_agent_feasibility.md, a research-only feasibility study for an initial HPC setup agentScope notes
bin/plan.mdwas intentionally not used because this task explicitly states it does not exist and should be skippedchemsmart/**,tests/**, orexamples/**Validation
Deliverable
docs/research/setup_agent_feasibility.md