Skip to main content
← Back to list
01Issue
BugClosedSwamp CLI
AssigneesNone

Relationships

#1083 One-time prod data checks: github:-authored lab issues blast radius + legacy uppercase extension names

Opened by keeb · 7/11/2026

Two cheap one-time prod Mongo queries from the 2026-07-10 review — both verify assumptions the code now (or already) relies on. Neither blocks the shipped fixes; both size or rule out residual exposure.

1. GitHub-synced lab issue attribution (sizes the fixed profile regression). The profile Lab-contributions fix queries authorId IN [operative.id, "github:"]. To size how many operatives were affected by the regression window (and whether any case-mismatch stragglers remain where the GH login casing differs from the swamp username and no GitHub account is linked):

// count synced issues whose authorUsername case-insensitively matches a real operative
db.lab_issues_v2.aggregate([
  { $match: { authorId: /^github:/ } },
  { $group: { _id: { $toLower: "$authorUsername" }, n: { $sum: 1 } } },
  { $lookup: { from: "user", localField: "_id", foreignField: "username", as: "op" } },
  { $match: { op: { $ne: [] } } },
  { $group: { _id: null, operatives: { $sum: 1 }, issues: { $sum: "$n" } } },
])

2. Extension name-prefix search assumes all stored names are lowercase. mongo-extension-repository's prefix search is a case-sensitive anchored regex justified by ExtensionName's lowercase validation. Legacy docs written before that validation could go invisible:

db.extensions.countDocuments({ name: /[A-Z]/ })

Expected 0; any hit needs a rename/migration or the prefix filter needs a case-insensitive fallback for those docs.

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

7/11/2026, 3:59:52 AM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.