Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ wrangler.jsonc Worker 설정과 공개 값(vars)
| 이벤트 | 하는 일 |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `projects_v2_item` | Week 설정이 바뀌면 경고 댓글을 달거나 지운다 |
| `pull_request` (`opened`, `reopened`, `synchronize`) | Week 검사, 풀이 패턴 태깅(`tagPatterns`), 학습 현황 댓글(`postLearningStatus`) |
| `pull_request` (`opened`, `reopened`, `synchronize`) | Week 검사, AI 풀이 분석 check run(`tagPatterns`), 학습 현황 댓글(`postLearningStatus`) |
| `issue_comment`, `pull_request_review_comment` (`created`) | `@dalestudy` 멘션에 응답한다. `approve`·`승인` 이면 PR 을 승인하고, 그 밖에는 AI 리뷰를 단다 |

Week 검사는 제목이 `WEEK NN Solutions` 형태인 풀이 PR 만 대상으로 하고, 경고 댓글은 봇이 단 것만 지운다.
Expand All @@ -69,7 +69,7 @@ GitHub webhook
```

`INTERNAL_SECRET` 과 `WORKER_URL` 이 둘 다 있어야 켜진다. 하나라도 없으면 같은 invocation 에서 차례로 실행된다.
`tests/subrequest-budget.test.js` 가 파일 5 개 시나리오의 fetch 횟수(`tagPatterns` 20, `postLearningStatus` 31)를 회귀 테스트로 고정한다.
`tests/subrequest-budget.test.js` 가 fetch 횟수(`tagPatterns` 파일 15 개에 36, `postLearningStatus` 파일 5 개에 31)를 회귀 테스트로 고정한다.

## 배포와 시크릿

Expand All @@ -91,7 +91,7 @@ GitHub secret 은 배포할 때마다 Worker secret 으로 들어가므로 `wran
https://github.com/organizations/DaleStudy/settings/apps/dalestudy

- Webhook URL: `https://github.dalestudy.com/webhooks`, Webhook secret 은 저장소 secret `WEBHOOK_SECRET` 과 같은 값. `/webhooks` 는 서명(`X-Hub-Signature-256`)이 맞지 않거나 `WEBHOOK_SECRET` 이 없으면 받지 않는다
- Repository permissions: Contents(Read), Issues(Read & write), Metadata(Read), Pull requests(Read & write), Projects(Read & write)
- Repository permissions: Checks(Read & write), Contents(Read), Issues(Read & write), Metadata(Read), Pull requests(Read & write), Projects(Read & write)
- 이벤트: Issue comments, Pull request review comments, Projects v2 item, Pull requests
- DaleStudy 조직에 설치돼 있고 leetcode-study 에 접근할 수 있어야 한다

Expand Down
4 changes: 2 additions & 2 deletions handlers/complexity-analysis.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* 시간/공간 복잡도 분석 (분석 함수 + 순수 헬퍼).
*
* 오케스트레이션과 댓글 게시는 tag-patterns 핸들러가 담당하며, 이 모듈은
* 오케스트레이션과 check run 게시는 tag-patterns 핸들러가 담당하며, 이 모듈은
* OpenAI 호출(`callComplexityAnalysis`)과 사용자 주석 처리/매칭 헬퍼,
* 한 파일분 섹션 렌더러(`renderComplexitySection`)만 제공한다.
*
Expand Down Expand Up @@ -353,7 +353,7 @@ function buildSolutionBody(solution) {

/**
* 한 파일분 복잡도 섹션을 렌더링한다.
* 패턴 태그 코멘트에 묻어가는 형태이므로 마커/푸터 없이
* check run 의 파일별 섹션에 묻어가는 형태이므로 마커/푸터 없이
* `### 📊 ...` 헤더부터 시작한다.
*
* @param {{problemName: string, solutions: Array}} entry
Expand Down
2 changes: 1 addition & 1 deletion handlers/internal-dispatch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vi.mock("../utils/github.js", () => ({
}));

vi.mock("./tag-patterns.js", () => ({
tagPatterns: vi.fn().mockResolvedValue({ tagged: true }),
tagPatterns: vi.fn().mockResolvedValue({ analyzed: 1 }),
}));

vi.mock("./learning-status.js", () => ({
Expand Down
Loading
Loading