mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
fix(track): read a late arrival frame before timing it out, so a measured wrong angle is never retried away
- observeArrivalRotation reads the sample before the deadline check and keeps a late frame's angle on the timeout result; arrivalAngleViolated then makes it final. Regressions: wrong late reveal and wrong late settle, each followed by a clean second attempt, still fail; a clean late frame stays retryable. - Overpass admission tests: a monotonic per-test clock removes order dependence on the module-level limiters; the proxy test covers ::1 and ::ffff:127.0.0.1 sockets; a new test pins the proxied: upstream bucket. - Retry edges (wrong on-time reveal, maxAttempts, inclusive 10° limit) and a check that every name the track harness imports is exported. - Docs: nginx needs Host, X-Forwarded-Proto and X-Forwarded-For; Docker bridge networking makes every host client one remote peer; list the exact forwarding headers; owner misses can also see 503.
This commit is contained in:
1 parent
8f16d10f7a
commit
01c764d4fd
8 files changed
+187
-50
No files matched your search
@@ -51,13 +51,21 @@ export function observeArrivalRotation({
|
||||
cleanup();
|
||||
resolve(result);
|
||||
};
|
||||
// A reveal timeout keeps the settle angle it already measured, so a wrong
|
||||
// settle frame is still visible to the caller and cannot be retried away.
|
||||
const expired = () => ({
|
||||
// A timeout keeps every angle it measured: the settle angle before a
|
||||
// reveal timeout, and the angle on a late frame itself (a late frame is
|
||||
// read first; the idle refresh can only repair an angle, so a wrong one
|
||||
// seen late was wrong on time too). `arrivalAngleViolated` then makes the
|
||||
// timeout final instead of retryable.
|
||||
const expired = (late = null) => ({
|
||||
error: `arrival ${moveEnd ? 'reveal' : 'moveEnd'} observation exceeded ${ARRIVAL_OBSERVATION_MS} ms`,
|
||||
elapsedMs: now() - startedAt,
|
||||
moveEndMs,
|
||||
...(moveEnd ? { dMoveEnd: moveEnd.rotationError } : {}),
|
||||
...(moveEnd
|
||||
? { dMoveEnd: moveEnd.rotationError }
|
||||
: late
|
||||
? { dMoveEnd: late.rotationError }
|
||||
: {}),
|
||||
...(moveEnd && late?.shown ? { dReveal: late.rotationError } : {}),
|
||||
flipFrame: -1,
|
||||
});
|
||||
const armDeadline = () => {
|
||||
@@ -69,11 +77,11 @@ export function observeArrivalRotation({
|
||||
try {
|
||||
const at = now();
|
||||
const elapsedMs = at - startedAt;
|
||||
const sample = read();
|
||||
if (at - phaseStartedAt >= ARRIVAL_OBSERVATION_MS) {
|
||||
finish(expired());
|
||||
finish(expired(sample));
|
||||
return;
|
||||
}
|
||||
const sample = read();
|
||||
if (moveEnd === null) {
|
||||
moveEnd = sample;
|
||||
moveEndMs = elapsedMs;
|
||||
|
||||
Reference in new issue
Block a user