Spaces:
Sleeping
Sleeping
Store full submissions in Supabase
Browse filesFiles changed (6)
- README.md+5-8
- SUPABASE_SETUP.mdAdded+54
- student_interface.py+49-111
- supabase_schema.sqlAdded+30
- supabase_submissions_logger.pyAdded+132
- test_supabase_submissions_logger.pyAdded+105
17 unmodified lines18192021222324251 unmodified line2728293031323334353617 unmodified lines- 🔍 Automated bug injection into real codebases- 🤖 AI-powered hint system (GPT-4o)- 🧪 Automated testing and scoring- 📊 Progress tracking via Google Sheets- 💾 Git-based submission backups## How to Use1. Enter your OpenAI API key1 unmodified line3. Select difficulty level4. Debug the injected bugs!## Environment Variables RequiredSet these in Hugging Face Spaces Settings:- `GOOGLE_SHEET_ID` - For logging submissions- `SUBMISSIONS_REPO_URL` - Git repo for backups- `SUBMISSIONS_GIT_TOKEN` - Git access tokenNote: Users provide their own OpenAI API keys via the login page.17 unmodified lines18192021222324251 unmodified line2728293031323317 unmodified lines- 🔍 Automated bug injection into real codebases- 🤖 AI-powered hint system (GPT-4o)- 🧪 Automated testing and scoring- 📊 Optional Google Sheets summaries- 💾 Complete submission storage in Supabase## How to Use1. Enter your OpenAI API key1 unmodified line3. Select difficulty level4. Debug the injected bugs!## Submission StorageCreate a free Supabase project and configure `SUPABASE_URL` and `SUPABASE_SECRET_KEY` in Hugging Face Spaces Settings. Follow [SUPABASE_SETUP.md](SUPABASE_SETUP.md) for the SQL schema and setup steps.Google Sheets summaries remain optional. New submissions are no longer uploaded to Git.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354# Supabase Submission Storage Setup
Supabase stores complete submission records. The app keeps its local JSON copy and may continue writing the optional Google Sheets summary. New submissions are no longer sent to the Git backup repository.
## 1. Create a free project
1. Create an account at https://supabase.com and choose **Start your project**.2. Create an organization and a project on the **Free** plan.3. Choose a strong database password and save it in your password manager. The app does not need this password.4. Wait for the database to finish provisioning.
The current Free plan includes 500 MB of database space and may pause a project after one week with no activity. Pricing and limits can change; confirm them in the Supabase dashboard.
## 2. Create the table
1. Open the project dashboard and select **SQL Editor**.2. Open `supabase_schema.sql` from this repository and copy its contents into a new SQL query.3. Run the query. It creates the `public.submissions` table, indexes the fields used for search, enables RLS, and removes direct access for `anon` and `authenticated` roles.4. The app uses a server-only Supabase secret key. Never put that key in source code, Google Sheets, or browser code.
## 3. Add the project secrets to the Space
In Supabase, open **Project Settings → API Keys** and copy:
- The project URL.- A **Secret key** beginning with `sb_secret_` (not the publishable key).
Then, in Hugging Face:
1. Open the `legacy-code-challenge` Space.2. Select **Settings → Variables and secrets**.3. Add `SUPABASE_URL` as a variable, with the project URL as its value.4. Add `SUPABASE_SECRET_KEY` as a secret, with the `sb_secret_...` value.5. Save the settings and wait for the Space to restart.
Do not send either value in chat. For local testing, add the same variable names to your local `.env`, which must remain untracked and private.
## 4. Verify
1. In the Supabase dashboard, open **Table Editor → submissions**.2. Submit one challenge in the app.3. Confirm that a row appears with the student, challenge, score, and a complete `payload` JSON record.4. Submit again and confirm that each run appears as its own row.
Supabase failures leave the local JSON record intact and are reported in its `cloud.supabase` status. Git backup uploads are disabled; existing Git history is not deleted by this change. Google Sheets remains an optional summary destination.
## 5. Rotate previously exposed credentials
Credentials from the old configuration have been exposed and must be replaced before using this setup with real student data:
1. Revoke the OpenAI API key in the OpenAI dashboard and create a replacement.2. Revoke the GitHub personal access token in GitHub settings. Remove the old token and repository URL from Hugging Face Space secrets after rotation.3. Create a new Google service-account key in Google Cloud, replace the key in the Space secret, then delete the old key. If Google Sheets is no longer needed, remove its credentials and sheet ID from the Space instead.4. Keep replacement values in Hugging Face Secrets or a local untracked `.env`; do not commit or share them.41 unmodified lines4243444546474849505152535455565758596034 unmodified lines95969798991001011021031041051061071081091101111121131141151161171181191201211043 unmodified lines11651166116711681169117011711172117376 unmodified lines1250125112521253125412551256618 unmodified lines1875187618771878187918806 unmodified lines1887188818891890189118921893189418951896189718981899190019011902190327 unmodified lines19311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971352 unmodified lines23242325232623272328232923304 unmodified lines2335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239041 unmodified linesexcept ImportError:GOOGLE_SHEETS_AVAILABLE = False# Optional Git submissions backuptry:from git_submissions_logger import diagnose_git_submissions, push_submission_to_gitGIT_SUBMISSIONS_AVAILABLE = Trueexcept ImportError:GIT_SUBMISSIONS_AVAILABLE = False# Optional Git submissions backuptry:from git_submissions_logger import diagnose_git_submissions, push_submission_to_gitGIT_SUBMISSIONS_AVAILABLE = Trueexcept ImportError:GIT_SUBMISSIONS_AVAILABLE = False# ── API Key Validation ────────────────────────────────────────────────────────34 unmodified lines)def _git_submissions_configured() -> bool:return bool(os.getenv("SUBMISSIONS_REPO_URL"))def _cloud_upload_capabilities() -> dict[str, dict[str, str | bool]]:google_configured = _google_sheets_configured()git_configured = _git_submissions_configured()return {"google_sheets": {"available": GOOGLE_SHEETS_AVAILABLE,"configured": google_configured,"reason": "" if google_configured else "Missing GOOGLE_SHEET_ID or service account credentials",},"git_backup": {"available": GIT_SUBMISSIONS_AVAILABLE,"configured": git_configured,"reason": "" if git_configured else "Missing SUBMISSIONS_REPO_URL",},}# ── Challenge state loader ────────────────────────────────────────────────────class ChallengeState:1043 unmodified linescloud_caps = _cloud_upload_capabilities()google_status = "pending" if enable_cloud_uploads and cloud_caps["google_sheets"]["available"] and cloud_caps["google_sheets"]["configured"] else "disabled"git_status = "pending" if enable_cloud_uploads and cloud_caps["git_backup"]["available"] and cloud_caps["git_backup"]["configured"] else "disabled"google_error = "" if google_status == "pending" else str(cloud_caps["google_sheets"]["reason"])git_error = "" if git_status == "pending" else str(cloud_caps["git_backup"]["reason"])return {"submission_id": submission_id,76 unmodified lines},"cloud": {"google_sheets": {"status": google_status, "error": google_error},"git_backup": {"status": git_status, "error": git_error},},"debug": {"captured_logs": debug_logs,618 unmodified linesidentity=_hf_oauth_identity(profile),)log_path = log.save(submission_record)sys.stdout = original_stdout # Restore stdout# Return results to user IMMEDIATELY6 unmodified linesdebug_logs, # live debug (same))# Upload to cloud services in BACKGROUND THREAD (non-blocking)def _background_upload():student_name = user_name.strip() if user_name else "Anonymous"cloud_updates = {}cloud_caps = _cloud_upload_capabilities()logger.info("Cloud upload capabilities: google available=%s configured=%s, git available=%s configured=%s",cloud_caps["google_sheets"]["available"],cloud_caps["google_sheets"]["configured"],cloud_caps["git_backup"]["available"],cloud_caps["git_backup"]["configured"],)# Google Sheets (fast summary)27 unmodified lineslogger.warning("Google Sheets upload disabled: %s", reason)cloud_updates["google_sheets"] = {"status": "disabled", "error": reason}# Git Submissions (detailed backup with all code)if cloud_caps["git_backup"]["available"] and cloud_caps["git_backup"]["configured"]:try:print("🔄 Pushing to Git repository...")git_ok = push_submission_to_git(student_name=student_name,repo_url=cs.github_url,original_code=cs.original_code,buggy_code=cs.sabotaged_code,student_code=submitted_code,chat_history=chat_log or [],score=result["total_score"],total_tests=result["total_tests"],passed_tests=result["passed"],hints_used=hints_used,challenge_prompt=cs.readme(),target_file=cs.target_file,submission_record=submission_record,)if git_ok:print(f"✅ Pushed to Git: {student_name}")cloud_updates["git_backup"] = {"status": "success", "error": ""}else:diag = diagnose_git_submissions()reason = diag.get("reason", "Logger returned False")print(f"⚠️ Git submission backup returned False: {reason}")cloud_updates["git_backup"] = {"status": "failed", "error": reason}except Exception as e:print(f"⚠️ Git submission backup failed: {e}")cloud_updates["git_backup"] = {"status": "failed", "error": str(e)}else:reason = str(cloud_caps["git_backup"]["reason"])logger.warning("Git backup upload disabled: %s", reason)cloud_updates["git_backup"] = {"status": "disabled", "error": reason}log.update(log_path, {"cloud": cloud_updates})# Start background upload (won't block UI)352 unmodified linesdebug_logs=debug_logs,enable_cloud_uploads=False,)log.save(submission_record)sys.stdout = original_stdout # Restore stdout# Return results to user IMMEDIATELY4 unmodified linesdebug_logs,)# Upload to cloud services in BACKGROUND THREAD (non-blocking)# TEMPORARILY DISABLED - Testing without cloud uploads"""def _background_upload():student_name = "Anonymous (standalone mode)"# Google Sheets (fast summary)if GOOGLE_SHEETS_AVAILABLE:try:print("📊 Uploading to Google Sheets...")log_to_google_sheets(student_name=student_name,repo_url=cs.github_url,hints_used=hints_used,score=result["total_score"],total_tests=result["total_tests"],passed_tests=result["passed"],all_passed=result["all_passed"],chat_history=chat_log or [],)print(f"✅ Logged to Google Sheets: {student_name}")except Exception as e:print(f"⚠️ Google Sheets logging failed: {e}")# Git Submissions (detailed backup with all code)if GIT_SUBMISSIONS_AVAILABLE:try:print("🔄 Pushing to Git repository...")push_submission_to_git(student_name=student_name,repo_url=cs.github_url,original_code=cs.original_code,buggy_code=cs.sabotaged_code,student_code=submitted_code,chat_history=chat_log or [],score=result["total_score"],total_tests=result["total_tests"],passed_tests=result["passed"],hints_used=hints_used,challenge_prompt=cs.readme(),target_file=cs.target_file,)print(f"✅ Pushed to Git: {student_name}")except Exception as e:print(f"⚠️ Git submission backup failed: {e}")# Start background upload (won't block UI)upload_thread = threading.Thread(target=_background_upload, daemon=True)upload_thread.start()"""except Exception as exc:import tracebackerror_details = traceback.format_exc()41 unmodified lines424344454647484950515234 unmodified lines878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371043 unmodified lines11811182118311841185118611871188118976 unmodified lines1266126712681269127012711272618 unmodified lines18911892189318941895189618971898189919006 unmodified lines190719081909191019111912191319141915191619171918191919201921192227 unmodified lines195019511952195319541955352 unmodified lines230823092310231123122313231423152316231723184 unmodified lines23232324232523262327232841 unmodified linesexcept ImportError:GOOGLE_SHEETS_AVAILABLE = Falsetry:from supabase_submissions_logger import upload_submission_to_supabaseSUPABASE_AVAILABLE = Trueexcept ImportError:SUPABASE_AVAILABLE = False# ── API Key Validation ────────────────────────────────────────────────────────34 unmodified lines)def _supabase_configured() -> bool:return bool(os.getenv("SUPABASE_URL")) and bool(os.getenv("SUPABASE_SECRET_KEY") or os.getenv("SUPABASE_SERVICE_ROLE_KEY"))def _cloud_upload_capabilities() -> dict[str, dict[str, str | bool]]:google_configured = _google_sheets_configured()supabase_configured = _supabase_configured()return {"google_sheets": {"available": GOOGLE_SHEETS_AVAILABLE,"configured": google_configured,"reason": "" if google_configured else "Missing GOOGLE_SHEET_ID or service account credentials",},"supabase": {"available": SUPABASE_AVAILABLE,"configured": supabase_configured,"reason": "" if supabase_configured else "Missing SUPABASE_URL or Supabase server secret",},}def _save_submission_to_supabase(log: "SubmissionLog", log_path: Path, record: dict) -> dict[str, str]:capability = _cloud_upload_capabilities()["supabase"]if not capability["available"] or not capability["configured"]:result = {"status": "disabled", "error": str(capability["reason"])}else:try:ok, reason = upload_submission_to_supabase(record)result = {"status": "success" if ok else "failed","error": "" if ok else reason,}except Exception as exc:result = {"status": "failed", "error": type(exc).__name__}log.update(log_path, {"cloud": {"supabase": result}})if result["status"] == "success":logger.info("Submission %s stored in Supabase", record.get("submission_id", ""))else:logger.warning("Supabase submission storage %s: %s", result["status"], result["error"])return result# ── Challenge state loader ────────────────────────────────────────────────────class ChallengeState:1043 unmodified linescloud_caps = _cloud_upload_capabilities()google_status = "pending" if enable_cloud_uploads and cloud_caps["google_sheets"]["available"] and cloud_caps["google_sheets"]["configured"] else "disabled"supabase_status = "pending" if enable_cloud_uploads and cloud_caps["supabase"]["available"] and cloud_caps["supabase"]["configured"] else "disabled"google_error = "" if google_status == "pending" else str(cloud_caps["google_sheets"]["reason"])supabase_error = "" if supabase_status == "pending" else str(cloud_caps["supabase"]["reason"])return {"submission_id": submission_id,76 unmodified lines},"cloud": {"google_sheets": {"status": google_status, "error": google_error},"supabase": {"status": supabase_status, "error": supabase_error},},"debug": {"captured_logs": debug_logs,618 unmodified linesidentity=_hf_oauth_identity(profile),)log_path = log.save(submission_record)supabase_result = _save_submission_to_supabase(log, log_path, submission_record)if supabase_result["status"] != "success":debug_logs += f"\n\nSupabase storage {supabase_result['status']}: {supabase_result['error']}"log.update(log_path, {"debug": {"captured_logs": debug_logs}})sys.stdout = original_stdout # Restore stdout# Return results to user IMMEDIATELY6 unmodified linesdebug_logs, # live debug (same))# Google Sheets remains an optional summary destination.def _background_upload():student_name = user_name.strip() if user_name else "Anonymous"cloud_updates = {}cloud_caps = _cloud_upload_capabilities()logger.info("Cloud upload capabilities: google available=%s configured=%s, Supabase status=%s",cloud_caps["google_sheets"]["available"],cloud_caps["google_sheets"]["configured"],supabase_result["status"],)# Google Sheets (fast summary)27 unmodified lineslogger.warning("Google Sheets upload disabled: %s", reason)cloud_updates["google_sheets"] = {"status": "disabled", "error": reason}log.update(log_path, {"cloud": cloud_updates})# Start background upload (won't block UI)352 unmodified linesdebug_logs=debug_logs,enable_cloud_uploads=False,)log_path = log.save(submission_record)supabase_result = _save_submission_to_supabase(log, log_path, submission_record)if supabase_result["status"] != "success":debug_logs += f"\n\nSupabase storage {supabase_result['status']}: {supabase_result['error']}"log.update(log_path, {"debug": {"captured_logs": debug_logs}})sys.stdout = original_stdout # Restore stdout# Return results to user IMMEDIATELY4 unmodified linesdebug_logs,)except Exception as exc:import tracebackerror_details = traceback.format_exc()
123456789101112131415161718192021222324252627282930create table if not exists public.submissions ( submission_id text primary key, submitted_at timestamptz not null, student_name text not null, auth_provider text, provider_user_id text, challenge_id text, repo_url text, target_file text, attempt_number integer not null default 1, hints_used integer not null default 0, llm_score integer, total_score integer, passed_tests integer, total_tests integer, submission_outcome text, payload jsonb not null, created_at timestamptz not null default now());
create index if not exists submissions_provider_user_id_idx on public.submissions (provider_user_id);create index if not exists submissions_submitted_at_idx on public.submissions (submitted_at desc);create index if not exists submissions_challenge_id_idx on public.submissions (challenge_id);
alter table public.submissions enable row level security;revoke all on table public.submissions from anon, authenticated;grant select, insert, update on table public.submissions to service_role;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132"""Store complete challenge submissions in Supabase using its REST API."""
from __future__ import annotations
import jsonimport osfrom typing import Anyfrom urllib.error import HTTPError, URLErrorfrom urllib.parse import urlencode, urlsplitfrom urllib.request import Request, urlopen
TABLE_NAME = "submissions"
def _configuration() -> tuple[str, str] | tuple[None, str]: url = os.getenv("SUPABASE_URL", "").strip().rstrip("/") key = ( os.getenv("SUPABASE_SECRET_KEY", "").strip() or os.getenv("SUPABASE_SERVICE_ROLE_KEY", "").strip() ) if not url or not key: return None, "Missing SUPABASE_URL or Supabase server secret" if urlsplit(url).scheme != "https": return None, "SUPABASE_URL must use HTTPS" return (url, key), ""
def _headers(key: str, *, prefer: str = "return=minimal") -> dict[str, str]: headers = { "apikey": key, "Content-Type": "application/json", "Accept": "application/json", "Prefer": prefer, } # Legacy service_role keys are JWTs. New sb_secret keys are not bearer tokens. if key.startswith("eyJ"): headers["Authorization"] = f"Bearer {key}" return headers
def _submission_row(record: dict[str, Any]) -> dict[str, Any]: student = record.get("student") or {} challenge = record.get("challenge") or {} submission = record.get("submission") or {} tests = record.get("tests") or {} scoring = record.get("scoring") or {} payload = dict(record) payload["cloud"] = dict(record.get("cloud") or {}) payload["cloud"]["supabase"] = {"status": "success", "error": ""}
return { "submission_id": str(record.get("submission_id") or ""), "submitted_at": record.get("timestamp"), "student_name": student.get("name") or "Anonymous", "auth_provider": student.get("auth_provider") or None, "provider_user_id": student.get("provider_user_id") or None, "challenge_id": challenge.get("challenge_id") or None, "repo_url": challenge.get("repo_url") or None, "target_file": challenge.get("target_file") or None, "attempt_number": submission.get("attempt_number", 1), "hints_used": submission.get("hints_used", 0), "llm_score": scoring.get("llm_score"), "total_score": scoring.get("total_score"), "passed_tests": tests.get("passed_tests"), "total_tests": tests.get("total_tests"), "submission_outcome": scoring.get("submission_outcome") or None, "payload": payload, }
def upload_submission_to_supabase(record: dict[str, Any]) -> tuple[bool, str]: """Upsert a submission; returns success and a safe, non-secret diagnostic.""" configured, reason = _configuration() if configured is None: return False, reason if not isinstance(record, dict) or not record.get("submission_id"): return False, "Submission record is missing submission_id"
url, key = configured query = urlencode({"on_conflict": "submission_id"}) request = Request( f"{url}/rest/v1/{TABLE_NAME}?{query}", data=json.dumps(_submission_row(record), ensure_ascii=False).encode("utf-8"), headers=_headers(key, prefer="resolution=merge-duplicates,return=minimal"), method="POST", ) try: with urlopen(request, timeout=12): return True, "" except HTTPError as exc: exc.close() if exc.code in (401, 403): return False, "Supabase rejected the server key or table privileges (HTTP 401/403)" if exc.code == 404: return False, "Supabase table or REST endpoint not found (HTTP 404)" if exc.code == 413: return False, "Submission is too large for the Supabase API (HTTP 413)" return False, f"Supabase returned HTTP {exc.code}" except (TimeoutError, URLError, OSError) as exc: return False, f"Supabase connection failed: {type(exc).__name__}" except (TypeError, ValueError) as exc: return False, f"Submission JSON could not be encoded: {type(exc).__name__}"
def diagnose_supabase() -> dict[str, Any]: """Check server configuration and table access without returning any key.""" configured, reason = _configuration() if configured is None: return {"ok": False, "reason": reason}
url, key = configured query = urlencode({"select": "submission_id", "limit": "1"}) request = Request( f"{url}/rest/v1/{TABLE_NAME}?{query}", headers=_headers(key), method="GET", ) try: with urlopen(request, timeout=8): return {"ok": True, "reason": ""} except HTTPError as exc: exc.close() if exc.code in (401, 403): reason = "Supabase rejected the server key or table privileges (HTTP 401/403)" elif exc.code == 404: reason = "Supabase table or REST endpoint not found (HTTP 404)" else: reason = f"Supabase returned HTTP {exc.code}" return {"ok": False, "reason": reason} except (TimeoutError, URLError, OSError) as exc: return {"ok": False, "reason": f"Supabase connection failed: {type(exc).__name__}"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105import jsonimport osimport unittestfrom unittest.mock import MagicMock, patchfrom urllib.error import HTTPError
import supabase_submissions_logger as logger
class SupabaseSubmissionLoggerTests(unittest.TestCase): def setUp(self): self.record = { "submission_id": "attempt-001", "timestamp": "2026-11-04T10:00:00", "student": { "name": "Alice", "auth_provider": "huggingface", "provider_user_id": "alice", }, "challenge": { "challenge_id": "boltons:utils", "repo_url": "https://github.com/mahmoud/boltons", "target_file": "utils.py", }, "submission": { "attempt_number": 1, "hints_used": 2, "student_code": "print(1)", }, "tests": {"passed_tests": 4, "total_tests": 5}, "scoring": { "llm_score": 80, "total_score": 76, "submission_outcome": "partial_fix", }, }
def test_missing_configuration_is_reported_without_network(self): with patch.dict(os.environ, {}, clear=True): self.assertEqual( logger.upload_submission_to_supabase(self.record), (False, "Missing SUPABASE_URL or Supabase server secret"), )
def test_upload_sends_full_payload_and_uses_idempotent_upsert(self): response = MagicMock() response.__enter__.return_value = response with patch.dict( os.environ, { "SUPABASE_URL": "https://demo.supabase.co", "SUPABASE_SECRET_KEY": "sb_secret_test", }, clear=True, ), patch.object(logger, "urlopen", return_value=response) as send: self.assertEqual(logger.upload_submission_to_supabase(self.record), (True, ""))
request = send.call_args.args[0] headers = {key.lower(): value for key, value in request.header_items()} payload = json.loads(request.data) self.assertEqual(request.get_method(), "POST") self.assertIn("on_conflict=submission_id", request.full_url) self.assertEqual(headers["apikey"], "sb_secret_test") self.assertNotIn("authorization", headers) self.assertEqual(payload["provider_user_id"], "alice") stored_record = payload["payload"] self.assertEqual(stored_record.pop("cloud")["supabase"]["status"], "success") self.assertEqual(stored_record, self.record)
def test_legacy_service_role_key_uses_bearer_header(self): response = MagicMock() response.__enter__.return_value = response legacy_key = "eyJ.test.legacy" with patch.dict( os.environ, { "SUPABASE_URL": "https://demo.supabase.co", "SUPABASE_SERVICE_ROLE_KEY": legacy_key, }, clear=True, ), patch.object(logger, "urlopen", return_value=response) as send: self.assertEqual(logger.upload_submission_to_supabase(self.record), (True, ""))
headers = {key.lower(): value for key, value in send.call_args.args[0].header_items()} self.assertEqual(headers["authorization"], f"Bearer {legacy_key}")
def test_http_errors_do_not_include_secret(self): error = HTTPError("https://demo.supabase.co", 401, "unauthorized", {}, None) with patch.dict( os.environ, { "SUPABASE_URL": "https://demo.supabase.co", "SUPABASE_SECRET_KEY": "sb_secret_private", }, clear=True, ), patch.object(logger, "urlopen", side_effect=error): ok, reason = logger.upload_submission_to_supabase(self.record)
self.assertFalse(ok) self.assertIn("401/403", reason) self.assertNotIn("sb_secret_private", reason)
if __name__ == "__main__": unittest.main()README.md+5-8
SUPABASE_SETUP.mdAdded+54
student_interface.py+49-111
supabase_schema.sqlAdded+30
supabase_submissions_logger.pyAdded+132
test_supabase_submissions_logger.pyAdded+105