Skip to content

Optimize Campaign repositories declaration-only queries - #19008

Closed
pelikhan wants to merge 3 commits into
mainfrom
pelikhan-campaign-repositories-performance
Closed

pelikhan wants to merge 3 commits into
mainfrom
pelikhan-campaign-repositories-performance

Conversation

@pelikhan

@pelikhan pelikhan commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Change

Optimize only the campaign-repositories route. Its chart and table separately evaluated campaign-workflows, including run/AIC totals and import-evidence dependencies that neither view displays. Both now use declaration-only Dashboard Language JSON over canonical workflows. Separate projection/inventory stages preserve coordinate/name filtering, search, structural declarations across runtime horizons, and stable ordering.

The shared JSON campaign-workflow-declarations base now feeds both structural topology and campaign-workflow-inventory. It selects orchestrator/worker roles once and centralizes campaign/workflow display-name fallbacks, repository coordinates, registration/mode defaults, and repository dashboard links. Raw organization/repository/workflow join coordinates and declaration fields remain intact; inactive/unknown entries remain in execution inventory. Active filtering stays in the two list consumers. Execution consumers retain their separate run/import-quality dependencies, while topology resolves only to workflows.

No production JavaScript, cache, batching, query-engine path, navigation-count query, execution-total definition, policy, or enrollment behavior changes. Preserve identities and links, chart counts, table behavior, and abort-scoped canonical subscriptions. Unavailable workflow evidence still fails closed; unrelated run/import quality no longer degrades declaration-only topology. The execution/import-quality definitions and raw-coordinate execution join are unchanged.

Integration with Campaign workflows #19004

Runtime query JSON merges cleanly with b88b01ac6; the complete branches require test/generated-artifact conflict resolution. Combining them requires resolving estimator expectations while retaining declaration-stage/identity coverage, native-quality aggregate assertions, and all existing reduction thresholds. Regenerate both agent catalogs from the resolved JSON sources. No duplicate implementation, dependency edits in #19004, or stacking on that branch are needed.

Follow-up commit 4d7dab4fc removes the redundant role filter in campaign-workflow-totals: the shared declaration base already guarantees those roles. This removes an unnecessary row scan without changing grouping, execution evidence, or quality dependencies. Combined normalized estimator results are:

Query Baseline reads / fields Combined reads / fields Existing read limit
campaign-inventory 88 / 257 74 / 88 < 74.8
campaign-workflows 56 / 161 47 / 69 < 47.6
campaign-workflow-totals 55 / 155 44 / 63 < 46.75

No thresholds were weakened. Regression coverage rejects duplicate role filtering downstream of the shared base. The coordinator independently verified the resolved combined export: 10 suites, 173 passed / 1 skipped, strict types, lint, and dashboard validation passed, retaining both branches' assertions and regenerating catalogs. That export is integration evidence, not a claim that these independent branches have been merged.

Same-data paired measurements

Rerun after the shared declaration extraction. The later redundant total-filter cleanup is outside the Campaign repositories route dependency graph, which remains unchanged. Production-built app, Chromium desktop 1440×1000, no intentional throttling. Both arms use identical JavaScript and pinned deployed data; only dashboard documents/page chunks differ. Baseline: unmodified parent 2de032495, not the earlier 13.13 s live observation.

575,582 fully ingested records, 4,073 runs, 695 workflows, 6 repositories, 11 campaigns, asserted before every sample. Retention frozen at 2026-10-19T20:25:34.392Z prevents evidence aging out between arms. Each arm loads a fresh document and waits for ingestion, then measures navigation through all chart, navigation/tab-count, table-payload and page-chrome worker responses plus completed rendering—not the shell. Ingestion, the 500 ms quiet check, screenshots and optional Table interaction are excluded from default readiness. The harness asserts the correct before/after source was requested.

Three paired samples per campaign, alternating B/A, A/B, B/A on this shared 18-core machine. Independent benchmarks were not stopped; 1-minute load ranged 13.95–24.93. This session ran no other validation workload during timed measurements. Absolute times are contention-sensitive; every pair improves, including reversed order. Final run: 2026-10-19T21:55:06Z–21:59:46Z, 12 completed measurements, no failures.

Campaign Before median After median Reduction Optional Table before → after
eu-cra-compliance 15.118 s 2.564 s 83.0% 15.825 → 2.484 s
dependabot 15.163 s 2.468 s 83.7% 14.266 → 2.565 s
Pair EU CRA before → after Dependabot before → after
1 13.815 → 2.564 s 16.403 → 2.659 s
2 (reversed) 17.103 → 3.058 s 15.163 → 2.468 s
3 15.118 → 2.149 s 13.706 → 2.182 s

Rendered table content and all tab labels/counts/links match between arms. EU CRA retains Insights 1, Failures 37, Reports 113; Dependabot retains Insights 1, Failures 6, and no nonzero Reports badge. Deployed campaign declarations have unknown registration, so active topology legitimately remains empty. Populated cases are separately validated through canonical ingestion/worker fixtures and live browser subscriptions; no deployed registration state was invented.

Deployed revision: 3afa28aea1b381123effea45bc49bc4692356ef7.
Manifest SHA-256: cce19a1f7237786b47a363678ea51e6a685e93a2eca21dd1bd80aac82b605808.
Inventory SHA-256: 4ddedb1f63ea89834b7fd2dab6a88ac5c6e938e9b37817d29d9468e52d94f7e5.
Preliminary retained-document/unfrozen-retention runs and the interrupted pre-final extraction run were discarded, not included above.

Regression coverage and validation

  • Contract fixture and canonical-worker tests cover exact declaration-only dependencies; shared raw join identity and role selection; preserved inactive/unknown registration; populated/empty/unavailable/stale evidence; duplicate names across repositories; role/mode/link/order parity; filtering/search/horizon behavior; no target-enrollment inference.
  • Execution inventory regressions compare selected-horizon totals, quality metadata, empty/unavailable inputs and failures against the original public-inventory consumers. Static estimator expectations reflect the shared layer without relaxing existing reduction thresholds.
  • Browser regression covers populated chart counts and links, campaign tabs, refresh-driven subscription updates, mobile rendering, Table switching and empty-route navigation.
  • Dashboard unit suite rerun after the follow-up: 3,598 passed, 1 skipped. Focused browser suite after shared-base extraction: 27 passed.
  • Catalog/performance-contract tests rerun: 52 passed. Dashboard/root lint, dashboard typecheck, dashboard validation, regenerated catalogs, and workflow compilation passed (71 workflows; existing experimental warnings). Both catalogs were regenerated; only the query catalog changed for the follow-up.

Desktop/mobile full-app captures with the pinned deployed dataset are attached separately. They honestly show empty active topology and populated navigation evidence—not mocked populated-page screenshots.

Read declaration-only campaign topology instead of unused run and import totals. Preserve scoped chart/table filtering, navigation counts and live canonical subscriptions, with populated and empty regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Dashboard dead views

Dead element views (0):
Dead dashboard pages (0):
Analyzed 8 element renderers and 66 dashboard pages across 1 dashboard.json file(s) from dashboard/site/src/components/ui-elements.js.

⚠️ This reachability report is informational and does not block the pull request.
🔎 View the workflow run and report artifact.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Full-app captures after the optimization, using the same fully ingested 575,582-record deployed dataset as the paired measurements. Desktop (1440×1000) and mobile (390×844). These are real site captures, not fixture/mock screenshots: campaign registration is unknown in the deployed inventory, so active repository topology remains honestly empty while the navigation retains Insights 1, Failures 37, and Reports 113.

Campaign repositories desktop with real deployed evidence and unchanged navigation counts

Campaign repositories mobile with real deployed evidence and unchanged navigation counts

pelikhan and others added 2 commits October 19, 2026 15:00
Preserve raw join coordinates and inactive or unknown inventory while sharing role selection and presentation fields between topology and execution consumers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse the shared declaration role guarantee when aggregating campaign workflow totals. Preserve the combined estimator read threshold and all execution quality dependencies.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

Superseded by the single consolidated draft PR #19015 at f0b769c. The reviewed source changes and preservation corrections are collected there, with regenerated catalogs and combined validation. Closing without merging or deleting the source branch; history and original evidence remain available.

@pelikhan pelikhan closed this Oct 19, 2026
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