chore(api): drop deprecated patch_policies.sources column (#3151) - #3154
Draft
ToddHebebrand wants to merge 1 commit into
Draft
chore(api): drop deprecated patch_policies.sources column (#3151)#3154ToddHebebrand wants to merge 1 commit into
ToddHebebrand wants to merge 1 commit into
Conversation
Deploying breeze with
|
| Latest commit: |
0d45d0b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c91379d0.breeze-9te.pages.dev |
| Branch Preview URL: | https://chore-3151-drop-patch-polici.breeze-9te.pages.dev |
Collaborator
Author
|
Heads-up from the base branch: 10fb309 on 🤖 Generated with Claude Code |
Base automatically changed from
ToddHebebrand/3rd-party-patch-update-rings
to
main
August 5, 2026 21:43
Contract phase of the third-party update ring auto-approve expand/contract plan (spec 2026-08-04). The expand phase (#3150) removed every reader and writer of patch_policies.sources; this drops the column itself, removes the deprecated schema definition, and deletes the now-dead response strips in the ring detail route and the manage_update_rings AI tool (a full-row select can no longer return a sources key). Must not merge until the release containing #3150 has shipped to both prod regions, so rolling deploys never run an older API against the dropped column. Closes #3151 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ToddHebebrand
force-pushed
the
chore/3151-drop-patch-policies-sources
branch
from
August 7, 2026 20:38
b72c9e4 to
0d45d0b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Contract phase of the third-party update ring auto-approve expand/contract plan (
docs/superpowers/specs/vuln-patch/2026-08-04-third-party-update-ring-auto-approve-design.md). The expand phase (#3150) removed every reader and writer ofpatch_policies.sources; this PR drops the column itself.2026-08-14-drop-patch-policies-sources.sql:ALTER TABLE patch_policies DROP COLUMN IF EXISTS sources;— idempotent, no inner transaction.sourcescolumn definition + deprecation comment fromapps/api/src/db/schema/patches.ts(patchSourceEnumitself stays — still used bypatches.source).sourceskey, so the defensiveconst { sources: _sources, ...rest }strips inroutes/updateRings.ts(detail endpoint) andservices/aiToolsPolicyPrereqs.ts(manage_update_ringsget) are removed. Tests updated accordingly; thenot.toHaveProperty('sources')response assertions are kept as regression guards.migrateToConfigPolicies.ts:primary.sources ?? ['os']becomes a hardcoded['os']. This is the compile-time handoff feat(patching): third-party auto-approval as a first-class Update Ring control #3150 deliberately set up — its comment said the DROP COLUMN "removes the Drizzle field, which breaks this line at compile time and forces this script to be updated (or deleted) in the same PR." The retained caveat: the script is a one-shot, not a repeatable sync, so re-running it for a legacy partner whose ring already opted into third-party auto-approve would silently reset that opt-in.patch_policiesis partner-owned (noorg_id, nodevice_id), so it appears in none of the cascade or export-policy lists.feat(patching): third-party auto-approval as a first-class Update Ring control #3150 merged — 2026-08-05,
f146d4027.A release containing feat(patching): third-party auto-approval as a first-class Update Ring control #3150 has shipped to BOTH prod regions (EU + US). Not met. Verified 2026-08-07:
git tag --contains f146d4027returns zero tags — no release contains feat(patching): third-party auto-approval as a first-class Update Ring control #3150.https://eu.2breeze.app/healthandhttps://us.2breeze.app/healthboth report"version":"0.103.0".So the code currently running in both regions still reads
patch_policies.sources. Merging and deploying this now would not merely break a rolling deploy — it would break both live regions the moment the migration applied.Unblocks when: a release cutting from a main that includes
f146d4027has been deployed to EU and US, and/healthreports that version in both. Re-verify with the three checks above rather than assuming the tag implies the deploy — per the deploy runbook, the hand-maintained service list has silently skipped services before.Rebase note (2026-08-07)
This PR was stacked on
ToddHebebrand/3rd-party-patch-update-rings(#3150). That PR was squash-merged, which discards the shared history, so all 14 of its commits on this branch started colliding with main's squashed copy — the PR wentCONFLICTINGwith 23 conflicted files, none of which were actually this PR's work.Resolved by replaying only this PR's own commit onto main (
git rebase --onto origin/main 66f77811b) rather than hand-resolving. That left 1 commit / 8 files, down from 15 commits / 39 files. The single genuine conflict wasmigrateToConfigPolicies.ts— exactly the handoff described above — resolved in favour of this PR's version. Pre-rebase headb72c9e4ebis preserved locally onbackup/3154-pre-rebase-b72c9e4eb.Verification (re-run on the rebased tree, 2026-08-07)
tsc --noEmit -p apps/api/tsconfig.json→ exit 0, no output.apps/apifull unit suite → 1283 files passed / 5 skipped, 20484 tests passed / 48 skipped.patchPolicies.sources/patch_policies.sources: only three comment references remain (migrateToConfigPolicies.ts:491,aiAgentSdkTools.ts:1887,aiAgentSdkTools.mcpCoverage.test.ts:211) — no live readers or writers.patchPoliciesschema object confirmed to have nosourcesfield.2026-08-13ring backfill from feat(patching): third-party auto-approval as a first-class Update Ring control #3150; it has no ordering dependency on the sibling2026-08-14-a-/-b-files (independentDROP COLUMN).Closes #3151
🤖 Generated with Claude Code