Repository navigation
Conversation
Access - Remove the unwired HTTP Basic login: app/auth.py, scripts/create_researcher.py, the researcher/workspace_member tables (dropped on startup) and their db helpers, and argon2-cffi. Per-browser boards (X-Board-Id -> workspace) are unchanged. - SESSION_SECRET is now required: the API refuses to start without it instead of falling back to a guessable key that would make the Turnstile cookie forgeable. - Docs describe Turnstile (a bot check, not a login) as the only gate. Cleanup - Delete scripts/export_csv.py (crashed on a bad kwarg; the Export button covers it) and the db_path parameter only it used. - Drop the SQLite-era `?` placeholder shim (_ph, _TxnConn, _WriteTxn); queries use psycopg's %s directly and write_txn() is a pooled connection. - Frontend: axios -> a small fetch wrapper with the same api.get/post shape, plus a test for it. Drop the ngrok header. - Daemon: requests -> httpx (already a dependency). - Fold GOAL_TIMELINE/ROLLUP/RUBRIC_ENABLED (never set anywhere) into GOAL_BATTERY_ENABLED, which the rollup and rubric reuse. - Remove requirements.txt, the unused MAX_STUDENT_IDS, stale SQLite wording and the old luc-dashboard name. Operations - /healthz checks the database and a daemon heartbeat (stamped every 10s on every tick) and returns 503 once it is older than 120s. - Pin postgres:18 in compose (matches prod) and CI; Node 22 in the image, dev compose and CI; the image installs with npm ci from the lockfile. - make install initializes and installs the engine submodule. - Split the goal evidence panel out of CohortDashboard.jsx into GoalEvidence.jsx.
This branch has not been deployed
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
Takes the findings from a repo audit (over-engineering + "run it like a big-company service") and applies the ones we agreed on.
Access
app/auth.py,scripts/create_researcher.py, theresearcher/workspace_membertables and helpers,argon2-cffi). The tables are dropped on startup; prod held one bootstrap row.X-Board-Id.SESSION_SECRETis required. The API refuses to start without it instead of silently signing Turnstile cookies with a public default./api/me/removed from the API reference (it never existed).Cleanup
scripts/export_csv.pydeleted (it crashed on every run with a bad kwarg; Export in the UI covers it), along with thedb_pathparameter only it used.?placeholder shim removed; queries use psycopg%sdirectly.axiosreplaced with a smallfetchwrapper keeping theapi.get/api.postshape (newapi.test.js);requestsreplaced withhttpx(already a dependency).GOAL_TIMELINE/ROLLUP/RUBRIC_ENABLED(set nowhere) folded intoGOAL_BATTERY_ENABLED.requirements.txt, the unusedMAX_STUDENT_IDS, the ngrok header, stale SQLite wording, and the oldluc-dashboardname removed.Operations
/healthznow checks the DB and a daemon heartbeat (stamped every 10s on every tick) and returns 503 when it is older than 120s.postgres:18pinned in compose (prod already runs 18.4 fromlatest) and CI; Node 22 (20 is EOL) in the image, dev compose and CI; the image installs withnpm ci.make installsets up the engine submodule.CohortDashboard.jsxintoGoalEvidence.jsx(2935 -> 1772 lines).Test plan
npm ci)SESSION_SECRET is not setwhen missing; with api + daemon running/healthz= 200 and reports the heartbeat age;/api/*without the cookie = 403turnstile_required; SPA = 200; a stale heartbeat gives 503;researcher/workspace_memberare gone🤖 Generated with Claude Code