Commit 738892d
committed
Fix interview.mjs CLI deadlocking on its own import cycle
`interview.mjs check` exited 13 ("unsettled top-level await") in every repo,
canon included, so the pending-adoption note could never print anywhere.
Refs #580.
The cycle closes only when this module is the entry point: its top-level
`await check(...)` holds evaluation open, check() calls loadPacks(), discovery
dynamically imports every pack's skills/<skill>/checks.mjs, and
adopt-claudinite/checks.mjs imports interviewState straight back from the module
still being evaluated. That import can never resolve, so the await never
settles. Not gated on the pack being declared — scanSkillChecks runs at
discovery, before activation is consulted.
Starting the work after evaluation completes leaves the same cycle harmless: the
re-import resolves against a finished module. Kept fail-soft, since the
orchestrator treats a failed step as a missing note rather than a crash.
The bug shipped because every existing test imports the pure helpers directly,
and the cycle only closes in the CLI. The regression tests spawn it as a child
process and assert the note reaches stdout, not merely that the exit code is
0 — a process exiting clean having printed nothing is this bug's own signature.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RVkfwBVJWV7tdk25KjNpdL1 parent e80b672 commit 738892d
2 files changed
Lines changed: 60 additions & 1 deletion
File tree
- packs-tests/grow_with_claudinite/skills/adopt-claudinite
- packs/grow_with_claudinite/skills/adopt-claudinite
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
114 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
115 | 129 | | |
116 | 130 | | |
117 | 131 | | |
| |||
0 commit comments