Skip to content

Offer tier-based partner import sync intervals - #241

Merged
abhi1693 merged 7 commits into
masterfrom
feat/partner-tier-sync-intervals
Oct 19, 2026
Merged

abhi1693 merged 7 commits into
masterfrom
feat/partner-tier-sync-intervals

Conversation

@abhi1693

@abhi1693 abhi1693 commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

What changes and why?

The partner connection form currently requires a raw minute count and allows schedules unrelated to the account tier. Replace it with hour-based dropdown choices:

Tier Sync intervals
Bronze / Silver 24 hours
Gold 12 or 24 hours
Platinum 6, 12 or 24 hours
Diamond 1, 3, 6, 12 or 24 hours

New connections default to 24 hours. The API validates explicit interval changes against the owning account's tier under the account lock, and includes the current tier in connection responses. The existing statistics join supplies that tier without an additional listing query.

Existing unsupported schedules and tier downgrades use a 24-hour effective interval in the scheduler. Valid schedules retain their selected interval. The form selects 24 hours for unsupported old values and saves that correction when submitted. Unowned administrator connections retain their configured schedules. Manual sync actions retain their existing behavior.

Validation

  • 122 focused backend tests passed for qualification diagnostics, qualification workflows, portal connections/tiers, workers and scheduling on disposable PostgreSQL/Redis. The earlier tier integration also passed 248 backend cases.
  • 518 partner UI tests, production partner build and browser checks passed. The Gold dropdown offers exactly 12/24 hours and submits 720 minutes. The later diagnostics integration leaves UI and contracts byte-identical to that validated build.
  • Python lint/format/version checks and mypy (348 source files) passed. Normal commit hooks and checks across the full feature diff passed, including affected frontend lint and TypeScript.
  • Admin and partner OpenAPI schemas and generated clients were regenerated and validated.
  • Screenshots remain local and untracked. Native GitHub attachment upload is unavailable in this session.
  • Fresh hosted CI, CodeQL, performance and Sonar checks must pass on the final pushed head before merge.

Rollout notes

No migration. Deploy partner API, portal and worker/scheduler changes together. Existing owned connections with unsupported minute values will sync daily until an allowed interval is selected. Tier downgrades defer an early next sync until the daily interval from the last successful sync has elapsed; active imports are not cancelled.

Ready for review

  • The description explains behavior and rollout impact.
  • Documentation and regression coverage are updated.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Backend unit coverage

PASS · minimum combined coverage 67.60%.

Tests: 5589 passed, 0 failed, 0 skipped. Source files: 348.

Workspace Lines Branches Combined
All backend code 73.40% 56.51% 69.75%
apps/admin-api 62.34% 31.71% 57.21%
apps/aggregator 72.34% 55.97% 68.62%
apps/api 78.48% 66.09% 76.21%
apps/article-enrichment-worker 80.00% 50.00% 71.43%
apps/cli 68.97% 42.93% 65.07%
apps/images-worker 80.00% 50.00% 71.43%
apps/mcp 84.14% 77.33% 82.91%
apps/notifications 83.33% 76.67% 81.75%
apps/partner-api 67.36% 40.48% 63.17%
apps/search-indexer 85.48% 85.71% 85.53%
apps/source-discovery-worker 80.00% 50.00% 71.43%
apps/user-api 61.83% 34.92% 56.90%
packages/core 74.67% 58.52% 70.79%
packages/http 90.76% 81.69% 88.77%

Unit coverage includes every backend workspace. PostgreSQL/Redis integration tests run separately.

Commit: 24d760d · HTML, JSON, XML reports and job logs · attempt 1

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

PR reader API performance

Result: INCONCLUSIVE

6 inconclusive · 2 within threshold. Zero request failures across all six runs.

Base 74d74133822a0bac3bd36a09c79b7b3e42a5b527 → PR 24d760d8c4d14c2cd02180a0d72d0896017d464e

Three independent GitHub-hosted ARM64 runners, each measuring base and PR sequentially with alternating order and isolated resources for every sample. 16 users, 60 seconds/run, 1,000 synthetic articles, cache off, five PgBouncer slots.

Latency comparison

All latency values are in milliseconds; lower is better. Values are medians of three runs.

Route Base p95 PR p95 Change Result
All requests 110 120 +10 (+9.1%) Inconclusive
Latest feed 140 160 +20 (+14.3%) Within threshold
Feed pagination 100 130 +30 (+30.0%) Inconclusive
Article detail 82 88 +6 (+7.3%) Within threshold
Source feed 110 110 +0 (+0.0%) Inconclusive
Topic feed 100 120 +20 (+20.0%) Inconclusive
Feed filters 76 90 +14 (+18.4%) Inconclusive
Sources 36 38 +2 (+5.6%) Inconclusive
Topics 49 55 +6 (+12.2%) Inconclusive
Additional latency and throughput metrics

Each cell shows base → PR. Latencies are in milliseconds.

Endpoint p50 p99 Requests/s
Aggregated 32 → 34 160 → 180 29.95 → 30.59
/v1/feed [latest] 50 → 51 190 → 210 8.44 → 8.92
/v1/feed [page] 31 → 33 150 → 160 3.76 → 3.58
/v1/articles/[id] 21 → 23 130 → 140 6.21 → 6.32
/v1/feed [source] 31 → 32 140 → 150 1.82 → 2.17
/v1/feed [topic] 34 → 31 140 → 180 1.90 → 1.83
/v1/feed/options 23 → 21 120 → 120 2.74 → 2.82
/v1/sources 12 → 14 68 → 54 2.74 → 2.82
/v1/topics 13 → 14 110 → 140 2.74 → 2.82
Individual runs
Run Requests Failures Exit code
Base 1 1674 0 0
Base 2 1688 0 0
Base 3 1726 0 0
PR 1 1723 0 0
PR 2 1772 0 0
PR 3 1738 0 0
How to interpret this report

Regressed / Improved: a p95 regression needs >20% and >20 ms increase in the medians and at least two head samples versus the base median. Improvements use the inverse threshold. Within threshold means the change did not meet both thresholds.

Inconclusive: a within-revision p95 range >35% of its median and >20 ms is too noisy for a confident latency verdict.

Inconclusive latency comparisons are non-blocking: the check passes without claiming an improvement. Confirmed regressions and test/report errors fail the PR gate. Throughput is descriptive: paced users do not measure maximum capacity. This uncached public API test does not establish production health, browser performance or worker capacity. Base and PR share a runner within each pair; three pairs use independent runners. Alternating order reduces host-assignment bias but cannot eliminate changes in host load over time.

Full HTML/CSV reports and logs · attempt 1

@abhi1693
abhi1693 enabled auto-merge October 19, 2026 13:35
@sonarqubecloud

Copy link
Copy Markdown

@abhi1693
abhi1693 merged commit 460712b into master Oct 19, 2026
78 checks passed
@abhi1693
abhi1693 deleted the feat/partner-tier-sync-intervals branch October 19, 2026 16:05
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.

1 participant