Implemented the cleaner audit/data design - #16
Merged
Merged
Conversation
What changed: Added employee fields in [schema.prisma: employmentType, conversionHireStatus, gender, ethnicity. Added dedicated event tables: auth_event, profile_event, ai_usage_event, ai_hitl_decision, nomination_event, review_event. Added migration: [migration.sql]. Updated [audit.ts] so existing audit calls still write to audit_log, but also project clean analytics rows into the new event tables. Updated HR employee create/edit APIs and the HR employee form to edit job grade, employment type, conversion hire, gender, and ethnicity. Updated the System Admin dashboard to read login/AI metrics from the new event tables and show aggregated gender/employment context, without exposing ethnicity. Updated [README.md (line 185)] and the runtime fixes audit log.
This was
linked to
issues
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed:
Added employee fields in [schema.prisma: employmentType, conversionHireStatus, gender, ethnicity. Added dedicated event tables: auth_event, profile_event, ai_usage_event, ai_hitl_decision, nomination_event, review_event. Added migration: [migration.sql].
Updated [audit.ts] so existing audit calls still write to audit_log, but also project clean analytics rows into the new event tables. Updated HR employee create/edit APIs and the HR employee form to edit job grade, employment type, conversion hire, gender, and ethnicity. Updated the System Admin dashboard to read login/AI metrics from the new event tables and show aggregated gender/employment context, without exposing ethnicity. Updated [README.md (line 185)] and the runtime fixes audit log.