Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pmoves/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ services:
- pmoves_bus
- pmoves_external # Required for YouTube processing
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'node|python' || exit 1"]
test: ["CMD-SHELL", "kill -0 1 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
Expand Down Expand Up @@ -2719,11 +2719,11 @@ services:
extra_hosts:
- host.docker.internal:host-gateway
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8055/healthz', timeout=5)"]
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8055/healthz', timeout=10)"]
interval: 30s
timeout: 10s
timeout: 15s
retries: 3
start_period: 15s
start_period: 60s

# Tier: agent (Tokenism Simulator - CHIT/geometry bus simulation service)
tokenism-simulator:
Expand Down
3 changes: 2 additions & 1 deletion pmoves/ui/app/dashboard/ingest/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default async function IngestDashboardPage() {
const token = getBootJwt();
if (!token) return '';
const [, payload] = token.split('.') as [string, string, string];
const json = JSON.parse(Buffer.from(payload, 'base64').toString('utf-8')) as { sub?: string };
const base64 = payload.replace(/-/g, '+').replace(/_/g, '/');
const json = JSON.parse(Buffer.from(base64, 'base64').toString('utf-8')) as { sub?: string };
return typeof json.sub === 'string' ? json.sub : '';
} catch {
return '';
Expand Down
3 changes: 2 additions & 1 deletion pmoves/ui/lib/supabaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ function decodeJwtExp(token: string | undefined): number | null {
try {
if (!token) return null;
const [, payload] = token.split('.') as [string, string, string];
const json = JSON.parse(Buffer.from(payload, 'base64').toString('utf-8')) as { exp?: number };
const base64 = payload.replace(/-/g, '+').replace(/_/g, '/');
const json = JSON.parse(Buffer.from(base64, 'base64').toString('utf-8')) as { exp?: number };
return typeof json.exp === 'number' ? json.exp : null;
} catch {
return null;
Expand Down
Loading