feat: comprehensive ACCL-Q improvements - #4
Conversation
…sts, CI, docs, demo Add ultra_low_latency mode to API server with /ull/configure, /ull/feedback, /ull/status, and /ull/disarm endpoints. Create pyproject.toml and requirements.txt for Python packaging. Add ~100 new tests covering profiler, stats, deployment, constants, and ULL latency validation (239 total passing). Add GitHub Actions CI workflow for Python 3.11/3.12. Update performance_tuning.md with ULL guide, README with architecture/API docs, and INSTALL.md with Python quickstart. Add Demo 6 showcasing ULL hardware-autonomous feedback (16x speedup). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.11", "3.12"] | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
|
|
||
| - name: Run quantum driver tests | ||
| run: | | ||
| python -m pytest test/quantum/ -v --tb=short | ||
|
|
||
| - name: Run demo script | ||
| run: | | ||
| python demo_accl_q.py |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 7 months ago
In general, the fix is to explicitly define a permissions block that grants only the minimal required scopes for the GITHUB_TOKEN. For a pure test workflow that only checks out code and runs tests, read‑only repository contents access is sufficient, so contents: read at the workflow or job level is appropriate.
The best fix here, without changing existing functionality, is to add a workflow‑level permissions block near the top of .github/workflows/python-tests.yml, right after the name: and before the on: section. This will apply to all jobs in this workflow (there is only one job, test). The block should set contents: read, which is enough for actions/checkout@v4 and does not grant write privileges. No steps in this workflow require write access to issues, pull requests, or other resources, so we do not need additional scopes.
Concretely:
-
Edit
.github/workflows/python-tests.yml. -
Insert:
permissions: contents: read
between line 2 (blank line after
name: Python Tests) and line 3 (on:). No other imports, methods, or definitions are needed because this is GitHub Actions configuration only.
| @@ -1,5 +1,8 @@ | ||
| name: Python Tests | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, corrina, dev] |
Summary
ultra_low_latencyto MODE_MAP + 4 new endpoints (/ull/configure,/ull/feedback,/ull/status,/ull/disarm), bumped to v0.3.0pyproject.tomlwith[server],[dev],[all]extras +requirements.txtTest plan
python3 -m pytest test/quantum/ -v— 239 passed, 29 skipped, 0 failurespython3 demo_accl_q.py— all 6 demos complete successfully🤖 Generated with Claude Code