Repository navigation
Commit 124c5e2
committed
fix(pipeline): route registrations survive the cross-language guard
Why: in a mixed-language repo the registry resolves the bare name of a
route-registration callee (`Route::get`, `$router->get`, `app.get`)
before either resolver classifies the call, and with imports in play it
binds `get` by suffix_match to a same-named definition in another
language (a JS `get`, a Python `get`). The DeusData#725 guard rightly refuses
that binding, but it dropped the whole call, so the callee-suffix route
classification never ran. Every GET registration vanished while
POST/PUT/DELETE (nothing named `post` to collide with) survived:
krayin/laravel-crm minted 1 GET Route for its 126 `Route::get` calls:
all 126 were bound (suffix_match, 19 candidates) to `get` in a vendored
Chart.js copy under resources/assets/js and refused.
Fix: a refused binding leaves the callee unresolved, so at the DeusData#725
guard both resolvers now give a route-registration callee exactly the
Route the unresolved-callee fallback mints for it, and nothing else.
Sequential: the DeusData#952 fallback's predicate + handle_route_registration.
Parallel: emit_xlang_refused_route classifies by callee the way
emit_service_edge classifies the callee_suffix fallback and emits only
emit_route_registration. The guard, its strategies and its per-language
scope are unchanged: no CALLS edge to the refused target, no URL
argument scan, every other refused call is still dropped.
Proof (fresh index per run, macOS arm64, origin/main 1f9b4db):
- krayin/laravel-crm 03ebedd7 with the pending Laravel slashless,
handler and withRouting-prefix patches applied: GET Routes 1 -> 126,
CALLS->Route 130 -> 257, HANDLES 1 -> 4. New GET CALLS per route file
equal the `Route::get(` count in all 14 files; 0 edges removed; 0 new
edges into non-Route nodes.
- krayin on origin/main alone: GET 1 -> 2 (before the slashless patch
only the two `Route::get('/', ...)` paths are classifiable).
- Suppression intact: code CALLS unchanged (krayin 16,439; BookStack
a09aa8aa 34,292) and cross-language suffix_match CALLS stay 0.
- Side effect: PHP test-client verb calls (`$this->get('/x')`) that the
guard had hidden now get the same route classification main already
gives their unhidden siblings (BookStack +43 on 544, krayin +1). That
classification is pre-existing and separate.
Tests: edge_types_probe routes_laravel_get_survives_xlang_guard,
routes_express_get_survives_xlang_guard and their _parallel twins.
Each fixture also asserts that a bare or member `get` call bound across
languages still yields no CALLS edge and no Route. RED 3x before, green
after; reverting either resolver re-reds exactly its own two tests.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 1f9b4db commit 124c5e2
3 files changed
Lines changed: 203 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
683 | 696 | | |
684 | 697 | | |
685 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
2495 | 2524 | | |
2496 | 2525 | | |
2497 | 2526 | | |
| |||
3025 | 3054 | | |
3026 | 3055 | | |
3027 | 3056 | | |
3028 | | - | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
3029 | 3061 | | |
3030 | 3062 | | |
3031 | 3063 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1684 | 1684 | | |
1685 | 1685 | | |
1686 | 1686 | | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
1687 | 1838 | | |
1688 | 1839 | | |
1689 | 1840 | | |
| |||
1766 | 1917 | | |
1767 | 1918 | | |
1768 | 1919 | | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
1769 | 1926 | | |
0 commit comments