Skip to content

Commit 1aeaec8

Browse files
fix tsets
1 parent 3afa080 commit 1aeaec8

2 files changed

Lines changed: 26 additions & 27 deletions

File tree

.agents/skills/pioreactor-cli/SKILL.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ Prefer the command's current `--help` output and the implementation in `core/pio
3838
- Test a job or command locally with `pio` before scaling it through `pios` when that is practical.
3939
- Remember that `pios` adds target selectors such as `--units` and `--experiments`; avoid relying on the default target set unless the user explicitly asked for all eligible workers.
4040

41-
## Source Files
42-
43-
- `core/pioreactor/cli/pio.py`: local CLI command group and many subcommands.
44-
- `core/pioreactor/cli/pios.py`: leader-to-workers orchestration CLI.
45-
- `core/pioreactor/cli/run.py`: `pio run` job discovery and launch behavior.
46-
- `core/pioreactor/web/tasks.py`: Huey-backed tasks used by some leader/web workflows.
47-
- `core/pioreactor/config.py`: config loading and override behavior.
48-
4941
## Safe Execution Rules
5042

5143
- Do not run broad production-affecting commands unless the user explicitly asked for that scope. Examples: `pios kill --all-jobs -y`, `pios shutdown`, `pios reboot`, `pios update app`, `pios rm`, and cluster-wide plugin changes.
@@ -59,29 +51,29 @@ Prefer the command's current `--help` output and the implementation in `core/pio
5951
### Inspect Current CLI Syntax
6052

6153
```bash
62-
.venv/bin/pio --help
63-
.venv/bin/pio <command> --help
64-
.venv/bin/pios --help
65-
.venv/bin/pios <command> --help
54+
pio --help
55+
pio <command> --help
56+
pios --help
57+
pios <command> --help
6658
```
6759

6860
### Local Job Work
6961

7062
```bash
71-
.venv/bin/pio jobs running
72-
.venv/bin/pio run <job_name> [job options]
73-
.venv/bin/pio update-settings <job_name> [setting options]
74-
.venv/bin/pio kill --job-name <job_name>
63+
pio jobs running
64+
pio run <job_name> [job options]
65+
pio update-settings <job_name> [setting options]
66+
pio kill --job-name <job_name>
7567
```
7668

7769
Check `core/pioreactor/background_jobs/base.py` and the job implementation when lifecycle, published settings, MQTT topics, or cleanup behavior matter.
7870

7971
### Cluster Job Work
8072

8173
```bash
82-
.venv/bin/pios run <job_name> --units <unit> [job options]
83-
.venv/bin/pios update-settings <job_name> --units <unit> [setting options]
84-
.venv/bin/pios kill --job-name <job_name> --units <unit>
74+
pios run <job_name> --units <unit> [job options]
75+
pios update-settings <job_name> --units <unit> [setting options]
76+
pios kill --job-name <job_name> --units <unit>
8577
```
8678

8779
For worker-targeted failures, distinguish leader dispatch failures from worker-local failures. Inspect the `pios` implementation, leader API route, Huey task, and worker `/unit_api` route as appropriate.
@@ -96,8 +88,8 @@ For worker-targeted failures, distinguish leader dispatch failures from worker-l
9688
### Logs and MQTT
9789

9890
```bash
99-
.venv/bin/pio logs -n 50
100-
.venv/bin/pio mqtt -t "pioreactor/<unit>/<experiment>/<job_name>/#"
91+
pio logs -n 50
92+
pio mqtt -t "pioreactor/<unit>/<experiment>/<job_name>/#"
10193
```
10294

10395
Use narrow MQTT topics when possible. Stop subscriptions before finalizing.
@@ -108,8 +100,8 @@ Use narrow MQTT topics when possible. Stop subscriptions before finalizing.
108100
- For command-syntax or discovery work, smoke check the current command:
109101

110102
```bash
111-
.venv/bin/pio <command> --help
112-
.venv/bin/pios <command> --help
103+
pio <command> --help
104+
pios <command> --help
113105
```
114106

115107
- For live cluster behavior, report exactly what was run, which unit or experiment was targeted, and any services or environment variables that mattered.

core/tests/test_update_app_commands.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from pioreactor.cli.pio import get_update_app_commands
1616
from pioreactor.config import temporary_config_change
1717
from pioreactor.mureq import Response
18+
from pioreactor.paths import get_pio_venv_path
1819

1920

2021
@pytest.fixture(autouse=True)
@@ -38,7 +39,7 @@ def mock_release_metadata_response(tag_name: str, assets: list[dict[str, str]])
3839

3940
def pip_install_app_from_git(repo: str, ref: str, extra: str = "leader_worker") -> list[str]:
4041
return [
41-
"/opt/pioreactor/venv/bin/pip",
42+
str(get_pio_venv_path() / "bin" / "pip"),
4243
"install",
4344
"--force-reinstall",
4445
"--index-url",
@@ -50,7 +51,13 @@ def pip_install_app_from_git(repo: str, ref: str, extra: str = "leader_worker")
5051

5152

5253
def pip_install_app_from_wheel(source: str) -> list[str]:
53-
return ["/opt/pioreactor/venv/bin/pip", "install", "--force-reinstall", "--no-index", source]
54+
return [
55+
str(get_pio_venv_path() / "bin" / "pip"),
56+
"install",
57+
"--force-reinstall",
58+
"--no-index",
59+
source,
60+
]
5461

5562

5663
def verify_release_archive_command(source: str, version: str) -> list[str]:
@@ -384,7 +391,7 @@ def mock_get(_url: str, **_kwargs) -> Response:
384391
(["sudo", "rm", "-rf", tmp_rls_dir], 98),
385392
(
386393
[
387-
"/opt/pioreactor/venv/bin/pip",
394+
str(get_pio_venv_path() / "bin" / "pip"),
388395
"install",
389396
"--no-index",
390397
f"--find-links={tmp_rls_dir}/wheels/",
@@ -394,7 +401,7 @@ def mock_get(_url: str, **_kwargs) -> Response:
394401
),
395402
(
396403
[
397-
"/opt/pioreactor/venv/bin/pio",
404+
str(get_pio_venv_path() / "bin" / "pio"),
398405
"repair",
399406
],
400407
99,

0 commit comments

Comments
 (0)