fix(selfhost): widen 2 more GitHub-id columns found via a live-schema sweep - #5062
Conversation
… sweep installations.app_id and orb_github_installations.account_id were both added by later ALTER TABLE ... ADD COLUMN migrations (0071, 0077) rather than the original CREATE TABLE statements the first pass grepped -- a direct information_schema query against the live edge-nl-01 schema for every remaining integer id-shaped column caught both (everything else that surfaced was either the one legitimate local-counter exception already excluded, or Postgres's own system catalogs).
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5062 +/- ##
=======================================
Coverage 94.13% 94.13%
=======================================
Files 465 465
Lines 39554 39554
Branches 14433 14433
=======================================
Hits 37235 37235
Misses 1664 1664
Partials 655 655
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 12:17:23 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
- Fix the stale "19 ALTERs" comment (array has grown twice since it was written); rephrase to "every ALTER in the list" so a future column addition can't leave the same stale count behind again. - Add explicit toContain assertions for the two new columns instead of relying on the length/shape check alone, mirroring the existing request_comment_id/response_comment_id test. Closes #5070
Summary
Follow-up to #5059 / #5060 (merged): after that PR merged, I ran one more, more-thorough check directly against the live edge-nl-01 Postgres schema (
information_schema.columnsfor every remainingintegercolumn shaped like an id) rather than trusting the migration-file grep alone. It caught two the first pass missed:installations.app_id-- GitHub's own numeric App id, added by a laterALTER TABLE ... ADD COLUMNmigration (0071), not the originalCREATE TABLEthe first grep matched against.orb_github_installations.account_id-- same shape, added by migration 0077.Everything else the live-schema query surfaced was either the one already-excluded local-counter exception (
orb_signals.id) or Postgres's own system catalogs (pg_locks,pg_stat_activity, etc.) -- confirmed nothing else is missing.Both statements were dry-run validated against production before being written into code, then applied directly (the underlying bug is live and actively occurring, same as #5059/#5060).
Closes #5070
Test plan
npm run typecheck-- cleanselfhost-pg-adapter-github-id-widening.test.ts-- explicittoContainassertions for both new columns, not just the length/shape checknpm run test:coverage(full, unsharded) -- 719 files / 14227 tests passed, 0 failuresnpm audit --audit-level=moderate-- 0 vulnerabilitiesALTERstatements dry-run validated then applied against the live edge-nl-01 Postgres schemasrc/selfhost/pg-adapter.tsis incodecov.yml's ignore list (Postgres runtime adapter) -- patch-coverage gate does not block on this PR