Skip to content

⚡ Bolt: GrooveMap의 maxTime 계산 성능 개선 - #859

Open
seonghobae wants to merge 17 commits into
developfrom
bolt-optimize-reduce-13473486884347986122
Open

⚡ Bolt: GrooveMap의 maxTime 계산 성능 개선#859
seonghobae wants to merge 17 commits into
developfrom
bolt-optimize-reduce-13473486884347986122

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Performance slice

Replace the GrooveMap transcription timeline maximum Array.prototype.reduce() with a single for...of scan, avoiding per-element reducer callback dispatch while preserving the predecessor Math.max semantics and the existing ten-second timeline floor.

Exact current scope

Exact head: 38e1027d3a9613da5ea912020fa3f08ef0814e69.
Protected base: develop@acdbea6344fe1231c39535b575f4de35e4c607c9.

Exactly three files differ from protected develop:

  • apps/desktop/src/features/workspace/GrooveMap.tsx;
  • apps/desktop/src/features/workspace/GrooveMap.test.tsx;
  • CHANGELOG.md.

No dependency, lockfile, workflow, database, network, filesystem, model, IPC, or application-permission authority is added.

Regression and semantic-preservation contract

The direct component regressions pin the buyer-visible layout contract:

  • when a note extends beyond ten seconds, the latest finite offset defines the timeline denominator and note left/width percentages remain stable;
  • when every note ends before ten seconds, the historical ten-second timeline floor remains authoritative;
  • while the shared TranscriptionNote boundary still accepts JavaScript non-finite numbers, the optimization preserves the protected predecessor's Math.max propagation semantics instead of silently changing them.

Exact-current-code rotation found branch drift at ace274430186b36dc5f47c517973b36555999efa: the focused regression file and Unreleased changelog entry had disappeared, and the source had changed to if (n.offset > max), which ignores NaN instead of preserving the protected predecessor reducer's Math.max behavior. Current head restores the focused regressions and changelog entry and uses max = Math.max(max, n.offset) inside the allocation-free loop. This does not broaden a performance PR into shared-schema policy.

Exact-current-head repository verification

All evidence in this section binds only to 38e1027d3a9613da5ea912020fa3f08ef0814e69.

Terminal-success exact-head workflows: ci run 31927023088, release run 31927023094, build-baseline run 31927023084, sbom run 31927023085, SAST Semgrep run 31927023110, bandit run 31927023103, and secret-scan-gate run 31927023106. Exact ci completed both ci / build-and-test and gate / ci / rust-check successfully; the native Rust numeric extension was built before repository quickcheck. The previously non-terminal cross-platform build-baseline has now completed successfully and is counted only on this exact head.

The two exact-head failed security workflows were inspected before the source repair and remain inherited protected-base evidence:

  • security-audit run 31927023100, job 95116082134, completed install/setup then failed at the npm audit stage. Python/Rust audit stages were skipped only because npm exited first, and those skipped stages are not success.
  • aggregate Security Scan run 31927023082 failed in trivy-fs job 95116088019 at the finding gate after scanning/SARIF handling. Its dependency review, Scorecard, and OSV base-vs-head / PR-introduced comparison completed successfully.

This PR has no dependency/root-lock delta. Those whole-tree findings remain inherited protected-base blockers owned by canonical #783 and are neither suppressed nor represented as branch success.

Review state

The latest OpenCode review is bound to this exact head and is CHANGES_REQUESTED only because the central coverage-evidence prerequisite did not run/publish passing evidence in workflow run 31928125994; it does not identify a current product-code finding. Because a same-head review has already been acknowledged, reviewer agents are not redispatched while the central prerequisite remains unresolved. There are no actionable current inline review threads and no qualifying independent non-author approval for this exact head.

Python branch coverage is not yet protected-baseline behavior; #861 remains the branch-measurement dependency. Statement-only Python evidence is not substituted for the requested owned statement+branch gate.

Dependency order and merge gate

Central ContextualWisdomLab/.github#1008 must first reach protected central main; canonical dependency-security baseline #783 must then reach protected develop; #861 must establish the requested Python branch-measurement baseline; this branch must be refreshed against the then-current protected develop and revalidated.

Keep unmerged until every required exact-current-head repository/central test, statement+branch coverage, docstring, SAST, security, SBOM/supply-chain and review gate is terminal-success; zero actionable current-head threads remain; a qualifying independent non-author exact-head approval satisfies the last-push rule; and branch protection permits merge without bypass.

Queued, in-progress, skipped-required, failed inherited-base or central-infrastructure evidence, predecessor-head evidence, author/self approval, protected-base evidence, or administrative bypass is not success.

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 15, 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 71bd4566-0357-4c53-ab2a-74d234f265c6

📥 Commits

Reviewing files that changed from the base of the PR and between 715c4da and d311e01.

📒 Files selected for processing (1)
  • CHANGELOG.md

📝 Walkthrough

Walkthrough

GrooveMapmaxTime 계산을 명시적 반복문으로 변경했습니다. 초기값 10을 유지하고 더 큰 offset을 반영합니다. 타임라인 스타일 테스트와 변경 로그를 추가했습니다.

Changes

GrooveMap 시간 계산

Layer / File(s) Summary
maxTime 계산 및 검증
apps/desktop/src/features/workspace/GrooveMap.tsx, apps/desktop/src/features/workspace/GrooveMap.test.tsx, CHANGELOG.md
maxTime 계산을 반복문과 조건부 갱신 방식으로 변경했습니다. 10초 타임라인 하한, 노트 위치, 노트 너비 스타일을 테스트합니다. 변경 로그에 계산 변경을 기록했습니다.

Estimated code review effort: 2 (간단) | ~10분

Merge Risk: ⚪ Minimal · up to d311e

This localized performance change preserves the existing timeline behavior and adds regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 제목은 GrooveMap의 maxTime 계산 성능 개선이라는 주요 변경 사항을 명확하고 간결하게 설명합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt-optimize-reduce-13473486884347986122

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.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head d311e01cc9f6fc41ee7ce6be5281c5efe5bd660f.

  • Head SHA: d311e01cc9f6fc41ee7ce6be5281c5efe5bd660f

  • Workflow run: 31906308332

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 38e1027d3a9613da5ea912020fa3f08ef0814e69
  • Workflow run: 31928125994
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 38e1027d3a9613da5ea912020fa3f08ef0814e69.

  • Head SHA: 38e1027d3a9613da5ea912020fa3f08ef0814e69

  • Workflow run: 31928125994

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

Copy link
Copy Markdown
Collaborator Author

Exact-current-head evidence refresh for 97518052bd435ade7b4b3630d400e94fa6431629 after the semantic-preservation fix:

  • repository ci run 31926216329 is terminal-success. ci / build-and-test built and installed the Rust numeric extension, ran the full quickcheck, executed all 23/23 test_numeric_parity.py cases (not skipped), and finished with 682 passed / 1 skipped Python tests and 3021/3021 statements = 100% statement coverage. Desktop completed 196/196 tests at 100% statements/branches/functions/lines; shared-types completed 20/20 at the same 100% metrics. Python branch coverage is still not measured on this protected-base lineage, so this result is not represented as the required Python branch-coverage proof; test(quality): enforce Python branch coverage #861 remains the branch-coverage prerequisite.
  • release 31926216300, sbom 31926216302, Semgrep 31926216276, Bandit 31926216271, and secret-scan 31926216309 are terminal-success. Exact release-preflight also passed docs, Security Notes, supply-chain/bootstrap checks, D100-D107 docstrings, Ruff check/format, mypy, Bandit with zero findings/zero #nosec skips, frontend build, desktop/shared-type tests, and 100% JS statement/branch coverage.
  • security-audit 31926216242 and aggregate Security Scan 31926216303 were inspected at exact-current-head job/log level before classification. npm audit is failing only on protected-base nanoid <3.3.18, pdfjs-dist >=5.6.83 <6.2.108, and undici 7.0.0-7.28.0; its Python/Rust audit stages are skipped because npm exits first and therefore are not counted as success. Aggregate dependency review, Scorecard, and OSV base-vs-head are successful; the sole failed Trivy job reports protected-base pdfjs-dist CVE-2026-16633 at package-lock.json:6370. This PR has no dependency/root-lock delta, so those failures remain canonical fix(security): establish canonical npm, PDF.js, Nanoid, and Undici baseline #783 ownership and are not suppressed or counted as branch success.
  • build-baseline 31926216297 remains in progress and is not counted as success.
  • Formal review history still contains only the predecessor-head OpenCode CHANGES_REQUESTED tied to d311e01cc9f6fc41ee7ce6be5281c5efe5bd660f; it is not current-head evidence. There is no qualifying independent non-author approval for the current head.

No merge/auto-merge is valid until the exact-current build-baseline completes successfully, #861 establishes required Python branch coverage on the protected lineage, #783 and .github#1008 land through protection, and a qualifying independent exact-head approval exists.

@google-labs-jules

Copy link
Copy Markdown

Exact-current-head evidence refresh for 97518052bd435ade7b4b3630d400e94fa6431629 after the semantic-preservation fix:

  • repository ci run 31926216329 is terminal-success. ci / build-and-test built and installed the Rust numeric extension, ran the full quickcheck, executed all 23/23 test_numeric_parity.py cases (not skipped), and finished with 682 passed / 1 skipped Python tests and 3021/3021 statements = 100% statement coverage. Desktop completed 196/196 tests at 100% statements/branches/functions/lines; shared-types completed 20/20 at the same 100% metrics. Python branch coverage is still not measured on this protected-base lineage, so this result is not represented as the required Python branch-coverage proof; test(quality): enforce Python branch coverage #861 remains the branch-coverage prerequisite.
  • release 31926216300, sbom 31926216302, Semgrep 31926216276, Bandit 31926216271, and secret-scan 31926216309 are terminal-success. Exact release-preflight also passed docs, Security Notes, supply-chain/bootstrap checks, D100-D107 docstrings, Ruff check/format, mypy, Bandit with zero findings/zero #nosec skips, frontend build, desktop/shared-type tests, and 100% JS statement/branch coverage.
  • security-audit 31926216242 and aggregate Security Scan 31926216303 were inspected at exact-current-head job/log level before classification. npm audit is failing only on protected-base nanoid <3.3.18, pdfjs-dist >=5.6.83 <6.2.108, and undici 7.0.0-7.28.0; its Python/Rust audit stages are skipped because npm exits first and therefore are not counted as success. Aggregate dependency review, Scorecard, and OSV base-vs-head are successful; the sole failed Trivy job reports protected-base pdfjs-dist CVE-2026-16633 at package-lock.json:6370. This PR has no dependency/root-lock delta, so those failures remain canonical fix(security): establish canonical npm, PDF.js, Nanoid, and Undici baseline #783 ownership and are not suppressed or counted as branch success.
  • build-baseline 31926216297 remains in progress and is not counted as success.
  • Formal review history still contains only the predecessor-head OpenCode CHANGES_REQUESTED tied to d311e01cc9f6fc41ee7ce6be5281c5efe5bd660f; it is not current-head evidence. There is no qualifying independent non-author approval for the current head.

No merge/auto-merge is valid until the exact-current build-baseline completes successfully, #861 establishes required Python branch coverage on the protected lineage, #783 and .github#1008 land through protection, and a qualifying independent exact-head approval exists.

Acknowledged.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head ace274430186b36dc5f47c517973b36555999efa.

  • Head SHA: ace274430186b36dc5f47c517973b36555999efa

  • Workflow run: 31926885594

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: GrooveMap.tsx"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: GrooveMap.tsx"]
  R1 --> V1["required checks"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 38e1027d3a9613da5ea912020fa3f08ef0814e69.

  • Head SHA: 38e1027d3a9613da5ea912020fa3f08ef0814e69

  • Workflow run: 31928125994

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

@seonghobae
seonghobae enabled auto-merge (squash) August 18, 2026 14:02
@opencode-agent
opencode-agent Bot disabled auto-merge August 18, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant