Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #56
Summary
본 PR은 Docker + isolate 기반 채점(Grading) 시스템을 백엔드에 도입합니다.
채점 실행 환경을 Docker → isolate → grader의 3단 구조로 분리하여,
보안·재현성·확장성을 동시에 확보하는 것을 목표로 합니다.
Module Diagram
flowchart TD A[HTTP Handler] --> B[Grader] B --> C[Isolate] C --> D[Docker Exec / Cp] %% isolate internals subgraph Isolate Module C1[init] C2[copy] C3[compile] C4[execute] C5[cleanup] end C --> C1 C --> C2 C --> C3 C --> C4 C --> C5 %% compile / execute configs B --> E[LanguageRegistry] E --> F[CompileConfig] E --> G[ExecuteConfig] %% errors D -->|DockerError| C C -->|IsolateError| B B -->|JudgeError| AArchitecture
Docker
최하위 계층으로 docker exec, cp를 래핑하는 어댑터
채점 환경 고정 및 1차 격리
isolate
중간 계층으로 docker 인터페이스를 사용하여 isolate 명령어를 수행함
untrusted code 실행을 위한 샌드박싱
프로세스 / 파일 접근 제한
추후) 시간 / 메모리 제한
grader
최상위 계층으로 isolate 인터페이스만 사용함
컴파일 → 실행 → 결과 수집 오케스트레이션
LanguageRegistry
언어별 컴파일/실행 명령어 프로필 생성
YAML 등으로 깔끔하게 하고 싶었으나 일단은
grader/config.rs내부에 하드코딩CompileConfig, ExecuteConfig를 관리합니다.
Result