Commit 3d1d682
discord-feedback: self-heal a stale nix dev shell instead of dying
A long-lived `nix develop` shell can go stale: its PATH still points at an
old-generation `pwnshop` wrapper whose launcher script no longer exists in the
checkout, so every `pwnshop ...` exits 127 ("No such file or directory"). The
bot trusted `IN_NIX_SHELL` and called the bare `pwnshop` unconditionally, so a
stale shell made all validation attempts 127 with no per-challenge logs --
indistinguishable from "all tests failed", which sent the fix agent chasing a
phantom breakage until the run died.
Preflight the in-shell `pwnshop` with a cheap `--help`; if it can't even launch,
fall back to `nix develop --command pwnshop` (a fresh flake eval that always
resolves the repo's current pwnshop) for the rest of the run. The decision is
cached so we probe at most once. A working in-shell pwnshop still takes the fast
bare path -- no added `nix develop` overhead in the common case.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 1b06bb4 commit 3d1d682
1 file changed
Lines changed: 49 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1729 | 1729 | | |
1730 | 1730 | | |
1731 | 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 | + | |
1732 | 1780 | | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
| 1781 | + | |
1736 | 1782 | | |
1737 | 1783 | | |
1738 | 1784 | | |
| |||
0 commit comments