Repository navigation
fix(config): register AUTOBOT_BROWSER_SERVICE_HOST/PORT, AUTOBOT_VNC_PORT (#15151) - #16555
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
AutoBot Phase Validation ResultsSystem Maturity: 96.5% Phase Status:PASS Phase 1: Core Infrastructure: 100.0% Recommendations:
|
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Independent review of Registers |
6ddf509 to
9113934
Compare
AutoBot Phase Validation ResultsSystem Maturity: 96.5% Phase Status:PASS Phase 1: Core Infrastructure: 100.0% Recommendations:
|
|
Fixed at `0c9442de6`: added `docs/guides/CONFIGURATION_GUIDE.md` to `.github/filters/python-paths.yml`, matching the same pattern as every other entry in that file (#14544, #14891, #15713, #16275, ...). Without it, a change confined to the guide would take the required-context shim's green while `configuration_guide_env_vars_test.py` never ran. Verified the pattern actually matches via `fnmatch` against the full filter list — `docs/guides/CONFIGURATION_GUIDE.md` is now covered. Note: this branch collides with #16440 on `repo_tests/configuration_guide_env_vars_test.py` and `docs/guides/CONFIGURATION_GUIDE.md` itself — tracking that consolidation separately per the sweep's instruction, not resolved in this push. |
|
Delta |
…PORT (#15151) CONFIGURATION_GUIDE.md documented AUTOBOT_PLAYWRIGHT_HOST, AUTOBOT_PLAYWRIGHT_API_PORT and AUTOBOT_PLAYWRIGHT_VNC_PORT -- none of the three read by any code, registered in env_registry.py, or present in any tracked .env* file, so setting any of them had no effect anywhere. The real, working knobs are AUTOBOT_BROWSER_SERVICE_HOST/_PORT and AUTOBOT_VNC_PORT (autobot_shared/ssot_config.py's pydantic Field(alias=...) fields) -- read via a mechanism check_env_var_registry.py's os.environ.get/env_utils detection never saw, the same visibility gap #15710 closed for a different reader shape. Corrected the guide to the real names and registered all three. Added repo_tests/configuration_guide_env_vars_test.py (#15151's AC2): every AUTOBOT_* name the guide documents must be registered or a tracked gap. 18 other undocumented gaps surfaced by writing this guard -- filed as #16554 rather than guessed at; each needs the same per-name trace these three got.
…#15151) 37's sweep: configuration_guide_env_vars_test.py reads docs/guides/CONFIGURATION_GUIDE.md, and .github/filters/python-paths.yml had no entry for it -- a change confined to the guide (documenting a name that resolves to nothing) would compute python != 'true', the required-context shim would report python-suite green, and the guard written to catch exactly that would never run. Same shape as every other entry in this file (#14544, #14891, #15713, #16275, ...). Verified the pattern actually matches: fnmatch against every filter entry, docs/guides/CONFIGURATION_GUIDE.md now covered.
0c9442d to
0e2bf8b
Compare
|
Delta
This head was pushed with the pre-push pytest timeout accepted, so CI is its only verification. It had 23 checks pending when I posted. |
Thinking Path
#15151 found that
AUTOBOT_PLAYWRIGHT_HOSTandAUTOBOT_PLAYWRIGHT_API_PORTare documented inCONFIGURATION_GUIDE.mdbut read by nothing: notenv_registry.py, no Python/TypeScript/shell code, no tracked.env*file. The issue asked for one of two fixes: wire them to whatever really configures the Playwright service, or remove them from the guide.Tracing
services/playwright_service.py::get_playwright_service(config.vm.browser, which raises"AUTOBOT_BROWSER_SERVICE_HOST environment variable must be set"when unset) led toautobot_shared/ssot_config.py's pydanticField(alias=...)fields:AUTOBOT_BROWSER_SERVICE_HOST(default127.0.0.1) andAUTOBOT_BROWSER_SERVICE_PORT(default9001) are the real, working knobs — read via a mechanismcheck_env_var_registry.py's reader-detection (os.environ.get/env_utilscalls) never sees, so they were unregistered too despite being live. So the right fix is "wire the guide to the real names," not remove them — the capability already exists, the guide just named the wrong knob.While tracing this I found a third name right next to the other two with the identical defect:
AUTOBOT_PLAYWRIGHT_VNC_PORT(guide) vs. the realAUTOBOT_VNC_PORT(ssot_config.py, default6080— the same default as the guide's wrong name, which is exactly why nobody noticed: the wrong name and the real one happened to agree on the default). Fixed in the same change since it's the same defect, same file, same fix shape.Writing #15151's AC2 guard (every documented
AUTOBOT_*name is registered or a tracked gap) surfaced that 18 other names in the same guide are also unregistered — a much bigger pre-existing gap than this issue's scope. Rather than guess through all 18 (each needs the same kind of trace these three got, and at least three of them are protocol enums that may not even fitenv_registry.py's plain-type shape), I filed #16554 to track them and gave the guard test a_KNOWN_GAPSescape hatch naming that issue — the same "recorded, not certified" pattern this repo already uses elsewhere (e.g.core_router_auth_guard_test.py's_TRACKED_BY_OTHER_ISSUES).What Changed
docs/guides/CONFIGURATION_GUIDE.md:AUTOBOT_PLAYWRIGHT_HOST→AUTOBOT_BROWSER_SERVICE_HOST,AUTOBOT_PLAYWRIGHT_API_PORT→AUTOBOT_BROWSER_SERVICE_PORT,AUTOBOT_PLAYWRIGHT_VNC_PORT→AUTOBOT_VNC_PORT.autobot_shared/env_registry_backend_services.py: registers all three,component="network".docs/developer/CLAUDE_RULES.md: the autogenerated env-var table gets the three new rows and the updated count (219→222) — hand-matched againstpipeline-scripts/generate_env_docs.py's exact formatting logic (read, not run, per the owner's no-local-execution rule) and confirmed byte-exact by theenv-vars-documentedpre-commit hook's own automatic run.repo_tests/configuration_guide_env_vars_test.py: everyAUTOBOT_*name the guide documents must be inREGISTRYor in this file's_KNOWN_GAPS(naming docs(config): 15 more AUTOBOT_* names in CONFIGURATION_GUIDE.md are unregistered in env_registry.py #16554); a second test fails if a known gap quietly becomes registered without being removed from the list (the tech-debt(guards): the exec-bit baseline cannot detect an entry that outlived its fix, and its tests broke when the backlog hit zero #15762 shape — a record outliving its fix).Verification
Static only, per the owner's no-local-execution rule — no test suite or generator script run locally; CI, the pre-commit hook, and the pre-push hook are the authority.
get_playwright_service→config.vm.browser→ssot_config.py'sField(alias="AUTOBOT_BROWSER_SERVICE_HOST")in full before registering, to confirm the real reader and default rather than guessing.pipeline-scripts/generate_env_docs.pyin full to hand-derive its exact table-row and count-line format rather than running it; theenv-vars-documentedpre-commit hook (which runs the equivalent check automatically on every commit) confirmed the hand-edit matches exactly — it failed twice on a first-pass mismatch (a missed count-line bump) and passed once corrected, which is the hook's own automatic run giving the evidence, not a manual invocation of the generator.grepthat all 18_KNOWN_GAPSnames are genuinely absent fromREGISTRYas of this diff, so the guard's initial state is accurate.[pre-push OK] pytest: all relevant tests pass).Risks
Low.
AUTOBOT_BROWSER_SERVICE_HOST/_PORT/AUTOBOT_VNC_PORTalready existed and already had these exact defaults — this only makes them discoverable and documented correctly; nothing about the real config mechanism changes.Model Used
Claude Sonnet 5 (claude-sonnet-5)
Issue Link
Closes #15151
Changelog fragment
changelog/unreleased/15151-playwright-env-vars.mdSingle-issue rationale
Single-issue rationale: #16554 (the 18-name follow-up this PR's own guard test surfaced) is deliberately a separate issue with its own, much larger trace-each-name scope — batching it here would block this fix on work that isn't ready.
Checklist
CLAUDE.mdgit commitruns them automatically)main— the default branch since the 2026-09-12 rename (this checklist item's "Dev_new_gui" wording is stale template text)🤖 Generated with Claude Code