Skip to content

feat(elm): Phase 2 Review, Test and Improvement of ELM Module (Roll 24BCS260,24BCS222) - #248

Open
uttkarshbagad wants to merge 23 commits into
FusionIIIT:mainfrom
uttkarshbagad:elm-phase2
Open

uttkarshbagad wants to merge 23 commits into
FusionIIIT:mainfrom
uttkarshbagad:elm-phase2

Conversation

@uttkarshbagad

@uttkarshbagad uttkarshbagad commented Oct 16, 2026 •

Copy link
Copy Markdown

Employee Leave Management (ELM) — Phase 2 Implementation

1. Student Details

  • Roll Number: 24BCS260
  • Roll Number: 24BCS222

2. Environment & Model Configuration

  • Model: Qwen2.5-Coder:7b (7.6B parameters, Q4_K_M quantization)
  • Inference Runtime: Ollama
  • Coding Interface: Continue VS Code Extension (Chat mode with @file context)
  • Hardware: Apple MacBook Air (M3, 16 GB Unified Memory)

3. Summary of Improvements Made in Phase 2

  1. Models & Schema Alignment (modules/elm/models.py):
    • Added reason field to LeaveApplication.
    • Updated STATUS_CHOICES to include multi-step workflow states (AWAITING_SUBSTITUTE, AWAITING_APPROVAL, APPROVED, REJECTED, WITHDRAWN, CANCELLED).
    • Added status (PENDING, ACCEPTED, DECLINED) and decline_reason to SubstituteNomination.
  2. Domain Business Rules (modules/elm/domain/policy.py):
    • Implemented pure-Python rules for date overlap prevention (BR-EL-012), self-substitute prevention (BR-EL-014), balance sufficiency, and state transition validation.
  3. Service Layer (modules/elm/services/applications.py):
    • Integrated atomic transactions, balance validation, overlap checks, substitute consent handling, and supervisor review with balance deduction.
  4. Database Migration (modules/elm/migrations/0002_add_workflow_and_reason_fields.py):
    • Created schema migration to persist the updated models.
  5. Automated Unit Testing (modules/elm/tests/test_policy.py):
    • Established automated pytest suite covering all domain rules (100% pass rate).
  6. REST API Layer (modules/elm/api/):
    • Wired serializers, views, and routes for applications, substitute responses, reviews, and withdrawals.
  7. Frontend Client (client/src/modules/elm/):
    • Replaced UI stubs with live data fetching in LeaveBalance.tsx and form submission with error feedback in LeaveApplication.tsx.

4. Detailed Engineering & Code Review Log

For the complete step-by-step log containing exact prompts, AI outputs, and defects caught during human-in-the-loop review, please see:
👉 docs/changes_made_by_24bcs260.md

@uttkarshbagad

Copy link
Copy Markdown
Author

Summary of Phase 2 Improvements (ELM Module)

This PR implements the Phase 2 review, testing, correction, and enhancement of the Employee Leave Management (ELM) module inherited from Phase 1 (elm-pilot-qwen), adhering strictly to the ELM Specification Bundle v1.4, clean domain architecture, and the human-in-the-loop local AI prompting workflow.

Engineering & Review Log

A detailed record of all local AI (qwen2.5-coder:7b) prompts, human code review findings, runtime defects caught, and applied fixes is documented here:
👉 ELM Phase 2 Engineering Log (Roll 24BCS260)

Key Commits Included:

  • e4afea2: feat(elm): update models with workflow statuses and reasons (added reason, workflow state choices, substitute consent status)
  • 9e9507e: feat(elm): add pure-Python domain business rules and transition validators (BR-EL-012 date overlap, BR-EL-014 substitute eligibility, balance sufficiency)
  • ae43983: feat(elm): integrate domain rules and workflow actions into application service (atomic transactions, balance deductions, substitute workflow)
  • 916bed9: feat(elm): add schema migration for workflow statuses and reasons (Django migration 0002)
  • 937b9dc: test(elm): add automated pytest suite for domain policy business rules (100% passing domain unit tests)
  • fa0e6a3: feat(elm): wire complete REST API views, serializers, and routes (endpoints for submit, substitute response, review, withdraw)
  • 4d1a882: feat(elm): wire LeaveBalance and LeaveApplication frontend to REST API (connected React components to live API)
  • 7809065: docs(phase2): organize engineering log by commit hashes

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.

2 participants