perf(segmenter): vectorize checkerboard novelty reference - #746
perf(segmenter): vectorize checkerboard novelty reference#746seonghobae wants to merge 60 commits into
Conversation
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
📝 WalkthroughWalkthrough
ChangesCheckerboard 벡터화
Desktop 의존성 업데이트
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…d-vectorization.yml)에 필수 GIT_CONFIG 환경변수 누락 추가
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/finalize-checkerboard-vectorization.yml:
- Around line 6-8: Remove scripts/ci/finalize_checkerboard_vectorization.py from
the paths filter of the finalize-checkerboard-vectorization workflow, leaving
the workflow file path so its initial addition still triggers the one-time
finalization. Keep the existing script compilation and deletion steps unchanged.
In `@services/analysis-engine/tests/test_segmenter.py`:
- Around line 128-143: Extend the parameter set for
test_checkerboard_novelty_reference_matches_independent_loop with a case where
matrix_size is smaller than kernel_size, such as (2, 4), so the test directly
exercises _checkerboard_novelty_reference’s early-return path. Keep the existing
seeded input generation and oracle comparison unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4d80b920-2735-423d-9e17-4998e1962423
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
.github/workflows/finalize-checkerboard-vectorization.yml.jules/bolt.mdservices/analysis-engine/src/bandscope_analysis/sections/segmenter.pyservices/analysis-engine/tests/test_segmenter.py
|
The exact head now carries the bounded root-lock Undici 7.29.0 refresh already isolated and validated in #744. The previous |
Acknowledged. I have restored the accidentally deleted |
|
Removed the reintroduced self-modifying finalizer again. That restoration was not a CI repair: the reviewed final state intentionally contains no branch-pushing one-shot workflow or helper. The branch is now restored byte-for-byte to the previously reviewed clean tree ( |
Understood. Acknowledging that the deletion of the workflow and helper script is intentional and that the branch is manually restored to the verified clean tree ( |
|
@cwl-noema-review @opencode-agent Please independently review exact head |
Acknowledged. Standing by for independent review on the exact head |
There was a problem hiding this comment.
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
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore 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 head23d2f2e9ec5e8512b0fa47d63942062108509fdd. -
Head SHA:
23d2f2e9ec5e8512b0fa47d63942062108509fdd -
Workflow run: 31551296351
-
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 (5 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (5 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Test (2 files)"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test (2 files)"]
R2 --> V2["targeted test run"]
|
@opencode-agent address Operate only if the live PR head is exactly Then verify the vectorized NumPy checkerboard reference against the independent scalar/patch oracle across short, unit, odd/even and boundary kernel cases; retain Rust as the production arithmetic path; run the focused segmenter tests, complete analysis-engine tests with 100% production statement/branch coverage and public docstrings, Ruff, mypy, compileall, native Rust tests, Rust↔NumPy parity, and repository quickcheck. Commit the minimal cleanup to this existing branch only. After the mutation, request fresh exact-head central review and do not reuse predecessor-head evidence. |
리뷰어님의 지침에 따라 |
Product and numerical gap
Vectorize the retained NumPy checkerboard-novelty reference with sliding-window/diagonal views while keeping the Rust production kernel numerically aligned, including even kernel sizes. Current-code boundary analysis also found a backward-compatibility regression in the vectorized valid-position formula:
kernel_size == 0createsn + 1candidate positions. Protecteddevelophistorically returned a stable all-zero curve for this input.Exact current scope
Exact head:
9d0def7d5038b62b1eb0a8ce2784e23d6618ad74Protected base:
develop@acdbea6344fe1231c39535b575f4de35e4c607c9Exactly seven files differ from protected
develop:CHANGELOG.md;docs/doctoring/checkerboard-novelty-parity.md;services/analysis-engine/rust/src/lib.rs;services/analysis-engine/src/bandscope_analysis/sections/segmenter.py;services/analysis-engine/tests/test_segmenter.py;services/analysis-engine/tests/test_segmenter_short_reference.py;services/analysis-engine/tests/test_segmenter_zero_kernel.py.The temporary repair workflow has self-deleted and is no longer part of the PR. No dependency, lockfile, model, database, network, filesystem, IPC, or persistent application-permission boundary is added.
Test-first repair history
941d403e5466d0339da35e354ae6689b20a13f81committed the zero-kernel regression before the production guard.6bb0a185ca9446d21becb46af79da12c1e572b9eran the committed regression in RED state, then applied the minimal Python/Rust guards, built and installed the native extension, exercised focused Rust-to-NumPy parity and Cargo tests, ran the repository quickcheck, removed the temporary workflow, and pushed GREEN commit4d025a392febb246597f9a8aab0c1d347d3eec0a.4d025a392f...concludedaction_requiredbefore creating jobs. They are diagnostic only and are not accepted as test success.f93e846efc036deca79c3b3aca2e32204117fe43added the APA 7 doctoring/evidence boundary for the mathematical layer, grounded in Foote (2000), Nieto et al. (2020), and Müller and Chiu (2024), explicitly separating arithmetic parity from end-to-end music-structure accuracy claims..julesnotes and removed the doctoring record. Headbee73250009d0c68a7c7b988d135c025a24c5d7akept the valid oracle fix, restored the shared notes exactly to protecteddevelop, restored the doctoring record, and restored the even-kernel Rust range rationale.9d0def7d5038b62b1eb0a8ce2784e23d6618ad74is two commits ahead ofbee7325000...butcomparereports zero changed files between those heads. It is therefore a fresh exact-head verification point with a byte-identical product/test/doc tree, not a semantic change. The obsolete Scorecard thread on the deleted temporary repair workflow remains resolved.Correctness boundary
kernel_size × kernel_sizediagonal patch;kernel_size == 0rather than raising, overflowing the result shape, or indexing past the Rust output;The mathematical evidence note records that checkerboard novelty is one established music-structure principle rather than a unique ground truth, and that end-to-end boundary quality requires separate tolerance-aware evaluation on annotated music.
Exact-head verification state
Repository workflow evidence binds to
9d0def7d5038b62b1eb0a8ce2784e23d6618ad74.Terminal-success exact-head repository gates include
ci,build-baseline,sbom,release,SAST Semgrep,bandit, andsecret-scan-gate.The exact-head failed gates were inspected before any edit or rerun:
security-auditrun31892071309, job95029726818, fails atAudit npm dependencies; later Python/Rust audit stages are skipped because npm exits first.Security Scanrun31892071343has terminal-success OSV base-vs-head comparison, dependency review, and Scorecard; its only failed job istrivy-fsjob95029728036, where filesystem scanning/SARIF generation succeeds and the finding gate fails.This PR has no dependency or lockfile delta, while the exact-head PR-introduced OSV comparison is clean. The remaining whole-tree JavaScript security baseline is therefore owned by canonical dependency baseline #783; it is neither suppressed nor copied into this mathematical branch, and failed inherited-base evidence is not counted as success.
All current inline review threads are resolved/outdated; the current product/test/doc diff directly covers the short-input oracle finding and the deleted one-shot workflow no longer exists.
Central coverage/review remains dependent on
ContextualWisdomLab/.github#1008. Exact-head central evidence must be re-evaluated only after its protected-mainprerequisite is actually integrated. Do not redispatch unchanged BandScope reviewer-agent work merely to reproduce the known central failure.Merge gate
Keep Draft until #783 establishes the protected dependency baseline and this branch is revalidated against that base; exact-current-head numerical tests and native Rust parity, Python owned-production statement/branch coverage at 100%, public docstrings, lint/type checks, every required repository CI/SAST/security/SBOM/supply-chain gate, current central coverage/review, zero actionable threads, a qualifying independent non-author last-push approval, and branch protection all pass.
Failed, queued, in-progress,
action_required, skipped-required, predecessor-head, protected-base, author/self, or administrative-bypass evidence is not success.