Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
236b680
docs: add architecture (SAD), fork strategy, and auth design
hamad-clustox Aug 5, 2026
08ea137
feat(auth): add ClustoxUserAuth and ClustoxUserTeamAccess tables
hamad-clustox Aug 5, 2026
4a6a255
feat(auth): add bcrypt password hashing
hamad-clustox Aug 5, 2026
a3ff16c
feat(auth): add auth types and data access queries
hamad-clustox Aug 5, 2026
df1b95e
feat(auth): add role and team-access guards
hamad-clustox Aug 5, 2026
d70c787
feat(auth): configure next-auth credentials provider
hamad-clustox Aug 5, 2026
5dc6626
feat(auth): enforce authentication in Endpoint.serve()
hamad-clustox Aug 5, 2026
177d730
feat(auth): add login page and page-level guard
hamad-clustox Aug 5, 2026
d1c980d
feat(auth): bootstrap first superadmin from environment
hamad-clustox Aug 5, 2026
64825b9
feat(auth): restrict Flask servers to BFF via shared secret
hamad-clustox Aug 5, 2026
203d486
feat(auth): scope team routes and restrict admin actions
hamad-clustox Aug 5, 2026
67ec817
feat(auth): add user management API and page
hamad-clustox Aug 5, 2026
2fd0a06
test(auth): add end-to-end coverage and correct fork footprint docs
hamad-clustox Aug 5, 2026
f895710
fix(auth): resolve identity and role from the database, not the token
hamad-clustox Aug 5, 2026
5ce2cc5
feat(auth): add sign out and Manage Users to the sidebar
hamad-clustox Aug 5, 2026
a729e49
Add Jenkinsfile for CI/CD pipeline
nexusameer Aug 6, 2026
062dfa5
Merge pull request #1 from Clustox/add-jenkinsfile
nexusameer Aug 6, 2026
3f909af
jenkins file updated
nexusameer Aug 6, 2026
5b862a7
Merge pull request #2 from Clustox/add-jenkinsfile
nexusameer Aug 6, 2026
3e101f4
docs: add multitenancy proposal and open decisions
hamad-clustox Aug 6, 2026
18337bd
jenkins file updated
nexusameer Aug 6, 2026
cd9bf1e
Merge pull request #3 from Clustox/add-jenkinsfile
nexusameer Aug 6, 2026
630c74e
jenkins file updated
nexusameer Aug 6, 2026
3b01e83
Merge pull request #4 from Clustox/add-jenkinsfile
nexusameer Aug 6, 2026
72c3589
feat(tenancy): give each admin their own workspace
hamad-clustox Aug 6, 2026
70527ef
feat(tenancy): scope every request to the caller's workspace
hamad-clustox Aug 6, 2026
26f01ef
fix(tenancy): give superadmin a workspace to view
hamad-clustox Aug 6, 2026
52e2868
fix(users): restore page chrome and rebuild the page around workspaces
hamad-clustox Aug 6, 2026
1b3fea4
fix(tenancy): let an admin link their own integration
hamad-clustox Aug 6, 2026
04f9140
fix(tenancy): let admins manage their own workspace, and close a cros…
hamad-clustox Aug 6, 2026
1796a26
feat(tenancy): sync every workspace, and record the outcome of each
hamad-clustox Aug 6, 2026
4972c80
feat(tenancy): surface sync health per workspace
hamad-clustox Aug 6, 2026
f0c5522
feat(tenancy): let an admin adopt an existing workspace
hamad-clustox Aug 6, 2026
8a4f79d
test(tenancy): end-to-end cross-workspace isolation, and fix a name c…
hamad-clustox Aug 6, 2026
d7d56a1
docs: correct the fork divergence baseline
hamad-clustox Aug 6, 2026
e584bf0
feat(tenancy): invite links
hamad-clustox Aug 6, 2026
d7f9df9
feat(tenancy): superadmin DORA comparison across workspaces
hamad-clustox Aug 6, 2026
9ec95de
slack alerts configured
nexusameer Aug 7, 2026
302f2cd
Merge pull request #5 from Clustox/add-jenkinsfile
nexusameer Aug 7, 2026
df8d2f1
docs: drop internal spec and plan scaffolding
hamad-clustox Aug 7, 2026
1fe2975
Merge feat/auth-rbac: drop internal spec and plan scaffolding
hamad-clustox Aug 7, 2026
9bbc881
Merge pull request #6 from Clustox/feat/auth-rbac
hamad-clustox Aug 7, 2026
3b615d2
Merge pull request #8 from Clustox/feat/multitenancy
hamad-clustox Aug 7, 2026
12f16cd
Invite link through email
batoolfatima05 Aug 7, 2026
94814bd
bug: github link issue
batoolfatima05 Aug 9, 2026
71f000a
docs: design for Jenkins deployment detection
hamad-clustox Aug 9, 2026
9d3efc3
docs: implementation plan for Jenkins deployment detection
hamad-clustox Aug 10, 2026
4c73a49
BUG: Scrollbar fix
batoolfatima05 Aug 10, 2026
29e2ab3
feat(jenkins): register jenkins as a workflow and identity provider
hamad-clustox Aug 10, 2026
85b3c18
feat(jenkins): add REST client with bounded timeouts
hamad-clustox Aug 10, 2026
071fe3f
test(jenkins): add build fixtures including the no-git-plugin case
hamad-clustox Aug 10, 2026
0880d5e
feat(jenkins): map builds to workflow runs
hamad-clustox Aug 10, 2026
3b02111
docs: correct task 4 test count from 10 to 9
hamad-clustox Aug 10, 2026
c7b8ce3
feat(jenkins): resolve credentials and register the handler
hamad-clustox Aug 10, 2026
69fe97c
feat(jenkins): expose job listing and mapping routes
hamad-clustox Aug 10, 2026
b773a34
feat(jenkins): add job listing and mapping endpoints
hamad-clustox Aug 10, 2026
20fe98c
UI: add account menu and update user management UI
batoolfatima05 Aug 10, 2026
c598cad
fix(jenkins): construct Endpoint with pathSchema, not postSchema
hamad-clustox Aug 10, 2026
e4441d2
test(jenkins): cross-workspace isolation for jenkins endpoints
hamad-clustox Aug 10, 2026
64aa5a7
docs: use an RFC-4122 valid placeholder UUID in task 8
hamad-clustox Aug 10, 2026
3849e6d
feat(jenkins): connect jenkins and map jobs to repositories
hamad-clustox Aug 10, 2026
eb5519b
Merge pull request #9 from Clustox/feat/email_invite
hamad-clustox Aug 10, 2026
c0a4a66
fix(jenkins): include jenkins in the workflow integration bucket
hamad-clustox Aug 10, 2026
8bcfc99
fix(jenkins): normalise the git plugin branch before storing it
hamad-clustox Aug 10, 2026
ce4250e
fix(jenkins): one active deployment source per repo, reversibly
hamad-clustox Aug 10, 2026
8f8a452
fix(jenkins): reject non-jenkins workflows on the jenkins delete route
hamad-clustox Aug 10, 2026
d33e12c
fix(jenkins): discover nested jobs and bound each request in wall-clock
hamad-clustox Aug 10, 2026
3be2812
fix(jenkins): declare requests, and report an unreachable jenkins as 502
hamad-clustox Aug 10, 2026
0ffa112
fix(jenkins): keep the api token out of the console, add fork markers
hamad-clustox Aug 10, 2026
d3fba5d
fix(jenkins): make the wall-clock ceiling actually bound the read
hamad-clustox Aug 10, 2026
549777f
fix(jenkins): unmapping restores only the workflows mapping displaced
hamad-clustox Aug 10, 2026
b67f2ad
fix(jenkins): match the reuse lookup to the unique index
hamad-clustox Aug 10, 2026
eeb3434
Merge main into feat/jenkins-integration
hamad-clustox Aug 10, 2026
d060b14
fix(jenkins): pin requests to a version python 3.9 can install
hamad-clustox Aug 10, 2026
f0a2286
docs: implementation plan for the DORA contributor filter
hamad-clustox Aug 10, 2026
f557f33
docs: implementation plan for the DORA contributor filter
hamad-clustox Aug 10, 2026
20c32fe
fix(filters): apply the pull request author filter
hamad-clustox Aug 10, 2026
ea3f9b8
docs: correct the test baseline for this branch
hamad-clustox Aug 10, 2026
ab38470
feat(filters): filter deployments by the actor who triggered them
hamad-clustox Aug 10, 2026
b9bb75b
feat(contributors): list a team's pull request authors, bots excluded
hamad-clustox Aug 10, 2026
6ee45e9
feat(contributors): expose the contributor list and thread the filter
hamad-clustox Aug 10, 2026
a5cbecf
feat(contributors): add the contributor filter to dora metrics
hamad-clustox Aug 10, 2026
913bb63
fix(contributors): stop CFR and MTTR from being filtered by contributor
hamad-clustox Aug 10, 2026
32c2b76
fix(contributors): nest event_actors inside the workflow_filter blob
hamad-clustox Aug 11, 2026
34daf2f
fix(contributors): keep the shared summary_prs list team-wide
hamad-clustox Aug 11, 2026
999ed82
fix(contributors): keep the selection across every DORA refetch path
hamad-clustox Aug 11, 2026
4296242
fix(contributors): count only merged PRs in the contributor list
hamad-clustox Aug 11, 2026
e3817e4
fix(contributors): keep chips removable when the contributor fetch fails
hamad-clustox Aug 11, 2026
2868361
fix(contributors): keep every name when the URL param repeats
hamad-clustox Aug 11, 2026
edcdd18
fix(contributors): align the dropdown's date window with the metrics …
hamad-clustox Aug 11, 2026
a824648
chore(contributors): mark every upstream edit with a CLUSTOX sentinel
hamad-clustox Aug 11, 2026
c0eeb90
fix(jenkins): make a mapped job actually count as deployments
hamad-clustox Aug 11, 2026
f2a73ef
feat(jenkins): list the workspace's existing job mappings
hamad-clustox Aug 11, 2026
bc7d5b6
fix(jenkins): refuse internal addresses and stop following redirects
hamad-clustox Aug 11, 2026
6204809
feat(jenkins): add helpers to forward analytics-server error messages
hamad-clustox Aug 11, 2026
a6927d3
fix(jenkins): show existing mappings and allow unmapping
hamad-clustox Aug 11, 2026
b88b535
fix(jenkins): report the real reason a Jenkins connection probe fails
hamad-clustox Aug 11, 2026
59db98a
fix(deployments): a repo with no prod_branches must not hide every de…
hamad-clustox Aug 11, 2026
b84da5c
docs: move the contributor filter plan off this branch
hamad-clustox Aug 11, 2026
a892f9f
Merge pull request #11 from Clustox/feat/jenkins-integration
hamad-clustox Aug 11, 2026
a4ff9de
Merge pull request #12 from Clustox/feat/contributor-filter
hamad-clustox Aug 11, 2026
0301f89
ci: warm the app's routes after deploy
hamad-clustox Aug 11, 2026
b285251
ci: deploy the production image instead of the dev server
hamad-clustox Aug 11, 2026
69762b0
Merge pull request #13 from Clustox/ci/production-build-deploy
hamad-clustox Aug 11, 2026
b36c563
docs: design for per-team DORA benchmarks
hamad-clustox Aug 11, 2026
dcceaa1
docs: implementation plan for per-team DORA benchmarks
hamad-clustox Aug 11, 2026
f64a0a4
feat(benchmarks): register the benchmark setting type
hamad-clustox Aug 11, 2026
a2e1127
feat(benchmarks): resolve team targets against the global baseline
hamad-clustox Aug 11, 2026
301908c
feat(benchmarks): return resolved targets with team metrics
hamad-clustox Aug 11, 2026
9e8055e
fix: point invite and share links at the public domain
hamad-clustox Aug 11, 2026
b29391c
Merge pull request #14 from Clustox/claude/invite-link-localhost-doma…
hamad-clustox Aug 11, 2026
c59e79e
feat(benchmarks): expose the superadmin baseline
hamad-clustox Aug 11, 2026
f996a76
docs: the settings extension has eleven points, not ten
hamad-clustox Aug 11, 2026
84716f0
fix(benchmarks): populate the setting body and scope marker for bench…
hamad-clustox Aug 11, 2026
2c7e65f
feat(benchmarks): draw the target on each metric card
hamad-clustox Aug 11, 2026
a5d6e85
feat(benchmarks): add the benchmark configuration forms
hamad-clustox Aug 11, 2026
3a006c4
fix(benchmarks): let any admin read the global baseline, not just sup…
hamad-clustox Aug 11, 2026
7bfb7d6
test(benchmarks): cross-workspace isolation
hamad-clustox Aug 11, 2026
586a962
fix(benchmarks): serve resolved targets, and stop inventing ones nobo…
hamad-clustox Aug 11, 2026
a781aed
fix(benchmarks): send the resolved targets on the route the cards read
hamad-clustox Aug 11, 2026
2cf1444
fix(benchmarks): harden the caption and target line against bad inputs
hamad-clustox Aug 11, 2026
d36fd88
docs(benchmarks): record the shipped design, not the proposed one
hamad-clustox Aug 11, 2026
7ad2a4f
fix(benchmarks): degrade to an unbenchmarked dashboard when targets f…
hamad-clustox Aug 11, 2026
d910394
test(benchmarks): let the isolation suite target a non-default instance
hamad-clustox Aug 11, 2026
2f8974d
fix(benchmarks): refresh the dashboard when a team target is saved
hamad-clustox Aug 11, 2026
75adbf8
docs(benchmarks): spec and plan for target bands and the LOC metric
hamad-clustox Aug 11, 2026
86abba8
feat(loc): aggregate lines of code from merged pull requests
hamad-clustox Aug 11, 2026
85e64e0
feat(loc): expose team lines-of-code totals and trends over HTTP
hamad-clustox Aug 11, 2026
8c69138
feat: Jira integration Phase 1 (link only) + unit and E2E test coverage
batoolfatima05 Aug 10, 2026
82c1a58
fix(jira): centralize code-provider detection, fix URL normalization
batoolfatima05 Aug 10, 2026
a458e1d
docs: drop JIRA_INTEGRATION_PROPOSAL.md from PR scope
batoolfatima05 Aug 11, 2026
0afb8fa
feat(jira): Phase 2 -- team-level Jira project selection
batoolfatima05 Aug 10, 2026
044d4b2
ui(teams): visually separate repo/Jira sections on Edit Team, disambi…
batoolfatima05 Aug 11, 2026
23f584d
feat(jira): Phase 2 -- issue sync into Ticket/TicketState
batoolfatima05 Aug 11, 2026
087f12e
feat(jira): Phase 3 -- ticket-PR matching
batoolfatima05 Aug 11, 2026
55d1051
fix(jira): scan the PR body for a ticket key, not just title/branch
batoolfatima05 Aug 11, 2026
702604f
feat(jira): Phase 4 -- Ticket Cycle Time widget + data-hygiene callout
batoolfatima05 Aug 11, 2026
0938edd
fix(jira): Ticket Cycle Time was measuring open tickets against "now"
batoolfatima05 Aug 11, 2026
41f162e
fix(jira): match Ticket Cycle Time to the design reference's actual m…
batoolfatima05 Aug 11, 2026
bc9d07d
fix(dora): floor Ticket Cycle Time's segment widths so tiny-but-real …
batoolfatima05 Aug 11, 2026
7e85467
feat(jira): let people see and check the PRs that didn't match a ticket
batoolfatima05 Aug 11, 2026
6b45906
fix(dora): match Data Hygiene's layout and copy to the design reference
batoolfatima05 Aug 11, 2026
af4a90e
style(loc): black formatting on pull_requests.py
hamad-clustox Aug 12, 2026
9f1d504
docs(loc): document the total key on loc_stats
hamad-clustox Aug 12, 2026
36d8eb2
feat(loc): send loc_stats and loc_trends on the dora metrics response
hamad-clustox Aug 12, 2026
b28109c
feat(benchmarks): register lines_of_code as a fifth benchmark metric
hamad-clustox Aug 12, 2026
2e071ba
feat(benchmarks): surface the lines_of_code target in the UI
hamad-clustox Aug 12, 2026
be4bcd9
test(benchmarks): pin every metric to every extension point
hamad-clustox Aug 12, 2026
906987e
refactor(benchmarks): derive the form's metric list, correct stale co…
hamad-clustox Aug 12, 2026
db074d9
docs(plan): cap the benchmark band's axis stretch at 2x the data
hamad-clustox Aug 12, 2026
1e9ec26
feat(benchmarks): draw the target as a shaded band in data space
hamad-clustox Aug 12, 2026
fbe3c33
style(benchmarks): run prettier over the band test
hamad-clustox Aug 12, 2026
e843160
refactor(benchmarks): drop the CSS-positioned target line
hamad-clustox Aug 12, 2026
49725a1
docs(plan): the axis stretch limit is 4x, not 2x
hamad-clustox Aug 12, 2026
ed541dd
test(benchmarks): cover an off-scale target in the inverted direction
hamad-clustox Aug 12, 2026
f734017
feat(benchmarks): share the DORA card chart options and the band merge
hamad-clustox Aug 12, 2026
462f725
feat(benchmarks): draw the target band on lead time and deployment fr…
hamad-clustox Aug 12, 2026
832cb94
feat(benchmarks): tell a real 0% failure rate apart from an unmeasura…
hamad-clustox Aug 12, 2026
ce871bc
fix(benchmarks): don't report 0% change failure rate with no deployments
hamad-clustox Aug 12, 2026
bcf245d
refactor(benchmarks): drop a dead ternary, align the DF caption gate
hamad-clustox Aug 12, 2026
8d32654
fix(dora): split Data Hygiene out of Ticket Cycle Time's column, own …
batoolfatima05 Aug 12, 2026
340518e
feat(jira): extend Lead Time breakdown with a "ticket created -> firs…
batoolfatima05 Aug 11, 2026
0cd5ebc
feat(jira): promote the extended Lead Time breakdown to an always-vis…
batoolfatima05 Aug 11, 2026
cc724c0
fix(dora): guard useLeadTimePipeline against metrics_summary being null
batoolfatima05 Aug 11, 2026
4ba6a28
feat(jira): Sprint rollup chart -- new sync pipeline, not a UI addition
batoolfatima05 Aug 11, 2026
81c94e3
fix(dora): align Sprint rollup bars, put it beside Ticket Cycle Time
batoolfatima05 Aug 11, 2026
cc42d1a
fix(dora): match the extended Lead Time card's titles to the design r…
batoolfatima05 Aug 11, 2026
04ea5cc
fix(dora): scroll Sprint rollup horizontally instead of wrapping rows
batoolfatima05 Aug 12, 2026
1b4f16f
fix(dora): stop Sprint rollup / Ticket Cycle Time stretching to match…
batoolfatima05 Aug 12, 2026
e203c2c
fix(dora): match the updated design reference -- layout order, Data H…
batoolfatima05 Aug 12, 2026
c681659
feat(jira): Jira issues as an incident source for CFR/MTTR (MID-8)
batoolfatima05 Aug 12, 2026
a85568f
feat(loc): add the lines of code card in a 2x3 grid
hamad-clustox Aug 12, 2026
fd09e86
test(loc): render the lines of code card, and unblock component suites
hamad-clustox Aug 12, 2026
38261b0
docs(loc): correct a comment that named an operator the code does not…
hamad-clustox Aug 12, 2026
61632dd
fix(loc): don't show a green improvement pill for a period that merge…
hamad-clustox Aug 12, 2026
48f2ce1
test(loc): prove the shared PR filter narrows lines of code, not just…
hamad-clustox Aug 12, 2026
d8f9579
test(benchmarks): cover lines_of_code in the workspace isolation suite
hamad-clustox Aug 12, 2026
d06c206
test(benchmarks): pin the regression guarantee for all five cards
hamad-clustox Aug 12, 2026
94cc431
test(benchmarks): drop an isolation assertion that could not fail
hamad-clustox Aug 12, 2026
c0d6e31
fix(benchmarks): no incidents this period is not a fast recovery
hamad-clustox Aug 12, 2026
92dbf7e
fix(loc): count lines of code as team insight
hamad-clustox Aug 12, 2026
b15cf6d
Merge pull request #23 from Clustox/feat/benchmarks
hamad-clustox Aug 12, 2026
de4d6cb
Merge branch 'main' of https://github.com/Clustox/middleware into jir…
batoolfatima05 Aug 12, 2026
ef84c8f
Merge remote-tracking branch 'fork/main' into jira/mid-2-link-jira-site
batoolfatima05 Aug 12, 2026
83d057b
Merge branch 'jira/mid-2-link-jira-site' into jira/mid-3-team-jira-pr…
batoolfatima05 Aug 12, 2026
247f739
Merge branch 'jira/mid-3-team-jira-project-selection' into jira/mid-4…
batoolfatima05 Aug 12, 2026
e3b9426
Merge branch 'jira/mid-4-jira-issue-sync' into jira/mid-5-match-ticke…
batoolfatima05 Aug 12, 2026
437edc8
Merge branch 'jira/mid-5-match-tickets-to-prs' into jira/mid-6-ticket…
batoolfatima05 Aug 12, 2026
1107187
Merge branch 'jira/mid-6-ticket-cycle-time-data-hygiene' into jira/mi…
batoolfatima05 Aug 12, 2026
0f76e4f
Merge branch 'jira/mid-7-lead-time-sprint-rollup' into jira/mid-8-jir…
batoolfatima05 Aug 12, 2026
bad62a0
fix(incidents): Jira issues count as an incident source by default
batoolfatima05 Aug 13, 2026
5bf64b7
Merge pull request #15 from Clustox/jira/mid-2-link-jira-site
batoolfatima05 Aug 13, 2026
d171a48
fix: scope Jira incident lookup to org, not just (key, type, provider)
batoolfatima05 Aug 13, 2026
1e06fca
Merge pull request #17 from Clustox/jira/mid-4-jira-issue-sync
batoolfatima05 Aug 13, 2026
a8e71d0
Merge pull request #18 from Clustox/jira/mid-5-match-tickets-to-prs
batoolfatima05 Aug 13, 2026
39aa0f4
Merge pull request #19 from Clustox/jira/mid-6-ticket-cycle-time-data…
batoolfatima05 Aug 13, 2026
15eba52
Merge pull request #20 from Clustox/jira/mid-7-lead-time-sprint-rollup
batoolfatima05 Aug 13, 2026
45c9c80
Merge pull request #21 from Clustox/jira/mid-8-jira-incident-source
batoolfatima05 Aug 13, 2026
c1c9925
Merge pull request #25 from Clustox/jira/mid-3-team-jira-project-sele…
batoolfatima05 Aug 13, 2026
bc7a396
Merge pull request #26 from Clustox/jira/mid-4-jira-issue-sync
batoolfatima05 Aug 14, 2026
a6fcb8c
Merge pull request #27 from Clustox/jira/mid-5-match-tickets-to-prs
batoolfatima05 Aug 14, 2026
e530b7a
Merge pull request #28 from Clustox/jira/mid-6-ticket-cycle-time-data…
batoolfatima05 Aug 14, 2026
efed2eb
Merge pull request #29 from Clustox/jira/mid-7-lead-time-sprint-rollup
batoolfatima05 Aug 14, 2026
d6b358c
feat(loc): lead with lines changed per day, not the period total
hamad-clustox Aug 16, 2026
572f02e
feat(dora): give the metric graphs a real line, a gradient, and tooltips
hamad-clustox Aug 17, 2026
50dacc2
feat(benchmarks): promote the caption to a verdict pill
hamad-clustox Aug 17, 2026
a407d26
Merge pull request #31 from Clustox/feat/loc-daily-average
hamad-clustox Aug 17, 2026
3f6b0ff
jira linking fix
batoolfatima05 Aug 24, 2026
378839e
Merge branch 'main' of https://github.com/Clustox/middleware into jir…
batoolfatima05 Aug 24, 2026
a010a73
jira linking fix
batoolfatima05 Aug 24, 2026
4c8a167
fix: preserve Jira token encryption keys at startup
batoolfatima05 Aug 24, 2026
66d44e5
Merge pull request #32 from Clustox/jira/linking
batoolfatima05 Aug 25, 2026
77699bf
fix: restore env-var export for the Node web-server's encryption keys
batoolfatima05 Aug 25, 2026
a8368c1
Merge pull request #33 from Clustox/fix/jira-webserver-env-export
batoolfatima05 Aug 25, 2026
08f93ce
docs(bitbucket): design spec for Bitbucket Cloud code provider and Pi…
hamad-clustox Aug 25, 2026
d68c900
docs(bitbucket): phase-1 implementation plan
hamad-clustox Aug 25, 2026
eb601cc
feat(bitbucket): Bitbucket Cloud v2 API client
hamad-clustox Aug 25, 2026
e786f6e
feat(bitbucket): ETL handler for repos and pull requests
hamad-clustox Aug 25, 2026
29cce34
test(bitbucket): reviews, code stats, and the 429 bookmark contract
hamad-clustox Aug 25, 2026
1bd4f7e
feat(bitbucket): revert-PR incidents and factory registration
hamad-clustox Aug 25, 2026
9d8d997
feat(bitbucket): server-side token check and workspace repo listing
hamad-clustox Aug 25, 2026
2a71e46
style(bitbucket): import-group spacing
hamad-clustox Aug 25, 2026
63c12b6
feat(bitbucket): configuration modal, integration card, and sync bucket
hamad-clustox Aug 25, 2026
e9e45a9
style(bitbucket): import order in integrations page
hamad-clustox Aug 25, 2026
ec0cc0e
test(bitbucket): provider isolation on both sides
hamad-clustox Aug 25, 2026
2d0108a
fix(bitbucket): diagnostic token check, trimmed inputs
hamad-clustox Aug 25, 2026
a6e40b9
fix(bitbucket): live-testing discoveries -- dead workspaces endpoint,…
hamad-clustox Aug 25, 2026
4a31620
fix(bitbucket): whole-branch review findings
hamad-clustox Aug 26, 2026
d949d32
Merge pull request #35 from Clustox/feat/bitbucket
hamad-clustox Aug 27, 2026
41e2f70
fix: let two workspaces track the same repo
hamad-clustox Sep 2, 2026
6e521a3
fix: sign out on the server landed on localhost's login page
hamad-clustox Sep 2, 2026
119c779
Merge pull request #37 from Clustox/fix/org-scoped-idempotency-key
hamad-clustox Sep 2, 2026
c65c0bc
ci: add SonarQube analysis, quality gate and issue report
nexusameer Sep 3, 2026
a660d0f
Merge pull request #38 from Clustox/ci/add-sonarqube-stage
nexusameer Sep 3, 2026
9da2b6b
Add Jira multi-account support, connection-aware sync/matching, and r…
batoolfatima05 Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ RUN --mount=type=cache,target=/root/.cache/pip /opt/venv/bin/pip install -r requ

