Repository navigation
fix-networking issue - #3
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.docker.internalfallback supportChanges
CLI
--network=hoston LinuxRuntime
Startup
host.docker.internalresolutionResult
Verfix can now reliably verify:
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