Skip to content

Commit fe3446b

Browse files
committed
Fix PR review comment links and metadata
1 parent ddf5123 commit fe3446b

8 files changed

Lines changed: 225 additions & 92 deletions

README.ko.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ opensession cleanup run --apply
242242
- artifact branch TTL: 30일
243243
- GitHub/GitLab 설정 시 PR/MR 갱신마다 session artifact branch를 갱신하고 리뷰 코멘트를 남기는 session-review 자동화 템플릿도 함께 생성됩니다.
244244
- 기본값은 ephemeral PR/MR artifact branch이며 리뷰가 닫히면 삭제됩니다. `--session-archive-branch <branch>`를 설정하면 `pr/sessions` 같은 전용 archive branch에 immutable snapshot을 계속 보관합니다.
245-
- session-review 코멘트에는 `Reviewer Quick Digest` 블록이 포함되며, Q&A 발췌(질문/응답), 수정 파일, 추가/수정 테스트가 함께 표시됩니다.
245+
- session-review 코멘트에는 `Reviewer Quick Digest` 블록이 포함되며, 모바일 친화적인 Q&A 줄글 요약, 수정 파일, 추가/수정 테스트가 함께 표시됩니다.
246246

247247
민감한 저장소는 즉시 정리 모드를 권장합니다.
248248

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Defaults:
243243
- artifact branch TTL: 30 days
244244
- GitHub/GitLab setup also writes PR/MR session-review automation that updates a session artifact branch and posts a review comment on PR/MR updates.
245245
- By default PR/MR artifact branches are ephemeral and are deleted when the review closes; set `--session-archive-branch <branch>` to keep immutable review snapshots on a dedicated archive branch such as `pr/sessions`.
246-
- Session review comments now include a `Reviewer Quick Digest` block with Q&A excerpts (question/answer rows), modified files, and added/updated tests.
246+
- Session review comments now include a `Reviewer Quick Digest` block with mobile-friendly Q&A prose, modified files, and added/updated tests.
247247

248248
Sensitive repositories can force immediate cleanup:
249249

docs.ko.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ opensession cleanup init --provider auto --session-archive-branch pr/sessions --
216216
- GitHub: `.github/workflows/opensession-cleanup.yml``.github/workflows/opensession-session-review.yml`을 생성합니다. 기본값은 ephemeral `opensession/pr-<number>-sessions` 브랜치를 PR 동안만 유지하고 PR close 시 삭제합니다. `--session-archive-branch <branch>`를 설정하면 `pr/sessions` 같은 전용 archive branch에 immutable snapshot을 저장합니다.
217217
- GitLab: `.gitlab/opensession-cleanup.yml``.gitlab/opensession-session-review.yml`을 생성합니다. `.gitlab-ci.yml`은 OpenSession 관리 마커 블록이 있을 때만(또는 새 파일일 때만) 갱신합니다. MR 파이프라인은 `opensession/mr-<iid>-sessions`를 게시/갱신하거나, `--session-archive-branch`가 설정된 경우 해당 archive branch를 사용합니다.
218218
- Generic git: cron/system scheduler 연동용 `.opensession/cleanup/cron.example`를 생성합니다.
219-
- session-review 코멘트에는 `Reviewer Quick Digest`가 포함되며, Q&A 발췌(`Question | Answer` 행), 수정 파일 요약, 추가/수정 테스트가 함께 표시됩니다.
219+
- session-review 코멘트에는 `Reviewer Quick Digest`가 포함되며, 모바일 친화적인 Q&A 줄글 요약, 수정 파일 요약, 추가/수정 테스트가 함께 표시됩니다.
220220

221221
## 개발 및 검증
222222

@@ -346,7 +346,7 @@ opensession view main..feature/my-branch
346346

347347
로컬 `view` 대상은 등록된 git credential이 필요하지 않습니다.
348348
로컬 git object / 로컬 source byte를 사용해 local review bundle을 만들기 때문입니다.
349-
commit-linked local review page는 Q&A 내용 발췌, 수정 파일, 추가/수정 테스트를 포함하는 `Reviewer Quick Digest` 패널을 노출합니다.
349+
commit-linked local review page는 모바일 친화적인 Q&A 내용 발췌, 수정 파일, 추가/수정 테스트를 포함하는 `Reviewer Quick Digest` 패널을 노출합니다.
350350

351351
## Handoff
352352

docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Provider matrix:
215215
- GitHub: `.github/workflows/opensession-cleanup.yml` plus `.github/workflows/opensession-session-review.yml` are generated. By default PR updates publish ephemeral `opensession/pr-<number>-sessions` branches and delete them when the PR closes; set `--session-archive-branch <branch>` to keep immutable review snapshots on a dedicated archive branch such as `pr/sessions`.
216216
- GitLab: `.gitlab/opensession-cleanup.yml` plus `.gitlab/opensession-session-review.yml` are generated; `.gitlab-ci.yml` is updated only when an OpenSession managed marker block exists (or file is newly created). MR pipelines publish/refresh `opensession/mr-<iid>-sessions` and post an MR note, or use the configured archive branch when `--session-archive-branch` is set.
217217
- Generic git: `.opensession/cleanup/cron.example` is generated for cron/system scheduler wiring.
218-
- Session-review comments include `Reviewer Quick Digest` with Q&A excerpts (`Question | Answer` rows), modified file summary, and added/updated tests.
218+
- Session-review comments include `Reviewer Quick Digest` with mobile-friendly Q&A prose, modified file summary, and added/updated tests.
219219

220220
## Development & Validation
221221

@@ -344,7 +344,7 @@ Default mode is web. Use `--no-open` to print URL only.
344344

345345
Local `view` targets do not require registered git credentials.
346346
They use local git objects / local source bytes and generate a local review bundle.
347-
Commit-linked local review pages expose a `Reviewer Quick Digest` panel that renders Q&A content excerpts (not just counts), modified files, and added/updated tests.
347+
Commit-linked local review pages expose a `Reviewer Quick Digest` panel that renders mobile-friendly Q&A content excerpts (not just counts), modified files, and added/updated tests.
348348

349349
## Handoff
350350

docs/development-validation-flow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Desktop dry-run reliability workflow:
153153
Reviewer block highlights:
154154

155155
- `Reviewer Quick Digest`
156-
- Q&A excerpts rendered as `Question | Answer` table rows (content, not counts)
156+
- Q&A excerpts rendered as mobile-friendly Markdown prose with session/commit context (content, not counts)
157157
- modified file summary
158158
- added/updated test file summary
159-
- direct local review deep-link (`/review/local/:id`) and commit/session trail
159+
- local replay command (`opensession review <github-pr-url>`), review ID, and commit/session trail

scripts/check-session-review-workflow.mjs

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,23 @@ function main() {
4343
if (!reportScript.includes("'<!-- opensession-session-review-final -->'")) {
4444
fail('Final marker is missing in scripts/pr_session_report.mjs.');
4545
}
46-
if (!reportScript.includes('| Metric | Value |')) {
47-
fail('Report must include an overview metric table.');
46+
if (reportScript.includes('| Metric | Value |')) {
47+
fail('Report must not use markdown tables for overview metrics.');
4848
}
4949
if (!reportScript.includes('Files changed](') || !reportScript.includes('Commits](')) {
5050
fail('Report must include PR quick links to files/commits.');
5151
}
52-
if (!reportScript.includes('Open in UI') || !reportScript.includes('ops review')) {
53-
fail('Report must include local review deep-link.');
52+
if (reportScript.includes('127.0.0.1:8788/review/local/')) {
53+
fail('Report must not embed localhost review links in PR comments.');
5454
}
55-
if (!reportScript.includes('Artifact branch |')) {
56-
fail('Report must include artifact branch summary link.');
55+
if (!reportScript.includes('**Local replay:**') || !reportScript.includes('localReviewCommand(')) {
56+
fail('Report must include a local replay command instead of localhost links.');
5757
}
58-
if (!reportScript.includes('| Session ID | Tool | Files | Commits | Open | OpenSession | JSONL | Meta | Title |')) {
59-
fail('Report must include session metadata columns for per-session navigation.');
58+
if (!reportScript.includes('**Artifact storage:**')) {
59+
fail('Report must include artifact storage metadata.');
60+
}
61+
if (reportScript.includes('| Session ID | Tool | Files | Commits | Open | OpenSession | JSONL | Meta | Title |')) {
62+
fail('Report must not use markdown tables for per-session navigation.');
6063
}
6164
if (!reportScript.includes('opensessionSourceLink(')) {
6265
fail('Report must build opensession.io source links for web review.');
@@ -85,14 +88,20 @@ function main() {
8588
if (!reportScript.includes('#### Reviewer Quick Digest')) {
8689
fail('Report must include Reviewer Quick Digest block for high-signal review context.');
8790
}
88-
if (!reportScript.includes('| Q&A | Areas | Files | Tests | Sessions / Commit |')) {
89-
fail('Report must summarize review KPIs in a digest table.');
91+
if (!reportScript.includes('**Comment type:**') || !reportScript.includes('**Review ID:**')) {
92+
fail('Report must include review metadata for comment type and review id.');
93+
}
94+
if (!reportScript.includes('**Coverage:**')) {
95+
fail('Report must summarize review KPIs in digest prose.');
96+
}
97+
if (!reportScript.includes('**Top areas:**')) {
98+
fail('Report must summarize changed areas in the quick digest.');
9099
}
91-
if (!reportScript.includes('#### Area Summary')) {
92-
fail('Report must summarize changed areas.');
100+
if (reportScript.includes('| Session | Commit | Question | Answer |')) {
101+
fail('Report must not use markdown tables for Q&A digest rows.');
93102
}
94-
if (!reportScript.includes('| Session | Commit | Question | Answer |')) {
95-
fail('Report must render Q&A digest with session and commit context.');
103+
if (!reportScript.includes('**Question:**') || !reportScript.includes('**Answer:**')) {
104+
fail('Report must render Q&A digest as prose with session and commit context.');
96105
}
97106
if (!reportScript.includes('primary only (auxiliary filtered)')) {
98107
fail('Report must describe primary-session filtering.');
@@ -106,7 +115,7 @@ function main() {
106115
if (!reportScript.includes('collectAreaSummary')) {
107116
fail('Report script must derive area summary rows from changed files.');
108117
}
109-
if (!reportScript.includes('Updated at (UTC)')) {
118+
if (!reportScript.includes('**Updated at (UTC):**')) {
110119
fail('Report must include update timestamp for per-run freshness.');
111120
}
112121

0 commit comments

Comments
 (0)