FA-8656 / Client navigation / Open access
Navigation active-link matching: Query and fragment state changes deactivate the current link · case 01
Query and fragment state changes deactivate the current link.
ROOT CAUSE
The query operation uses `path` where the contract requires `path.split('?', 1)[0].split('#', 1)[0]`.
VERIFIED REPAIR
Implement the query operation as `path.split('?', 1)[0].split('#', 1)[0]`.
Unsuccessful approach: Stripping query alone leaves fragment-only navigation mismatched.
Case contract
Ignore URL query and fragment; normalize trailing slashes with root preserved; honor case policy; section matches require a slash boundary and root matches exactly.
Why this case matters
A deterministic model of navigation active-link matching; this isolates one interface invariant without requiring a browser.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(path, link, exact, case_sensitive):
path = path
link = link.rstrip('/') or '/'
path = path.rstrip('/') or '/'
if not case_sensitive: path, link = path.casefold(), link.casefold()
if exact or link == '/': return path == link
return path == link or path.startswith(link + '/')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| query | False | True | Failed |
| fragment | False | True | Failed |
| slash | True | True | Passed |
| root | False | False | Passed |
| root itself | True | True | Passed |
| fold | True | True | Passed |
| sensitive | False | False | Passed |
| child | True | True | Passed |
| prefix sibling | False | False | Passed |
| parameterized route segment | True | True | Passed |
| repeat prefix sibling | False | False | Passed |
SHA-256 / dc9348bb9caa51256be3f16533e9e951cd756180c53d749100fd24a1883930e9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(path, link, exact, case_sensitive):
path = path.split('?', 1)[0]
link = link.rstrip('/') or '/'
path = path.rstrip('/') or '/'
if not case_sensitive: path, link = path.casefold(), link.casefold()
if exact or link == '/': return path == link
return path == link or path.startswith(link + '/')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| query | True | True | Passed |
| fragment | False | True | Failed |
| slash | True | True | Passed |
| root | False | False | Passed |
| root itself | True | True | Passed |
| fold | True | True | Passed |
| sensitive | False | False | Passed |
| child | True | True | Passed |
| prefix sibling | False | False | Passed |
| parameterized route segment | True | True | Passed |
| repeat prefix sibling | False | False | Passed |
SHA-256 / fe9b9f5867366232fb451ee2ccb91bec71d8493c149967e02cc584d3c148c52d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(path, link, exact, case_sensitive):
path = path.split('?', 1)[0].split('#', 1)[0]
link = link.rstrip('/') or '/'
path = path.rstrip('/') or '/'
if not case_sensitive: path, link = path.casefold(), link.casefold()
if exact or link == '/': return path == link
return path == link or path.startswith(link + '/')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| query | True | True | Passed |
| fragment | True | True | Passed |
| slash | True | True | Passed |
| root | False | False | Passed |
| root itself | True | True | Passed |
| fold | True | True | Passed |
| sensitive | False | False | Passed |
| child | True | True | Passed |
| prefix sibling | False | False | Passed |
| parameterized route segment | True | True | Passed |
| repeat prefix sibling | False | False | Passed |
SHA-256 / 5f4fba5b804be1fd36d31301a615d617455f49d9f15a48c72b61e31b818c9a6b
Verification & scope
This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:23.245348+00:00.
Case digest / 3c1a007cf74b0ae242a674aad4ae26f2ffb7213c017991aa59cf87226ef0bd7a