Skip to content

feat: GATEKEEPER Roll Number Verification Flow (#16)#28

Merged
Rajkoli145 merged 1 commit into
mainfrom
feature/gatekeeper-roll-verification
May 23, 2026
Merged

feat: GATEKEEPER Roll Number Verification Flow (#16)#28
Rajkoli145 merged 1 commit into
mainfrom
feature/gatekeeper-roll-verification

Conversation

@amankoli09

Copy link
Copy Markdown
Collaborator

Build fallback identity verification using roll numbers for GATEKEEPER.

  • roll_verification/fixtures.py: 35 real students from the official class roster as StudentProfile fixtures; VALID_ROLL_NUMBERS frozenset; ROLL_TO_NAME dict; build_fixture_registry() returns pre-seeded StudentRegistry ready for verification

  • roll_verification/display.py: StudentDisplayCard frozen dataclass with pretty() (bordered terminal card), one_line() (log-friendly summary), to_dict() (plain types, JSON-safe); format_display_card() pure converter; format_not_found() and format_inactive() staff messages

  • roll_verification/flow.py: RollVerificationFlow stateless class; verify() single-lookup pipeline: lookup → map failure reason → FlowStatus → build display card; verify_batch() bulk verification; verified_count() and rejected_count() helpers; FlowStatus enum: VERIFIED/NOT_FOUND/INVALID/INACTIVE/MANUAL_CHECK; VerificationFlowResult with display_card, requires_manual flag, audit lookup_result; never raises on any input

  • tests/test_roll_verification.py: 55 tests using REAL roll numbers:

    • all 35 real students verified individually and in bulk
    • spot checks: Raj Rasal, Sahil Ghone, Pranav Nair, Shivam Sah
    • name casing normalization verified (SHIVAM SAH → Shivam Sah)
    • invalid inputs: empty, None, special chars, spaces, too short
    • display card: pretty(), one_line(), to_dict(), JSON serialization
    • registry injection, inactive student, custom registry
    • batch: all 35, mixed valid/invalid, empty list
    • manual verification flag on verified vs rejected

Closes #16

Build fallback identity verification using roll numbers for GATEKEEPER.

- roll_verification/fixtures.py: 35 real students from the official class
  roster as StudentProfile fixtures; VALID_ROLL_NUMBERS frozenset;
  ROLL_TO_NAME dict; build_fixture_registry() returns pre-seeded
  StudentRegistry ready for verification

- roll_verification/display.py: StudentDisplayCard frozen dataclass with
  pretty() (bordered terminal card), one_line() (log-friendly summary),
  to_dict() (plain types, JSON-safe); format_display_card() pure
  converter; format_not_found() and format_inactive() staff messages

- roll_verification/flow.py: RollVerificationFlow stateless class;
  verify() single-lookup pipeline: lookup → map failure reason →
  FlowStatus → build display card; verify_batch() bulk verification;
  verified_count() and rejected_count() helpers; FlowStatus enum:
  VERIFIED/NOT_FOUND/INVALID/INACTIVE/MANUAL_CHECK;
  VerificationFlowResult with display_card, requires_manual flag,
  audit lookup_result; never raises on any input

- tests/test_roll_verification.py: 55 tests using REAL roll numbers:
  - all 35 real students verified individually and in bulk
  - spot checks: Raj Rasal, Sahil Ghone, Pranav Nair, Shivam Sah
  - name casing normalization verified (SHIVAM SAH → Shivam Sah)
  - invalid inputs: empty, None, special chars, spaces, too short
  - display card: pretty(), one_line(), to_dict(), JSON serialization
  - registry injection, inactive student, custom registry
  - batch: all 35, mixed valid/invalid, empty list
  - manual verification flag on verified vs rejected

Closes #16
@Rajkoli145 Rajkoli145 merged commit 8e3bfdf into main May 23, 2026
1 check passed
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.

ISSUE 3 — Roll Number Verification Flow

2 participants