Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
# tests/test_isolated_bot_social.py parses the isolated overlay with PyYAML, so the
# dependency is pinned here rather than skipped: a missing parser must fail this job.
# Both matrix versions (3.11, 3.13) have manylinux x86_64 wheels at this pin.
- name: Install the pinned YAML parser for the overlay contract
run: python -m pip install --disable-pip-version-check 'PyYAML==6.0.2'
- name: Python tests with explicit trusted runner Node
run: |
install -d -m 0700 "$RUNNER_TEMP/flybot-workspace-planner-bin"
Expand Down
1 change: 1 addition & 0 deletions docs/COMPOSE_MANAGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ resume, data deletion or purge. Owner may explicitly start only after STOP conve
# Safe temporary SQLite + local HTTP + actual subprocess STUB only:
scripts/accept-compose-manager-stub.sh
# Full original + new suite (Node planner requires trusted Node per runtime docs):
python3 -m pip install 'PyYAML==6.0.2' # isolated Bot Social overlay contract test
FLYBOT_WORKSPACE_PLANNER_NODE="$(command -v node)" python3 -m unittest discover -s tests -v
node --test manager/compose-planner/compose-command-planner.test.js
```
Expand Down
3 changes: 2 additions & 1 deletion docs/RUNTIME_IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ Manager headers: `Authorization: Bearer <manager-id>.<43-character-opaque-token>

## Running and configuration

Python3.11+; **Node18+ is additionally needed for planner integration/tests** (local verification used Node24.22.1). No pip/npm dependency install required. The manager-side adapter defaults to the system executable search path only. For an operator-installed/CI tool-cache Node outside that path, explicitly set `FLYBOT_WORKSPACE_PLANNER_NODE` to its absolute executable path (or inject the constructor argument); relative paths, non-Node filenames and group/world-writable executables are refused. This is operator process configuration, never an HTTP/JSON selector. CI stages its preinstalled runner Node into a private0700 job directory with an0500 executable, then exports that absolute path before Python tests. The application permission check is not relaxed for writable hosted-tool-cache binaries. The Web/API remains Python stdlib only.
Python3.11+; **Node18+ is additionally needed for planner integration/tests** (local verification used Node24.22.1). No pip/npm dependency install is required for the manager or the server; the test suite additionally parses the isolated Bot Social overlay with PyYAML 6.0.2, so a local `python3 -m pip install 'PyYAML==6.0.2'` is needed before `unittest discover`. A missing parser fails the suite instead of skipping the overlay contract. The manager-side adapter defaults to the system executable search path only. For an operator-installed/CI tool-cache Node outside that path, explicitly set `FLYBOT_WORKSPACE_PLANNER_NODE` to its absolute executable path (or inject the constructor argument); relative paths, non-Node filenames and group/world-writable executables are refused. This is operator process configuration, never an HTTP/JSON selector. CI stages its preinstalled runner Node into a private0700 job directory with an0500 executable, then exports that absolute path before Python tests. The application permission check is not relaxed for writable hosted-tool-cache binaries. The Web/API remains Python stdlib only.

```sh
python3 -m pip install 'PyYAML==6.0.2' # isolated Bot Social overlay contract test
python3 -m unittest discover -s tests -v
node --test manager/compose-planner/compose-command-planner.test.js
python3 -m compileall -q flybot-workspace tests
Expand Down
13 changes: 7 additions & 6 deletions tests/test_isolated_bot_social.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
"""Isolated FlyBot Bot Social overlay: additive, loopback-only, no FlyBot hooks."""
"""Isolated FlyBot Bot Social overlay: additive, loopback-only, no FlyBot hooks.

The overlay contract is a YAML parse, so PyYAML is a hard requirement: if the parser is missing,
this module must fail to import instead of skipping the only test that checks the contract. CI
installs the pinned version in .github/workflows/tests.yml.
"""
import unittest
from pathlib import Path

try:
import yaml
except ImportError: # pragma: no cover - PyYAML is in the usual test env
yaml = None
import yaml

ROOT = Path(__file__).resolve().parents[1]
OVERLAY = ROOT / 'deploy' / 'isolated' / 'bot-social.compose.yml'


@unittest.skipUnless(yaml, 'PyYAML is required to parse the overlay')
class IsolatedBotSocialOverlayTests(unittest.TestCase):
def test_overlay_adds_only_bot_social_on_loopback(self):
text = OVERLAY.read_text()
Expand Down
Loading