WORKDIR /app
RUN mkdir -p /etc/cron.d && mv /app/setup_utils/cronjob.txt /etc/cron.d/cronjob
RUN chmod +x /app/setup_utils/start.sh /app/setup_utils/init_db.sh /app/setup_utils/generate_config_ini.sh
# CLUSTOX: trigger_sync.sh added so cron can send the internal API token.
RUN chmod +x /app/setup_utils/start.sh /app/setup_utils/init_db.sh /app/setup_utils/generate_config_ini.sh /app/setup_utils/trigger_sync.sh
RUN mv /app/setup_utils/supervisord.conf /etc/supervisord.conf
RUN mv /app/database-docker/db/ /app/ && rm -rf /app/database-docker/
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/15/main/pg_hba.conf
Expand Down
301 changes: 301 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
pipeline {
agent any

environment {
APP_DIR = '/opt/app/middleware'
// CLUSTOX: the production compose file, not the default one. See the
// Build & Deploy stage for why that distinction is the whole point.
COMPOSE_FILE = 'docker-compose.prod.yml'
}

stages {
stage('Checkout') {
steps {
checkout scm
}
}

stage('Update Deployment Copy') {
steps {
sh '''
cd ${APP_DIR}
git fetch origin main
git reset --hard origin/main
'''
}
}

// CLUSTOX: .env is gitignored, so a release that needs a new variable
// cannot deliver it. Without this stage the app builds, starts, and
// then fails at runtime in ways the health check cannot see -- an unset
// INTERNAL_API_TOKEN makes the Flask servers reject every request, and
// an unset SUPERADMIN_PASSWORD means no account is ever created.
//
// Failing here, before anything is torn down, leaves the running
// deployment alive through a misconfigured release.
stage('Verify Environment') {
steps {
sh '''
cd ${APP_DIR}

if [ ! -f .env ]; then
echo "FATAL: ${APP_DIR}/.env does not exist."
exit 1
fi

MISSING=""
for VAR in NEXTAUTH_URL NEXTAUTH_SECRET INTERNAL_API_TOKEN \
SUPERADMIN_EMAIL SUPERADMIN_PASSWORD; do
# Present AND non-empty. `grep -q "^VAR="` alone would
# pass on a variable set to nothing.
if ! grep -qE "^${VAR}=.+" .env; then
MISSING="${MISSING} ${VAR}"
fi
done

if [ -n "${MISSING}" ]; then
echo "FATAL: required variables missing or empty in ${APP_DIR}/.env:"
for VAR in ${MISSING}; do echo " - ${VAR}"; done
echo ""
echo "See env.example. Nothing has been changed."
exit 1
fi

echo "All required environment variables are present."
'''
}
}

stage('SonarQube Analysis') {
steps {
// CLUSTOX: placed before Build/Deploy on purpose -- this is a deploy
// pipeline, so the gate below has to be able to stop a release. It sits
// after Verify Environment so a missing .env variable still fails fast
// and cheaply, before spending a scan.
//
// The agent has Docker but no sonar-scanner CLI and no SonarQube Scanner
// tool installation, so the official scanner image is used.
// sonar.working.directory is redirected into the bind-mounted workspace:
// the image's baked-in /tmp/.scannerwork is owned by uid 1000 and
// unwritable under -u, and the override also lands report-task.txt where
// waitForQualityGate looks for it.
withSonarQubeEnv('MySonarQube') {
sh '''
docker run --rm \
-u "$(id -u):$(id -g)" \
-e SONAR_HOST_URL="$SONAR_HOST_URL" \
-e SONAR_TOKEN="$SONAR_AUTH_TOKEN" \
-e SONAR_USER_HOME=/tmp/.sonar \
-v "$WORKSPACE:/usr/src" \
-w /usr/src \
sonarsource/sonar-scanner-cli:latest \
-Dsonar.working.directory=/usr/src/.scannerwork \
-Dsonar.projectVersion="${GIT_COMMIT:-$BUILD_NUMBER}"
'''
}
}
}

stage('Quality Gate') {
steps {
// CLUSTOX: bounded wait. waitForQualityGate depends on SonarQube calling
// back to /sonarqube-webhook/; without the timeout a missed webhook would
// hang this stage until the build is killed, holding the deploy hostage.
timeout(time: 5, unit: 'MINUTES') {
waitForQualityGate abortPipeline: true
}
}
}

stage('Fetch Sonar Issues') {
steps {
// CLUSTOX: reporting only -- catchError keeps a SonarQube outage or an
// expired token from blocking a deploy that already passed the gate. Uses
// the read-only token, not the scan credential, and sends it as an
// Authorization header so it cannot land in proxy or access logs.
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
withCredentials([string(credentialsId: 'sonarqube-readonly-token', variable: 'SONAR_RO_TOKEN')]) {
sh '''
set -eu
PS=500
TMP=$(mktemp -d)
trap 'rm -rf "$TMP"' EXIT
page=1
while : ; do
curl --fail --silent --show-error \
-H "Authorization: Bearer $SONAR_RO_TOKEN" \
-o "$TMP/page-$page.json" \
"https://sonar.theclustox.com/api/issues/search?componentKeys=middleware&resolved=false&ps=$PS&p=$page"
total=$(jq -r '.paging.total' "$TMP/page-$page.json")
fetched=$(( page * PS ))
echo "fetched page $page (up to $fetched of $total open issues)"
[ "$fetched" -ge "$total" ] && break
[ "$fetched" -ge 10000 ] && { echo "WARNING: capped at 10000 issues"; break; }
page=$(( page + 1 ))
done
# The warnings-ng SonarQube parser sniffs the response format from
# the top-level keys, so the merged document has to look like one
# big api/issues/search page -- dropping total/p/ps makes it
# silently parse to zero issues.
jq -s '
(map(.issues) | add) as $iss |
(.[0].paging.total) as $tot |
{
total: $tot,
p: 1,
ps: ($iss | length),
paging: {pageIndex: 1, pageSize: ($iss | length), total: $tot},
effortTotal: (map(.effortTotal // 0) | add),
issues: $iss,
components: (map(.components // []) | add | unique_by(.key))
}' "$TMP"/page-*.json > sonar-issues.json
echo "merged $(jq '.issues | length' sonar-issues.json) issues into sonar-issues.json"
'''
}
}
}
}

stage('Publish Issue Report') {
steps {
catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
recordIssues(tools: [sonarQube(pattern: 'sonar-issues.json')])
}
}
}

