Repository navigation
Fix undefined names, bind services to localhost, and add ruff CI - #209
Merged
Merged
Conversation
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
…orts Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
…servos Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Latest Pytest Result ✅
|
cursor
Bot
force-pushed
the
cursor/audit-ruff-bind-tests-2243
branch
from
October 12, 2026 08:39
772131f to
4a6da8f
Compare
cursor
Bot
force-pushed
the
cursor/audit-ruff-bind-tests-2243
branch
from
October 12, 2026 08:44
4a6da8f to
378eb9d
Compare
WhoIsMrSentry
marked this pull request as ready for review
October 12, 2026 08:46
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 12, 2026
…ts-2243 Fix undefined names, bind services to localhost, and add ruff CI
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
Co-authored-by: Emir HAMURCU <WhoIsMrSentry@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Özet
Denetim raporundaki ruff F821 / kullanılmayan import, ağ bind güvenliği, test toplama ve depo hijyeni maddeleri kapatıldı. Kamera, autonomy, VLM ve Ollama HTTP sunucuları varsayılan olarak
127.0.0.1dinler; mevcutserver.hostanahtarı durur, Pi tarafı env ile0.0.0.0seçebilir. Davranış bunun dışında aynı bırakıldı.Değişiklik tipi
Ne değişti
Tanımsız isimler (F821 / F811 / F823 / F601)
time(common/health.py,camera/services/capture.py),threading(autonomy/.../decision.py, OLED, wakeword, Google VLM client),check_latency, typing adları,asynccontextmanager,FastAPIve benzerleri.arduino_serial/xArduinoSerialService.py:cute_mapping.jsonartıkjson+Pathile yüklenir. Bareexcept: passkalktı; hata loglanır. ÇiftHeadArbiterTransportWrapperimportu kaldırıldı; sarmalayıcı metot içinden import edilir.job_types.get_job_registry_asynciçindeglobal _global_registryeklendi (F823, gerçek UnboundLocalError).laya_engineiçindeki yineleneninstructionsanahtarında çalışma anındaki (ikinci) metin bırakıldı.command_routergölgelemesi kasıtlı uyumluluk;# noqa: F811.Kullanılmayan import / değişken (F401 / F841)
__init__.pyyeniden dışa aktarımları ruffper-file-ignoresile duruyor.xArduinoSerialService.os,_default_serial_device,tts.Path,tts.requests,_load_piper_api,_wav_bytes_to_pcm) ve kontrat / bootstrap / console yeniden dışa aktarımları# noqa: F401ile korundu.Ağ bind
modules/common/bind_host.py. Env, YAMLserver.hostdeğerinin önüne geçer; env yoksa açık0.0.0.0korunur.CAM_HOST,AUTONOMY_HOST,VLM_HOST,OLLAMA_SERVICE_HOST.OLLAMA_HOSTOllama daemon URL’sidir, bind için kullanılmaz.0.0.0.0/SENTRYBOT_HOST).docs/PI_DEPLOYMENT_RUNTIME.md,README.md,modules/ai_provider/README.md.Testler
textualisteyen modüller, import’tan öncepytest.importorskipile atlanır.test_face_renderer_begin_uses_config_brightness:FaceRenderer.beginzatenbrightvefpsdeğerlerini config’tenEyeEngine’e geçiriyor. Pillow kurulu ortamda test geçiyor; Pillow yoksa modül artık collection error yerine skip olur.CI ve .gitignore
pyproject.toml[tool.ruff]: Python 3.10, seçilen kurallar E9, F401, F811, F821, F823, F841.__init__.pyiçin F401 yok sayılır..github/workflows/pytest.ymliçineruff==0.17.0adımı eklendi..gitignore:__init__.pysatırı yoktu (silinecek bir girdi bulunamadı).*.inidaraltılıp*.local.iniyapıldı;pytest.iniizlenmeye devam eder.modules/modules/state_manager/data/*.sqlite3-wal/shmsilindi.Etkilenen modüller
common, camera, autonomy, vlm_bridge, ai_provider, arduino_serial, agent_core, gateway, visual_output, voice, runtime_console, system_control ve ilgili testler.
Doğrulama
Test sonuçları
Önce (denetim, x86 venv, Pi kütüphaneleri yok):
test_face_renderer_begin_uses_config_brightness), 12 collection errorSonra (bu dal, ruff 0.17.0, pytest 9.1.1, Pillow kurulu, textual kurulu değil):
python3 -m ruff check .: All checks passed (seçilen kurallar)python3 -m pytest -q tests: 959 passed, 2 skipped, 0 failed (29.56s). Skip’ler textual eksikliği:test_textual_tui,test_sentrybot_launcher. Collection error yok.Arduino Kontrat Kontrolü (uygunsa)
contract.pydışında elle Arduino payload yazılmadı/arduino/requestkullanıyorcontract.py/contract_validators.pyyeniden dışa aktarımları korundu; payload üreticilerine dokunulmadı.Risk ve geri alma
Loopback varsayılanı, YAML’de açıkça
0.0.0.0yazılmamış kamera/autonomy/VLM/Ollama süreçlerini yalnızca localhost’a çeker. LAN erişimi için ilgiliserver.host: 0.0.0.0veya env (CAM_HOSTvb.) yeterlidir. Geri alma: bu dalı revert etmek.İlgili issue
Denetim raporu (
sentrybot_audit); bağlı issue numarası yok.Takip işleri (bu PR dışında)
requirements.txtdosyaları ve lockfile yok.agent_api_compat.py(~1154),evaluate_laya_action_proposals.py(~1021),companion_execution_loop.py(~852),laya_engine.py(~809),runtime/schemas.py(~721)..sentrybot/AI metadata,AGENTS.md,opencode.jsonyerleşimi.circuit/arduino.pdf(~2.3 MB) ve3d_Print/ikili dosyaları.main’e push alışkanlığı.