Skip to content

[AEP][medium] AEP-20260924-r3-REPO-F01: parse ISO times in the fallback page - #337

Merged
mattmre merged 2 commits into
mainfrom
aep/medium/AEP-20260924-r3-REPO-F01/inline-timestamp
Sep 24, 2026
Merged

mattmre merged 2 commits into
mainfrom
aep/medium/AEP-20260924-r3-REPO-F01/inline-timestamp

Conversation

@mattmre

@mattmre mattmre commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Description

The inline fallback page, used only when dashboard/index.html is missing, parses numbers as unix seconds and naive ISO strings as UTC. Unparseable values render as a dash. The regex is written so ruff accepts it and the JavaScript source still contains \d.

This score is for 89fd7ff, replayed onto the squash of #336. git range-diff marks it equal to the previously scored 3be98ff.

Type of Change

  • Bug fix

Testing

ruff check dashboard_server.py passed. TestInlineDashboardTimestamp passed. Review grok-tierb-337d-20260924 confirmed the range-diff equality and re-ran both. No browser.

Brutal Honesty

EVIDENCE: ruff and TestInlineDashboardTimestamp on 89fd7ff; range-diff equal to 3be98ff; review grok-tierb-337d-20260924
SMOKE: targeted unittest only; bash scripts/smoke.sh was not run on this branch
BHS_SELF_DRAFT: 100
BHS_SELF_DRAFT_AGENT: grok-aep-fix-20260924
BHS_TIER_B: 100
BHS_TIER_B_AGENT: grok-tierb-337d-20260924
BHS_TIER_B_SEVERITY: none
BHS_OFFICIAL: 100
CARRY_FORWARD: none
DEFERRED_SCOPE: none
LOOP_ITERATIONS: 2
OPERATOR_OVERRIDE: none

@mattmre

mattmre commented Sep 24, 2026

Copy link
Copy Markdown
Owner Author

Review of 3596190. The inline formatTimestamp matches the intended branches: a number is unix seconds, a zoned string is that instant, a naive ISO string gets Z, and a bad value becomes - without throwing. Two problems stay open.

  1. dashboard_server.py:590 is a normal Python string, so \d is an invalid escape. ruff check dashboard_server.py exits 1 with W605 on both \d sequences. Write \\d so the JavaScript regex still sees \d, and ruff passes.

  2. Nothing reads get_inline_dashboard_html(). Putting new Date(timestamp * 1000) back for every value does not fail the dashboard tests. Add a test that loads that string, and fails if a numeric stamp is not multiplied by 1000 or if a naive ISO string is not treated as UTC.

Tier B on this SHA: 84, severity important. This commit does not merge. The production page parser is PR #329, not this fallback.

@mattmre
mattmre force-pushed the aep/medium/AEP-20260924-r3-REPO-B02/history-limit branch from a2e43cf to 91ab50c Compare September 24, 2026 14:44
@mattmre
mattmre force-pushed the aep/medium/AEP-20260924-r3-REPO-F01/inline-timestamp branch from 3596190 to 2f91085 Compare September 24, 2026 14:46
@mattmre

mattmre commented Sep 24, 2026

Copy link
Copy Markdown
Owner Author

Fix pushed as 2f91085, rebased onto the updated history-limit tip 91ab50c.

The inline timestamp regex is written as \\d in the Python source, so ruff W605 is gone and the JavaScript source still contains \d. TestInlineDashboardTimestamp runs the extracted function under node: a numeric stamp is unix seconds, a naive ISO string is UTC, and not-a-time is -.

Parent re-ran that test plus test_dashboard_api_limits.py: 10 passed. ruff check dashboard_server.py passed. No browser. Not merged. The body still scores 3596190. A fresh Tier B review of 2f91085 is required.

@mattmre
mattmre force-pushed the aep/medium/AEP-20260924-r3-REPO-B02/history-limit branch from 91ab50c to fe09228 Compare September 24, 2026 15:11
@mattmre
mattmre force-pushed the aep/medium/AEP-20260924-r3-REPO-F01/inline-timestamp branch from 2f91085 to 3be98ff Compare September 24, 2026 15:11
Base automatically changed from aep/medium/AEP-20260924-r3-REPO-B02/history-limit to main September 24, 2026 15:21
The fallback document multiplied every timestamp by 1000. Unix numbers
still do. Naive ISO strings are treated as UTC, and an unparseable
value renders as a dash instead of Invalid Date.
@mattmre
mattmre force-pushed the aep/medium/AEP-20260924-r3-REPO-F01/inline-timestamp branch from 3be98ff to 89fd7ff Compare September 24, 2026 15:22
@mattmre
mattmre merged commit 46a5a53 into main Sep 24, 2026
17 of 25 checks passed
@mattmre
mattmre deleted the aep/medium/AEP-20260924-r3-REPO-F01/inline-timestamp branch September 24, 2026 15:23
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