DX: local-dev safety + launched_by tier + pending status#28
Merged
Conversation
Frontend - Tier (24/7 vs Slurm badge) now derived from the peer's launched_by label instead of a hardcoded model list. Persistent launchers (k8s, cscs_L1) → 24/7; anything else (username from model-launch, empty) → Slurm. New helper getTierFromLaunchedBy replaces getModelTier in ModelCard and ModelList. - Pending status surfaces on the collapsed card via a traffic-light dot (green/amber+pulsing/grey) AND a muted-grey tile treatment (grayscale logo+badges, gray-500/400 text, faint background wash). Amber dot stays vivid against the grey card. Local-dev safety - Makefile guards _guard-local-db and _guard-local-api refuse to run if .env DATABASE_URL or frontend/.env VITE_API_URL points at a non-localhost host. Closes a foot-gun where prod creds in .env let `make dummy-run` attempt alembic upgrade head against prod Neon. - Committed .env.example and frontend/.env.example templates (with !.env.example in .gitignore so the un-ignore actually works) so a fresh clone bootstraps cleanly via `make run`. Fixture - dnt_table_dev_live.json gains 6 real k8s peer entries pulled from prod DNT, so `make dummy-run` shows a representative mix of k8s 24/7 models + Slurm jobs (incl. a pending one) for UI iteration. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getTierFromLaunchedBy(launched_by)replaces the hardcodedmodelMetrics.tsmodel list.launched_by ∈ {k8s, cscs_L1}→ 24/7, anything else → Slurm. Same logic backs the badge inModelCardand the filter pills inModelList.pending. Amber dot stays vivid against the greyed body._guard-local-dband_guard-local-apirefusemake run/make dummy-run/make migrateif.env'sDATABASE_URLorfrontend/.env'sVITE_API_URLpoints at a non-localhost host. Closes the foot-gun where prod creds in.envletmake dummy-runattemptalembic upgrade headagainst prod Neon (which is what triggered this PR)..env.exampletemplates committed (with!.env.exampleexemption in.gitignore) so a fresh clone bootstraps cleanly.frontend/.env.exampleisVITE_*-only — backend secrets no longer belong there.dnt_table_dev_live.json, alongside the existing Slurm jobs (one pending), so the UI shows the full badge / dot / greyed-tile matrix offline.Test plan
make checkpasses (ruff clean)pytest backend/tests/— 35 passingmake dummy-runsucceeds (used to fail at the guard against prod URL in.env)make dummy-runUI: 24/7 badge on k8s entries, Slurm badge on rosmith/ahadinia entries, amber pulsing dot + greyed tile on the pending onefrontend/.env'sVITE_API_URLto prod →make dummy-runrefused by_guard-local-api.env'sDATABASE_URLto prod →make dummy-runrefused by_guard-local-db🤖 Generated with Claude Code