Skip to content

Commit 386806a

Browse files
committed
fix crash after succeed run
1 parent aac81b8 commit 386806a

36 files changed

Lines changed: 17550 additions & 753 deletions

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@
1919
<a href="#quick-start"><strong>Quick Start</strong></a> •
2020
<a href="#cli-commands"><strong>CLI Commands</strong></a> •
2121
<a href="#documentation-output"><strong>Output Structure</strong></a> •
22+
<a href="./docs/index.html"><strong>Repo Docs</strong></a> •
2223
<a href="https://arxiv.org/abs/2510.24428"><strong>Paper</strong></a>
2324
</p>
2425

26+
<p align="center">
27+
📚 <strong>CodeWiki documents itself</strong> — browse the generated documentation for this repository at <a href="./docs/index.html"><code>docs/index.html</code></a> (open in a browser, or visit the hosted GitHub Pages site).
28+
</p>
29+
2530
<p align="center">
2631
<img src="./img/framework-overview.png" alt="CodeWiki Framework" width="600" style="border: 2px solid #e1e4e8; border-radius: 12px; padding: 20px;"/>
2732
</p>
@@ -317,6 +322,8 @@ Generated documentation includes both **textual descriptions** and **visual arti
317322
└── index.html # Interactive viewer (with --github-pages)
318323
```
319324

325+
> **See it in action:** This repository's own docs are checked in under [`./docs/`](./docs/) — open [`./docs/index.html`](./docs/index.html) in a browser for the interactive viewer, or start from [`./docs/overview.md`](./docs/overview.md).
326+
320327
---
321328

322329
## Experimental Results
@@ -387,6 +394,7 @@ CodeWiki employs a three-stage process for comprehensive documentation generatio
387394
## Additional Resources
388395

389396
### Documentation & Guides
397+
- **[This Repo's Generated Docs](./docs/index.html)** - Interactive documentation for CodeWiki itself, produced by CodeWiki (start at [`docs/overview.md`](./docs/overview.md))
390398
- **[MCP Server](codewiki/mcp/)** - Model Context Protocol server for IDE integrations
391399
- **[Docker Deployment](docker/DOCKER_README.md)** - Containerized deployment instructions
392400
- **[Development Guide](DEVELOPMENT.md)** - Project structure, architecture, and contributing guidelines

codewiki/src/be/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import re
3+
import sys
34
import threading
45
from pathlib import Path
56
from typing import List, Tuple
@@ -143,7 +144,11 @@ def extract_mermaid_blocks(content: str) -> List[Tuple[int, str]]:
143144
return mermaid_blocks
144145

145146

146-
_PYTHONMONKEY_BROKEN = False
147+
# PythonMonkey 1.3.1 only supports Python 3.8–3.11. On 3.12+ it still imports,
148+
# but its SpiderMonkey cleanup runs on the wrong thread during _Py_Finalize and
149+
# segfaults at interpreter shutdown (macOS crash dialog after a successful run).
150+
# Skip it proactively so SpiderMonkey is never loaded into the process.
151+
_PYTHONMONKEY_BROKEN = sys.version_info >= (3, 12)
147152

148153

149154
async def _try_pythonmonkey_parse(diagram_content: str) -> str | None:
@@ -157,7 +162,6 @@ async def _try_pythonmonkey_parse(diagram_content: str) -> str | None:
157162
if _PYTHONMONKEY_BROKEN:
158163
return None
159164

160-
import sys
161165
import os
162166

163167
try:

0 commit comments

Comments
 (0)