fix: address performance and security findings
Lint / Lint (push) Successful in 26s
Tests / Go backend (push) Failing after 1m14s
Tests / Dashboard checks (push) Successful in 52s
Docker / Docker Build & Push (push) Successful in 3m41s

- Add PostgreSQL-backed backend and frontend tests to CI
- Harden Android API logging and disable app backups
- Update the performance report with resolved findings
This commit is contained in:
Gabriel20xx committed 2026-10-19 21:16:08 +00:00
1 parent a84a36349b
commit 937f51b4fb
35 files changed
+2566 -332

No files matched your search

+27
View File
@@ -41,6 +41,31 @@ func enqueueNotification(
return err
}
// enqueueNotificationInTx writes a notification inside a savepoint. PostgreSQL
// aborts the whole transaction after any failing statement, so without the
// savepoint a failed notification insert would make the data mutation's commit
// fail too.
func enqueueNotificationInTx(
ctx context.Context,
tx pgx.Tx,
deviceID string,
eventType string,
entityType string,
entityID string,
listID string,
createdAt int64,
) error {
savepoint, err := tx.Begin(ctx)
if err != nil {
return err
}
if err := enqueueNotification(ctx, savepoint, deviceID, eventType, entityType, entityID, listID, createdAt); err != nil {
_ = savepoint.Rollback(ctx)
return err
}
return savepoint.Commit(ctx)
}
func nullableString(value string) any {
if value == "" {
return nil
@@ -48,6 +73,8 @@ func nullableString(value string) any {
return value
}
// ignoreNotificationError logs a failed notification. Use it only for
// notifications written by enqueueNotificationInTx or outside a transaction.
func ignoreNotificationError(err error) {
if err != nil {
// Notifications are an acceleration path for clients that poll. A failed