Code Review Guidelines
Review code changes following HMIS project standards and patterns.
Review Checklist
1. Backward Compatibility
- •No modified existing constructor signatures
- •No renamed database columns (e.g.,
purcahseRateis intentional) - •No renamed composite components without checking ALL usage
- •Entity properties kept alongside new DTO properties
2. AI Suggestion Verification
- •Never accept CodeRabbit/AI suggestions without verification
- •Check for existing implementations before adding null checks
- •Verify lazy initialization patterns (e.g.,
getBillFinanceDetails()already handles nulls) - •Search codebase for existing patterns before adding new code
3. Persistence Configuration
- •
persistence.xmlmust NOT contain hardcoded JNDI names - •Must use
${JDBC_DATASOURCE}and${JDBC_AUDIT_DATASOURCE} - •No hardcoded DDL generation paths
4. JSF/XHTML Rules
- •AJAX update targets must be JSF components (not plain HTML)
- •No CSS/jQuery selectors in update/process attributes
- •Use
h:outputTextinstead of HTML headings - •PrimeFaces button classes, not Bootstrap
5. DTO Patterns
- •Direct JPQL constructor queries (not entity-to-DTO loops)
- •Use
findLightsByJpql()with explicit cast - •Only persisted fields in JPQL (not derived properties)
- •Wrapper types in DTO constructors
6. Security
- •New privileges added to
Privileges.javaenum (not reordering) - •Privilege checks in controllers and XHTML
renderedattributes - •No credentials committed to git
7. Query Patterns
- •
retired = falseincluded in queries - •
inactive = falsefor item filtering where applicable - •Proper null handling for optional relationships (LEFT JOIN)
Process
- •Read the changed files
- •Check each item in the checklist above
- •Report findings with specific file:line references
- •Suggest fixes for any issues found