Skip to content

fix(webarena): keep site credentials_env in the Rainbond slice runtime config - #166

Merged
lanyue-llk merged 1 commit into
mainfrom
fix/webarena-rainbond-credentials-env
Nov 3, 2026
Merged

lanyue-llk merged 1 commit into
mainfrom
fix/webarena-rainbond-credentials-env

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What, why and how of this PR

Issues

Closes #164

Summary

RainbondSlicePool.runtime_config rebuilt each stateful site as {"urls": [...]}, so a public WebArena run on a slice stopped at the verify_runtime login preflight.

  • runtime_config now names each stateful site's login variables through a new site_credential_names in the topology registry. It holds names only, never values.
  • The registry is the source because the generated webarena.config.json never had these names to keep, and pool reset or release rewrites that file. Using the registry covers provisioned, reset and released configs. Slices that already exist pick it up when WebArenaEnvironment overlays the runtime config on load.
  • This also repairs a second gap: redact_login_passwords reads the same names, so on a slice it had no passwords to redact from saved error text.
  • A credentials_env hand-edited into a slice config, or passed as base_config, is replaced by the registry names. That matches the earlier behaviour, where such a value was dropped, and an unset registry variable stops the preflight by name. The protocol doc states this.

Curated track: no change. Only public_webarena/webarena_environment.py and pool_main (through scripts/manage_webarena_rainbond_pool.py) use RainbondSlicePool. The curated track reads lex_webarena_remote_sites/1 site maps through load_remote_sites, which do not come from runtime_config.

Official evaluator: it reads the same JSON. I checked that its EnvironmentConfig accepts and ignores credentials_env, as it already does for the non-slice example config.

Tests: the fake pool in test_rainbond_slice_verification_and_reset_replace_the_complete_application now subclasses the real pool, so runtime_config and persist_runtime_config are real and only the API-facing methods are faked. The _login_credentials stub is gone. The test also covers the login after reset, redaction, and that no value reaches the persisted file. A new test covers the preflight naming an unset variable.

No real Rainbond slice was run.

Test plan

  • Lint gate (ruff check with both configurations): passed.
  • pytest tests/trajectory_replay/public_webarena tests/test_manage_webarena_rainbond_pool.py tests/environments/test_webarena_topology.py tests/test_golden_reports.py: 769 passed, 3 skipped. Golden route hashes are unchanged.
  • Negative control: with the credentials_env line removed from runtime_config, the three affected tests fail (test_rainbond_slice_verification_and_reset_replace_the_complete_application, test_rainbond_slice_preflight_names_an_unset_login, test_new_slice_runtime_config_contains_four_unique_sites_and_two_shared_sites).
  • The full suite runs in CI (Linux).

…e config

RainbondSlicePool.runtime_config rebuilt each stateful site as URLs only, so a public WebArena run on a slice stopped at the login preflight. Name each site's login variables from the topology registry, so generated, reset and released slice configs all carry them.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Review complete · 675ef97

No findings in this review.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review, round 1

Reviewed head 675ef97b against base a239d1cc. No defects found. I checked the following by reading the code and running tests.

Fix

  • runtime_config now names credentials_env for each stateful component. site_credential_names returns a copy, so a caller cannot change the registry.
  • Components are limited to STATEFUL_SITES, and all four have registry names, so the new lookup cannot raise for a valid receipt.
  • All config writers (provision, scale, release, persist_runtime_config) and the overlay in WebArenaEnvironment.__init__ go through this one method.
  • Only names are persisted; no credential values are written. The new test asserts this for the reset path.

Registry names replacing other names

  • The issue says "keep", while the PR replaces any credentials_env from a hand-edited config or base_config with the registry names. The generated config never held these names, and such a value was already dropped before this change.
  • The PR body and the protocol doc both state this, so I do not count it as a defect.

Redaction and preflight

  • A slice now names all four sites, including ones a run may not use. redact_login_passwords handles unset variables: I ran redact_site_passwords with empty and whitespace values and it still redacted the real password.
  • verify_runtime only requires credentials for the sites in the run's tasks, so a partly filled .env does not stop an unrelated run.

Other config readers

  • The official evaluator: WebArenaVerifiedConfig.model_validate accepts a config with credentials_env, image_lock and rainbond_slice, and ignores the extra fields. I ran this against the locked package.
  • diagnostics.site_urls reads only URLs. Its --verify-login path uses WebArenaEnvironment.
  • No check I found hashes the runtime config. Qualification freezes only the suite and scope, and the receipt binds pool_config_sha256.

Curated track

  • RainbondSlicePool is used only by rainbond.py itself and public_webarena/webarena_environment.py. The manage script reaches it through pool_main.
  • The curated track reads its own site maps through load_remote_sites, so it is unaffected.

Tests

  • The _login_credentials stub is gone. The fake pool subclasses the real one, so runtime_config and persist_runtime_config are real.
  • Negative control: with the credentials_env line removed, exactly the three tests the PR names fail.
  • Lint gate: passed.
  • tests/trajectory_replay/public_webarena, tests/test_manage_webarena_rainbond_pool.py, tests/environments/test_webarena_topology.py and tests/test_golden_reports.py: 769 passed, 3 skipped. Golden route hashes are unchanged.

Scope and rules

  • Closes #164 is accurate: the fix, the real-runtime_config test and the stub removal are all present.
  • There are no aliases or parallel implementations, topology.json is unchanged, and no hash-bound evidence or private data is touched.

CI on this head
All checks pass: Tests and static checks, Installation and packaging, Rendered reference and report checks, Python 3.11, OCR.

Not verified: no real Rainbond slice was run, as the PR also states.

lanyue-llk added a commit that referenced this pull request Nov 3, 2026
@lanyue-llk
lanyue-llk merged commit 4616a98 into main Nov 3, 2026
7 checks passed
@lanyue-llk
lanyue-llk deleted the fix/webarena-rainbond-credentials-env branch November 3, 2026 16:01
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.

fix(webarena): keep site credentials_env in the public replay's Rainbond runtime config

1 participant