tools: agent_simulator.py --labs N to spread simulated agents over several labs
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 66/100
調査の方向性
Start with tools/agent_simulator.py and its existing argument parsing, JWT handling, and agent enrollment flow; then read Backend/system_routes.py and Backend/pops/routers/agents.py to understand token creation and lab assignment. Use docs/api.md and section 9 of docs/kapasite/README.md as references, and test only against a throwaway server and database. Done means the acceptance criteria pass, including the four-lab 100-agent distribution, help text, and flake8 tools/.
索引モデルが issue の本文から書いたものです。
説明
Context
tools/agent_simulator.py runs N fake agents against a test server (load tests, docs/kapasite/README.md). With --enroll-token every simulated agent uses the same token, so all of them land in one lab (or in Atanmamis_Cihazlar without a token). Pages and reports that group by lab (Sınıflar, Raporlar, lab targets in İşlemler) cannot be tried with a realistic spread.
An enrollment token can be bound to a lab: POST /api/system/enroll-token with {"lab_name": ..., "max_uses": ..., "ttl_hours": ...} (superadmin, see Backend/system_routes.py and docs/api.md). A device that enrolls with such a token is put in that lab (Backend/pops/routers/agents.py).
What to do
Add --labs N to the simulator:
- With
--labs N(and a superadmin JWT in--jwtorPOPS_SIM_JWT, which the simulator already reads), create N enrollment tokens through the API, bound to labsSIM-LAB-1…SIM-LAB-N, with a short lifetime and enough uses for the agents of each lab. - Agent
iuses the token of labi % N. - Print how many agents enrolled per lab at the end.
Acceptance criteria
-
--labsdefaults to 0, and without it the simulator behaves exactly as today. -
--labstogether with--enroll-token, or without a JWT, stops with a clearargparseerror. - After a run with
--n 100 --labs 4, Sınıflar shows fourSIM-LAB-*labs with 25 agents each. - The module docstring and
--helpdescribe the option, with an example. - Standard library and
websocketsonly; runs on Python 3.10;flake8 tools/is clean (CI checks it). - Tested against a throwaway server and database only, as described in section 9 of
docs/kapasite/README.md, never against a real server.
- 主要言語
- Python
- スター
- 1
- フォーク
- 2
- 平均マージ
- 9時間 3分
- マージ済み PR(30日)
- 140
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PashaCore/POps のほかの issue
-
CI: add Python 3.13 to the backend matrix (the SSO test CA needs key identifiers)対応中かも @RajGahoi が 14 日前に担当しました。 オープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue türkçe
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
good first issue türkçe
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue türkçe
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
good first issue türkçe
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
RunestoneInteractive/rs#1661 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
streamlink/streamlink#7192 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws-samples/sample-per-model-bedrock#795 ·
メンテナーはふだん 1 日以内に返信