@ngocsangairvds/vsaf 4.1.15 → 4.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngocsangairvds/vsaf",
3
- "version": "4.1.15",
3
+ "version": "4.1.16",
4
4
  "description": "logging step",
5
5
  "main": "packages/core/dist/index.js",
6
6
  "types": "packages/core/dist/index.d.ts",
@@ -46,7 +46,7 @@ uv run --directory ~/.claude/vds-scripts --package audit_orchestrator \
46
46
  ## Targeted Rerun Commands
47
47
 
48
48
  > **Recommended for runs expected to take more than 5 minutes**: use `./scripts/run-audit-in-tmux.sh` to prevent session timeout orphaning. The parent process must stay alive while child workflow processes run — tmux ensures this. See [cli-commands.md](./cli-commands.md#persistent-execution) for the full pattern.
49
- > `run-audit-in-tmux.sh` inherits the shared-env bootstrap behavior of `worktree_uv.sh`, so normal runs should load `VDS_AUDIT_STATE_DSN` and other shared runtime keys from `~/.vds/.env` automatically. Explicit `--state-dsn` is still propagated to child workflow lanes after the parent resolves it.
49
+ > Normal runs load `VDS_AUDIT_STATE_DSN` and other shared runtime keys from `~/.vds/.env` automatically via `vds_cli_common.env`. Explicit `--state-dsn` is still propagated to child workflow lanes after the parent resolves it.
50
50
 
51
51
  Use the effective repo-cache root for your environment as defined by the portable Phase 2 cache-root model documented in `portable-paths-and-config.md`.
52
52
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Current command surface is WHO-owned and runs from `WHO-project/vds-scripts`.
6
6
  When operating from a dedicated `vds-scripts` worktree, prefer `uv run --directory ~/.claude/vds-scripts ...` so a different checkout's active `.venv` does not leak into the current worktree.
7
- `worktree_uv.sh` also bootstraps missing shared runtime env from `~/.vds/.env` (or `VDS_ENV_FILE`) and re-roots execution to the owning repo, so detached shells and tmux sessions do not depend on manual `source ~/.vds/.env`.
7
+ The shared runtime env is bootstrapped from `~/.vds/.env` (or `VDS_ENV_FILE`) automatically by `vds_cli_common.env`, so detached shells and tmux sessions do not depend on manual `source ~/.vds/.env`.
8
8
 
9
9
  > **Interactive use vs. shell scripts**
10
10
  >
@@ -48,7 +48,7 @@ uv run --directory ~/.claude/vds-scripts --package audit_orchestrator \
48
48
  ## Targeted Rerun Commands
49
49
 
50
50
  > **Recommended for runs expected to take more than 5 minutes**: use `./scripts/run-audit-in-tmux.sh` to prevent session timeout orphaning. The parent process must stay alive while child workflow processes run — tmux ensures this. See [cli-commands.md](./cli-commands.md#persistent-execution) for the full pattern.
51
- > `run-audit-in-tmux.sh` inherits the shared-env bootstrap behavior of `worktree_uv.sh`, so normal runs should load `VDS_AUDIT_STATE_DSN` and other shared runtime keys from `~/.vds/.env` automatically. Explicit `--state-dsn` is still propagated to child workflow lanes after the parent resolves it.
51
+ > Normal runs load `VDS_AUDIT_STATE_DSN` and other shared runtime keys from `~/.vds/.env` automatically via `vds_cli_common.env`. Explicit `--state-dsn` is still propagated to child workflow lanes after the parent resolves it.
52
52
 
53
53
  Use the effective repo-cache root for your environment as defined by the portable Phase 2 cache-root model documented in `portable-paths-and-config.md`.
54
54
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  Current command surface is WHO-owned and runs from `WHO-project/vds-scripts`.
8
8
  When operating from a dedicated `vds-scripts` worktree, prefer `uv run --directory ~/.claude/vds-scripts ...` so a different checkout's active `.venv` does not leak into the current worktree.
9
- `worktree_uv.sh` also bootstraps missing shared runtime env from `~/.vds/.env` (or `VDS_ENV_FILE`) and re-roots execution to the owning repo, so detached shells and tmux sessions do not depend on manual `source ~/.vds/.env`.
9
+ The shared runtime env is bootstrapped from `~/.vds/.env` (or `VDS_ENV_FILE`) automatically by `vds_cli_common.env`, so detached shells and tmux sessions do not depend on manual `source ~/.vds/.env`.
10
10
 
11
11
  > **Interactive use vs. shell scripts**
12
12
  >
@@ -165,7 +165,7 @@ def test_render_installation_guide(sample_config: ConfluenceHubConfig) -> None:
165
165
 
166
166
  assert "<h1>Ecosystem Installation Guide</h1>" in body
167
167
  assert "git clone" in body
168
- assert "worktree_uv.sh sync" in body
168
+ assert "uv sync --directory ~/.claude/vds-scripts --all-packages" in body
169
169
 
170
170
 
171
171
  def test_render_quick_reference_vds_scripts_fallback(sample_config: ConfluenceHubConfig) -> None:
@@ -1,7 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import os
4
- import subprocess
5
4
  from pathlib import Path
6
5
 
7
6
  import pytest
@@ -19,10 +18,6 @@ def _write_env(path: Path, content: str) -> None:
19
18
  path.write_text(content, encoding="utf-8")
20
19
 
21
20
 
22
- def _worktree_uv_script() -> Path:
23
- return Path(__file__).resolve().parents[2] / "scripts" / "worktree_uv.sh"
24
-
25
-
26
21
  def test_load_shared_env_first_file_wins_when_keys_overlap(tmp_path: Path, monkeypatch) -> None:
27
22
  primary = tmp_path / "primary.env"
28
23
  fallback = tmp_path / "fallback.env"
@@ -133,103 +128,3 @@ def test_render_shared_env_exports_override_true_emits_existing_values(tmp_path:
133
128
  assert exports == "export TOKEN=from-file"
134
129
 
135
130
 
136
- @pytest.mark.integration
137
- @pytest.mark.slow
138
- def test_worktree_uv_bootstraps_shared_env_for_python_entrypoint(tmp_path: Path) -> None:
139
- env_file = tmp_path / "shared.env"
140
- _write_env(env_file, "VDS_AUDIT_STATE_DSN=postgresql://from-file/state\n")
141
-
142
- script = _worktree_uv_script()
143
- result = subprocess.run(
144
- [
145
- str(script),
146
- "run",
147
- "--project",
148
- "audit_orchestrator",
149
- "python",
150
- "-c",
151
- "import os; print(os.getenv('VDS_AUDIT_STATE_DSN') or '')",
152
- ],
153
- cwd=script.parent.parent,
154
- env={
155
- "HOME": os.environ["HOME"],
156
- "PATH": os.environ["PATH"],
157
- "VDS_ENV_FILE": str(env_file),
158
- },
159
- capture_output=True,
160
- text=True,
161
- check=False,
162
- timeout=30,
163
- )
164
-
165
- assert result.returncode == 0, result.stderr
166
- assert result.stdout.strip() == "postgresql://from-file/state"
167
-
168
-
169
- @pytest.mark.integration
170
- @pytest.mark.slow
171
- def test_worktree_uv_preserves_explicit_state_dsn_over_shared_env(tmp_path: Path) -> None:
172
- env_file = tmp_path / "shared.env"
173
- _write_env(env_file, "VDS_AUDIT_STATE_DSN=postgresql://from-file/state\n")
174
-
175
- script = _worktree_uv_script()
176
- result = subprocess.run(
177
- [
178
- str(script),
179
- "run",
180
- "--project",
181
- "audit_orchestrator",
182
- "python",
183
- "-c",
184
- "import os; print(os.getenv('VDS_AUDIT_STATE_DSN') or '')",
185
- ],
186
- cwd=script.parent.parent,
187
- env={
188
- "HOME": os.environ["HOME"],
189
- "PATH": os.environ["PATH"],
190
- "VDS_ENV_FILE": str(env_file),
191
- "VDS_AUDIT_STATE_DSN": "postgresql://from-shell/state",
192
- },
193
- capture_output=True,
194
- text=True,
195
- check=False,
196
- timeout=30,
197
- )
198
-
199
- assert result.returncode == 0, result.stderr
200
- assert result.stdout.strip() == "postgresql://from-shell/state"
201
-
202
-
203
- @pytest.mark.integration
204
- @pytest.mark.slow
205
- def test_worktree_uv_bootstraps_shared_env_from_external_cwd(tmp_path: Path) -> None:
206
- env_file = tmp_path / "shared.env"
207
- _write_env(env_file, "VDS_AUDIT_STATE_DSN=postgresql://from-file/state\n")
208
-
209
- script = _worktree_uv_script()
210
- outside_cwd = tmp_path / "outside"
211
- outside_cwd.mkdir()
212
- result = subprocess.run(
213
- [
214
- str(script),
215
- "run",
216
- "--project",
217
- "audit_orchestrator",
218
- "python",
219
- "-c",
220
- "import os; print(os.getenv('VDS_AUDIT_STATE_DSN') or '')",
221
- ],
222
- cwd=outside_cwd,
223
- env={
224
- "HOME": os.environ["HOME"],
225
- "PATH": os.environ["PATH"],
226
- "VDS_ENV_FILE": str(env_file),
227
- },
228
- capture_output=True,
229
- text=True,
230
- check=False,
231
- timeout=30,
232
- )
233
-
234
- assert result.returncode == 0, result.stderr
235
- assert result.stdout.strip() == "postgresql://from-file/state"