Commit graph

6 commits

Author SHA1 Message Date
openhands
13249613c0 address review: fix stale JSDoc, correct comments, remove redundant dispatchEvent 2026-03-01 19:11:43 +00:00
openhands
6489dc4896 fix: holdout scenario - use cheats page swap widget, match e2e wallet connection pattern
- Switch from account 5 to account 0 (matches e2e tests)
- Use cheats page (/app/cheats) instead of get-krk (/app/get-krk) -
  get-krk swap widget has v-model reactivity issue with Playwright fill()
- Match e2e/01 wallet connection pattern with mobile fallback
- Add debug screenshots for swap widget diagnosis
- Use getByLabel/getByRole selectors matching e2e patterns
2026-03-01 15:41:45 +00:00
openhands
cce3c92120 fix: address review feedback on holdout evaluator (#381)
- evaluate.sh: add --ignore-scripts to npm install (prevents husky from
  writing to permanent repo .git/hooks from the ephemeral worktree)
- evaluate.sh: change --silent to --quiet (errors still printed on failure)
- evaluate.sh: add `npx playwright install chromium` step so browser
  binaries are present even when the cached revision doesn't match ^1.55.1
- evaluate.sh: set CI=true inline on the playwright invocation so
  forbidOnly activates and accidental test.only() causes a gate failure
- holdout.config.ts: document that CI=true is supplied by evaluate.sh
- always-leave.spec.ts: add waitForReceipt() helper; replace fixed
  waitForTimeout(2000) after eth_sendTransaction with proper receipt
  polling so tx confirmation is not a timing assumption
- always-leave.spec.ts: log the caught error in the button-cycling
  try/catch so contract reverts surface in the output
- always-leave.spec.ts: add console.log when connect button or connector
  panel is not found to make silent-skip cases diagnosable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 12:04:35 +00:00
openhands
2ddd8e9ed2 fix: Holdout evaluator: Playwright browser-based scenario scripts (#381)
Replace shell-script scenario runner with Playwright. The evaluator now
runs `npx playwright test --config scripts/harb-evaluator/holdout.config.ts`
after booting the stack, using the existing tests/setup/ wallet-provider
and navigation infrastructure.

Changes:
- scripts/harb-evaluator/holdout.config.ts — new Playwright config pointing
  to scenarios/, headless chromium, 5-min timeout per test
- scripts/harb-evaluator/scenarios/sovereign-exit/always-leave.spec.ts —
  Playwright spec that buys KRK through the LocalSwapWidget then sells it
  back via the injected wallet provider, asserting sovereign exit works
- scripts/harb-evaluator/evaluate.sh — adds root npm install step (needed
  for npx playwright), exports STACK_* env aliases for getStackConfig(),
  replaces shell-script loop with a single playwright test invocation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 11:24:15 +00:00
openhands
1d6dd8c628 fix: address review feedback on evaluate.sh (#380)
- container_name(): derive separator from compose version (_COMPOSE_SEP),
  so v1 (underscores) and v2 (hyphens) both resolve the right container name
- Drop buggy grep fallback for JSON branch extraction; python3 path is
  sufficient and safe; grep cannot reliably target only head.ref in the
  nested Gitea response
- Validate KRAIKEN/STAKE/LIQUIDITY_MANAGER after sourcing contracts.env to
  catch renamed variables with a clear infra_error instead of a cryptic
  'unbound variable' abort
- wait_exited: handle Docker 'dead' state alongside 'exited' to fail fast
  instead of polling the full timeout
- Ponder /ready timeout is now infra_error (was a logged warning); scenarios
  must not run against a partially-indexed chain
- Avoid double git fetch: only fetch the specific branch if the earlier
  --prune fetch (fallback path) has not already retrieved all remote refs
- Use mktemp -u so git worktree add creates the directory itself, avoiding
  failures on older git versions that reject a pre-existing target path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 10:12:34 +00:00
openhands
43c8d79afd fix: Holdout evaluator: fresh containerised stack per run (#380)
Adds scripts/harb-evaluator/evaluate.sh which:
- Accepts a PR number, resolves the branch via Codeberg API or git remote scan
- Checks out that branch into an isolated git worktree
- Boots a fresh docker compose stack with a unique COMPOSE_PROJECT name
- Waits for anvil healthy, bootstrap complete, ponder healthy + indexed
- Sources contract addresses from tmp/containers/contracts.env (never hardcoded)
- Exports EVAL_* env vars and runs any *.sh scripts under scenarios/
- Always tears down the stack and removes the worktree on exit (pass or fail)
- Returns 0 (gate passed), 1 (gate failed), or 2 (infra error)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 09:04:33 +00:00