Skip to content

fix(config): register AUTOBOT_BROWSER_SERVICE_HOST/PORT, AUTOBOT_VNC_PORT (#15151) - #16555

Merged
mrveiss merged 3 commits into
mainfrom
issue-15151-playwright-env-vars
Sep 13, 2026
Merged

mrveiss merged 3 commits into
mainfrom
issue-15151-playwright-env-vars

Conversation

@mrveiss

@mrveiss mrveiss commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Thinking Path

#15151 found that AUTOBOT_PLAYWRIGHT_HOST and AUTOBOT_PLAYWRIGHT_API_PORT are documented in CONFIGURATION_GUIDE.md but read by nothing: not env_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 to autobot_shared/ssot_config.py's pydantic Field(alias=...) fields: AUTOBOT_BROWSER_SERVICE_HOST (default 127.0.0.1) and AUTOBOT_BROWSER_SERVICE_PORT (default 9001) are the real, working knobs — read via a mechanism check_env_var_registry.py's reader-detection (os.environ.get/env_utils calls) 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 real AUTOBOT_VNC_PORT (ssot_config.py, default 6080 — 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 fit env_registry.py's plain-type shape), I filed #16554 to track them and gave the guard test a _KNOWN_GAPS escape 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

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.

  • Traced get_playwright_service → config.vm.browser → ssot_config.py's Field(alias="AUTOBOT_BROWSER_SERVICE_HOST") in full before registering, to confirm the real reader and default rather than guessing.
  • Read pipeline-scripts/generate_env_docs.py in full to hand-derive its exact table-row and count-line format rather than running it; the env-vars-documented pre-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.
  • Confirmed via grep that all 18 _KNOWN_GAPS names are genuinely absent from REGISTRY as of this diff, so the guard's initial state is accurate.
  • Pre-commit hooks ran and passed on commit; the pre-push hook ran pytest on the new test file and passed before either push went through ([pre-push OK] pytest: all relevant tests pass).

Risks

Low. AUTOBOT_BROWSER_SERVICE_HOST/_PORT/AUTOBOT_VNC_PORT already 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

  • Added changelog/unreleased/15151-playwright-env-vars.md

Single-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

  • Code follows AutoBot patterns from CLAUDE.md
  • Tests added or updated
  • Documentation updated if behavior changed (the guide itself is the fix)
  • Pre-commit hooks pass (git commit runs them automatically)
  • PR targets main — the default branch since the 2026-09-12 rename (this checklist item's "Dev_new_gui" wording is stale template text)
  • No secrets or credentials in the diff

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 60cba3e8-07d1-47f6-821c-49e89c046507


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

AutoBot Phase Validation Results

System Maturity: 96.5%

Phase Status:

PASS Phase 1: Core Infrastructure: 100.0%
PASS Phase 2: Knowledge Base and Memory: 100.0%
IN PROGRESS Phase 3: LLM Integration: 66.7%
PASS Phase 4: Security and Authentication: 100.0%
PASS Phase 5: Agent Orchestration: 100.0%
PASS Phase 6: Enhanced UI/UX: 100.0%
PASS Phase 7: Testing and Validation: 100.0%
PASS Phase 8: Advanced Features: 100.0%
PASS Phase 9: Multi-Modal AI: 100.0%
PASS Phase 10: Production Readiness: 100.0%

Recommendations:

  • 🟡 MEDIUM: Phase 3: LLM Integration requires attention (66.7% complete): Review and implement
  • ✅ System is production-ready - consider advanced features and scaling: Review and implement

@github-actions

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@github-actions

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

There is no PR queue limit, and this is not a request to defer this PR. Work proceeds one issue at a time without a cap on open PRs; review capacity is the constraint.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Merge the ones whose CI has finished and review has passed: gh pr merge <number> --squash --delete-branch
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@mrveiss

mrveiss commented Sep 12, 2026

Copy link
Copy Markdown
Owner Author

Independent review of 6ddf509be: approve, no findings. 1 behind, 0 trailers, closingIssuesReferences=[15151] matches the single Closes.

Registers AUTOBOT_BROWSER_SERVICE_HOST/PORT and AUTOBOT_VNC_PORT via register_env_var, the same visibility gap #15710 closed for a different reader shape (these three are read via pydantic Field(alias=...), so the registry never saw them). Fixes the doc guide's three wrong/dead names in the same change, rather than leaving the registration and the doc fix as two separate claims to reconcile. AUTOBOT_BROWSER_SERVICE_PORT's description specifically calls out 9001 vs Grafana's 3000 — the kind of detail that prevents a future copy-paste mistake. Tests: the guide documents at least one name, every documented name is either registered or a tracked gap, and no known gap quietly became registered without the tracking being updated — that third one guards against exactly the kind of silent drift this PR is fixing.

@github-actions

Copy link
Copy Markdown
Contributor

AutoBot Phase Validation Results

System Maturity: 96.5%

Phase Status:

PASS Phase 1: Core Infrastructure: 100.0%
PASS Phase 2: Knowledge Base and Memory: 100.0%
IN PROGRESS Phase 3: LLM Integration: 66.7%
PASS Phase 4: Security and Authentication: 100.0%
PASS Phase 5: Agent Orchestration: 100.0%
PASS Phase 6: Enhanced UI/UX: 100.0%
PASS Phase 7: Testing and Validation: 100.0%
PASS Phase 8: Advanced Features: 100.0%
PASS Phase 9: Multi-Modal AI: 100.0%
PASS Phase 10: Production Readiness: 100.0%

Recommendations:

  • 🟡 MEDIUM: Phase 3: LLM Integration requires attention (66.7% complete): Review and implement
  • ✅ System is production-ready - consider advanced features and scaling: Review and implement

This was referenced Sep 12, 2026
@mrveiss

mrveiss commented Sep 12, 2026

Copy link
Copy Markdown
Owner Author

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.

@mrveiss

mrveiss commented Sep 12, 2026

Copy link
Copy Markdown
Owner Author

Delta 6ddf509be..0c9442de6: still approved. The only file whose change differs across the net diffs is .github/filters/python-paths.yml. It gains docs/guides/CONFIGURATION_GUIDE.md, so a change confined to the guide still triggers configuration_guide_env_vars_test.py, which fixes the uncovered-read red. The other new commit is the changelog fragment. Note that #16440 adds the same test file, so whichever of the two lands second has to reconcile. CI was still pending when I posted.

…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.
@mrveiss

mrveiss commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

Delta 0c9442de6..0e2bf8b09 (the rebase onto 0abe0d47a): still approved.

  • Scope: the net diff against main is 6 files, +132/−5, the same as the approved version. The only file whose change differs is docs/developer/CLAUDE_RULES.md.
  • Footer: at this head, the | AUTOBOT_… rows strictly between BEGIN_AUTOGEN_ENV_DOCS and END_AUTOGEN_ENV_DOCS number 224, and the footer reads 224. That is main's 221 plus this PR's three new variables. For the record, main at 0abe0d47a is itself consistent (221 rows, footer 221), so the one-behind mismatch seen during the rebase came from the older base, not from main.
  • .github/filters/python-paths.yml: both additive entries are present, docs/guides/CONFIGURATION_GUIDE.md (this PR) and requirements-gpu-faiss.txt (fix(rag): wire GPU faiss onto an automated install, gated on GPU alone (#15163) #16560, via main), with no duplicate. This PR's own change to the file is identical to the approved one.

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.

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.

bug(config): AUTOBOT_PLAYWRIGHT_HOST and AUTOBOT_PLAYWRIGHT_API_PORT are documented but read by nothing

1 participant