Every org sees every report, and improvements can be voted on

Featurekamo-shared-library
Shipped
September 7, 2026 at 3:21 AM UTC
Author
Kamo
Commit
a1c2826

The tenancy predicate is gone from all four queries, and its absence is the feature: a defect in the platform is not one tenant's private business, and a request for an improvement is worth more the more organizations can weigh in on it. What used to be protected by not returning the row is now protected by withholding WHO filed it — the reporter fields on SystemBugDTO are null together or populated together, with identityDisclosed saying which shape a row is, so the console never infers withheld from missing. SystemBugVote is one row per member per report, enforced by a unique index rather than by a read-then-write: changing an upvote to a downvote rewrites that row and clearing deletes it. There is no stored zero, because "has not voted" and "voted neutral" would sum identically and read differently. SystemBug.voteScore is a cache of SUM(vote), recomputed on every write and never incremented — a counter nudged as votes arrive is right only while every path that touches one remembers to nudge it. It exists so ordering can be a plain column sort: the listing is a SELECT DISTINCT over a LEFT JOIN, and an aggregate in ORDER BY would force a GROUP BY that breaks both the distinct-entity paging and the hand-written count beside it. The table and column are NOT created by this commit. ddl-auto is none and initializerservice is not deployed, so **************** has to be applied by hand — it has been, against the live database: 30 existing improvements carry their reporter's backfilled upvote.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing