Skip to content

fix(integrations): renumber INTEGRATION_SPECS to resolve order collis…#2791

Merged
Devesh36 merged 1 commit into
Tracer-Cloud:mainfrom
Davidson3556:fix/renumber-integration-spec-orders
Jun 12, 2026
Merged

fix(integrations): renumber INTEGRATION_SPECS to resolve order collis…#2791
Devesh36 merged 1 commit into
Tracer-Cloud:mainfrom
Davidson3556:fix/renumber-integration-spec-orders

Conversation

@Davidson3556

Copy link
Copy Markdown
Contributor

Fixes #2790

Describe the changes you have made in this PR -

app/integrations/registry.py carried 9 pre-existing order collisions surfaced by the registry contract tests merged in #2773 (4 setup_order ties and 5 verify_order ties). The two xfail markers on test_setup_orders_are_unique and test_verify_orders_are_unique were placed exactly to track this.

Renumber the later-added spec in each collision pair to a free slot at the high end of the range, with one fill-in at verify_order=6 (the only existing gap in the 0–36 range). The earlier-occurring spec in source keeps its original number, so the bulk of the user-visible wizard ordering is unchanged.

Field Service Before After
setup_order tracer 12 25
setup_order telegram 19 26
setup_order whatsapp 19 27
setup_order mysql 20 28
setup_order dagster 24 29
verify_order victoria_logs 2 6
verify_order kafka 22 37
verify_order mysql 27 38
verify_order openclaw 28 39
verify_order dagster 36 40

The two @pytest.mark.xfail(strict=False) markers in tests/integrations/test_registry_invariants.py are removed along with the now-unused import pytest, since both tests pass on this state. Any future PR that reintroduces a collision will fail those tests strictly.

Demo/Screenshot for feature changes and bug fixes -

Before (current main, with --runxfail to surface what the contract tests catch):

image

After this PR (normal run, no --runxfail needed since the markers are gone):

Screenshot 2026-06-10 at 00 07 23

Code Understanding and AI Usage

Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?

  • No, I wrote all the code myself
  • Yes, I used AI assistance (continue below)

If you used AI assistance:

  • I have reviewed every single line of the AI-generated code
  • I can explain the purpose and logic of each function/component I added
  • I have tested edge cases and understand how the code handles them
  • I have modified the AI output to follow this project's coding standards and conventions

Explain your implementation approach:

The problem is mechanical (pick non-colliding integers) but the renumber strategy matters. The wizard sort order and the integrations verify listing order are user-visible, so I wanted to disturb as little of the existing ordering as possible while still satisfying the uniqueness invariant.

The rule I went with: in each collision pair, whichever spec appears first in the source file keeps its original number; later occurrences move to a free slot. That preserves the rough chronology of how integrations were added and avoids shuffling integrations that have shipped in a specific position for a while.

Picking the new slots, I checked which integers were already taken across the whole spec list. setup_order is dense from 0–24 (no gaps). verify_order is dense from 0–36 except for 6 (the only free slot in that range), plus 99 for supabase as an outlier. So new setup_order slots go to 25–29, new verify_order slots go to 37–40, and the one fill-in at verify_order=6 lets victoria_logs slot in compactly instead of pushing into the 40s.

Alternatives I considered:

  1. Full renumber (1, 2, 3, …) by category. Cleaner long-term but would shuffle every user-visible position, including for integrations the changelog has implicitly stabilized. Too invasive for a fix PR; that's a separate cleanup if anyone wants it.
  2. Random assignment to free slots. Unreviewable, no defensible rule for "why this number."
  3. Semantic grouping (e.g. all messaging integrations contiguous). No existing pattern in the file to fit into — current ordering is historical accretion. Imposing one here would be a different PR.

I went with the minimal-disruption rule because the contract tests don't care about ordering value, only ordering uniqueness; once each spec has a unique number, the registry is in spec, and future drift fails CI.

One wrinkle worth flagging: openclaw stays at setup_order=12 (it appears before tracer in source) but moves on verify_order from 28 to 39 (twilio appears before openclaw in source for the verify collision). Consistent application of the source-order rule, but it does mean one spec moves on one axis and not the other.


Checklist before requesting a review

  • I have added proper PR title and linked to the issue
  • I have performed a self-review of my code
  • I can explain the purpose of every function, class, and logic block I added
  • I understand why my changes work and have tested them thoroughly
  • I have considered potential edge cases and how my code handles them
  • If it is a core feature, I have added thorough tests
  • My code follows the project's style guidelines and conventions

…ions

Pre-existing main carried 9 collisions surfaced by the registry contract
tests (Tracer-Cloud#2773): 4 setup_order ties and 5 verify_order ties. Renumber the
later-added spec in each collision pair (preserving first-occurrence in
source = original number) to a free slot at the high end of the range,
with one fill-in at verify_order=6 (the only existing gap):

  setup_order  tracer 12->25, telegram 19->26, whatsapp 19->27,
               mysql 20->28, dagster 24->29
  verify_order victoria_logs 2->6, kafka 22->37, mysql 27->38,
               openclaw 28->39, dagster 36->40

The two xfail markers on test_setup_orders_are_unique and
test_verify_orders_are_unique are now removed since both assertions pass
on this state. Any future PR that reintroduces a collision will fail
those tests strictly.

Closes Tracer-Cloud#2790
@github-actions

Copy link
Copy Markdown
Contributor

Greptile code review

This repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md.

Run a review — add a PR comment with:

@greptile review

Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5.

Optional: automate with the greploop skill.

@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Resolves 9 pre-existing setup_order/verify_order collisions in INTEGRATION_SPECS by renumbering the later-appearing spec in each pair to a free slot (25–29 for setup_order, 37–40 for verify_order, with victoria_logs filling the one gap at verify_order=6). The companion test change removes the xfail markers that were tracking these collisions, turning both uniqueness tests into strict CI guards.

  • registry.py: 10 order fields updated across 7 specs; the earlier-appearing spec in each collision keeps its original number, minimising user-visible wizard position changes.
  • test_registry_invariants.py: Two @pytest.mark.xfail(strict=False) blocks and the now-unused import pytest removed; test_setup_orders_are_unique and test_verify_orders_are_unique will now fail hard on any future collision.

Confidence Score: 5/5

Safe to merge — all changes are mechanical integer renumbering with no logic alterations, and the uniqueness tests now strictly enforce the invariant.

Every collision listed in the PR table is resolved in the diff, no new collisions are introduced, and the two contract tests are converted from xfail to strict, so any future regression will immediately fail CI. The only side-effect of the renumbering is a shift in wizard/verify listing positions for the affected services, which is the intended outcome.

No files require special attention.

Important Files Changed

Filename Overview
app/integrations/registry.py Resolves 10 order collisions (5 setup_order, 5 verify_order) by renumbering the later-appearing spec in each colliding pair to a free slot; no logic or behavioral changes.
tests/integrations/test_registry_invariants.py Removes two xfail markers (and the now-unused pytest import) from the uniqueness tests, making both tests strictly enforcing going forward.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[INTEGRATION_SPECS tuple] --> B{setup_order set?}
    A --> C{verify_order set?}
    B -- yes --> D[SUPPORTED_SETUP_SERVICES\nsorted by setup_order]
    C -- yes --> E[SUPPORTED_VERIFY_SERVICES\nsorted by verify_order]
    D --> F[Wizard step ordering]
    E --> G[integrations verify listing order]
    H[test_setup_orders_are_unique\n✅ now strictly enforced] --> D
    I[test_verify_orders_are_unique\n✅ now strictly enforced] --> E
    subgraph "Renumbered specs (this PR)"
        J[tracer 12→25]
        K[telegram 19→26]
        L[whatsapp 19→27]
        M[mysql 20→28]
        N[dagster 24→29]
        O[victoria_logs 2→6]
        P[kafka 22→37]
        Q[mysql 27→38]
        R[openclaw 28→39]
        S[dagster 36→40]
    end
    J & K & L & M & N --> D
    O & P & Q & R & S --> E
Loading

Reviews (1): Last reviewed commit: "fix(integrations): renumber INTEGRATION_..." | Re-trigger Greptile

@Davidson3556

Copy link
Copy Markdown
Contributor Author

@muddlebee @Devesh36 kindly review

@Devesh36

Copy link
Copy Markdown
Collaborator

@muddlebee @Devesh36 kindly review

Hey @Davidson3556 can we keep such type of issue for community ?

@Devesh36

Copy link
Copy Markdown
Collaborator

LG 👍

@Devesh36 Devesh36 merged commit d127346 into Tracer-Cloud:main Jun 12, 2026
15 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎻 "The diff was clean, the tests did pass, the reviewer wept." That poem was about @Davidson3556's PR. 🥹


👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Renumber INTEGRATION_SPECS to resolve 9 setup_order / verify_order collisions

2 participants