stage('Build') {
steps {
// CLUSTOX: builds docker-compose.prod.yml, which uses the
// production Dockerfile and runs `yarn build`. The default
// docker-compose.yml is upstream's *local development* file: it
// builds Dockerfile.dev, which never builds the frontend, so the
// container serves the app through `next dev` and compiles every
// route inside the first request that asks for it. Measured on a
// cold container: /login 7.5s, /workspaces 5.7s, /users 21.8s,
// against 0.02s once warm.
//
// The build is deliberately its own stage. `docker compose build
// && docker compose up -d` in one step is a trap: when the build
// fails, `up -d` happily recreates the container from the
// PREVIOUS image, so a broken release presents as a healthy app
// serving stale code and the pipeline reports success. That is
// not hypothetical -- it happened during development when a
// dependency pin was wrong for the image's Python version.
sh '''
cd ${APP_DIR}
docker compose -f ${COMPOSE_FILE} build
'''
}
}

stage('Deploy') {
steps {
sh '''
cd ${APP_DIR}
docker compose -f ${COMPOSE_FILE} up -d
'''
}
}

stage('Health Check') {
steps {
// CLUSTOX: the previous check was `sleep 10` then a curl of `/`.
// Both halves were wrong. `/` answers 307 to /login for a
// signed-out request and curl treats a redirect as success, so
// it passed against an app whose API was entirely broken. And
// 10s is short for a cold start that also runs migrations, so it
// produced false failures too.
//
// Instead: poll until the app answers, then assert the API
// returns 401. Reaching 401 proves Next.js is serving, the
// database is reachable, and auth is wired up. A misconfigured
// instance returns 500 or refuses the connection.
sh '''
PORT_NUM=${PORT:-3333}
BASE="http://127.0.0.1:${PORT_NUM}"

echo "Waiting for the app to accept connections..."
READY=0
for i in $(seq 1 60); do
if curl -sf -o /dev/null "${BASE}/login"; then
READY=1
echo "App responded after $((i * 5))s."
break
fi
sleep 5
done

if [ "${READY}" != "1" ]; then
echo "FATAL: app did not respond within 300s."
cd ${APP_DIR} && docker compose -f ${COMPOSE_FILE} logs --tail=80
exit 1
fi

echo "Checking that the API is up and enforcing auth..."
CODE=$(curl -s -o /dev/null -w '%{http_code}' "${BASE}/api/clustox/me")
if [ "${CODE}" != "401" ]; then
echo "FATAL: /api/clustox/me returned ${CODE}, expected 401."
echo "The app is serving pages but the API is not healthy."
cd ${APP_DIR} && docker compose -f ${COMPOSE_FILE} logs --tail=80
exit 1
fi

echo "Health check passed."
'''
}
}

