frontend-patterns/research/reviews/NavigationHistoryExperiment.md
tegwick d32774da51 Measure navigation history and cache corroboration cycle
Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a0cffe-206f-7323-89d3-b20ca4cf4bf9
2026-09-27 00:11:21 +02:00

75 lines
5.4 KiB
Markdown

# First prospective navigation cycle — 2026-09-27
Author/reviewer: Codex, author-model; no independent human validation. Stream B,
LEARN-0011. [Registered protocol](../evolution/cycles/2026-09-27-navigation.md) committed
as `f3697c1` before implementation/execution. [Runner and reproduction](../experiments/navigation-history/README.md),
[complete receipt](../experiments/navigation-history/result.json),
[partial first run](../experiments/navigation-history/initial-partial.json).
## Evidence and observations
Real htmx 2.0.11 in an authored public-catalog server; Playwright 1.63.0, Chromium
151.0.7922.34 and Firefox 155.0. Dependencies locked, inputs and browser binaries
hashed in the complete receipt. Existing [htmx history/cache documentation](https://htmx.org/docs/)
was consulted for mechanism context (accessed local date 2026-09-27, living revision
unknown); execution is evidence only for the pinned package and declared server policy.
| Claim | Registered checks | Observation in both browsers |
| --- | --- | --- |
| NH01 | N01/N02 | Direct filtered entry, native link/GET form, enhanced navigation, reload and fresh direct entry preserve selection; document entries include the shell |
| NH02 | N03/N04 | Snapshot back/forward makes no additional article request; evicting the pinned sessionStorage history cache causes a history-restore request and full response |
| NH03 | N05/N06 | Enhanced 503 leaves the old committed URL/content; explicit native recovery works. A failed htmx script load leaves native link/form usable |
| NH04 | N07/N08 | Correct Vary selection returns full versus fragment content in both population orders; N08's final full fetch recontacts the server, not proof that both variants stay cached |
| NH05 | N09 | Without Vary, the browser reuses the cached fragment as a full document, loses the shell, and sends no additional request |
| NH06 | N10 | Explicit Node requests receive 304 for a matching representation validator and 200/full body for the other representation; a history-restore selector returns full content |
20/20 registered rows met expectations, including the intentionally broken N09.
There are 18 browser cases and the same explicit HTTP sequence repeated twice; do
not describe N10 as browser automatic revalidation. Snapshot hits restore selected
views, not a tested guarantee of current publisher bytes. HTTP cache and htmx history
storage are different mechanisms. Vary names both HX-Request and
HX-History-Restore-Request because both influence the fixture's representation.
The fixture's historyRestoreAsHxRequest=false is explicit, not a claim about defaults.
The first run completed ten Chromium rows, then failed to locate Firefox in its
default installation path. Its incomplete receipt is preserved. The second run used
the existing `/tmp/fep-playwright-browsers` installation and unrestricted temporary
profile access. No source/criteria changes between runs; repetition is not new learning.
No unexpected assertion failure was discarded. Initial launch error: executable absent
at `/home/worsch/.cache/ms-playwright/firefox-1543/firefox/firefox`.
## Learning disposition: corroboration
Before: documentary evidence and synthetic reasoning predicted native contracts,
history recovery and representation-aware caching were necessary for coherent routes.
After: one pinned library plus our server policy supplies bounded runtime support,
including a concrete fragment-as-document counterexample when cache selection is broken.
The existing obligations stand; no new pattern or consequential conceptual revision is
claimed. Updating evidence text is not automatically a new discovery. This is one
question/outcome, not twenty discoveries, and not independent deployed recurrence.
CAND-0009 and CAND-0010 remain draft/hypothesis. VC-03 remains provisional: its tested
read-only navigation subset is stronger, while keyboard/focus/announcements, delayed
script activation, interrupted transport, invalid/deleted routes, numerical delivery
budgets and offline availability remain open. Native recovery was explicitly offered
by the fixture; no automatic fallback or full accessibility claim follows. No real
CDN/intermediary, private cache policy or publisher-freshness guarantee was tested.
## Measurement and next decision
[Effort receipt](../evolution/cycles/2026-09-27-navigation-effort.json) records the
monotonic measured window and subtracted execution intervals. Active time includes
registration, fixture development, source inspection, analysis and recording. The
initial orientation is excluded; subprocess execution includes the failed launch and
full rerun. Administrative commit/snapshot/sync time after cutoff is unmeasured overhead.
This is single-agent elapsed effort, not human labor or model compute time. Token/cost
telemetry is unknown. Brief checkpoint inspection during execution is assigned wholly
to execution, never counted twice. Clock start UTC label was read during orientation;
monotonic start after orientation is the duration authority.
No diminishing-returns claim follows from one corroborating cycle. WP-0006 T03 keeps
comparison-window review and review-date reconciliation open. WP-0003 T01 next owns
bounded keyboard/focus/error-feedback checks if we continue this navigation stream;
use a new comparison group if the accessibility question/protocol is materially different.
WP-0003 T02 still owns the independent walkthrough review and offline branch. M1/M2,
independent human review and language usefulness remain unresolved.