Skip to content

fix-networking issue - #3

Merged
jyotir-aditya merged 1 commit into
mainfrom
fix/docker-localhost-networking
May 23, 2026
Merged

jyotir-aditya merged 1 commit into
mainfrom
fix/docker-localhost-networking

Conversation

@jyotir-aditya

Copy link
Copy Markdown
Contributor

Summary

Fixes local application access from the Verfix Docker runtime.

Previously, browser workers inside the runtime container could not reliably access applications running on the host machine using localhost, causing verification failures for local development workflows.

This PR adds:

  • host networking support for Linux runtimes
  • automatic localhost handling for Docker bridge mode
  • host.docker.internal fallback support
  • runtime URL rewriting safeguards
  • improved cross-platform behavior for CLI and Dashboard flows

Changes

CLI

  • injects --network=host on Linux
  • rewrites localhost URLs for bridge-mode environments

Runtime

  • worker-level localhost rewrite fallback
  • improved host connectivity behavior

Startup

  • startup script now ensures host.docker.internal resolution

Result

Verfix can now reliably verify:

  • local Next.js apps
  • Vite apps
  • React dev servers
  • localhost development environments

from inside the runtime container across Linux, macOS, and Windows.

Notes

This is foundational for local-first verification workflows and improves onboarding reliability significantly.
Closes #2

@jyotir-aditya jyotir-aditya self-assigned this May 23, 2026
@jyotir-aditya
jyotir-aditya merged commit c56da46 into main May 23, 2026
@jyotir-aditya
jyotir-aditya deleted the fix/docker-localhost-networking branch July 7, 2026 14:46
jyotir-aditya added a commit that referenced this pull request Jul 9, 2026
…iew #3 fixes (#54)

* feat(workers,cli): per-flow storage-state lifecycle with rotating-token support

Restore a flow's useState immediately before that flow runs (in-page seed:
cookies via addCookies, web storage via a routed blank page on the saved
origin) instead of once per run at context creation — a clearState flow
batched ahead of a useState flow now gets a genuinely clean slate, and
multiple state names per run work. The run's first flow keeps the
context-creation fast path (the only way to restore IndexedDB token caches).

After a flow that restored a state passes, re-capture the live session to the
same name (refreshState, default true) so backends with single-use/rotating
refresh tokens never leave the saved state stale. Opt out with
refreshState: false. New escape hatch: verfix run --fresh-state discards the
selected flows' saved states so login flows re-authenticate from scratch.

Regression test (npm run test:state) drives a real rotating-token mini-app
through save, restore, rotation survival, batched clearState+useState, and
the refreshState opt-out.

* docs(roadmap): triage field-review #3 (rotating-token SaaS run)

Records what shipped on this branch and specs the three remaining confirmed
items (AI budget clamp + message, stale-session fix_hint enrichment,
show --network --filter + anomaly summary) with implementation hints so they
can be picked up independently. Declines a new failure type, the validate
batching warning, and cross-run healing memory, with reasons.

* fix(workers): clamp AI call timeout to the remaining per-run budget

Each AI HTTP call had a fixed 30s timeout while the per-run budget is 20s, so
one slow call could spend 30s of a 20s budget and open the breaker with the
nonsensical '30s spent of 20s'. chatCompletion now short-circuits when under
2s of budget remains and otherwise threads min(30s, remaining) down to
fetchWithTimeout via CompletionOptions.timeoutMs; adapter timeout logs report
the actual value, and the exhaustion message reads 'Xs spent, budget Ys'.
Retry semantics, thresholds, and the AI_TIME_BUDGET_MS override unchanged.

* feat(workers): flag stale restored sessions in fix hints

A restored useState session invalidated server-side (single-use token spent
after refreshState: false, expiry, server-side logout) fails as a bare
selector_not_found with the real cause buried in network logs. When a flow
restored a state and its selector/url/timeout failure coincides with a
401/403 on an auth-looking request, the fix_hint now appends a note naming
the rejected endpoint (query string stripped so tokens never reach logs) and
pointing at re-running the saving flow or --fresh-state. Deterministic, no
new failure type — hint text only, which is contract-safe.

* feat(cli): show --filter and failed-request summary for --network/--console

verfix show --network gains a case-insensitive substring --filter on URLs
(--console filters text/source_url) and prints failed requests (status >= 400
or 0) first under a warning header in pretty mode; JSON output adds an
additive failed_requests array without restructuring existing fields. Docs
and generated agent instructions updated; roadmap backlog #3 items ticked.

* chore: bump engine to 0.1.8, cli to 0.3.12; update changelog
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.

Runtime container cannot access host localhost applications

1 participant