Skip to content

Commit 54e0bbf

Browse files
committed
devlog: add 260723 overnight PR review unit (docs-only Phase 0)
Research and analysis for 10 open PRs. Decision: merge 8, close 1 (#293 wrong branch), keep open with review comments 1 (#249 per audit).
1 parent 2e9442a commit 54e0bbf

12 files changed

Lines changed: 307 additions & 0 deletions
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 260723 Overnight PR Review & Triage
2+
3+
## Objective
4+
5+
Review all 10 open PRs as of 2026-07-23 morning KST, classify each as
6+
merge / comment-and-request-changes / close / rebuild-on-dev, then execute.
7+
8+
## PR Inventory & Decision Summary
9+
10+
| PR | Title | Author | Base | CI | Decision | Rationale |
11+
|----|-------|--------|------|----|---------:|-----------|
12+
| #302 | feat(kiro): harden completion and transport | mushikingh | dev | partial | **MERGE** | Large but well-structured: adds incomplete event, provider continuation, phase-aware messages. 8 commits, tests. |
13+
| #301 | ci: PR auto-labeler + auto release notes | Wibias | dev | all pass | **MERGE** | Clean CI workflow. Pinned action refs. Replaces manual git-log release notes with --generate-notes. |
14+
| #299 | ci: issue translator workflow | Wibias | dev | partial | **MERGE** | Uses actions/ai-inference for issue translation. Pinned refs. CodeRabbit fixes applied. |
15+
| #298 | ci: issue deduplicator workflow | Wibias | dev | partial | **MERGE** | Semantic duplicate detection via GitHub Models. Pinned refs. CodeRabbit fixes applied. |
16+
| #296 | Add Cursor Router optimization levels | jontonsoup | dev | pass | **MERGE** | Exposes cursor/auto-cost, cursor/auto-balance, cursor/auto-intelligence. Well-tested, docs updated. |
17+
| #293 | [WRONG BRANCH] ChatGPT non-stream buffer | PyEL666 | main | FAIL | **CLOSE** | Targets main instead of dev. Good ideas but needs retarget. |
18+
| #286 | fix(server): return 400 for non-streaming | lg320531124 | dev | all pass | **MERGE** | One-line fix: 500 to 400. Correct HTTP semantics. |
19+
| #283 | fix(v2): fail fast on encrypted agent tasks | MathiasHeinke | dev (draft) | all pass | **MERGE** | Detects Fernet-encrypted tasks routed to non-ChatGPT providers, returns 400 early. Well-tested. |
20+
| #255 | Fix provider JSON editor save flow | rrmlima | dev (draft) | partial | **MERGE** | Fixes credential round-trip loss in GUI JSON editor. Important UX fix. |
21+
| #249 | feat: Cloudflare Tunnel public API | Aiweline | dev | FAIL (narrow) | **KEEP OPEN + REQUEST CHANGES** | CI failures are narrow (fixture email + i18n keys). Keep open for security/ops review per audit. |
22+
23+
## Merge Order (Phase 1)
24+
25+
1. Batch 1 (low risk, CI green): #286, #301
26+
2. Batch 2 (well-scoped features): #296, #298, #299
27+
3. Batch 3 (undraft + merge): #283, #255
28+
4. Batch 4 (largest, last): #302
29+
5. Close: #293 (wrong branch), #249 (CI broken)
30+
6. Typecheck + test after each batch
31+
32+
## Phase 2: Rebuild-on-dev (if needed)
33+
34+
- #293 SSE buffering / mimo retry ideas: evaluate cherry-pick crediting PyEL666
35+
- #249 Cloudflare tunnel concept: defer to future work
36+
37+
## Security Notes
38+
39+
- #301 modifies release.yml: removes manual notes, adds --generate-notes. Net simplification. OK.
40+
- #299, #298: new workflows, issues:write + models:read only. No extra secrets. OK.
41+
- #283: security improvement (early-exit guard for encrypted tasks).
42+
- #255: improves credential safety (preserves masked fields on save). OK.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 010 — PR #286: fix(server): return 400 instead of 500 for non-streaming
2+
3+
- **Author:** lg320531124
4+
- **Branch:** fix/non-streaming-400-status → dev
5+
- **CI:** All pass (ubuntu, windows, macos, npm-global x3)
6+
- **Decision:** MERGE
7+
- **Risk:** Minimal (one-line change)
8+
9+
## Change
10+
11+
`src/server/responses.ts` line ~1637: `formatErrorResponse(500, "internal_error", ...)` → `formatErrorResponse(400, "invalid_request_error", ...)`.
12+
13+
Non-streaming on adapters without `parseResponse` is a client config error, not an internal server error.
14+
15+
## Review
16+
17+
- Correct HTTP semantics: 400 > 500 for invalid client request.
18+
- No functional regression risk.
19+
- No tests needed beyond existing coverage.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# 020 — PR #301: ci: PR auto-labeler + auto release notes
2+
3+
- **Author:** Wibias
4+
- **Branch:** feat/auto-release-notes → dev
5+
- **CI:** All pass (7/7 checks)
6+
- **Decision:** MERGE
7+
- **Risk:** Low (CI-only, no runtime changes)
8+
9+
## Changes
10+
11+
1. `.github/workflows/pr-labeler.yml` — new workflow. Labels PRs from conventional-commit title prefix (feat→enhancement, fix→bug, etc). Uses `actions/github-script@60a0d83` (pinned).
12+
2. `.github/release.yml` — new config. Maps labels to release note sections.
13+
3. `.github/workflows/release.yml` — removes manual git-log notes generation, uses `--generate-notes`.
14+
15+
## Security Review
16+
17+
- Permissions: `contents:read`, `pull-requests:write` — minimal.
18+
- Pinned action ref (SHA, not tag). Good.
19+
- Modifies release.yml: change is a net REMOVAL of shell scripting in favor of GitHub built-in `--generate-notes`. Safer.
20+
- NOTE: requires `chore` label to exist. Author left instructions in PR description.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# 030 — PR #296: Add Cursor Router optimization levels
2+
3+
- **Author:** jontonsoup (Jonathan Friedman)
4+
- **Branch:** codex/cursor-routing-levels → dev
5+
- **CI:** enforce-target pass (4x)
6+
- **Decision:** MERGE
7+
- **Risk:** Low-Medium (well-scoped adapter change, tests included)
8+
9+
## Changes
10+
11+
1. `src/adapters/cursor/discovery.ts` — adds `CURSOR_ROUTING_LEVELS` type, `CURSOR_ROUTER_MODEL_IDS`, `cursorWireModelSelection()`, `isCursorRouterModelId()`. Router models survive live discovery filter.
12+
2. `src/adapters/cursor/protobuf-request.ts` — adds `requestedModel.parameters` with `optimization` param for routing level.
13+
3. `src/adapters/cursor/request-builder.ts` — `normalizeCursorModelId` now returns `{ modelId, routingLevel? }`.
14+
4. `src/adapters/cursor/types.ts` — adds `routingLevel?: CursorRoutingLevel` to `CursorRunRequest`.
15+
5. `structure/04_transports-and-sidecars.md` — documents Router optimization levels section.
16+
6. `docs-site/` — adapters.md + configuration.md updated with model table.
17+
7. Tests: `codex-catalog.test.ts`, `cursor-adapter.test.ts`, `cursor-blob.test.ts`, `cursor-discovery.test.ts` — comprehensive coverage.
18+
19+
## Review
20+
21+
- Clean implementation. Exposes Cursor's hidden `optimization` parameter as first-class model IDs.
22+
- Backwards compatible: `cursor/auto` unchanged, new IDs are additive.
23+
- Tested: catalog lists all 4 router IDs, discovery filter keeps them, wire encoding includes parameter.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 040 — PR #298: ci: issue deduplicator workflow
2+
3+
- **Author:** Wibias
4+
- **Branch:** feat/issue-deduplicator → dev
5+
- **CI:** react-doctor pass
6+
- **Decision:** MERGE
7+
- **Risk:** Low (CI-only)
8+
9+
## Changes
10+
11+
1. `.github/workflows/issue-deduplicator.yml` — new workflow. Triggers on issue opened/labeled. Uses `actions/ai-inference@v1` with `openai/gpt-4o-mini` for semantic duplicate detection. Posts bot comment with up to 5 similar issues.
12+
2. 5 commits including CodeRabbit review fixes: dropped unused `contents:read`, added concurrency group, pre-fetch bot comment for cleanup, targeted error handling on label removal.
13+
14+
## Security Review
15+
16+
- Permissions: `issues:write`, `models:read`. No secrets beyond GITHUB_TOKEN.
17+
- Uses `actions/github-script@3a2844b` (pinned SHA).
18+
- `actions/ai-inference@v1` — not SHA-pinned (tag only). Minor concern but GitHub-owned action. Acceptable.
19+
- Prompt injection surface: issue body is fed to LLM, but output is constrained to JSON with issue numbers only.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 050 — PR #299: ci: issue translator workflow
2+
3+
- **Author:** Wibias
4+
- **Branch:** feat/issue-translator → dev
5+
- **CI:** react-doctor pass
6+
- **Decision:** MERGE
7+
- **Risk:** Low (CI-only)
8+
9+
## Changes
10+
11+
1. `.github/workflows/issue-translator.yml` — new workflow. Detects non-English issues, translates title + body to English using `actions/ai-inference` with `gpt-4o-mini`.
12+
2. Updates issue title (for searchability/dedup compatibility with #298).
13+
3. Posts marked bot comment with English translation.
14+
4. 6 commits including CodeRabbit fixes: JSON parsing hardened (try raw first, then strip fences), title clamped to 256 chars, comment pagination.
15+
16+
## Security Review
17+
18+
- Permissions: `issues:write`, `models:read`. Minimal.
19+
- Pinned `actions/ai-inference@b81b2af` and `actions/github-script@3a2844b`.
20+
- Issue content treated as untrusted text in system prompt.
21+
- Title mutation is deliberate and well-motivated (enables cross-language dedup).
22+
23+
## Note
24+
25+
- Missing newline at end of file (minor). Won't block merge.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# 060 — PR #283: fix(v2): fail fast on unreadable routed agent tasks
2+
3+
- **Author:** MathiasHeinke (Mathias)
4+
- **Branch:** codex/v2-encrypted-task-failfast → dev
5+
- **Status:** Draft → needs undraft before merge
6+
- **CI:** All pass (8/8 checks)
7+
- **Decision:** MERGE (undraft first)
8+
- **Risk:** Medium (touches responses.ts, but well-isolated guard)
9+
10+
## Changes
11+
12+
1. `src/server/responses.ts`:
13+
- `readableAgentMessagePayload()` — extracts readable text from V2 agent message content, stripping routing envelope.
14+
- `hasUnreadableEncryptedAgentTask()` — detects Fernet-encrypted agent tasks with no readable payload.
15+
- Guard in `handleResponses()`: returns 400 before auth/adapter/network when a non-ChatGPT route receives an undecryptable V2 task.
16+
2. `tests/v2-agent-message-failfast.test.ts` — 145 lines. Tests: Fernet-only detection, readable payload bypass, non-agent-message bypass, routed vs native provider behavior.
17+
18+
## Security Review
19+
20+
- This is a security IMPROVEMENT: prevents cost storms from retrying undecryptable tasks.
21+
- Error message reveals no ciphertext or request content.
22+
- Uses `isCanonicalOpenAiForwardProvider()` to distinguish native ChatGPT routes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 070 — PR #255: Fix provider JSON editor save flow
2+
3+
- **Author:** rrmlima
4+
- **Branch:** agent/fix-provider-json-save → dev
5+
- **Status:** Draft → needs undraft before merge
6+
- **CI:** enforce-target pass (3x)
7+
- **Decision:** MERGE (undraft first)
8+
- **Risk:** Medium (GUI + backend save flow change)
9+
10+
## Changes
11+
12+
1. `gui/src/pages/Providers.tsx`:
13+
- Replaces single `PUT /api/config` with per-provider `POST /api/providers` loop.
14+
- Deletes providers absent from draft via `DELETE /api/providers?name=...`.
15+
- Validates parsed JSON structure before saving.
16+
- Blocks port/hostname/websockets changes from JSON editor.
17+
- Handles `codexAutoStart` via `PUT /api/settings`.
18+
2. `src/server/management-api.ts`:
19+
- Preserves `apiKey`, `apiKeyPool`, `headers`, `googleMode`, `modelMaxInputTokens` when not provided in update.
20+
- Prevents credential loss from browser round-trip of masked values.
21+
22+
## Security Review
23+
24+
- This FIXES a credential safety issue: previously, saving from the GUI JSON editor could erase API keys that were masked in the browser.
25+
- The preservation list (`apiKey`, `apiKeyPool`, `headers`, etc.) covers known sensitive fields.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# 080 — PR #302: feat(kiro): harden completion and transport integration
2+
3+
- **Author:** mushikingh
4+
- **Branch:** feat/kiro-integration-hardening → dev
5+
- **CI:** enforce-target pass, missing full CI run
6+
- **Decision:** MERGE (last, highest risk)
7+
- **Risk:** High (8 commits, touches core bridge.ts, types.ts, responses.ts, state.ts, parser.ts, schema.ts)
8+
9+
## Changes (8 commits)
10+
11+
1. Provider-aware terminal state: `OcxProviderContinuationState` type.
12+
2. `OcxMessagePhase` type for phase-aware text deltas.
13+
3. `incomplete` event type in bridge SSE handling.
14+
4. `adapterFailureFromEvent()` for structured error extraction.
15+
5. `endTurn` field in response snapshots.
16+
6. `retryable` flag on error/incomplete responses.
17+
7. Non-streaming (`buildResponseJSON`) gets same phase/incomplete support.
18+
8. Tests: bridge.test.ts (+87 lines), responses-parser.test.ts (+15), responses-state.test.ts (+43).
19+
20+
## Files Modified
21+
22+
- `src/bridge.ts` — major: incomplete event, phase-aware messages, structured errors
23+
- `src/responses/parser.ts`, `schema.ts`, `state.ts` — minor extensions
24+
- `src/server/responses.ts` — non-streaming JSON builder updates
25+
- `src/types.ts` — new types (OcxMessagePhase, OcxProviderContinuationState)
26+
- Tests: 3 test files updated
27+
28+
## Review Notes
29+
30+
- Well-structured incremental commits.
31+
- Backwards compatible: new fields are optional, `incomplete` is additive.
32+
- Merge LAST to minimize conflict surface with #283 and #286 which also touch responses.ts.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 090 — PR #293: [WRONG BRANCH] fix(responses): ChatGPT non-stream buffer
2+
3+
- **Author:** PyEL666
4+
- **Branch:** fix/chatgpt-nonstrream-buffer-and-mimo-hardening → **main** (wrong!)
5+
- **CI:** enforce-target FAIL (branch check)
6+
- **Decision:** CLOSE with comment
7+
8+
## Why Close
9+
10+
- Targets `main` instead of `dev`. Title already flags this.
11+
- enforce-target CI correctly rejects it.
12+
13+
## Salvageable Ideas
14+
15+
1. SSE buffering for stream:false clients: `bufferResponsesSseToJson()` — reconstructs response.completed output from streamed events.
16+
2. Mimo-free retry hardening: 5xx retry loop, 441 abuse block rotation.
17+
3. Reasoning effort clamping for mimo-free.
18+
4. Force stream:true on ChatGPT wire requests.
19+
20+
## Rebuild-on-dev Assessment
21+
22+
- The SSE buffering logic (150 lines) is substantial and addresses a real gap.
23+
- The mimo retry changes are aggressive (client-id rotation, file deletion) — needs careful review.
24+
- Recommendation: evaluate rebuild in Phase 2 after main merges complete.

0 commit comments

Comments
 (0)