Skip to content

Commit 23a7d56

Browse files
committed
docs: update guides for Lua/Luau parser, include_paths, and panic recovery
1 parent b047a84 commit 23a7d56

5 files changed

Lines changed: 57 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Inspired by [code-review-graph](https://github.com/tirth8205/code-review-graph)
66

77
## Features
88

9-
- **12 languages**: Go, Python, TypeScript, Java, Ruby, JavaScript, C, C++, Rust, Kotlin, PHP, Lua
9+
- **12 languages**: Go, Python, TypeScript, Java, Ruby, JavaScript, C, C++, Rust, Kotlin, PHP, Lua/Luau
1010
- **29 MCP tools**: parse, search, impact analysis, flow tracing, dead code detection, file workspace management, and more
1111
- **Custom annotations**: `@intent`, `@domainRule`, `@sideEffect`, `@mutates`, `@index` — search code by business context ([details](guide/annotations.md))
12-
- **Webhook sync**: GitHub / Gitea push events → auto clone + build with per-repo branch filtering ([details](guide/webhook.md))
12+
- **Webhook sync**: GitHub / Gitea push events → auto clone + build with per-repo branch filtering and `.ccg.yaml` `include_paths` auto-loading ([details](guide/webhook.md))
1313
- **Multi-DB**: SQLite (local), PostgreSQL
1414
- **Full-text search**: FTS5 (SQLite), tsvector+GIN (PostgreSQL)
1515

guide/architecture.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Source Code → Tree-sitter Parser → Nodes + Edges + Annotations
2525

2626
Tree-sitter 기반 코드 파서. 12개 언어를 지원하며 각 언어별 `LangSpec`으로 함수, 클래스, 타입, 임포트, 호출 관계를 추출합니다.
2727

28-
**지원 언어**: Go, Python, TypeScript, Java, Ruby, JavaScript, C, C++, Rust, Kotlin, PHP, Lua
28+
**지원 언어**: Go, Python, TypeScript, Java, Ruby, JavaScript, C, C++, Rust, Kotlin, PHP, Lua/Luau
29+
30+
> Lua 파서는 Luau(Roblox) 문법도 지원합니다. 타입 어노테이션은 tree-sitter 에러 복구로 무시되며, 함수(global, local, method), 주석(한줄, 블록, `--!strict`)을 모두 추출합니다.
2931
3032
### Store (`internal/store/gormstore/`)
3133

@@ -61,6 +63,15 @@ DB별 전문 검색 백엔드:
6163

6264
28개 도구를 MCP 프로토콜로 노출. stdio와 Streamable HTTP 두 가지 전송 모드 지원.
6365

66+
### Reliability
67+
68+
운영 안정성을 위해 모든 goroutine에 panic recovery가 적용되어 있습니다:
69+
70+
- **Signal handler**: panic 시 에러 로깅 후 `os.Exit(2)`
71+
- **HTTP server**: panic을 에러 채널로 전파하여 정상 종료 흐름 유지
72+
- **SyncQueue worker**: panic 로깅 후 다른 워커에 영향 없이 계속 동작
73+
- **SyncQueue shutdown**: shutdown 과정의 panic 격리
74+
6475
### Webhook (`internal/webhook/`)
6576

6677
GitHub/Gitea push 이벤트 수신 → 자동 clone/build 파이프라인.

guide/cli-reference.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,28 @@ exclude:
7979
- ".*\\.pb\\.go$"
8080
- ".*_test\\.go$"
8181

82+
include_paths:
83+
- src/
84+
- lib/
85+
8286
docs:
8387
out: docs
8488
```
8589
90+
### `include_paths`
91+
92+
빌드 대상 경로를 제한합니다. 설정 시 지정된 경로 하위만 파싱됩니다.
93+
94+
- CLI: `ccg build` 시 `.ccg.yaml`의 `include_paths` 자동 적용
95+
- Webhook: 레포 clone 후 `.ccg.yaml`의 `include_paths`를 자동 로딩하여 빌드 범위 제한
96+
- 증분 빌드(`ccg update`): 변경 파일 수집 시 `include_paths` 필터 적용
97+
98+
```yaml
99+
include_paths:
100+
- src/backend/
101+
- src/shared/
102+
```
103+
86104
### Regex Patterns
87105

88106
`exclude`와 `rules` 패턴 필드는 정규표현식을 지원합니다. `$`, `^`, `+`, `{}`, `|`, `\.`, `.*` 를 포함하는 패턴은 자동으로 regex로 감지됩니다:

guide/development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ internal/
4848
cli/ — CLI 커맨드 정의
4949
ctxns/ — Context namespace
5050
docs/ — 문서 생성
51-
mcp/ — MCP 서버 (28 tools)
51+
mcp/ — MCP 서버 (29 tools)
5252
model/ — DB 모델
53-
parse/treesitter/ — Tree-sitter 파서 (12 languages)
53+
parse/treesitter/ — Tree-sitter 파서 (12 languages, Lua/Luau 포함)
5454
pathutil/ — 경로 유틸리티
5555
ragindex/ — RAG 인덱스
5656
service/ — 비즈니스 로직

guide/webhook.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,26 @@ Push Event → HMAC Verify → RepoFilter.IsAllowedRef()
9898
- 기본 4개 워커
9999
- 서로 다른 레포는 병렬 처리
100100
- 같은 레포는 순차 처리 (dirty requeue)
101+
102+
## `.ccg.yaml` include_paths 자동 반영
103+
104+
Webhook 빌드 시 clone된 레포 내 `.ccg.yaml` 파일의 `include_paths` 설정을 자동으로 읽어 빌드 범위를 제한합니다.
105+
106+
```yaml
107+
# 레포 내 .ccg.yaml
108+
include_paths:
109+
- src/
110+
- lib/
111+
```
112+
113+
- `.ccg.yaml` 파일이 없거나 `include_paths` 키가 없으면 전체 디렉토리를 빌드합니다
114+
- CLI의 `--config` 플래그와 독립적으로 동작합니다 (viper 미사용, yaml 직접 파싱)
115+
116+
## Panic Recovery
117+
118+
모든 goroutine에 `defer recover()`가 적용되어 있어 개별 워커 panic이 전체 프로세스를 크래시시키지 않습니다:
119+
120+
- Signal handler goroutine
121+
- HTTP server goroutine
122+
- SyncQueue worker goroutine
123+
- SyncQueue shutdown goroutine

0 commit comments

Comments
 (0)