Repository navigation
Commit 5286740
committed
fix: fingerprint the built daemon's real import graph (#1545)
The static-import regex in computeDaemonCodeSignature required whitespace
around `from` and after `import`/`export`. The built daemon entry is a
minified bundle (tsdown/rolldown `minify: true`), whose real import
statements have zero whitespace (e.g. `import{o as e}from"../foo.js"`), so
the regex never matched any dependency edge and the graph walk silently
degraded to fingerprinting only the entry file (`graph:1`) instead of its
true ~50-file runtime graph.
That defeats the safety net the signature exists for: a daemon started from
one build can look identical to a client running a materially different
build as long as the entry file's own size/mtime happen to coincide, and the
"code-signature mismatch" takeover this check drives was one of the
mechanisms observed in #1545's worktree dev-daemon multiplication.1 parent b59b4e5 commit 5286740
2 files changed
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | | - | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1776 | 1776 | | |
1777 | 1777 | | |
1778 | 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 | + | |
1779 | 1820 | | |
1780 | 1821 | | |
1781 | 1822 | | |
| |||
0 commit comments