// CLUSTOX: proves the deploy is actually serving a compiled bundle
// rather than silently falling back to the dev server. A production
// build answers a cold page request in well under a second; `next dev`
// takes seconds to tens of seconds because it compiles on demand.
//
// This is a warning rather than a failure: a slow disk or a loaded host
// could trip it without the deploy being wrong, and failing a healthy
// release over a timing measurement would be worse than the problem.
stage('Verify Production Build') {
steps {
sh '''
BASE="http://127.0.0.1:${PORT:-3333}"

ELAPSED=$(curl -s -o /dev/null -w '%{time_total}' "${BASE}/login")
echo "Cold /login response: ${ELAPSED}s"

# Integer compare; `sh` has no float arithmetic.
WHOLE=$(echo "${ELAPSED}" | cut -d. -f1)
if [ "${WHOLE}" -ge 3 ]; then
echo "WARNING: ${ELAPSED}s is slow for a compiled build."
echo "The container may be running 'next dev' -- check that"
echo "ENVIRONMENT=prod reached it and that ${COMPOSE_FILE} was used."
else
echo "Response time is consistent with a production build."
fi
'''
}
}
}

post {
success {
echo 'Deployment succeeded.'
withCredentials([string(credentialsId: 'slack-webhook-ci-build-alerts', variable: 'SLACK_WEBHOOK_URL')]) {
sh '''
curl -X POST -H "Content-type: application/json" \
--data "{\\"text\\":\\"✅ *middleware* deployment succeeded — build #${BUILD_NUMBER} — ${BUILD_URL}\\"}" \
"$SLACK_WEBHOOK_URL"
'''
}
}
failure {
echo 'Deployment failed - check console output.'
withCredentials([string(credentialsId: 'slack-webhook-ci-build-alerts', variable: 'SLACK_WEBHOOK_URL')]) {
sh '''
curl -X POST -H "Content-type: application/json" \
--data "{\\"text\\":\\"❌ *middleware* deployment failed — build #${BUILD_NUMBER} — ${BUILD_URL}\\"}" \
"$SLACK_WEBHOOK_URL"
'''
}
}
}
}
54 changes: 54 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Middleware
==========

This product includes software developed by Middleware HQ and the Middleware
open-source contributors.

Project: Middleware — open-source engineering management / DORA metrics
Source: https://github.com/middlewarehq/middleware
Homepage: https://www.middlewarehq.com/
Licence: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License. The
full licence text is included in the LICENSE file at the root of this
repository.


Modifications
-------------

This repository is a fork of middlewarehq/middleware maintained by Clustox.

Fork: https://github.com/Clustox/middleware
Fork point: commit 844eb42 on branch main

Modifications made by Clustox are marked in source files with `CLUSTOX:`
sentinel comments. The complete set of modifications can be listed with:

grep -rn "CLUSTOX:" --include='*.py' --include='*.ts' --include='*.tsx' \
--include='*.sql' . | grep -v node_modules

and the full diff from the fork point with:

git diff 844eb42..main

See docs/FORK_STRATEGY.md for how this fork is maintained.


Trademarks
----------

The Apache License, Version 2.0 does not grant permission to use the trade
names, trademarks, service marks, or product names of the licensor. "Middleware"
and "Middleware HQ", together with associated logos and brand assets (including
those under media_files/), remain the property of their respective owners and
are used here solely to attribute the origin of this software.
6 changes: 6 additions & 0 deletions backend/analytics_server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

from mhq.store.initialise_db import initialize_database

# CLUSTOX: restrict this API to the BFF. See mhq/clustox_auth/internal_token.py
from mhq.clustox_auth.internal_token import register_internal_token_guard

ANALYTICS_SERVER_PORT = getenv("ANALYTICS_SERVER_PORT")

app = Flask(__name__)
Expand All @@ -33,6 +36,9 @@
app.register_blueprint(bookmark_api)
app.register_blueprint(ai_api)

# CLUSTOX: reject any request that did not come from the BFF.
register_internal_token_guard(app)

configure_db_with_app(app)
initialize_database(app)

Expand Down
Loading