Properties
title: Engineering Ops
aliases: [Build & Deploy, Tech Debt]
tags: [3netra/wiki, devops, build, tech-debt]
product: 3netra Meta Android App
source_repository: 3Netra-ai/3n_meta_android
source_ref: origin/prod
source_revision: b48aada8fd5427b5db0c02945569963c4ae543c8
last_verified: 2026-08-06
up: "[[Home]]"

Engineering Ops

Build & Run (native app)

cd src/frontend
# needs: JDK 17 (Android Studio bundled JBR), unset ANDROID_PREFS_ROOT
# env: GITHUB_ACTOR + GITHUB_TOKEN (Meta SDK Maven)
# local.properties: sdk.dir, SUPABASE_URL, SUPABASE_ANON_KEY,
#   SARVAM_API_KEY, GOOGLE_WEB_CLIENT_ID, AWS_BACKEND_URL
./gradlew installDebug        # physical device required (BLE + Meta SDK)
  • app/build.gradle also defines client BuildConfig fields for an OpenAI key and Meta credentials. Do not put server secrets in this app; source contains committed fallback Meta values that need rotation/removal.
  • Unit tests: ./gradlew testDebugUnitTest · Instrumented command: ./gradlew connectedDebugAndroidTest. At the audited ref there are only two weak JVM tests; no instrumented tests were found.
  • CI: .github/workflows/android-build.yml runs only on pushes to prod, writes secrets to local.properties, builds a debug APK, and uploads it. It does not run tests or lint.
  • Deploy runbook: skills/prod-local-deploy — 8-phase diagnose/build/install/verify against device VortexJK68 (prod branch)

Backend Deploys

  • AWS SAM: src/backend/ has a Lambda prototype, but active Android callers use the Supabase Edge Function. Its workflow triggers only from main (not prod) and supplies only Supabase parameters even though the template requires an OpenAI parameter; deployment is not verified.
  • Supabase: local dev config identifies project 3nApp-Mobile; no migrations or seed are committed, and schema_paths is empty. Version schema and policies before treating it as deployable.
  • Legacy: Firebase Functions (npm run deploy in functions/), Vercel (api/)

Documentation reliability at the audited revision

  • README.md contains unresolved merge-conflict markers and retains K–6 positioning.
  • docs/BUILD_AND_DEPLOY.md describes the obsolete Expo/root android/ route and a stale configuration key; it is not a runnable guide for the maintained src/frontend app.
  • docs/TESTING.md describes PR test/lint behavior that .github/workflows/android-build.yml does not implement.
  • Treat active build files, source, the two test files, and workflow YAML as implementation evidence; treat the remaining docs and PRD as historical/roadmap material until reconciled.

Version History (CHANGELOG)

Date Change
2026-07-01–2026-08-03 Historical CHANGELOG/documentation entries; not independently verified as end-to-end delivery
2026-08-05 Audited merge PR #11 cleanup (b48aada8…); source still contains the fixed AI-response defect and stale documentation

Known Quirks & Tech Debt (verified in code)

  1. Critical: SupabaseAiService invokes chat-vision but replaces the returned message with a fixed success string. Scene, chat, and lecture-summary flows cannot supply a verified model answer.
  2. dashboard route orphaned — glassesConfig/chatHistory unreachable in normal flow
  3. StudentOnboardingWizard (voice calibration, emergency contact, battery saver) built but not wired into navigation
  4. SettingsScreen.kt lives in ui/ but declares package ui.student
  5. "Classroom" is a valid scene mode but missing from the mode-chip list; falls through to generic scene prompt
  6. SceneDescriptionScreen.gradeLevel never passed → always "3rd Grade" (pitch 1.1)
  7. ClassmatesScreen shows hardcoded "92% confidence"; KDoc describes AWS Rekognition/3-photo flow that differs from implementation
  8. AssistantChatScreen: camera-capture launchers wired but no camera button rendered
  9. My Story + Chat share one chatHistory StateFlow; story timestamps approximated at render
  10. SOS: no trigger wired; GPS + recent-summaries are TODO stubs; emergency contact not persisted
  11. Wake-word service removed; WHAT_DO_I_SEE/CLASSROOM_MODE broadcasts have no broadcaster
  12. Meta SDK fallback credentials are committed in src/frontend/app/build.gradle — rotate + remove defaults; no values are reproduced here
  13. Ollama endpoint hardcoded to LAN IP 192.168.0.179 (dev-only service)
  14. OPENAI_API_KEY BuildConfig is defined but unused client-side; ML Kit dependency unused
  15. No Supabase migrations/seed committed; RLS policies not in repo
  16. Two Android codebases (native vs Expo/RN shell); RN tree unbuildable (missing JS sources)
  17. Teacher PIN is local-only — needs backend role for real multi-device teacher access

See the severity-ranked register in 12-Risks-Decisions.

Security Notes

  • Never log/commit API keys; local.properties is gitignored (but Meta tokens in strings.xml are committed — flag)
  • Active face flow uses Supabase cloud embeddings; the encrypted 90-day utility is unreferenced.
  • Active AI traffic uses the Supabase Edge Function, not the Lambda. Keep provider credentials server-side and rotate/remove committed or app-compiled secrets.

Repo Agent Tooling

  • skills/ synced to .claude/.gemini/.codex/.openrouter via sync_skills.sh
  • Installed skill: supabase (best practices); project skills: prod-local-deploy, threenetra-vlm-providers (how to add VLM providers), sync-agent-skills
  • Agent pointers: AGENTS.md, CLAUDE.md, GEMINI.md

Key People & Sources

  • Dev log: Mayukh (Supabase migration, schema design, Phase 5)
  • Org docs: PRD v1.0 (Feb 2026, .agent_docs/Assets/), docs/ 16-file suite, JIRA AI-chat story (13 pts) — see 13-Source-Map-Glossary

Tip

Navigation ⬅️ 09-Design-System · 🏠 Home · ➡️ 11-Security-Privacy-Compliance