@supermodeltools/openapi-spec 0.9.2 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/openapi.yaml +1642 -128
- package/package.json +1 -1
package/openapi.yaml
CHANGED
|
@@ -2,7 +2,7 @@ openapi: 3.0.0
|
|
|
2
2
|
info:
|
|
3
3
|
title: Supermodel
|
|
4
4
|
description: Code Graphing & Analysis API
|
|
5
|
-
version: 0.9.
|
|
5
|
+
version: 0.9.4
|
|
6
6
|
license:
|
|
7
7
|
name: Supermodel API Terms of Service
|
|
8
8
|
url: https://supermodeltools.com/legal/api-terms
|
|
@@ -1486,6 +1486,596 @@ paths:
|
|
|
1486
1486
|
application/json:
|
|
1487
1487
|
schema:
|
|
1488
1488
|
$ref: '#/components/schemas/Error'
|
|
1489
|
+
/v1/analysis/dead-code:
|
|
1490
|
+
post:
|
|
1491
|
+
tags:
|
|
1492
|
+
- Data Plane
|
|
1493
|
+
summary: Dead code analysis
|
|
1494
|
+
description: Upload a zipped repository snapshot to identify dead (unreachable) code candidates by combining parse graph declarations with call graph relationships.
|
|
1495
|
+
operationId: generateDeadCodeAnalysis
|
|
1496
|
+
security:
|
|
1497
|
+
- ApiKeyAuth: []
|
|
1498
|
+
parameters:
|
|
1499
|
+
- $ref: '#/components/parameters/IdempotencyKey'
|
|
1500
|
+
requestBody:
|
|
1501
|
+
required: true
|
|
1502
|
+
content:
|
|
1503
|
+
multipart/form-data:
|
|
1504
|
+
schema:
|
|
1505
|
+
type: object
|
|
1506
|
+
required:
|
|
1507
|
+
- file
|
|
1508
|
+
properties:
|
|
1509
|
+
file:
|
|
1510
|
+
type: string
|
|
1511
|
+
format: binary
|
|
1512
|
+
description: Zipped repository archive containing the code to analyze.
|
|
1513
|
+
x-codeSamples:
|
|
1514
|
+
- lang: cURL
|
|
1515
|
+
label: cURL
|
|
1516
|
+
source: |
|
|
1517
|
+
curl -X POST 'https://api.supermodeltools.com/v1/analysis/dead-code' \
|
|
1518
|
+
-H 'Idempotency-Key: <idempotency-key>' \
|
|
1519
|
+
-H 'X-Api-Key: <api-key>' \
|
|
1520
|
+
-F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'
|
|
1521
|
+
responses:
|
|
1522
|
+
'200':
|
|
1523
|
+
description: Dead code analysis (job completed)
|
|
1524
|
+
headers:
|
|
1525
|
+
X-Request-Id:
|
|
1526
|
+
$ref: '#/components/headers/X-Request-Id'
|
|
1527
|
+
X-API-Version:
|
|
1528
|
+
$ref: '#/components/headers/X-API-Version'
|
|
1529
|
+
RateLimit-Limit:
|
|
1530
|
+
$ref: '#/components/headers/RateLimit-Limit'
|
|
1531
|
+
RateLimit-Remaining:
|
|
1532
|
+
$ref: '#/components/headers/RateLimit-Remaining'
|
|
1533
|
+
RateLimit-Reset:
|
|
1534
|
+
$ref: '#/components/headers/RateLimit-Reset'
|
|
1535
|
+
X-Usage-Units:
|
|
1536
|
+
$ref: '#/components/headers/X-Usage-Units'
|
|
1537
|
+
content:
|
|
1538
|
+
application/json:
|
|
1539
|
+
schema:
|
|
1540
|
+
$ref: '#/components/schemas/DeadCodeAnalysisResponseAsync'
|
|
1541
|
+
example:
|
|
1542
|
+
status: completed
|
|
1543
|
+
jobId: abc-123-def
|
|
1544
|
+
result:
|
|
1545
|
+
metadata:
|
|
1546
|
+
totalDeclarations: 162
|
|
1547
|
+
deadCodeCandidates: 102
|
|
1548
|
+
aliveCode: 60
|
|
1549
|
+
analysisMethod: parse_graph + call_graph
|
|
1550
|
+
analysisStartTime: '2025-02-05T15:42:05Z'
|
|
1551
|
+
analysisEndTime: '2025-02-05T15:42:10Z'
|
|
1552
|
+
deadCodeCandidates:
|
|
1553
|
+
- file: src/utils/idGenerator.ts
|
|
1554
|
+
name: generateSequentialId
|
|
1555
|
+
line: 8
|
|
1556
|
+
type: function
|
|
1557
|
+
confidence: high
|
|
1558
|
+
reason: No callers found in codebase
|
|
1559
|
+
aliveCode:
|
|
1560
|
+
- file: src/index.ts
|
|
1561
|
+
name: main
|
|
1562
|
+
line: 10
|
|
1563
|
+
type: function
|
|
1564
|
+
callerCount: 3
|
|
1565
|
+
entryPoints:
|
|
1566
|
+
- file: src/index.ts
|
|
1567
|
+
name: main
|
|
1568
|
+
line: 10
|
|
1569
|
+
type: function
|
|
1570
|
+
reason: Module export
|
|
1571
|
+
'202':
|
|
1572
|
+
description: Job accepted and processing
|
|
1573
|
+
headers:
|
|
1574
|
+
X-Request-Id:
|
|
1575
|
+
$ref: '#/components/headers/X-Request-Id'
|
|
1576
|
+
X-API-Version:
|
|
1577
|
+
$ref: '#/components/headers/X-API-Version'
|
|
1578
|
+
Retry-After:
|
|
1579
|
+
description: Recommended wait time in seconds before polling again.
|
|
1580
|
+
schema:
|
|
1581
|
+
type: integer
|
|
1582
|
+
content:
|
|
1583
|
+
application/json:
|
|
1584
|
+
schema:
|
|
1585
|
+
$ref: '#/components/schemas/DeadCodeAnalysisResponseAsync'
|
|
1586
|
+
example:
|
|
1587
|
+
status: processing
|
|
1588
|
+
jobId: abc-123-def
|
|
1589
|
+
retryAfter: 5
|
|
1590
|
+
'400':
|
|
1591
|
+
$ref: '#/components/responses/BadRequest'
|
|
1592
|
+
'401':
|
|
1593
|
+
$ref: '#/components/responses/Unauthorized'
|
|
1594
|
+
'403':
|
|
1595
|
+
$ref: '#/components/responses/Forbidden'
|
|
1596
|
+
'429':
|
|
1597
|
+
$ref: '#/components/responses/TooManyRequests'
|
|
1598
|
+
'500':
|
|
1599
|
+
$ref: '#/components/responses/InternalError'
|
|
1600
|
+
'502':
|
|
1601
|
+
description: Bad Gateway
|
|
1602
|
+
content:
|
|
1603
|
+
application/json:
|
|
1604
|
+
schema:
|
|
1605
|
+
$ref: '#/components/schemas/Error'
|
|
1606
|
+
/v1/analysis/test-coverage-map:
|
|
1607
|
+
post:
|
|
1608
|
+
tags:
|
|
1609
|
+
- Data Plane
|
|
1610
|
+
summary: Test coverage map
|
|
1611
|
+
description: Upload a zipped repository snapshot to identify functions with zero test coverage by tracing call graph reachability from test files to production code. This is static analysis — no test execution or instrumentation required.
|
|
1612
|
+
operationId: generateTestCoverageMap
|
|
1613
|
+
security:
|
|
1614
|
+
- ApiKeyAuth: []
|
|
1615
|
+
parameters:
|
|
1616
|
+
- $ref: '#/components/parameters/IdempotencyKey'
|
|
1617
|
+
requestBody:
|
|
1618
|
+
required: true
|
|
1619
|
+
content:
|
|
1620
|
+
multipart/form-data:
|
|
1621
|
+
schema:
|
|
1622
|
+
type: object
|
|
1623
|
+
required:
|
|
1624
|
+
- file
|
|
1625
|
+
properties:
|
|
1626
|
+
file:
|
|
1627
|
+
type: string
|
|
1628
|
+
format: binary
|
|
1629
|
+
description: Zipped repository archive containing the code to analyze.
|
|
1630
|
+
x-codeSamples:
|
|
1631
|
+
- lang: cURL
|
|
1632
|
+
label: cURL
|
|
1633
|
+
source: |
|
|
1634
|
+
curl -X POST 'https://api.supermodeltools.com/v1/analysis/test-coverage-map' \
|
|
1635
|
+
-H 'Idempotency-Key: <idempotency-key>' \
|
|
1636
|
+
-H 'X-Api-Key: <api-key>' \
|
|
1637
|
+
-F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'
|
|
1638
|
+
responses:
|
|
1639
|
+
'200':
|
|
1640
|
+
description: Test coverage map (job completed)
|
|
1641
|
+
headers:
|
|
1642
|
+
X-Request-Id:
|
|
1643
|
+
$ref: '#/components/headers/X-Request-Id'
|
|
1644
|
+
X-API-Version:
|
|
1645
|
+
$ref: '#/components/headers/X-API-Version'
|
|
1646
|
+
RateLimit-Limit:
|
|
1647
|
+
$ref: '#/components/headers/RateLimit-Limit'
|
|
1648
|
+
RateLimit-Remaining:
|
|
1649
|
+
$ref: '#/components/headers/RateLimit-Remaining'
|
|
1650
|
+
RateLimit-Reset:
|
|
1651
|
+
$ref: '#/components/headers/RateLimit-Reset'
|
|
1652
|
+
X-Usage-Units:
|
|
1653
|
+
$ref: '#/components/headers/X-Usage-Units'
|
|
1654
|
+
content:
|
|
1655
|
+
application/json:
|
|
1656
|
+
schema:
|
|
1657
|
+
$ref: '#/components/schemas/TestCoverageMapResponseAsync'
|
|
1658
|
+
example:
|
|
1659
|
+
status: completed
|
|
1660
|
+
jobId: abc-123-def
|
|
1661
|
+
result:
|
|
1662
|
+
metadata:
|
|
1663
|
+
totalFiles: 142
|
|
1664
|
+
testFiles: 28
|
|
1665
|
+
productionFiles: 114
|
|
1666
|
+
totalFunctions: 891
|
|
1667
|
+
testedFunctions: 342
|
|
1668
|
+
untestedFunctions: 549
|
|
1669
|
+
coveragePercentage: 38.4
|
|
1670
|
+
analysisMethod: static_call_graph_test_reachability
|
|
1671
|
+
analysisStartTime: '2026-02-09T12:00:00Z'
|
|
1672
|
+
analysisEndTime: '2026-02-09T12:01:00Z'
|
|
1673
|
+
untestedFunctions:
|
|
1674
|
+
- file: src/services/billing.ts
|
|
1675
|
+
name: calculateRefund
|
|
1676
|
+
line: 89
|
|
1677
|
+
type: function
|
|
1678
|
+
confidence: high
|
|
1679
|
+
reason: No test file calls this function directly or transitively
|
|
1680
|
+
testedFunctions:
|
|
1681
|
+
- file: src/services/billing.ts
|
|
1682
|
+
name: calculateTotal
|
|
1683
|
+
line: 45
|
|
1684
|
+
type: function
|
|
1685
|
+
testFiles:
|
|
1686
|
+
- tests/billing.test.ts
|
|
1687
|
+
directTestCallers: 3
|
|
1688
|
+
transitiveTestCallers: 7
|
|
1689
|
+
testFiles:
|
|
1690
|
+
- file: tests/billing.test.ts
|
|
1691
|
+
testFunctions: 12
|
|
1692
|
+
productionFunctionsCovered: 8
|
|
1693
|
+
productionFilesCovered: 3
|
|
1694
|
+
coverageByFile:
|
|
1695
|
+
- file: src/services/billing.ts
|
|
1696
|
+
totalFunctions: 12
|
|
1697
|
+
testedFunctions: 8
|
|
1698
|
+
untestedFunctions: 4
|
|
1699
|
+
coveragePercentage: 66.7
|
|
1700
|
+
'202':
|
|
1701
|
+
description: Job accepted and processing
|
|
1702
|
+
headers:
|
|
1703
|
+
X-Request-Id:
|
|
1704
|
+
$ref: '#/components/headers/X-Request-Id'
|
|
1705
|
+
X-API-Version:
|
|
1706
|
+
$ref: '#/components/headers/X-API-Version'
|
|
1707
|
+
Retry-After:
|
|
1708
|
+
description: Recommended wait time in seconds before polling again.
|
|
1709
|
+
schema:
|
|
1710
|
+
type: integer
|
|
1711
|
+
content:
|
|
1712
|
+
application/json:
|
|
1713
|
+
schema:
|
|
1714
|
+
$ref: '#/components/schemas/TestCoverageMapResponseAsync'
|
|
1715
|
+
example:
|
|
1716
|
+
status: processing
|
|
1717
|
+
jobId: abc-123-def
|
|
1718
|
+
retryAfter: 5
|
|
1719
|
+
'400':
|
|
1720
|
+
$ref: '#/components/responses/BadRequest'
|
|
1721
|
+
'401':
|
|
1722
|
+
$ref: '#/components/responses/Unauthorized'
|
|
1723
|
+
'403':
|
|
1724
|
+
$ref: '#/components/responses/Forbidden'
|
|
1725
|
+
'429':
|
|
1726
|
+
$ref: '#/components/responses/TooManyRequests'
|
|
1727
|
+
'500':
|
|
1728
|
+
$ref: '#/components/responses/InternalError'
|
|
1729
|
+
'502':
|
|
1730
|
+
description: Bad Gateway
|
|
1731
|
+
content:
|
|
1732
|
+
application/json:
|
|
1733
|
+
schema:
|
|
1734
|
+
$ref: '#/components/schemas/Error'
|
|
1735
|
+
/v1/analysis/circular-dependencies:
|
|
1736
|
+
post:
|
|
1737
|
+
tags:
|
|
1738
|
+
- Data Plane
|
|
1739
|
+
summary: Circular dependency detection
|
|
1740
|
+
description: Upload a zipped repository snapshot to detect circular dependencies (dependency cycles) at the file level using Tarjan's strongly connected components algorithm.
|
|
1741
|
+
operationId: generateCircularDependencyAnalysis
|
|
1742
|
+
security:
|
|
1743
|
+
- ApiKeyAuth: []
|
|
1744
|
+
parameters:
|
|
1745
|
+
- $ref: '#/components/parameters/IdempotencyKey'
|
|
1746
|
+
requestBody:
|
|
1747
|
+
required: true
|
|
1748
|
+
content:
|
|
1749
|
+
multipart/form-data:
|
|
1750
|
+
schema:
|
|
1751
|
+
type: object
|
|
1752
|
+
required:
|
|
1753
|
+
- file
|
|
1754
|
+
properties:
|
|
1755
|
+
file:
|
|
1756
|
+
type: string
|
|
1757
|
+
format: binary
|
|
1758
|
+
description: Zipped repository archive containing the code to analyze.
|
|
1759
|
+
x-codeSamples:
|
|
1760
|
+
- lang: cURL
|
|
1761
|
+
label: cURL
|
|
1762
|
+
source: |
|
|
1763
|
+
curl -X POST 'https://api.supermodeltools.com/v1/analysis/circular-dependencies' \
|
|
1764
|
+
-H 'Idempotency-Key: <idempotency-key>' \
|
|
1765
|
+
-H 'X-Api-Key: <api-key>' \
|
|
1766
|
+
-F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'
|
|
1767
|
+
responses:
|
|
1768
|
+
'200':
|
|
1769
|
+
description: Circular dependency analysis (job completed)
|
|
1770
|
+
headers:
|
|
1771
|
+
X-Request-Id:
|
|
1772
|
+
$ref: '#/components/headers/X-Request-Id'
|
|
1773
|
+
X-API-Version:
|
|
1774
|
+
$ref: '#/components/headers/X-API-Version'
|
|
1775
|
+
RateLimit-Limit:
|
|
1776
|
+
$ref: '#/components/headers/RateLimit-Limit'
|
|
1777
|
+
RateLimit-Remaining:
|
|
1778
|
+
$ref: '#/components/headers/RateLimit-Remaining'
|
|
1779
|
+
RateLimit-Reset:
|
|
1780
|
+
$ref: '#/components/headers/RateLimit-Reset'
|
|
1781
|
+
X-Usage-Units:
|
|
1782
|
+
$ref: '#/components/headers/X-Usage-Units'
|
|
1783
|
+
content:
|
|
1784
|
+
application/json:
|
|
1785
|
+
schema:
|
|
1786
|
+
$ref: '#/components/schemas/CircularDependencyResponseAsync'
|
|
1787
|
+
example:
|
|
1788
|
+
status: completed
|
|
1789
|
+
jobId: abc-123-def
|
|
1790
|
+
result:
|
|
1791
|
+
metadata:
|
|
1792
|
+
totalFiles: 142
|
|
1793
|
+
totalImports: 487
|
|
1794
|
+
cycleCount: 7
|
|
1795
|
+
analysisMethod: tarjan_scc
|
|
1796
|
+
analysisStartTime: '2026-02-09T12:00:00Z'
|
|
1797
|
+
analysisEndTime: '2026-02-09T12:00:05Z'
|
|
1798
|
+
cycles:
|
|
1799
|
+
- id: cycle-1
|
|
1800
|
+
severity: high
|
|
1801
|
+
files:
|
|
1802
|
+
- src/services/billingService.ts
|
|
1803
|
+
- src/services/orderService.ts
|
|
1804
|
+
- src/services/userService.ts
|
|
1805
|
+
edges:
|
|
1806
|
+
- source: src/services/userService.ts
|
|
1807
|
+
target: src/services/orderService.ts
|
|
1808
|
+
importedSymbols:
|
|
1809
|
+
- getOrders
|
|
1810
|
+
- OrderStatus
|
|
1811
|
+
- source: src/services/orderService.ts
|
|
1812
|
+
target: src/services/billingService.ts
|
|
1813
|
+
importedSymbols:
|
|
1814
|
+
- calculateTotal
|
|
1815
|
+
- source: src/services/billingService.ts
|
|
1816
|
+
target: src/services/userService.ts
|
|
1817
|
+
importedSymbols:
|
|
1818
|
+
- getUserDiscount
|
|
1819
|
+
breakingSuggestion: src/services/billingService.ts -> src/services/userService.ts
|
|
1820
|
+
summary:
|
|
1821
|
+
totalCycles: 7
|
|
1822
|
+
filesInCycles: 18
|
|
1823
|
+
highSeverityCount: 2
|
|
1824
|
+
mediumSeverityCount: 3
|
|
1825
|
+
lowSeverityCount: 2
|
|
1826
|
+
'202':
|
|
1827
|
+
description: Job accepted and processing
|
|
1828
|
+
headers:
|
|
1829
|
+
X-Request-Id:
|
|
1830
|
+
$ref: '#/components/headers/X-Request-Id'
|
|
1831
|
+
X-API-Version:
|
|
1832
|
+
$ref: '#/components/headers/X-API-Version'
|
|
1833
|
+
Retry-After:
|
|
1834
|
+
description: Recommended wait time in seconds before polling again.
|
|
1835
|
+
schema:
|
|
1836
|
+
type: integer
|
|
1837
|
+
content:
|
|
1838
|
+
application/json:
|
|
1839
|
+
schema:
|
|
1840
|
+
$ref: '#/components/schemas/CircularDependencyResponseAsync'
|
|
1841
|
+
example:
|
|
1842
|
+
status: processing
|
|
1843
|
+
jobId: abc-123-def
|
|
1844
|
+
retryAfter: 5
|
|
1845
|
+
'400':
|
|
1846
|
+
$ref: '#/components/responses/BadRequest'
|
|
1847
|
+
'401':
|
|
1848
|
+
$ref: '#/components/responses/Unauthorized'
|
|
1849
|
+
'403':
|
|
1850
|
+
$ref: '#/components/responses/Forbidden'
|
|
1851
|
+
'429':
|
|
1852
|
+
$ref: '#/components/responses/TooManyRequests'
|
|
1853
|
+
'500':
|
|
1854
|
+
$ref: '#/components/responses/InternalError'
|
|
1855
|
+
'502':
|
|
1856
|
+
description: Bad Gateway
|
|
1857
|
+
content:
|
|
1858
|
+
application/json:
|
|
1859
|
+
schema:
|
|
1860
|
+
$ref: '#/components/schemas/Error'
|
|
1861
|
+
/v1/analysis/impact:
|
|
1862
|
+
post:
|
|
1863
|
+
tags:
|
|
1864
|
+
- Data Plane
|
|
1865
|
+
summary: Impact analysis
|
|
1866
|
+
description: |-
|
|
1867
|
+
Compute blast radius — what breaks if a given file or function changes. Uses reverse-reachability BFS on call graph and dependency graph, enriched with LLM-powered domain classification to detect cross-domain impact.
|
|
1868
|
+
|
|
1869
|
+
**Three usage modes:**
|
|
1870
|
+
1. **With diff** — upload a unified diff (`git diff` output) alongside the repo zip.
|
|
1871
|
+
Changed files are automatically extracted as targets. Best for CI/CD pipelines.
|
|
1872
|
+
|
|
1873
|
+
2. **With targets** — specify files or file:function pairs via query parameter.
|
|
1874
|
+
Best for ad-hoc analysis of specific functions.
|
|
1875
|
+
|
|
1876
|
+
3. **Neither** — analyzes the entire codebase and returns a global coupling/risk map
|
|
1877
|
+
with the most critical files ranked by dependent count.
|
|
1878
|
+
|
|
1879
|
+
|
|
1880
|
+
**CI Integration (GitHub Actions):**
|
|
1881
|
+
```yaml - name: Impact Analysis
|
|
1882
|
+
run: |
|
|
1883
|
+
git diff origin/main...HEAD > changes.diff
|
|
1884
|
+
git archive --format=zip HEAD -o repo.zip
|
|
1885
|
+
curl -s -X POST "$SUPERMODEL_API_URL/v1/analysis/impact" \
|
|
1886
|
+
-H "Idempotency-Key: ${{ github.run_id }}-impact" \
|
|
1887
|
+
-H "X-Api-Key: ${{ secrets.SUPERMODEL_API_KEY }}" \
|
|
1888
|
+
-F "file=@repo.zip;type=application/zip" \
|
|
1889
|
+
-F "diff=@changes.diff;type=text/plain" \
|
|
1890
|
+
-o impact.json
|
|
1891
|
+
```
|
|
1892
|
+
|
|
1893
|
+
**CI Integration (GitLab CI):**
|
|
1894
|
+
```yaml impact_analysis:
|
|
1895
|
+
script:
|
|
1896
|
+
- git diff origin/main...HEAD > changes.diff
|
|
1897
|
+
- git archive --format=zip HEAD -o repo.zip
|
|
1898
|
+
- >-
|
|
1899
|
+
curl -s -X POST "$SUPERMODEL_API_URL/v1/analysis/impact"
|
|
1900
|
+
-H "Idempotency-Key: $CI_PIPELINE_IID-impact"
|
|
1901
|
+
-H "X-Api-Key: $SUPERMODEL_API_KEY"
|
|
1902
|
+
-F "file=@repo.zip;type=application/zip"
|
|
1903
|
+
-F "diff=@changes.diff;type=text/plain"
|
|
1904
|
+
-o impact.json
|
|
1905
|
+
```
|
|
1906
|
+
|
|
1907
|
+
**Standalone usage (no CI):**
|
|
1908
|
+
```bash # Analyze specific targets curl -X POST '.../v1/analysis/impact?targets=src/services/billing.ts:calculateTotal' \
|
|
1909
|
+
-H 'Idempotency-Key: my-key' -H 'X-Api-Key: ...' \
|
|
1910
|
+
-F 'file=@repo.zip;type=application/zip'
|
|
1911
|
+
|
|
1912
|
+
# Analyze from a diff git diff main > changes.diff && git archive --format=zip HEAD -o repo.zip curl -X POST '.../v1/analysis/impact' \
|
|
1913
|
+
-H 'Idempotency-Key: my-key' -H 'X-Api-Key: ...' \
|
|
1914
|
+
-F 'file=@repo.zip;type=application/zip' \
|
|
1915
|
+
-F 'diff=@changes.diff;type=text/plain'
|
|
1916
|
+
|
|
1917
|
+
# Global coupling map (no targets, no diff) curl -X POST '.../v1/analysis/impact' \
|
|
1918
|
+
-H 'Idempotency-Key: my-key' -H 'X-Api-Key: ...' \
|
|
1919
|
+
-F 'file=@repo.zip;type=application/zip'
|
|
1920
|
+
```
|
|
1921
|
+
operationId: generateImpactAnalysis
|
|
1922
|
+
security:
|
|
1923
|
+
- ApiKeyAuth: []
|
|
1924
|
+
parameters:
|
|
1925
|
+
- $ref: '#/components/parameters/IdempotencyKey'
|
|
1926
|
+
- name: targets
|
|
1927
|
+
in: query
|
|
1928
|
+
required: false
|
|
1929
|
+
schema:
|
|
1930
|
+
type: string
|
|
1931
|
+
description: 'Comma-separated list of file paths or file:functionName pairs to analyze. If omitted, analyzes all files and returns a global coupling/risk map. Examples: ''src/services/billing.ts'', ''src/services/billing.ts:calculateTotal,src/auth/login.ts''.'
|
|
1932
|
+
requestBody:
|
|
1933
|
+
required: true
|
|
1934
|
+
content:
|
|
1935
|
+
multipart/form-data:
|
|
1936
|
+
schema:
|
|
1937
|
+
type: object
|
|
1938
|
+
required:
|
|
1939
|
+
- file
|
|
1940
|
+
properties:
|
|
1941
|
+
file:
|
|
1942
|
+
type: string
|
|
1943
|
+
format: binary
|
|
1944
|
+
description: Zipped repository archive containing the code to analyze.
|
|
1945
|
+
diff:
|
|
1946
|
+
type: string
|
|
1947
|
+
format: binary
|
|
1948
|
+
description: Optional unified diff (output of `git diff`). When provided, changed files are automatically extracted and used as analysis targets. This is the recommended input for CI/CD pipelines. If both `diff` and `targets` are provided, the targets from both are merged.
|
|
1949
|
+
x-codeSamples:
|
|
1950
|
+
- lang: cURL
|
|
1951
|
+
label: With diff (CI)
|
|
1952
|
+
source: |
|
|
1953
|
+
git diff origin/main...HEAD > changes.diff
|
|
1954
|
+
git archive --format=zip HEAD -o repo.zip
|
|
1955
|
+
curl -X POST 'https://api.supermodeltools.com/v1/analysis/impact' \
|
|
1956
|
+
-H 'Idempotency-Key: <idempotency-key>' \
|
|
1957
|
+
-H 'X-Api-Key: <api-key>' \
|
|
1958
|
+
-F 'file=@repo.zip;type=application/zip' \
|
|
1959
|
+
-F 'diff=@changes.diff;type=text/plain'
|
|
1960
|
+
- lang: cURL
|
|
1961
|
+
label: With targets
|
|
1962
|
+
source: |
|
|
1963
|
+
curl -X POST 'https://api.supermodeltools.com/v1/analysis/impact?targets=src/services/billing.ts' \
|
|
1964
|
+
-H 'Idempotency-Key: <idempotency-key>' \
|
|
1965
|
+
-H 'X-Api-Key: <api-key>' \
|
|
1966
|
+
-F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'
|
|
1967
|
+
responses:
|
|
1968
|
+
'200':
|
|
1969
|
+
description: Impact analysis (job completed)
|
|
1970
|
+
headers:
|
|
1971
|
+
X-Request-Id:
|
|
1972
|
+
$ref: '#/components/headers/X-Request-Id'
|
|
1973
|
+
X-API-Version:
|
|
1974
|
+
$ref: '#/components/headers/X-API-Version'
|
|
1975
|
+
RateLimit-Limit:
|
|
1976
|
+
$ref: '#/components/headers/RateLimit-Limit'
|
|
1977
|
+
RateLimit-Remaining:
|
|
1978
|
+
$ref: '#/components/headers/RateLimit-Remaining'
|
|
1979
|
+
RateLimit-Reset:
|
|
1980
|
+
$ref: '#/components/headers/RateLimit-Reset'
|
|
1981
|
+
X-Usage-Units:
|
|
1982
|
+
$ref: '#/components/headers/X-Usage-Units'
|
|
1983
|
+
content:
|
|
1984
|
+
application/json:
|
|
1985
|
+
schema:
|
|
1986
|
+
$ref: '#/components/schemas/ImpactAnalysisResponseAsync'
|
|
1987
|
+
example:
|
|
1988
|
+
status: completed
|
|
1989
|
+
jobId: abc-123-def
|
|
1990
|
+
result:
|
|
1991
|
+
metadata:
|
|
1992
|
+
totalFiles: 142
|
|
1993
|
+
totalFunctions: 891
|
|
1994
|
+
targetsAnalyzed: 1
|
|
1995
|
+
analysisMethod: reverse_reachability_call_graph
|
|
1996
|
+
analysisStartTime: '2026-02-09T12:00:00Z'
|
|
1997
|
+
analysisEndTime: '2026-02-09T12:00:45Z'
|
|
1998
|
+
impacts:
|
|
1999
|
+
- target:
|
|
2000
|
+
file: src/services/billing.ts
|
|
2001
|
+
name: calculateTotal
|
|
2002
|
+
line: 45
|
|
2003
|
+
type: function
|
|
2004
|
+
blastRadius:
|
|
2005
|
+
directDependents: 8
|
|
2006
|
+
transitiveDependents: 31
|
|
2007
|
+
affectedFiles: 12
|
|
2008
|
+
affectedDomains:
|
|
2009
|
+
- Billing
|
|
2010
|
+
- Checkout
|
|
2011
|
+
- Notifications
|
|
2012
|
+
riskScore: high
|
|
2013
|
+
riskFactors:
|
|
2014
|
+
- High fan-in (8 direct callers)
|
|
2015
|
+
- Deep dependency chain (5 levels)
|
|
2016
|
+
- Crosses 3 domain boundaries
|
|
2017
|
+
affectedFunctions:
|
|
2018
|
+
- file: src/handlers/checkout.ts
|
|
2019
|
+
name: processCheckout
|
|
2020
|
+
line: 12
|
|
2021
|
+
type: function
|
|
2022
|
+
distance: 1
|
|
2023
|
+
relationship: direct_caller
|
|
2024
|
+
affectedFiles:
|
|
2025
|
+
- file: src/handlers/checkout.ts
|
|
2026
|
+
directDependencies: 3
|
|
2027
|
+
transitiveDependencies: 7
|
|
2028
|
+
entryPointsAffected:
|
|
2029
|
+
- file: src/routes/checkout.ts
|
|
2030
|
+
name: POST /checkout
|
|
2031
|
+
type: route_handler
|
|
2032
|
+
globalMetrics:
|
|
2033
|
+
mostCriticalFiles:
|
|
2034
|
+
- file: src/services/billing.ts
|
|
2035
|
+
dependentCount: 31
|
|
2036
|
+
riskScore: high
|
|
2037
|
+
crossDomainDependencies:
|
|
2038
|
+
- from: Billing
|
|
2039
|
+
to: Checkout
|
|
2040
|
+
edgeCount: 5
|
|
2041
|
+
- from: Billing
|
|
2042
|
+
to: Notifications
|
|
2043
|
+
edgeCount: 2
|
|
2044
|
+
'202':
|
|
2045
|
+
description: Job accepted and processing
|
|
2046
|
+
headers:
|
|
2047
|
+
X-Request-Id:
|
|
2048
|
+
$ref: '#/components/headers/X-Request-Id'
|
|
2049
|
+
X-API-Version:
|
|
2050
|
+
$ref: '#/components/headers/X-API-Version'
|
|
2051
|
+
Retry-After:
|
|
2052
|
+
description: Recommended wait time in seconds before polling again.
|
|
2053
|
+
schema:
|
|
2054
|
+
type: integer
|
|
2055
|
+
content:
|
|
2056
|
+
application/json:
|
|
2057
|
+
schema:
|
|
2058
|
+
$ref: '#/components/schemas/ImpactAnalysisResponseAsync'
|
|
2059
|
+
example:
|
|
2060
|
+
status: processing
|
|
2061
|
+
jobId: abc-123-def
|
|
2062
|
+
retryAfter: 10
|
|
2063
|
+
'400':
|
|
2064
|
+
$ref: '#/components/responses/BadRequest'
|
|
2065
|
+
'401':
|
|
2066
|
+
$ref: '#/components/responses/Unauthorized'
|
|
2067
|
+
'403':
|
|
2068
|
+
$ref: '#/components/responses/Forbidden'
|
|
2069
|
+
'429':
|
|
2070
|
+
$ref: '#/components/responses/TooManyRequests'
|
|
2071
|
+
'500':
|
|
2072
|
+
$ref: '#/components/responses/InternalError'
|
|
2073
|
+
'502':
|
|
2074
|
+
description: Bad Gateway
|
|
2075
|
+
content:
|
|
2076
|
+
application/json:
|
|
2077
|
+
schema:
|
|
2078
|
+
$ref: '#/components/schemas/Error'
|
|
1489
2079
|
components:
|
|
1490
2080
|
securitySchemes:
|
|
1491
2081
|
ApiKeyAuth:
|
|
@@ -1698,165 +2288,1089 @@ components:
|
|
|
1698
2288
|
CodeGraphNode:
|
|
1699
2289
|
type: object
|
|
1700
2290
|
properties:
|
|
1701
|
-
id:
|
|
2291
|
+
id:
|
|
2292
|
+
type: string
|
|
2293
|
+
labels:
|
|
2294
|
+
type: array
|
|
2295
|
+
items:
|
|
2296
|
+
type: string
|
|
2297
|
+
properties:
|
|
2298
|
+
type: object
|
|
2299
|
+
additionalProperties: true
|
|
2300
|
+
required:
|
|
2301
|
+
- id
|
|
2302
|
+
CodeGraphRelationship:
|
|
2303
|
+
type: object
|
|
2304
|
+
properties:
|
|
2305
|
+
id:
|
|
2306
|
+
type: string
|
|
2307
|
+
type:
|
|
2308
|
+
type: string
|
|
2309
|
+
startNode:
|
|
2310
|
+
type: string
|
|
2311
|
+
endNode:
|
|
2312
|
+
type: string
|
|
2313
|
+
properties:
|
|
2314
|
+
type: object
|
|
2315
|
+
additionalProperties: true
|
|
2316
|
+
required:
|
|
2317
|
+
- id
|
|
2318
|
+
- type
|
|
2319
|
+
- startNode
|
|
2320
|
+
- endNode
|
|
2321
|
+
CodeGraphStats:
|
|
2322
|
+
type: object
|
|
2323
|
+
properties:
|
|
2324
|
+
nodeCount:
|
|
2325
|
+
type: integer
|
|
2326
|
+
format: int64
|
|
2327
|
+
description: Total number of nodes in the graph
|
|
2328
|
+
relationshipCount:
|
|
2329
|
+
type: integer
|
|
2330
|
+
format: int64
|
|
2331
|
+
description: Total number of relationships in the graph
|
|
2332
|
+
nodeTypes:
|
|
2333
|
+
type: object
|
|
2334
|
+
additionalProperties:
|
|
2335
|
+
type: integer
|
|
2336
|
+
description: Count of nodes by type
|
|
2337
|
+
relationshipTypes:
|
|
2338
|
+
type: object
|
|
2339
|
+
additionalProperties:
|
|
2340
|
+
type: integer
|
|
2341
|
+
description: Count of relationships by type
|
|
2342
|
+
filesProcessed:
|
|
2343
|
+
type: integer
|
|
2344
|
+
format: int64
|
|
2345
|
+
classes:
|
|
2346
|
+
type: integer
|
|
2347
|
+
format: int64
|
|
2348
|
+
functions:
|
|
2349
|
+
type: integer
|
|
2350
|
+
format: int64
|
|
2351
|
+
types:
|
|
2352
|
+
type: integer
|
|
2353
|
+
format: int64
|
|
2354
|
+
processingTimeMs:
|
|
2355
|
+
type: number
|
|
2356
|
+
CodeGraphEnvelope:
|
|
2357
|
+
type: object
|
|
2358
|
+
properties:
|
|
2359
|
+
generatedAt:
|
|
2360
|
+
type: string
|
|
2361
|
+
format: date-time
|
|
2362
|
+
message:
|
|
2363
|
+
type: string
|
|
2364
|
+
stats:
|
|
2365
|
+
$ref: '#/components/schemas/CodeGraphStats'
|
|
2366
|
+
metadata:
|
|
2367
|
+
type: object
|
|
2368
|
+
properties:
|
|
2369
|
+
analysisStartTime:
|
|
2370
|
+
type: string
|
|
2371
|
+
format: date-time
|
|
2372
|
+
analysisEndTime:
|
|
2373
|
+
type: string
|
|
2374
|
+
format: date-time
|
|
2375
|
+
fileCount:
|
|
2376
|
+
type: integer
|
|
2377
|
+
languages:
|
|
2378
|
+
type: array
|
|
2379
|
+
items:
|
|
2380
|
+
type: string
|
|
2381
|
+
description: Analysis metadata including timing and file information
|
|
2382
|
+
graph:
|
|
2383
|
+
type: object
|
|
2384
|
+
properties:
|
|
2385
|
+
nodes:
|
|
2386
|
+
type: array
|
|
2387
|
+
items:
|
|
2388
|
+
$ref: '#/components/schemas/CodeGraphNode'
|
|
2389
|
+
relationships:
|
|
2390
|
+
type: array
|
|
2391
|
+
items:
|
|
2392
|
+
$ref: '#/components/schemas/CodeGraphRelationship'
|
|
2393
|
+
required:
|
|
2394
|
+
- nodes
|
|
2395
|
+
- relationships
|
|
2396
|
+
required:
|
|
2397
|
+
- graph
|
|
2398
|
+
JobStatus:
|
|
2399
|
+
type: object
|
|
2400
|
+
description: Common fields for async job status tracking.
|
|
2401
|
+
required:
|
|
2402
|
+
- status
|
|
2403
|
+
- jobId
|
|
2404
|
+
properties:
|
|
2405
|
+
status:
|
|
2406
|
+
type: string
|
|
2407
|
+
description: Current status of the job.
|
|
2408
|
+
enum:
|
|
2409
|
+
- pending
|
|
2410
|
+
- processing
|
|
2411
|
+
- completed
|
|
2412
|
+
- failed
|
|
2413
|
+
jobId:
|
|
2414
|
+
type: string
|
|
2415
|
+
description: Unique identifier for the job.
|
|
2416
|
+
retryAfter:
|
|
2417
|
+
type: integer
|
|
2418
|
+
format: int32
|
|
2419
|
+
description: Recommended seconds to wait before polling again.
|
|
2420
|
+
error:
|
|
2421
|
+
type: string
|
|
2422
|
+
description: Error message (present when status is failed).
|
|
2423
|
+
CodeGraphEnvelopeAsync:
|
|
2424
|
+
allOf:
|
|
2425
|
+
- $ref: '#/components/schemas/JobStatus'
|
|
2426
|
+
- type: object
|
|
2427
|
+
description: Async response envelope for code graph operations.
|
|
2428
|
+
properties:
|
|
2429
|
+
result:
|
|
2430
|
+
$ref: '#/components/schemas/CodeGraphEnvelope'
|
|
2431
|
+
description: The result (present when status is completed).
|
|
2432
|
+
DomainClassificationResponseAsync:
|
|
2433
|
+
allOf:
|
|
2434
|
+
- $ref: '#/components/schemas/JobStatus'
|
|
2435
|
+
- type: object
|
|
2436
|
+
description: Async response envelope for domain classification operations.
|
|
2437
|
+
properties:
|
|
2438
|
+
result:
|
|
2439
|
+
$ref: '#/components/schemas/DomainClassificationResponse'
|
|
2440
|
+
description: The result (present when status is completed).
|
|
2441
|
+
SupermodelIRAsync:
|
|
2442
|
+
allOf:
|
|
2443
|
+
- $ref: '#/components/schemas/JobStatus'
|
|
2444
|
+
- type: object
|
|
2445
|
+
description: Async response envelope for Supermodel IR operations.
|
|
2446
|
+
properties:
|
|
2447
|
+
result:
|
|
2448
|
+
$ref: '#/components/schemas/SupermodelIR'
|
|
2449
|
+
description: The result (present when status is completed).
|
|
2450
|
+
DeadCodeAnalysisResponseAsync:
|
|
2451
|
+
allOf:
|
|
2452
|
+
- $ref: '#/components/schemas/JobStatus'
|
|
2453
|
+
- type: object
|
|
2454
|
+
description: Async response envelope for dead code analysis operations.
|
|
2455
|
+
properties:
|
|
2456
|
+
result:
|
|
2457
|
+
$ref: '#/components/schemas/DeadCodeAnalysisResponse'
|
|
2458
|
+
description: The result (present when status is completed).
|
|
2459
|
+
TestCoverageMapResponseAsync:
|
|
2460
|
+
allOf:
|
|
2461
|
+
- $ref: '#/components/schemas/JobStatus'
|
|
2462
|
+
- type: object
|
|
2463
|
+
description: Async response envelope for test coverage map operations.
|
|
2464
|
+
properties:
|
|
2465
|
+
result:
|
|
2466
|
+
$ref: '#/components/schemas/TestCoverageMapResponse'
|
|
2467
|
+
description: The result (present when status is completed).
|
|
2468
|
+
CircularDependencyResponseAsync:
|
|
2469
|
+
allOf:
|
|
2470
|
+
- $ref: '#/components/schemas/JobStatus'
|
|
2471
|
+
- type: object
|
|
2472
|
+
description: Async response envelope for circular dependency analysis operations.
|
|
2473
|
+
properties:
|
|
2474
|
+
result:
|
|
2475
|
+
$ref: '#/components/schemas/CircularDependencyResponse'
|
|
2476
|
+
description: The result (present when status is completed).
|
|
2477
|
+
ImpactAnalysisResponseAsync:
|
|
2478
|
+
allOf:
|
|
2479
|
+
- $ref: '#/components/schemas/JobStatus'
|
|
2480
|
+
- type: object
|
|
2481
|
+
description: Async response envelope for impact analysis operations.
|
|
2482
|
+
properties:
|
|
2483
|
+
result:
|
|
2484
|
+
$ref: '#/components/schemas/ImpactAnalysisResponse'
|
|
2485
|
+
description: The result (present when status is completed).
|
|
2486
|
+
ImpactAnalysisResponse:
|
|
2487
|
+
type: object
|
|
2488
|
+
description: Impact analysis result containing blast radius and affected functions/files.
|
|
2489
|
+
required:
|
|
2490
|
+
- metadata
|
|
2491
|
+
- impacts
|
|
2492
|
+
- globalMetrics
|
|
2493
|
+
properties:
|
|
2494
|
+
metadata:
|
|
2495
|
+
$ref: '#/components/schemas/ImpactAnalysisMetadata'
|
|
2496
|
+
impacts:
|
|
2497
|
+
type: array
|
|
2498
|
+
description: Impact results for each analyzed target.
|
|
2499
|
+
items:
|
|
2500
|
+
$ref: '#/components/schemas/ImpactResult'
|
|
2501
|
+
globalMetrics:
|
|
2502
|
+
$ref: '#/components/schemas/ImpactGlobalMetrics'
|
|
2503
|
+
ImpactAnalysisMetadata:
|
|
2504
|
+
type: object
|
|
2505
|
+
description: Summary statistics for the impact analysis.
|
|
2506
|
+
required:
|
|
2507
|
+
- totalFiles
|
|
2508
|
+
- totalFunctions
|
|
2509
|
+
- targetsAnalyzed
|
|
2510
|
+
- analysisMethod
|
|
2511
|
+
properties:
|
|
2512
|
+
totalFiles:
|
|
2513
|
+
type: integer
|
|
2514
|
+
format: int64
|
|
2515
|
+
description: Total number of files in the repository.
|
|
2516
|
+
totalFunctions:
|
|
2517
|
+
type: integer
|
|
2518
|
+
format: int64
|
|
2519
|
+
description: Total number of functions analyzed.
|
|
2520
|
+
targetsAnalyzed:
|
|
2521
|
+
type: integer
|
|
2522
|
+
format: int32
|
|
2523
|
+
description: Number of targets analyzed.
|
|
2524
|
+
analysisMethod:
|
|
2525
|
+
type: string
|
|
2526
|
+
description: Method used for impact analysis.
|
|
2527
|
+
analysisStartTime:
|
|
2528
|
+
type: string
|
|
2529
|
+
format: date-time
|
|
2530
|
+
description: Timestamp when analysis started.
|
|
2531
|
+
analysisEndTime:
|
|
2532
|
+
type: string
|
|
2533
|
+
format: date-time
|
|
2534
|
+
description: Timestamp when analysis completed.
|
|
2535
|
+
ImpactResult:
|
|
2536
|
+
type: object
|
|
2537
|
+
description: Impact analysis result for a single target.
|
|
2538
|
+
required:
|
|
2539
|
+
- target
|
|
2540
|
+
- blastRadius
|
|
2541
|
+
- affectedFunctions
|
|
2542
|
+
- affectedFiles
|
|
2543
|
+
- entryPointsAffected
|
|
2544
|
+
properties:
|
|
2545
|
+
target:
|
|
2546
|
+
$ref: '#/components/schemas/ImpactTarget'
|
|
2547
|
+
blastRadius:
|
|
2548
|
+
$ref: '#/components/schemas/BlastRadius'
|
|
2549
|
+
affectedFunctions:
|
|
2550
|
+
type: array
|
|
2551
|
+
description: Functions affected by changes to this target.
|
|
2552
|
+
items:
|
|
2553
|
+
$ref: '#/components/schemas/AffectedFunction'
|
|
2554
|
+
affectedFiles:
|
|
2555
|
+
type: array
|
|
2556
|
+
description: Files affected by changes to this target.
|
|
2557
|
+
items:
|
|
2558
|
+
$ref: '#/components/schemas/AffectedFile'
|
|
2559
|
+
entryPointsAffected:
|
|
2560
|
+
type: array
|
|
2561
|
+
description: Entry points (route handlers, exports) affected by this target.
|
|
2562
|
+
items:
|
|
2563
|
+
$ref: '#/components/schemas/AffectedEntryPoint'
|
|
2564
|
+
ImpactTarget:
|
|
2565
|
+
type: object
|
|
2566
|
+
description: The target file or function being analyzed for impact.
|
|
2567
|
+
required:
|
|
2568
|
+
- file
|
|
2569
|
+
- type
|
|
2570
|
+
properties:
|
|
2571
|
+
file:
|
|
2572
|
+
type: string
|
|
2573
|
+
description: File path relative to repository root.
|
|
2574
|
+
name:
|
|
2575
|
+
type: string
|
|
2576
|
+
description: Function or method name (if targeting a specific function).
|
|
2577
|
+
line:
|
|
2578
|
+
type: integer
|
|
2579
|
+
format: int32
|
|
2580
|
+
description: Line number of the target declaration.
|
|
2581
|
+
type:
|
|
2582
|
+
type: string
|
|
2583
|
+
description: Type of the target element.
|
|
2584
|
+
enum:
|
|
2585
|
+
- file
|
|
2586
|
+
- function
|
|
2587
|
+
- method
|
|
2588
|
+
- class
|
|
2589
|
+
BlastRadius:
|
|
2590
|
+
type: object
|
|
2591
|
+
description: Blast radius metrics for a target.
|
|
2592
|
+
required:
|
|
2593
|
+
- directDependents
|
|
2594
|
+
- transitiveDependents
|
|
2595
|
+
- affectedFiles
|
|
2596
|
+
- riskScore
|
|
2597
|
+
properties:
|
|
2598
|
+
directDependents:
|
|
2599
|
+
type: integer
|
|
2600
|
+
format: int32
|
|
2601
|
+
description: Number of direct callers/dependents.
|
|
2602
|
+
transitiveDependents:
|
|
2603
|
+
type: integer
|
|
2604
|
+
format: int32
|
|
2605
|
+
description: Number of transitive (indirect) dependents.
|
|
2606
|
+
affectedFiles:
|
|
2607
|
+
type: integer
|
|
2608
|
+
format: int32
|
|
2609
|
+
description: Number of files affected.
|
|
2610
|
+
affectedDomains:
|
|
2611
|
+
type: array
|
|
2612
|
+
description: Domains affected by this change (scaffolded, empty in v1).
|
|
2613
|
+
items:
|
|
2614
|
+
type: string
|
|
2615
|
+
riskScore:
|
|
2616
|
+
type: string
|
|
2617
|
+
description: Risk level based on blast radius analysis.
|
|
2618
|
+
enum:
|
|
2619
|
+
- low
|
|
2620
|
+
- medium
|
|
2621
|
+
- high
|
|
2622
|
+
- critical
|
|
2623
|
+
riskFactors:
|
|
2624
|
+
type: array
|
|
2625
|
+
description: Human-readable explanations for the risk score.
|
|
2626
|
+
items:
|
|
2627
|
+
type: string
|
|
2628
|
+
AffectedFunction:
|
|
2629
|
+
type: object
|
|
2630
|
+
description: A function affected by changes to the target.
|
|
2631
|
+
required:
|
|
2632
|
+
- file
|
|
2633
|
+
- name
|
|
2634
|
+
- type
|
|
2635
|
+
- distance
|
|
2636
|
+
- relationship
|
|
2637
|
+
properties:
|
|
2638
|
+
file:
|
|
2639
|
+
type: string
|
|
2640
|
+
description: File path relative to repository root.
|
|
2641
|
+
name:
|
|
2642
|
+
type: string
|
|
2643
|
+
description: Name of the affected function.
|
|
2644
|
+
line:
|
|
2645
|
+
type: integer
|
|
2646
|
+
format: int32
|
|
2647
|
+
description: Line number of the function declaration.
|
|
2648
|
+
type:
|
|
2649
|
+
type: string
|
|
2650
|
+
description: Type of code element.
|
|
2651
|
+
enum:
|
|
2652
|
+
- function
|
|
2653
|
+
- method
|
|
2654
|
+
- class
|
|
2655
|
+
distance:
|
|
2656
|
+
type: integer
|
|
2657
|
+
format: int32
|
|
2658
|
+
description: Number of hops from the target in the call graph.
|
|
2659
|
+
relationship:
|
|
2660
|
+
type: string
|
|
2661
|
+
description: Relationship type to the target.
|
|
2662
|
+
enum:
|
|
2663
|
+
- direct_caller
|
|
2664
|
+
- transitive_caller
|
|
2665
|
+
AffectedFile:
|
|
2666
|
+
type: object
|
|
2667
|
+
description: A file affected by changes to the target.
|
|
2668
|
+
required:
|
|
2669
|
+
- file
|
|
2670
|
+
- directDependencies
|
|
2671
|
+
- transitiveDependencies
|
|
2672
|
+
properties:
|
|
2673
|
+
file:
|
|
2674
|
+
type: string
|
|
2675
|
+
description: File path relative to repository root.
|
|
2676
|
+
directDependencies:
|
|
2677
|
+
type: integer
|
|
2678
|
+
format: int32
|
|
2679
|
+
description: Number of direct dependencies in this file.
|
|
2680
|
+
transitiveDependencies:
|
|
2681
|
+
type: integer
|
|
2682
|
+
format: int32
|
|
2683
|
+
description: Number of transitive dependencies in this file.
|
|
2684
|
+
AffectedEntryPoint:
|
|
2685
|
+
type: object
|
|
2686
|
+
description: An entry point affected by changes to the target.
|
|
2687
|
+
required:
|
|
2688
|
+
- file
|
|
2689
|
+
- name
|
|
2690
|
+
- type
|
|
2691
|
+
properties:
|
|
2692
|
+
file:
|
|
2693
|
+
type: string
|
|
2694
|
+
description: File path relative to repository root.
|
|
2695
|
+
name:
|
|
2696
|
+
type: string
|
|
2697
|
+
description: Name or route of the entry point.
|
|
2698
|
+
type:
|
|
2699
|
+
type: string
|
|
2700
|
+
description: Type of entry point.
|
|
2701
|
+
enum:
|
|
2702
|
+
- route_handler
|
|
2703
|
+
- module_export
|
|
2704
|
+
- main_function
|
|
2705
|
+
- event_handler
|
|
2706
|
+
ImpactGlobalMetrics:
|
|
2707
|
+
type: object
|
|
2708
|
+
description: Global metrics across all analyzed targets.
|
|
2709
|
+
properties:
|
|
2710
|
+
mostCriticalFiles:
|
|
2711
|
+
type: array
|
|
2712
|
+
description: Files with the highest dependent counts.
|
|
2713
|
+
items:
|
|
2714
|
+
$ref: '#/components/schemas/CriticalFile'
|
|
2715
|
+
crossDomainDependencies:
|
|
2716
|
+
type: array
|
|
2717
|
+
description: Dependencies that cross domain boundaries (scaffolded, empty in v1).
|
|
2718
|
+
items:
|
|
2719
|
+
$ref: '#/components/schemas/CrossDomainDependency'
|
|
2720
|
+
CriticalFile:
|
|
2721
|
+
type: object
|
|
2722
|
+
description: A file identified as critical due to high dependent count.
|
|
2723
|
+
required:
|
|
2724
|
+
- file
|
|
2725
|
+
- dependentCount
|
|
2726
|
+
- riskScore
|
|
2727
|
+
properties:
|
|
2728
|
+
file:
|
|
2729
|
+
type: string
|
|
2730
|
+
description: File path relative to repository root.
|
|
2731
|
+
dependentCount:
|
|
2732
|
+
type: integer
|
|
2733
|
+
format: int32
|
|
2734
|
+
description: Total number of transitive dependents.
|
|
2735
|
+
riskScore:
|
|
2736
|
+
type: string
|
|
2737
|
+
description: Risk level based on dependent count.
|
|
2738
|
+
enum:
|
|
2739
|
+
- low
|
|
2740
|
+
- medium
|
|
2741
|
+
- high
|
|
2742
|
+
- critical
|
|
2743
|
+
CrossDomainDependency:
|
|
2744
|
+
type: object
|
|
2745
|
+
description: A dependency that crosses domain boundaries.
|
|
2746
|
+
required:
|
|
2747
|
+
- from
|
|
2748
|
+
- to
|
|
2749
|
+
- edgeCount
|
|
2750
|
+
properties:
|
|
2751
|
+
from:
|
|
2752
|
+
type: string
|
|
2753
|
+
description: Source domain.
|
|
2754
|
+
to:
|
|
2755
|
+
type: string
|
|
2756
|
+
description: Target domain.
|
|
2757
|
+
edgeCount:
|
|
2758
|
+
type: integer
|
|
2759
|
+
format: int32
|
|
2760
|
+
description: Number of cross-domain edges.
|
|
2761
|
+
DeadCodeAnalysisResponse:
|
|
2762
|
+
type: object
|
|
2763
|
+
description: Dead code analysis result containing candidates and alive code.
|
|
2764
|
+
required:
|
|
2765
|
+
- metadata
|
|
2766
|
+
- deadCodeCandidates
|
|
2767
|
+
- aliveCode
|
|
2768
|
+
- entryPoints
|
|
2769
|
+
properties:
|
|
2770
|
+
metadata:
|
|
2771
|
+
$ref: '#/components/schemas/DeadCodeAnalysisMetadata'
|
|
2772
|
+
deadCodeCandidates:
|
|
2773
|
+
type: array
|
|
2774
|
+
description: Code elements with no detected callers or references.
|
|
2775
|
+
items:
|
|
2776
|
+
$ref: '#/components/schemas/DeadCodeCandidate'
|
|
2777
|
+
aliveCode:
|
|
2778
|
+
type: array
|
|
2779
|
+
description: Code elements with at least one caller or reference.
|
|
2780
|
+
items:
|
|
2781
|
+
$ref: '#/components/schemas/AliveCodeItem'
|
|
2782
|
+
entryPoints:
|
|
2783
|
+
type: array
|
|
2784
|
+
description: Detected entry points (exports, route handlers, main functions).
|
|
2785
|
+
items:
|
|
2786
|
+
$ref: '#/components/schemas/EntryPoint'
|
|
2787
|
+
DeadCodeAnalysisMetadata:
|
|
2788
|
+
type: object
|
|
2789
|
+
description: Summary statistics for the dead code analysis.
|
|
2790
|
+
required:
|
|
2791
|
+
- totalDeclarations
|
|
2792
|
+
- deadCodeCandidates
|
|
2793
|
+
- aliveCode
|
|
2794
|
+
- analysisMethod
|
|
2795
|
+
properties:
|
|
2796
|
+
totalDeclarations:
|
|
2797
|
+
type: integer
|
|
2798
|
+
format: int64
|
|
2799
|
+
description: Total number of declarations (functions, classes, methods) analyzed.
|
|
2800
|
+
deadCodeCandidates:
|
|
2801
|
+
type: integer
|
|
2802
|
+
format: int64
|
|
2803
|
+
description: Number of dead code candidates found.
|
|
2804
|
+
aliveCode:
|
|
2805
|
+
type: integer
|
|
2806
|
+
format: int64
|
|
2807
|
+
description: Number of code elements with active references.
|
|
2808
|
+
rootFilesCount:
|
|
2809
|
+
type: integer
|
|
2810
|
+
format: int64
|
|
2811
|
+
description: Number of root files detected (files with no importers, used as entry points).
|
|
2812
|
+
transitiveDeadCount:
|
|
2813
|
+
type: integer
|
|
2814
|
+
format: int64
|
|
2815
|
+
description: Number of functions detected as dead via transitive propagation (all callers are dead).
|
|
2816
|
+
symbolLevelDeadCount:
|
|
2817
|
+
type: integer
|
|
2818
|
+
format: int64
|
|
2819
|
+
description: Number of exports detected as dead via symbol-level import analysis (exported but never imported by name).
|
|
2820
|
+
analysisMethod:
|
|
2821
|
+
type: string
|
|
2822
|
+
description: Method used for analysis (e.g., 'dependency_graph_reachability').
|
|
2823
|
+
analysisStartTime:
|
|
2824
|
+
type: string
|
|
2825
|
+
format: date-time
|
|
2826
|
+
description: Timestamp when analysis started.
|
|
2827
|
+
analysisEndTime:
|
|
2828
|
+
type: string
|
|
2829
|
+
format: date-time
|
|
2830
|
+
description: Timestamp when analysis completed.
|
|
2831
|
+
DeadCodeCandidate:
|
|
2832
|
+
type: object
|
|
2833
|
+
description: A code element identified as potentially dead (unreachable).
|
|
2834
|
+
required:
|
|
2835
|
+
- file
|
|
2836
|
+
- name
|
|
2837
|
+
- line
|
|
2838
|
+
- type
|
|
2839
|
+
- confidence
|
|
2840
|
+
- reason
|
|
2841
|
+
properties:
|
|
2842
|
+
file:
|
|
2843
|
+
type: string
|
|
2844
|
+
description: File path relative to repository root.
|
|
2845
|
+
name:
|
|
2846
|
+
type: string
|
|
2847
|
+
description: Name of the function, class, or method.
|
|
2848
|
+
line:
|
|
2849
|
+
type: integer
|
|
2850
|
+
format: int32
|
|
2851
|
+
description: Line number where the declaration starts.
|
|
2852
|
+
type:
|
|
2853
|
+
type: string
|
|
2854
|
+
description: Type of code element.
|
|
2855
|
+
enum:
|
|
2856
|
+
- function
|
|
2857
|
+
- class
|
|
2858
|
+
- method
|
|
2859
|
+
- interface
|
|
2860
|
+
- type
|
|
2861
|
+
- variable
|
|
2862
|
+
- constant
|
|
2863
|
+
confidence:
|
|
2864
|
+
type: string
|
|
2865
|
+
description: Confidence level of dead code detection.
|
|
2866
|
+
enum:
|
|
2867
|
+
- high
|
|
2868
|
+
- medium
|
|
2869
|
+
- low
|
|
2870
|
+
reason:
|
|
2871
|
+
type: string
|
|
2872
|
+
description: Explanation of why this was flagged as dead code.
|
|
2873
|
+
AliveCodeItem:
|
|
2874
|
+
type: object
|
|
2875
|
+
description: A code element with active callers or references.
|
|
2876
|
+
required:
|
|
2877
|
+
- file
|
|
2878
|
+
- name
|
|
2879
|
+
- line
|
|
2880
|
+
- type
|
|
2881
|
+
- callerCount
|
|
2882
|
+
properties:
|
|
2883
|
+
file:
|
|
2884
|
+
type: string
|
|
2885
|
+
description: File path relative to repository root.
|
|
2886
|
+
name:
|
|
2887
|
+
type: string
|
|
2888
|
+
description: Name of the function, class, or method.
|
|
2889
|
+
line:
|
|
2890
|
+
type: integer
|
|
2891
|
+
format: int32
|
|
2892
|
+
description: Line number where the declaration starts.
|
|
2893
|
+
type:
|
|
2894
|
+
type: string
|
|
2895
|
+
description: Type of code element.
|
|
2896
|
+
enum:
|
|
2897
|
+
- function
|
|
2898
|
+
- class
|
|
2899
|
+
- method
|
|
2900
|
+
- interface
|
|
2901
|
+
- type
|
|
2902
|
+
- variable
|
|
2903
|
+
- constant
|
|
2904
|
+
callerCount:
|
|
2905
|
+
type: integer
|
|
2906
|
+
format: int32
|
|
2907
|
+
description: Number of unique callers or references.
|
|
2908
|
+
EntryPoint:
|
|
2909
|
+
type: object
|
|
2910
|
+
description: A detected entry point that should not be flagged as dead code.
|
|
2911
|
+
required:
|
|
2912
|
+
- file
|
|
2913
|
+
- name
|
|
2914
|
+
- line
|
|
2915
|
+
- type
|
|
2916
|
+
- reason
|
|
2917
|
+
properties:
|
|
2918
|
+
file:
|
|
2919
|
+
type: string
|
|
2920
|
+
description: File path relative to repository root.
|
|
2921
|
+
name:
|
|
2922
|
+
type: string
|
|
2923
|
+
description: Name of the entry point.
|
|
2924
|
+
line:
|
|
2925
|
+
type: integer
|
|
2926
|
+
format: int32
|
|
2927
|
+
description: Line number where the entry point is declared.
|
|
2928
|
+
type:
|
|
2929
|
+
type: string
|
|
2930
|
+
description: Type of code element.
|
|
2931
|
+
enum:
|
|
2932
|
+
- function
|
|
2933
|
+
- class
|
|
2934
|
+
- method
|
|
2935
|
+
- interface
|
|
2936
|
+
- type
|
|
2937
|
+
- variable
|
|
2938
|
+
- constant
|
|
2939
|
+
reason:
|
|
2940
|
+
type: string
|
|
2941
|
+
description: Reason this is considered an entry point (e.g., 'Module export', 'Route handler', 'Main function').
|
|
2942
|
+
TestCoverageMapResponse:
|
|
2943
|
+
type: object
|
|
2944
|
+
description: Test coverage map result identifying tested and untested functions via static call graph reachability from test files.
|
|
2945
|
+
required:
|
|
2946
|
+
- metadata
|
|
2947
|
+
- untestedFunctions
|
|
2948
|
+
- testedFunctions
|
|
2949
|
+
- testFiles
|
|
2950
|
+
- coverageByFile
|
|
2951
|
+
properties:
|
|
2952
|
+
metadata:
|
|
2953
|
+
$ref: '#/components/schemas/TestCoverageMapMetadata'
|
|
2954
|
+
untestedFunctions:
|
|
2955
|
+
type: array
|
|
2956
|
+
description: Production functions with no test coverage (not reachable from any test function).
|
|
2957
|
+
items:
|
|
2958
|
+
$ref: '#/components/schemas/UntestedFunction'
|
|
2959
|
+
testedFunctions:
|
|
2960
|
+
type: array
|
|
2961
|
+
description: Production functions with test coverage (reachable from at least one test function).
|
|
2962
|
+
items:
|
|
2963
|
+
$ref: '#/components/schemas/TestedFunction'
|
|
2964
|
+
testFiles:
|
|
2965
|
+
type: array
|
|
2966
|
+
description: Detected test files with coverage statistics.
|
|
2967
|
+
items:
|
|
2968
|
+
$ref: '#/components/schemas/TestFileInfo'
|
|
2969
|
+
coverageByDomain:
|
|
2970
|
+
type: array
|
|
2971
|
+
description: Coverage breakdown by domain classification.
|
|
2972
|
+
items:
|
|
2973
|
+
$ref: '#/components/schemas/CoverageByDomain'
|
|
2974
|
+
coverageByFile:
|
|
2975
|
+
type: array
|
|
2976
|
+
description: Coverage breakdown by production file.
|
|
2977
|
+
items:
|
|
2978
|
+
$ref: '#/components/schemas/CoverageByFile'
|
|
2979
|
+
TestCoverageMapMetadata:
|
|
2980
|
+
type: object
|
|
2981
|
+
description: Summary statistics for the test coverage map analysis.
|
|
2982
|
+
required:
|
|
2983
|
+
- totalFiles
|
|
2984
|
+
- testFiles
|
|
2985
|
+
- productionFiles
|
|
2986
|
+
- totalFunctions
|
|
2987
|
+
- testedFunctions
|
|
2988
|
+
- untestedFunctions
|
|
2989
|
+
- coveragePercentage
|
|
2990
|
+
- analysisMethod
|
|
2991
|
+
properties:
|
|
2992
|
+
totalFiles:
|
|
2993
|
+
type: integer
|
|
2994
|
+
format: int64
|
|
2995
|
+
description: Total number of files in the repository.
|
|
2996
|
+
testFiles:
|
|
2997
|
+
type: integer
|
|
2998
|
+
format: int64
|
|
2999
|
+
description: Number of files identified as test files.
|
|
3000
|
+
productionFiles:
|
|
3001
|
+
type: integer
|
|
3002
|
+
format: int64
|
|
3003
|
+
description: Number of non-test (production) files.
|
|
3004
|
+
totalFunctions:
|
|
3005
|
+
type: integer
|
|
3006
|
+
format: int64
|
|
3007
|
+
description: Total number of functions in production files.
|
|
3008
|
+
testedFunctions:
|
|
3009
|
+
type: integer
|
|
3010
|
+
format: int64
|
|
3011
|
+
description: Number of production functions reachable from test functions.
|
|
3012
|
+
untestedFunctions:
|
|
3013
|
+
type: integer
|
|
3014
|
+
format: int64
|
|
3015
|
+
description: Number of production functions not reachable from any test function.
|
|
3016
|
+
coveragePercentage:
|
|
3017
|
+
type: number
|
|
3018
|
+
format: double
|
|
3019
|
+
description: Percentage of production functions with test coverage.
|
|
3020
|
+
analysisMethod:
|
|
3021
|
+
type: string
|
|
3022
|
+
description: Method used for analysis.
|
|
3023
|
+
analysisStartTime:
|
|
3024
|
+
type: string
|
|
3025
|
+
format: date-time
|
|
3026
|
+
description: Timestamp when analysis started.
|
|
3027
|
+
analysisEndTime:
|
|
3028
|
+
type: string
|
|
3029
|
+
format: date-time
|
|
3030
|
+
description: Timestamp when analysis completed.
|
|
3031
|
+
UntestedFunction:
|
|
3032
|
+
type: object
|
|
3033
|
+
description: A production function with no test coverage.
|
|
3034
|
+
required:
|
|
3035
|
+
- file
|
|
3036
|
+
- name
|
|
3037
|
+
- line
|
|
3038
|
+
- type
|
|
3039
|
+
- confidence
|
|
3040
|
+
- reason
|
|
3041
|
+
properties:
|
|
3042
|
+
file:
|
|
1702
3043
|
type: string
|
|
1703
|
-
|
|
3044
|
+
description: File path relative to repository root.
|
|
3045
|
+
name:
|
|
3046
|
+
type: string
|
|
3047
|
+
description: Name of the function or method.
|
|
3048
|
+
line:
|
|
3049
|
+
type: integer
|
|
3050
|
+
format: int32
|
|
3051
|
+
description: Line number where the function is declared.
|
|
3052
|
+
type:
|
|
3053
|
+
type: string
|
|
3054
|
+
description: Type of code element.
|
|
3055
|
+
enum:
|
|
3056
|
+
- function
|
|
3057
|
+
- class
|
|
3058
|
+
- method
|
|
3059
|
+
- interface
|
|
3060
|
+
- type
|
|
3061
|
+
- variable
|
|
3062
|
+
- constant
|
|
3063
|
+
confidence:
|
|
3064
|
+
type: string
|
|
3065
|
+
description: Confidence level of the untested classification.
|
|
3066
|
+
enum:
|
|
3067
|
+
- high
|
|
3068
|
+
- medium
|
|
3069
|
+
- low
|
|
3070
|
+
reason:
|
|
3071
|
+
type: string
|
|
3072
|
+
description: Explanation of why this function is classified as untested.
|
|
3073
|
+
nearestTestedCaller:
|
|
3074
|
+
$ref: '#/components/schemas/NearestTestedCaller'
|
|
3075
|
+
suggestedTestFile:
|
|
3076
|
+
type: string
|
|
3077
|
+
description: The test file that covers the most sibling functions in the same production file. This is the recommended file in which to add a test for this untested function.
|
|
3078
|
+
testedSiblings:
|
|
1704
3079
|
type: array
|
|
3080
|
+
description: Other functions in the same file that ARE tested, along with which test files cover them. Use this to see existing test patterns you can follow.
|
|
1705
3081
|
items:
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
type: object
|
|
1709
|
-
additionalProperties: true
|
|
1710
|
-
required:
|
|
1711
|
-
- id
|
|
1712
|
-
CodeGraphRelationship:
|
|
3082
|
+
$ref: '#/components/schemas/TestedSibling'
|
|
3083
|
+
TestedSibling:
|
|
1713
3084
|
type: object
|
|
3085
|
+
description: A sibling function in the same file that has test coverage.
|
|
3086
|
+
required:
|
|
3087
|
+
- name
|
|
3088
|
+
- line
|
|
3089
|
+
- testFiles
|
|
1714
3090
|
properties:
|
|
1715
|
-
|
|
1716
|
-
type: string
|
|
1717
|
-
type:
|
|
3091
|
+
name:
|
|
1718
3092
|
type: string
|
|
1719
|
-
|
|
3093
|
+
description: Name of the tested sibling function.
|
|
3094
|
+
line:
|
|
3095
|
+
type: integer
|
|
3096
|
+
format: int32
|
|
3097
|
+
description: Line number where the sibling function is declared.
|
|
3098
|
+
testFiles:
|
|
3099
|
+
type: array
|
|
3100
|
+
description: Test files that cover this sibling function.
|
|
3101
|
+
items:
|
|
3102
|
+
type: string
|
|
3103
|
+
NearestTestedCaller:
|
|
3104
|
+
type: object
|
|
3105
|
+
description: The nearest function in the call graph that has test coverage.
|
|
3106
|
+
required:
|
|
3107
|
+
- file
|
|
3108
|
+
- name
|
|
3109
|
+
- distance
|
|
3110
|
+
properties:
|
|
3111
|
+
file:
|
|
1720
3112
|
type: string
|
|
1721
|
-
|
|
3113
|
+
description: File path of the nearest tested function.
|
|
3114
|
+
name:
|
|
1722
3115
|
type: string
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
3116
|
+
description: Name of the nearest tested function.
|
|
3117
|
+
distance:
|
|
3118
|
+
type: integer
|
|
3119
|
+
format: int32
|
|
3120
|
+
description: Number of call graph hops to the nearest tested function.
|
|
3121
|
+
TestedFunction:
|
|
3122
|
+
type: object
|
|
3123
|
+
description: A production function reachable from at least one test function.
|
|
1726
3124
|
required:
|
|
1727
|
-
-
|
|
3125
|
+
- file
|
|
3126
|
+
- name
|
|
3127
|
+
- line
|
|
1728
3128
|
- type
|
|
1729
|
-
-
|
|
1730
|
-
-
|
|
1731
|
-
|
|
3129
|
+
- testFiles
|
|
3130
|
+
- directTestCallers
|
|
3131
|
+
- transitiveTestCallers
|
|
3132
|
+
properties:
|
|
3133
|
+
file:
|
|
3134
|
+
type: string
|
|
3135
|
+
description: File path relative to repository root.
|
|
3136
|
+
name:
|
|
3137
|
+
type: string
|
|
3138
|
+
description: Name of the function or method.
|
|
3139
|
+
line:
|
|
3140
|
+
type: integer
|
|
3141
|
+
format: int32
|
|
3142
|
+
description: Line number where the function is declared.
|
|
3143
|
+
type:
|
|
3144
|
+
type: string
|
|
3145
|
+
description: Type of code element.
|
|
3146
|
+
enum:
|
|
3147
|
+
- function
|
|
3148
|
+
- class
|
|
3149
|
+
- method
|
|
3150
|
+
- interface
|
|
3151
|
+
- type
|
|
3152
|
+
- variable
|
|
3153
|
+
- constant
|
|
3154
|
+
testFiles:
|
|
3155
|
+
type: array
|
|
3156
|
+
description: Test files that cover this function (directly or transitively).
|
|
3157
|
+
items:
|
|
3158
|
+
type: string
|
|
3159
|
+
directTestCallers:
|
|
3160
|
+
type: integer
|
|
3161
|
+
format: int32
|
|
3162
|
+
description: Number of test functions that directly call this function.
|
|
3163
|
+
transitiveTestCallers:
|
|
3164
|
+
type: integer
|
|
3165
|
+
format: int32
|
|
3166
|
+
description: Number of test functions that transitively reach this function.
|
|
3167
|
+
TestFileInfo:
|
|
1732
3168
|
type: object
|
|
3169
|
+
description: Information about a detected test file.
|
|
3170
|
+
required:
|
|
3171
|
+
- file
|
|
3172
|
+
- testFunctions
|
|
3173
|
+
- productionFunctionsCovered
|
|
3174
|
+
- productionFilesCovered
|
|
1733
3175
|
properties:
|
|
1734
|
-
|
|
3176
|
+
file:
|
|
3177
|
+
type: string
|
|
3178
|
+
description: File path relative to repository root.
|
|
3179
|
+
testFunctions:
|
|
1735
3180
|
type: integer
|
|
1736
|
-
format:
|
|
1737
|
-
description:
|
|
1738
|
-
|
|
3181
|
+
format: int32
|
|
3182
|
+
description: Number of test functions defined in this file.
|
|
3183
|
+
productionFunctionsCovered:
|
|
1739
3184
|
type: integer
|
|
1740
|
-
format:
|
|
1741
|
-
description:
|
|
1742
|
-
|
|
1743
|
-
type: object
|
|
1744
|
-
additionalProperties:
|
|
1745
|
-
type: integer
|
|
1746
|
-
description: Count of nodes by type
|
|
1747
|
-
relationshipTypes:
|
|
1748
|
-
type: object
|
|
1749
|
-
additionalProperties:
|
|
1750
|
-
type: integer
|
|
1751
|
-
description: Count of relationships by type
|
|
1752
|
-
filesProcessed:
|
|
3185
|
+
format: int32
|
|
3186
|
+
description: Number of unique production functions covered by tests in this file.
|
|
3187
|
+
productionFilesCovered:
|
|
1753
3188
|
type: integer
|
|
1754
|
-
format:
|
|
1755
|
-
|
|
3189
|
+
format: int32
|
|
3190
|
+
description: Number of unique production files covered by tests in this file.
|
|
3191
|
+
CoverageByDomain:
|
|
3192
|
+
type: object
|
|
3193
|
+
description: Test coverage breakdown for a domain.
|
|
3194
|
+
required:
|
|
3195
|
+
- domain
|
|
3196
|
+
- totalFunctions
|
|
3197
|
+
- testedFunctions
|
|
3198
|
+
- coveragePercentage
|
|
3199
|
+
properties:
|
|
3200
|
+
domain:
|
|
3201
|
+
type: string
|
|
3202
|
+
description: Domain name from domain classification.
|
|
3203
|
+
totalFunctions:
|
|
1756
3204
|
type: integer
|
|
1757
|
-
format:
|
|
1758
|
-
|
|
3205
|
+
format: int32
|
|
3206
|
+
description: Total functions in the domain.
|
|
3207
|
+
testedFunctions:
|
|
1759
3208
|
type: integer
|
|
1760
|
-
format:
|
|
1761
|
-
|
|
3209
|
+
format: int32
|
|
3210
|
+
description: Number of tested functions in the domain.
|
|
3211
|
+
coveragePercentage:
|
|
3212
|
+
type: number
|
|
3213
|
+
format: double
|
|
3214
|
+
description: Coverage percentage for the domain.
|
|
3215
|
+
CoverageByFile:
|
|
3216
|
+
type: object
|
|
3217
|
+
description: Test coverage breakdown for a production file.
|
|
3218
|
+
required:
|
|
3219
|
+
- file
|
|
3220
|
+
- totalFunctions
|
|
3221
|
+
- testedFunctions
|
|
3222
|
+
- untestedFunctions
|
|
3223
|
+
- coveragePercentage
|
|
3224
|
+
properties:
|
|
3225
|
+
file:
|
|
3226
|
+
type: string
|
|
3227
|
+
description: File path relative to repository root.
|
|
3228
|
+
totalFunctions:
|
|
1762
3229
|
type: integer
|
|
1763
|
-
format:
|
|
1764
|
-
|
|
3230
|
+
format: int32
|
|
3231
|
+
description: Total functions in the file.
|
|
3232
|
+
testedFunctions:
|
|
3233
|
+
type: integer
|
|
3234
|
+
format: int32
|
|
3235
|
+
description: Number of tested functions in the file.
|
|
3236
|
+
untestedFunctions:
|
|
3237
|
+
type: integer
|
|
3238
|
+
format: int32
|
|
3239
|
+
description: Number of untested functions in the file.
|
|
3240
|
+
coveragePercentage:
|
|
1765
3241
|
type: number
|
|
1766
|
-
|
|
3242
|
+
format: double
|
|
3243
|
+
description: Coverage percentage for the file.
|
|
3244
|
+
CircularDependencyResponse:
|
|
1767
3245
|
type: object
|
|
3246
|
+
description: Circular dependency analysis result containing detected cycles and summary.
|
|
3247
|
+
required:
|
|
3248
|
+
- metadata
|
|
3249
|
+
- cycles
|
|
3250
|
+
- summary
|
|
1768
3251
|
properties:
|
|
1769
|
-
|
|
3252
|
+
metadata:
|
|
3253
|
+
$ref: '#/components/schemas/CircularDependencyMetadata'
|
|
3254
|
+
cycles:
|
|
3255
|
+
type: array
|
|
3256
|
+
description: Detected dependency cycles.
|
|
3257
|
+
items:
|
|
3258
|
+
$ref: '#/components/schemas/CircularDependencyCycle'
|
|
3259
|
+
summary:
|
|
3260
|
+
$ref: '#/components/schemas/CircularDependencySummary'
|
|
3261
|
+
CircularDependencyMetadata:
|
|
3262
|
+
type: object
|
|
3263
|
+
description: Summary statistics for the circular dependency analysis.
|
|
3264
|
+
required:
|
|
3265
|
+
- totalFiles
|
|
3266
|
+
- totalImports
|
|
3267
|
+
- cycleCount
|
|
3268
|
+
- analysisMethod
|
|
3269
|
+
properties:
|
|
3270
|
+
totalFiles:
|
|
3271
|
+
type: integer
|
|
3272
|
+
format: int32
|
|
3273
|
+
description: Total number of files in the dependency graph.
|
|
3274
|
+
totalImports:
|
|
3275
|
+
type: integer
|
|
3276
|
+
format: int32
|
|
3277
|
+
description: Total number of import relationships.
|
|
3278
|
+
cycleCount:
|
|
3279
|
+
type: integer
|
|
3280
|
+
format: int32
|
|
3281
|
+
description: Number of cycles found.
|
|
3282
|
+
analysisMethod:
|
|
3283
|
+
type: string
|
|
3284
|
+
description: Algorithm used for cycle detection (e.g., tarjan_scc).
|
|
3285
|
+
analysisStartTime:
|
|
1770
3286
|
type: string
|
|
1771
3287
|
format: date-time
|
|
1772
|
-
|
|
3288
|
+
description: Timestamp when analysis started.
|
|
3289
|
+
analysisEndTime:
|
|
1773
3290
|
type: string
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
type: object
|
|
1778
|
-
properties:
|
|
1779
|
-
analysisStartTime:
|
|
1780
|
-
type: string
|
|
1781
|
-
format: date-time
|
|
1782
|
-
analysisEndTime:
|
|
1783
|
-
type: string
|
|
1784
|
-
format: date-time
|
|
1785
|
-
fileCount:
|
|
1786
|
-
type: integer
|
|
1787
|
-
languages:
|
|
1788
|
-
type: array
|
|
1789
|
-
items:
|
|
1790
|
-
type: string
|
|
1791
|
-
description: Analysis metadata including timing and file information
|
|
1792
|
-
graph:
|
|
1793
|
-
type: object
|
|
1794
|
-
properties:
|
|
1795
|
-
nodes:
|
|
1796
|
-
type: array
|
|
1797
|
-
items:
|
|
1798
|
-
$ref: '#/components/schemas/CodeGraphNode'
|
|
1799
|
-
relationships:
|
|
1800
|
-
type: array
|
|
1801
|
-
items:
|
|
1802
|
-
$ref: '#/components/schemas/CodeGraphRelationship'
|
|
1803
|
-
required:
|
|
1804
|
-
- nodes
|
|
1805
|
-
- relationships
|
|
1806
|
-
required:
|
|
1807
|
-
- graph
|
|
1808
|
-
JobStatus:
|
|
3291
|
+
format: date-time
|
|
3292
|
+
description: Timestamp when analysis completed.
|
|
3293
|
+
CircularDependencyCycle:
|
|
1809
3294
|
type: object
|
|
1810
|
-
description:
|
|
3295
|
+
description: A single dependency cycle (strongly connected component).
|
|
1811
3296
|
required:
|
|
1812
|
-
-
|
|
1813
|
-
-
|
|
3297
|
+
- id
|
|
3298
|
+
- files
|
|
3299
|
+
- edges
|
|
3300
|
+
- severity
|
|
1814
3301
|
properties:
|
|
1815
|
-
|
|
3302
|
+
id:
|
|
1816
3303
|
type: string
|
|
1817
|
-
description:
|
|
3304
|
+
description: Unique identifier for this cycle (e.g., cycle-1).
|
|
3305
|
+
files:
|
|
3306
|
+
type: array
|
|
3307
|
+
description: Files involved in this cycle, sorted alphabetically.
|
|
3308
|
+
items:
|
|
3309
|
+
type: string
|
|
3310
|
+
edges:
|
|
3311
|
+
type: array
|
|
3312
|
+
description: Import edges that form this cycle.
|
|
3313
|
+
items:
|
|
3314
|
+
$ref: '#/components/schemas/CycleEdge'
|
|
3315
|
+
severity:
|
|
3316
|
+
type: string
|
|
3317
|
+
description: Severity of this cycle based on cross-directory span and size.
|
|
1818
3318
|
enum:
|
|
1819
|
-
-
|
|
1820
|
-
-
|
|
1821
|
-
-
|
|
1822
|
-
|
|
1823
|
-
jobId:
|
|
3319
|
+
- low
|
|
3320
|
+
- medium
|
|
3321
|
+
- high
|
|
3322
|
+
breakingSuggestion:
|
|
1824
3323
|
type: string
|
|
1825
|
-
description:
|
|
1826
|
-
|
|
3324
|
+
description: Suggested edge to break to resolve this cycle.
|
|
3325
|
+
CycleEdge:
|
|
3326
|
+
type: object
|
|
3327
|
+
description: A directed import edge within a cycle.
|
|
3328
|
+
required:
|
|
3329
|
+
- source
|
|
3330
|
+
- target
|
|
3331
|
+
- importedSymbols
|
|
3332
|
+
properties:
|
|
3333
|
+
source:
|
|
3334
|
+
type: string
|
|
3335
|
+
description: File path of the importing file.
|
|
3336
|
+
target:
|
|
3337
|
+
type: string
|
|
3338
|
+
description: File path of the imported file.
|
|
3339
|
+
importedSymbols:
|
|
3340
|
+
type: array
|
|
3341
|
+
description: Symbols imported along this edge.
|
|
3342
|
+
items:
|
|
3343
|
+
type: string
|
|
3344
|
+
CircularDependencySummary:
|
|
3345
|
+
type: object
|
|
3346
|
+
description: Aggregate summary of circular dependency analysis.
|
|
3347
|
+
required:
|
|
3348
|
+
- totalCycles
|
|
3349
|
+
- filesInCycles
|
|
3350
|
+
- highSeverityCount
|
|
3351
|
+
- mediumSeverityCount
|
|
3352
|
+
- lowSeverityCount
|
|
3353
|
+
properties:
|
|
3354
|
+
totalCycles:
|
|
1827
3355
|
type: integer
|
|
1828
3356
|
format: int32
|
|
1829
|
-
description:
|
|
1830
|
-
|
|
1831
|
-
type:
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
description:
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
description: Async response envelope for domain classification operations.
|
|
1847
|
-
properties:
|
|
1848
|
-
result:
|
|
1849
|
-
$ref: '#/components/schemas/DomainClassificationResponse'
|
|
1850
|
-
description: The result (present when status is completed).
|
|
1851
|
-
SupermodelIRAsync:
|
|
1852
|
-
allOf:
|
|
1853
|
-
- $ref: '#/components/schemas/JobStatus'
|
|
1854
|
-
- type: object
|
|
1855
|
-
description: Async response envelope for Supermodel IR operations.
|
|
1856
|
-
properties:
|
|
1857
|
-
result:
|
|
1858
|
-
$ref: '#/components/schemas/SupermodelIR'
|
|
1859
|
-
description: The result (present when status is completed).
|
|
3357
|
+
description: Total number of cycles found.
|
|
3358
|
+
filesInCycles:
|
|
3359
|
+
type: integer
|
|
3360
|
+
format: int32
|
|
3361
|
+
description: Number of unique files involved in at least one cycle.
|
|
3362
|
+
highSeverityCount:
|
|
3363
|
+
type: integer
|
|
3364
|
+
format: int32
|
|
3365
|
+
description: Number of high-severity cycles.
|
|
3366
|
+
mediumSeverityCount:
|
|
3367
|
+
type: integer
|
|
3368
|
+
format: int32
|
|
3369
|
+
description: Number of medium-severity cycles.
|
|
3370
|
+
lowSeverityCount:
|
|
3371
|
+
type: integer
|
|
3372
|
+
format: int32
|
|
3373
|
+
description: Number of low-severity cycles.
|
|
1860
3374
|
Error:
|
|
1861
3375
|
type: object
|
|
1862
3376
|
description: Standardized error payload returned by the API.
|