Skip to content

Gym env, Arena eval, and netforge CLI - #9

Merged
elprofesoriqo merged 8 commits into
mainfrom
feat/gym-cli
Sep 20, 2026
Merged

elprofesoriqo merged 8 commits into
mainfrom
feat/gym-cli

Conversation

@elprofesoriqo

Copy link
Copy Markdown
Collaborator

Summary

  • Typed EnvConfig, tick/reset split, and Gymnasium / PettingZoo ids (NetForge/Blue-v4, netforge/ransomware-v4).
  • Arena 2026 metrics, named probes, YAML scenario packs, and the netforge CLI (python -m netforge).
  • HTML replay, offline dataset export, league helpers, and a CAGE-style make_blue example. Trainers stay out of tree.

Test plan

  • pytest tests/ -m fast
  • python -m netforge version and python -m netforge run ransomware --max-ticks 8
  • python -c "import netforge_rl; from pettingzoo import make; make('parallel', 'netforge/ransomware-v4', max_ticks=4).reset(seed=0)"

Checklist

  • One issue, one PR
  • Tests added or updated
  • Did not vendor a training algorithm (MAPPO / QMIX / CT-GMARL stay out of tree)
  • User-path docs updated only if the user path changed (docs follow in stacked PR)

Stacked: merge this before #docs and #ci PRs.

elprofesoriqo and others added 6 commits September 20, 2026 15:15
Keep PettingZoo parallel and Gymnasium Blue as the public make() surface without stuffing trainers into this tree.

Co-authored-by: Cursor <cursoragent@cursor.com>
Register DeployEDR so the mask matches the action table, and keep oracle graphs off the Blue observation path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rank on mission/SLA/FPs/security/CVaR instead of mean reward, and keep Windows CLI catalog text ASCII.

Co-authored-by: Cursor <cursoragent@cursor.com>
…rust.

Community packs stay data, not bundled training algorithms.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pin the project to netforge-rl 4.0.0 with Gymnasium/PettingZoo as the gym, not a trainer repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
…xample.

These sit around the gym so researchers can export trajectories and submissions without vendoring MAPPO or QMIX.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elprofesoriqo elprofesoriqo mentioned this pull request Sep 20, 2026
3 of 7 tasks

@elprofesoriqo elprofesoriqo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the gym/CLI stack (6 commits). Merge this first.

Looks good

  • EnvConfig / tick / reset split is the right grain; gym.make("NetForge/Blue-v4") and make("parallel", "netforge/ransomware-v4") match the tests.
  • DeployEDR is actually registered, so the action-mask reachability test can pass.
  • Questions catalog is ASCII, so netforge questions does not crash on Windows cp1252.

Notes (non-blocking)

  • First commit subject has a UTF-8 BOM (Split...). Harmless but ugly in git log.
  • Until #11 lands, GitHub still runs .github/workflows/python-app.yml (ruff check . on the whole tree). Expect that job to stay red on pre-existing simulator files; it is not a regression from this PR.
  • python -m netforge needs the netforge package, which is in this PR. Docs/README follow in #10.

elprofesoriqo and others added 2 commits September 20, 2026 15:21
Unindent the evaluate command in the docstring and construct FrameRecorder before asserting empty save.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ruff 0.16 treats a bare ignore list as a much larger rule set, which fails on the existing simulator files.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elprofesoriqo
elprofesoriqo merged commit 57b1158 into main Sep 20, 2026
2 checks passed
elprofesoriqo added a commit that referenced this pull request Sep 20, 2026
## Summary
- Replace MkDocs with Sphinx + Furo (FlowEdge parchment/wine, Excalidraw
figures).
- Rewrite README and docs around the cybersecurity RL gym: SIEM vs
oracle, first run, Arena, packs.
- No Light/Dark/Auto picker; theme follows the browser. Keep arXiv
citation and CybORG/DSTG license notes.

## Test plan
- [ ] `pip install -e ".[docs]"`
- [ ] `sphinx-build -b html -W --keep-going docs docs/_build/html`
- [ ] Open `docs/_build/html/index.html` and confirm nav has no
Light/Dark/Auto controls

## Checklist
- [x] One issue, one PR
- [ ] Tests added or updated
- [x] Did not vendor a training algorithm (MAPPO / QMIX / CT-GMARL stay
out of tree)
- [x] User-path docs updated only if the user path changed

Stacked on #9. Retarget to `main` after #9 merges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant