Skip to content

[WRONG BRANCH] release: refresh preview onto the audit-clean dev head for v2.41.0-preview.20260903 - #3347

Merged
lidge-jun merged 4 commits into
previewfrom
codex/promote-preview-2410-v3
Sep 3, 2026
Merged

[WRONG BRANCH] release: refresh preview onto the audit-clean dev head for v2.41.0-preview.20260903#3347
lidge-jun merged 4 commits into
previewfrom
codex/promote-preview-2410-v3

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Refreshes preview onto the current dev head (1f00ff52b) so the 2.41.0-preview.20260903 publish can complete. The version was already set by [WRONG BRANCH] release: v2.41.0-preview.20260903 #3341; this brings the three fixes that landed after it.
  • The first dispatch of this release (run 33738740649) failed in release.yml's dependency-audit step on four high fast-uri advisories. That is the gate doing its job, and it is what these three commits close:
Commit PR What it unblocks
2b5a38aaf #3346 fast-uri → ^3.1.7 and qs → ^6.16.0; audit:high clean, which is the step that failed
1f00ff52b #3345 the ReDoS guard measured best-of-5 instead of one sample, after a 53.77ms reading failed a 50ms budget on a loaded macOS runner
b15cbb2c3 #3343 the carry-attribution gate now strips an unclosed HTML comment the way GitHub renders one, closing the CodeQL high alert raised on #3342

Merges cleanly; no conflict this time, since #3341 already resolved the version.

Verification

  • bun run audit:highNo vulnerabilities found at both levels (143 packages root, 81 GUI). Same command the release workflow failed on.
  • The preview head before this refresh (d7de528cd) already carried push-event Cross-platform CI and Service lifecycle to success; this PR's head has to clear them again before the next dispatch, which is the gate release.yml:222 requires.

Screenshot

Carries the Meta provider mark from #3338:

Meta provider mark, before and after, dark and light

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of unterminated HTML comments so carry language following them is ignored correctly.
    • Preserved detection of carry language following properly closed comments.
  • Tests

    • Added coverage for comment-handling edge cases.
    • Improved reliability of regular-expression performance tests by reducing measurement noise and simplifying repeated-input testing.
  • Chores

    • Updated dependency version overrides for improved compatibility and security.

lidge-jun and others added 4 commits September 3, 2026 18:32
The carry-attribution scanner stripped HTML comments with a pattern that
required the closing delimiter. An unterminated `<!--` therefore matched
nothing and the entire tail stayed in the scanned text, while GitHub renders
none of it.

That is a divergence between what the gate enforces and what a reader sees, and
it runs both ways: a carry claim the gate reads but nobody can see, or one the
gate misses because an author closed the comment somewhere the scanner did not
expect. pr-quality.cjs already got this right - its comment pattern carries the
`(?:-->|$)` alternative for exactly this reason - so this is the two files
agreeing rather than a new rule.

CodeQL raised it as js/incomplete-multi-character-sanitization (high) on the
v2.41.0 promotion. Its own framing does not apply: this output is fed to a
regex, never to a renderer, so there is no HTML element injection here. The
underlying observation is still correct for what the strip is actually for.

Two regression tests, one per direction: carry language after an unclosed
comment is ignored, and carry language after a properly closed one is still
read - the guard must not swallow the body wholesale.

Verification: node --test .github/scripts/*.test.cjs 543 pass 0 fail;
bun test tests/ci-workflows.test.ts 135 pass 0 fail.

Co-authored-by: jun <jun@lidge.dev>
…VEs (#3313) (#3346)

fast-uri 3.1.5 carries four high-severity advisories, all reachable through
@modelcontextprotocol/sdk > ajv > fast-uri: host confusion via skipped IDN
canonicalization, SSRF via malformed IPv6 normalization, SSRF via repeated
hostname percent-decoding, and host confusion via percent-encoded scheme
normalization. qs 6.15.3 carries two moderate ones.

This is not a latent finding. The v2.41.0-preview publish dispatched today
failed in release.yml's own dependency-audit step (run 33738740649), which is
the gate working as designed: a release cannot go out carrying four high
advisories. The fix has to land on dev before the release train can move.

Carried from #3314 by agentHits, who found it and wrote the overrides. Landed
directly because the release is blocked on it and that PR's contributor
readiness gate cannot clear from a fork.

Verification: bun run audit:high clean at both levels (143 and 81 packages);
bun test tests/repo-hygiene.test.ts passes.

Closes #3313

Co-authored-by: jun <jun@lidge.dev>
Co-authored-by: agentHits <zvercombat26rus@icloud.com>
…3345)

The guard timed a single parse against a 50ms budget. On a loaded macOS runner
that sample came back at 53.77ms and failed the v2.41.0 promotion, for a parse
whose subject regression is 522ms — three orders of magnitude away. A first call
also carries regex compilation and JIT warm-up that the parse itself does not.

A gate that fires on runner weather teaches everyone to re-run it, which is
exactly how a real ReDoS regression would get waved through.

Best-of-N is the right statistic here, and that is measured rather than assumed.
Running the semver.org prerelease pattern this module replaced, three runs each:
17.4-17.6ms at 20 repetitions, then 491-545ms at 30, 39 and 45. The blowup is on
every run with under 10% spread, because superlinear backtracking is a property
of the pattern; the 4ms of jitter that broke the single-sample form is not. If
the exponential path returns, no run is fast.

The measurements are in the test file, so the next person to touch the budget
can see what it is actually separating.

Verification: bun test tests/strict-semver.test.ts 7 pass 0 fail;
bun run typecheck exit 0.

Co-authored-by: jun <jun@lidge.dev>
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 3, 2026 09:44
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 3, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T10:03:30.274389Z 1017867 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot changed the title release: refresh preview onto the audit-clean dev head for v2.41.0-preview.20260903 [WRONG BRANCH] release: refresh preview onto the audit-clean dev head for v2.41.0-preview.20260903 Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • wrong target branch (preview); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required enforce-target check will keep failing until every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft September 3, 2026 09:44
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 27992c61-0c6c-46c2-8d8b-fca8975a1aa4

📥 Commits

Reviewing files that changed from the base of the PR and between d7de528 and 1017867.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/scripts/pr-carry-attribution.cjs
  • .github/scripts/pr-carry-attribution.test.cjs
  • package.json
  • tests/strict-semver.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates HTML comment handling, adds attribution coverage, refreshes two dependency overrides, and changes semver performance tests to use repeated best-of-five timing measurements.

Changes

HTML comment attribution parsing

Layer / File(s) Summary
HTML comment stripping and coverage
.github/scripts/pr-carry-attribution.cjs, .github/scripts/pr-carry-attribution.test.cjs
At .github/scripts/pr-carry-attribution.cjs:59-75, HTML comment stripping now consumes unterminated comments through end-of-input. Tests at .github/scripts/pr-carry-attribution.test.cjs:123-151 verify that attribution text after an unclosed comment is ignored and text after a closed comment remains detected.

Dependency override updates

Layer / File(s) Summary
Dependency override updates
package.json
package.json:77 updates the fast-uri override from ^3.1.5 to ^3.1.7. package.json:80 adds a qs override pinned to ^6.16.0.

Semver performance test stabilization

Layer / File(s) Summary
Semver timing measurements
tests/strict-semver.test.ts
tests/strict-semver.test.ts:13-49 adds fastestParseMs and documents timing noise. Lines 61-69 replace single-sample assertions with best-of-five measurements for short and long repetition inputs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 10178

This updates dependency overrides, makes semver timing checks less sensitive to measurement noise, and correctly ignores attribution text after unclosed HTML comments. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: refreshing the preview branch onto the audit-clean dev head for the specified v2.41.0 preview release. The "[WRONG BRANCH]" prefix adds noise but does not …
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 unsupported.)

Full details: Title check

Explanation

The title clearly describes the main change: refreshing the preview branch onto the audit-clean dev head for the specified v2.41.0 preview release. The "[WRONG BRANCH]" prefix adds noise but does not make the title misleading.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/promote-preview-2410-v3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1017867370

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

* this output is matched by regex, never rendered — but the underlying
* observation, that the strip is incomplete, is correct for this gate's purpose.
*/
const HTML_COMMENT_RE = /<!--[\s\S]*?(?:-->|$)/g;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Protect inline code before stripping unclosed comments

When a PR body contains a literal <!-- inside inline code before a visible carry declaration—for example, The token \<!--` starts a comment. Supersedes #2797.—this new end-of-input alternative treats the code-span content as an unclosed HTML comment and removes the declaration before referencedCarryNumbers` scans it. GitHub renders the opener literally inside the code span, so the missing-attribution gate incorrectly passes and can allow the contributor credit to be lost; protect/remove inline code before comment stripping, or use a Markdown-aware scanner, and add this case to the regression tests.

AGENTS.md reference: AGENTS.md:L266-L276

Useful? React with 👍 / 👎.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 74 / 80

이 PR은 제품 기능을 새로 넣지 않습니다. preview 브랜치를 지금 dev HEAD(1f00ff52b)로 맞춰서, 이미 버전만 올려 둔 2.41.0-preview.20260903 배포가 다시 통과하게 만드는 릴리스 열차 새로고침입니다. muse_release_train WP3(devlog/_plan/260903_muse_release_train/030_wp3_preview_release.md)가 말하는 바로 그 경로입니다. 버전 bump는 #3341에서 이미 끝났고, 그 뒤에 dev에 들어온 세 커밋만 preview에 실어 올립니다.

왜 지금이냐면, 오늘 첫 preview 배포(run 33738740649)가 release.ymldependency-audit / bun run audit:high에서 막혔기 때문입니다. 당시 preview에는 아직 fast-uri@3.1.5 계열이 남아 고위험 advisory 네 건이 걸렸습니다. 그 구멍을 막은 게 #3346(2b5a38aaf: package.json overrides에서 fast-uri^3.1.7, qs^6.16.0 + lock). 같이 실리는 #3345(1f00ff52b)는 tests/strict-semver.test.ts의 ReDoS 가드를 한 번 재는 대신 fastestParseMs best-of-N으로 바꿔, 로드된 macOS 러너에서 53ms가 50ms 예산에 걸려 승격이 깨지는 가짜 실패를 줄입니다. #3343(b15cbb2c3)는 .github/scripts/pr-carry-attribution.cjsHTML_COMMENT_RE<!--[\s\S]*?(?:-->|$) 형태로 바꿔, 닫히지 않은 HTML 주석을 GitHub이 렌더하는 방식과 같게 EOF까지 지웁니다. CodeQL이 #3342에서 올린 incomplete sanitization 경고의 실질 구멍을 닫는 쪽입니다.

현재 dev 스냅샷과 맞추면, 이 세 커밋은 이미 dev HEAD에 있습니다. 이 PR의 하는 일은 codex/promote-preview-2410-v3preview에 머지해 채널 헤드를 audit-clean 트리로 옮기는 것뿐입니다. 지금 previewpackage.json은 버전만 2.41.0-preview.20260903이고 overrides는 아직 fast-uri ^3.1.5라서, 그대로 다시 배포하면 같은 audit 문에 걸립니다. 본문 검증(bun run audit:high 루트·GUI 깨끗)과 일치합니다. types.ts/config.ts 분할과도 무관하고, 다른 열린 기능 PR을 무효화하지 않습니다.

자동 게이트가 제목에 [WRONG BRANCH]를 붙이고 draft로 묶고, enforce-target 체크를 fail로 둔 것은 예상된 마찰입니다. WP3 문서 1번 단계가 정확히 이렇게 말합니다. promotion PR은 base가 preview여야 하고, enforce-target은 그 경우를 위해 쓰인 검사가 아니니 admin bypass를 기록하고 초록을 기다리지 말라는 뜻입니다. 일반 기여 PR을 dev로 돌리라는 규칙과 충돌하는 게 아니라, 릴리스 PR만의 예외입니다. macos 등 나머지 제품 CI는 대체로 통과·진행 중이고, 막히는 핵심은 target-branch 강제뿐입니다.

.github/scripts/pr-carry-attribution.cjs HTML_COMMENT_RE - (?:-->|$) 대안이 없으면 미종료 <!--가 매칭 실패해 스캔 텍스트에 꼬리가 남는다. pr-quality.cjs와 맞춘 변경이라 게이트·렌더 불일치를 직접 줄인다. 회귀 테스트 두 개(미종료 무시 / 정상 종료 후 carry 유지)가 방향을 고정한다.
tests/strict-semver.test.ts fastestParseMs - 단일 샘플 대신 best-of-5라 러너 지터에 덜 흔들린다. 진짜 초선형 경로가 돌아오면 매 런이 느리니 최소값도 50ms를 넘긴다는 전제가 본문 측정과 맞다. 예산 자체(50ms)는 그대로라 가드 약화가 아니다.
package.json / bun.lock overrides - preview에 아직 없는 fast-uri ^3.1.7·qs ^6.16.0을 실어 audit:high 실패 원인을 제거한다. 이미 dev에 머지된 #3346과 동일 diff다.
enforce-target / [WRONG BRANCH] - 실패·제목 접두어는 WP3 promotion의 정상 신호다. base를 dev로 바꾸면 이 PR의 의미가 사라진다. retarget 하지 말 것.
base preview vs #3342 main - 이 PR은 preview 채널 새로고침이고, #3342는 stable v2.41.0 main 승격이다. 섞어 닫거나 하나로 합치지 말 것.

메인테이너의 판단이 필요한 지점

  • enforce-target fail을 admin merge로 넘길지(WP3가 권장), 아니면 릴리스 열차 동안만 이 체크를 예외 처리할지
  • draft/[WRONG BRANCH] 접두어를 수동으로 걷어낸 뒤 ready로 올릴지, 상태 그대로 admin merge할지
  • 이 새로고침 머지 후 push-event CI(ci.yml + service-lifecycle.yml)가 preview HEAD에서 초록이 된 다음에야 release.yml을 다시 돌릴지(문서 4·6단계), 아니면 이전 SHA 성공을 재사용할지(문서상 PR-event 성공은 인정 안 함)

너의 추천
base는 preview로 유지한다. retarget 하지 않는다. Cross-platform / service-lifecycle이 이 헤드의 push-event로 초록이 되면 admin으로 머지하고, git ls-remote origin preview로 40자 SHA를 확인한 뒤 release.ymlversion=2.41.0-preview.20260903 / tag=preview / expected-sha=<그 SHA>로 재디스패치한다. 코드 리뷰 이슈보다는 릴리스 절차 PR이라 우선순위는 높다. #3342(main 승격)와는 순서를 섞지 말고, preview 채널이 audit-clean으로 먼저 나가게 두는 편이 안전하다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun marked this pull request as ready for review September 3, 2026 10:01
@lidge-jun
lidge-jun merged commit 491ffcf into preview Sep 3, 2026
30 of 32 checks passed
@lidge-jun
lidge-jun deleted the codex/promote-preview-2410-v3 branch September 3, 2026 10:01
@lidge-jun lidge-jun mentioned this pull request Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant