feat: add manual feedback AI summaries and secure leaderboard scoring
Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
407b878e23
commit
821907b164
37 files changed
+1640
-77
No files matched your search
@@ -161,4 +161,27 @@ the full local commit ID `c0fbf495dc15fd8e1886ae6e9e54a6099ea3dbbe`.
|
||||
The subsequent documentation follow-up includes the pending whitespace-only
|
||||
formatting of `supabase/seed.sql`. Comparison with the committed seed confirmed
|
||||
identical non-whitespace content; seeded data and SQL behavior are unchanged.
|
||||
No database reset, seed execution or additional production deployment is needed.
|
||||
No database reset, seed execution or additional production deployment is needed.
|
||||
|
||||
## Feedback AI (Local Follow-up)
|
||||
|
||||
The subsequent feedback feature is a separate local implementation, not included
|
||||
in the commits or production deployments recorded above. Admin now has global
|
||||
LLM settings and manual **Generate AI Summary** buttons for event feedback and
|
||||
each individual session with responses. Results are persisted separately and a
|
||||
failed regeneration preserves the previous result. The old Schedule evaluation
|
||||
stub is removed and its RPC is no longer client-callable.
|
||||
|
||||
Migration `20261011163332_feedback_ai_summaries` was applied by itself to the local
|
||||
database with its ledger entry. Older pending migrations were left alone. No
|
||||
reset, seed or production changes were performed. The LLM remains unconfigured;
|
||||
no real feedback was sent to a provider. See the
|
||||
[configuration, permissions and privacy contract](../backend/feedback-ai.md).
|
||||
|
||||
Validation: 28 sidecar tests, eight rollback-only SQL assertions, 54 combined
|
||||
API-mocked browser regressions, Admin build, test TypeScript and editor checks.
|
||||
Desktop/mobile screenshots were inspected. A disposable local Auth smoke verified
|
||||
authenticated settings/key redaction and no-feedback rejection, then removed all
|
||||
fixtures without sending email. The usual local Admin on port 3001 uses the
|
||||
updated isolated sidecar on port 3003 via a Git-ignored development proxy override;
|
||||
the existing port-3002 sidecar and Auth services were not restarted.
|
||||
@@ -0,0 +1,51 @@
|
||||
# Leaderboard Validation
|
||||
|
||||
## Findings and Fixes
|
||||
|
||||
The old implementation hid staff from rankings but still awarded them points.
|
||||
A rollback regression reproduced a staff check-in award of ten points. The
|
||||
internal security-definer award helper was also executable by API roles, and the
|
||||
local leaderboard was absent from the Realtime publication.
|
||||
|
||||
Migration `20261015164546_leaderboard_staff_admin_exclusion` enforces zero points
|
||||
for staff and Admin contacts (`is_admin` or `@appe.at`) at award and registration
|
||||
write boundaries. Excluded awards create no points-log entries. Session feedback
|
||||
reports zero earned for excluded users; their attendance/feedback still works.
|
||||
Role changes clear excluded balances and remove leaderboard entries immediately.
|
||||
Historical audit entries are preserved. Ordinary participants, including
|
||||
non-Admin speakers, remain eligible.
|
||||
|
||||
Rankings mirror registration totals, refresh on name changes and registration
|
||||
deletion, exclude missing registrations and use deterministic tie ordering.
|
||||
The migration adds leaderboard Realtime publication membership and revokes
|
||||
direct client execution of internal scoring/synchronization helpers.
|
||||
|
||||
## Verification
|
||||
|
||||
- 46 rollback SQL assertions passed against the installed local migration.
|
||||
- A real local browser test passed using disposable Auth/registration fixtures:
|
||||
the leaderboard received a WebSocket change, updated the winning score and
|
||||
moved the signed-in participant from rank #1 to #2 without reload. Staff/Admin
|
||||
adjustments left balances at zero, with no ranking rows or new award logs.
|
||||
Fixture contacts and Auth users were deleted afterward.
|
||||
- Neighboring service-staff, GridSmart, speaker-portal, ticket-merge and
|
||||
Sessionize date-guard SQL suites passed. The last two required their pending
|
||||
prerequisite migrations within rollback transactions; no broad migration or
|
||||
database reset was run. Their former staff-balance assertions now expect zero.
|
||||
- Attendee production build and browser-test TypeScript validation passed.
|
||||
- The final combined browser run passed all 40 tests: the real leaderboard test
|
||||
plus 39 existing attendee entry, service agenda, clock and profile regressions.
|
||||
- Supabase security advisors reported only existing mutable-search-path warnings
|
||||
for `current_email` and `_map_ticket_type`, not the new functions.
|
||||
|
||||
## Activation Scope
|
||||
|
||||
Only this migration was applied and recorded locally. No production deployment,
|
||||
commit or push was performed for this task. Production cannot be confirmed to
|
||||
enforce these new rules until the migration is deployed there. Existing excluded
|
||||
balances are cleared when applied; historical audit rows remain unchanged.
|
||||
|
||||
Local attendee app: `http://127.0.0.1:3000`.
|
||||
|
||||
See [RPC rules](../backend/rpcs.md#points-rules) and
|
||||
[test commands](../backend/tests.md#leaderboard-regression).
|
||||
Reference in new issue
Block a user