python_eval: 읽기 불가 폴더(EACCES)에서 새 파일 스캔이 통째로 중단되던 버그 수정, 샌드박스 이미지에 tabulate 추가

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
kimandClaude Sonnet 5.5 committed 2026-10-17 12:25:45 +09:00
1 parent b4716a4513
commit dc4ec309b1
2 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ FROM python:3.12-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends fonts-nanum libgl1 libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir numpy pandas matplotlib scipy openpyxl pillow \
RUN pip install --no-cache-dir numpy pandas matplotlib scipy openpyxl pillow tabulate \
opencv-python-headless sympy scikit-learn statsmodels
ENV MPLBACKEND=Agg MPLCONFIGDIR=/tmp/mpl HOME=/tmp PYTHONDONTWRITEBYTECODE=1
WORKDIR /work
+7 -2
View File
@@ -117,7 +117,10 @@ export const pythonEvalTool = {
const beforeFiles = new Set<string>();
try {
function scanDir(dir: string, prefix: string) {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
// 읽을 수 없는 폴더(.android-emulator 등 EACCES)에서 스캔 전체가 중단되면 새 파일 감지가 통째로 사라진다
let entries: fs.Dirent[] = [];
try { entries = fs.readdirSync(dir, { withFileTypes: true }); } catch { return; }
for (const entry of entries) {
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
const full = path.join(dir, entry.name);
if (entry.isDirectory()) { scanDir(full, rel); }
@@ -203,7 +206,9 @@ export const pythonEvalTool = {
const newFiles: string[] = [];
try {
function scanDirAfter(dir: string, prefix: string) {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
let entries: fs.Dirent[] = [];
try { entries = fs.readdirSync(dir, { withFileTypes: true }); } catch { return; }
for (const entry of entries) {
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
const full = path.join(dir, entry.name);
if (entry.isDirectory()) { scanDirAfter(full, rel); }