Skip to content

iter-138: navigation truthfulness II — HTTP status, SPA history, honest timeouts - #177

Merged
ractive merged 2 commits into
mainfrom
iter-138/navigation-truthfulness-2
Aug 10, 2026
Merged

iter-138: navigation truthfulness II — HTTP status, SPA history, honest timeouts#177
ractive merged 2 commits into
mainfrom
iter-138/navigation-truthfulness-2

Conversation

@ractive

@ractive ractive commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Theme B regression fix (priority): back/forward/reload no longer hard-fail with a Timeout on same-document history traversal (SPA pushState/popstate) — iter-130 gave these commands navigate's document-commit wait, but a same-document popstate fires no fresh document-commit event, so the wait could never resolve. Same-document completion is now detected directly (readyState complete + location.href changed) via a replay-guarded probe (probe_same_document_commit_safe) instead of waiting for a commit that never arrives.
  • Theme A: navigate now reports the main document's real HTTP status (404/503 pages previously returned an untruthful success envelope with no way to detect the failure short of a follow-up network call). Sourced by streaming network-event via start_daemon_stream/stop_daemon_stream alongside the existing document-event wait on the default daemon path — the daemon does not forward network-event to a plain watchResources subscriber, so this required daemon-stream plumbing, not just a subscribe.
  • Theme C: same-page fragment navigation (#frag) now succeeds instead of burning the full --timeout and reporting failure (same same-document root cause as Theme B).
  • Theme D: timeout error messages report real wall-clock elapsed time instead of an internal sub-budget (previously ~3× under the actual elapsed time).
  • Theme E: back/forward/reload gain a real --no-wait escape hatch — previously recommended in the Theme B/C error text but rejected as an unrecognized argument.
  • Theme F: back/forward/reload always re-resolve committed_url via a top-level eval location.href instead of trusting a document-event that may belong to a subframe (fixed a case where back/forward reported a cross-origin CDN subframe URL as the result).
  • Theme G: navigate --with-network no longer drops committed_url/ready_state — both are now present alongside network data (and now status too).

Test plan

  • cargo fmt — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo test --workspace -q — 820+ passed, 0 failed
  • FF_RDP_LIVE_TESTS=1 cargo test -p ff-rdp-cli --test live live_138 — all 7 live_138_* tests pass against real headless Firefox through the default daemon path (no --no-daemon):
    • live_138_navigate_reports_404
    • live_138_navigate_reports_200
    • live_138_pushstate_back_succeeds
    • live_138_fragment_navigate_succeeds
    • live_138_timeout_message_matches_wall_clock
    • live_138_back_forward_committed_url_is_top_frame
    • live_138_with_network_keeps_envelope
  • cargo run -p xtask -- check-iteration-ready --plan kb/iterations/iteration-138-navigation-truthfulness-2.md --base origin/main — 10/10 sub-checks PASS

🤖 Generated with Claude Code## Claims vs code
<generated 2026-08-10T12:19:47Z by ralph-loop>

  • the → ✅ matched in diff

ractive and others added 2 commits August 10, 2026 14:08
…honest timeouts

Fixes the iter-130 regression where back/forward/reload hard-failed with a
Timeout when traversing a same-document history entry (SPA pushState/popstate,
or a same-page fragment navigate) — Firefox never fires a document-event for
these, so the previous commit-wait could never resolve.

- Theme A: navigate reports the main document's real HTTP status, sourced by
  watching network-event resources alongside document-event; works through
  the default daemon connection via start_daemon_stream/stop_daemon_stream
  (the daemon manages network-event centrally and doesn't forward it to a
  plain watchResources subscriber).
- Themes B/C: detect completed same-document navigation directly (readyState
  complete + location.href changed) instead of waiting for a document commit
  that will never arrive.
- Theme D: timeout messages report the real wall-clock elapsed time instead
  of an internal sub-budget.
- Theme E: back/forward/reload gain a real --no-wait escape hatch.
- Theme F: back/forward/reload always re-resolve committed_url via a
  top-level eval instead of trusting a document-event that may belong to a
  subframe.
- Theme G: navigate --with-network no longer drops committed_url/ready_state
  (and now status too).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
iter-138 found and fixed a bug where taking "most recent update
record" instead of "most recent non-null value per field" silently
dropped a real HTTP status back to null. perf's Theme B byte
attribution reads from the performance-timing API, not the RDP
network-event stream iter-138 touched, so this doesn't apply
directly — recorded so the next investigator doesn't have to
re-derive that check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ractive
ractive merged commit 7111daf into main Aug 10, 2026
10 checks passed
@ractive
ractive deleted the iter-138/navigation-truthfulness-2 branch August 10, 2026 12:31
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.

1 participant