Skip to content

Phase 1A: profile core and primary education - #3

Merged
abdo2006-dev merged 10 commits into
mainfrom
phase-1a/profile-core-education
Aug 2, 2026
Merged

Phase 1A: profile core and primary education#3
abdo2006-dev merged 10 commits into
mainfrom
phase-1a/profile-core-education

Conversation

@abdo2006-dev

@abdo2006-dev abdo2006-dev commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Scope

  • Refined profile/education schema, revisions/reviews, primary-selection/review RPCs, protected routing, manual profile/education workflows, and education-slice completeness.

Independent review corrections

  • Fixed the unmerged migration defect: last_confirmed_at is nullable for migrated Phase 0 rows, while new manual rows retain the now() default. Empty-data resets missed this because no legacy rows existed to update to NULL.
  • Added automated ./supabase/scripts/migration-compatibility-test.sh: reset through Phase 0, insert synthetic Phase 0 fixtures, apply pending Phase 1A migration, and assert safe preservation/backfill/provenance/revision behavior. CI runs it before its normal fresh reset.
  • Pinned react-router exactly to 8.3.0 and verified the installed version.
  • Made the evaluator the overview completeness source; missing review state no longer counts as reviewed. Added visible review status, zero-row profile save protection, edit loading/missing states, and stronger client validation.
  • Extended API coverage for owner root-profile delete denial and direct review/revision write denial.

Final review corrections

  • Added explicit basic-profile loading, ready, missing, and retryable error states; the editable form and review action remain unavailable until both profile and section state are real.
  • Refresh education review state after a successful review, and guard review, save, delete, and primary-selection requests against duplicates while preserving safe recoverable-error states.
  • Added user-observable page workflow tests (31 frontend tests total), catalog checks for all eight privileged functions, focused primary/review behavior tests, and stronger legacy-fixture assertions.
  • Extended real loopback API coverage to 33 checks: primary switching/idempotence, non-current rejection, deletion without promotion, review staleness, cross-user revision/review isolation, concurrent revision advancement, and verified cascade cleanup.

Verification

  • Migration compatibility: passed.
  • pgTAP: 168 assertions passed.
  • Real Auth/JWT/PostgREST API: 33 checks passed, with cleanup verified.
  • Frontend: npm ci, exact Router version, format, lint, typecheck, 31 tests, and production build passed.

Exclusions

No deferred Phase 1A sections, resume/ingestion/opportunity features, hosted resources, deployment work, or real profile data.

Refine the profile and education schema with explicit column grants, RLS, section revision triggers, review and primary-selection RPCs, and forward-only legacy compatibility.
Exercise refined profile permissions, education CRUD, constrained primary and review RPCs, review freshness, and cross-user denial through real local Auth and PostgREST.
Install React Router 8.3.0 and introduce authenticated redirects, a protected profile layout, bookmarkable profile routes, safe route errors, and in-memory router coverage.
Add typed profile, education, and review repositories with protected basic-profile and education CRUD workflows, explicit primary selection, validation, review controls, and safe user feedback.
Add a pure versioned education-slice completeness evaluator with public-safe tests and document its named checks, neutral deferred availability state, and migration decisions.
Make migrated confirmation timestamps nullable, add an automated Phase 0-to-Phase 1A compatibility path, and pin React Router exactly.
Use the completeness evaluator as the overview source, distinguish missing review state, refresh visible review status, protect zero-row saves, validate education inputs, and gate edit forms on loaded records.
Add browser root-profile deletion and direct review-write integration coverage, and reconcile the documented API security checks.
Add explicit basic-profile loading, ready, missing, and error states; refresh education review state; guard duplicate mutations; and cover observable page workflows.
Cover privileged function hardening, primary and review behavior, API concurrency and isolation, and stronger legacy migration assertions.
@abdo2006-dev
abdo2006-dev merged commit 0f1ec18 into main Aug 2, 2026
2 checks passed
@abdo2006-dev
abdo2006-dev deleted the phase-1a/profile-core-education branch August 2, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant