Skip to content

fix: restore PR gates and OCR compatibility#2008

Merged
yyhhyyyyyy merged 7 commits into
devfrom
fix/test-entrypoints
Jul 23, 2026
Merged

fix: restore PR gates and OCR compatibility#2008
yyhhyyyyyy merged 7 commits into
devfrom
fix/test-entrypoints

Conversation

@yyhhyyyyyy

@yyhhyyyyyy yyhhyyyyyy commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Restore explicit one-shot test entrypoints for the complete main and renderer suites.
  • Split PR Check into independent static, test, Native Memory, and build quality gates.
  • Add a fail-closed pr-required aggregate check for branch protection.
  • Fix the Light OCR regression that incorrectly limited pure vision requests to eight images.

Changes

Light OCR

  • Apply the eight-image limit only to actual OCR candidates.
  • Preserve all image representations for vision-capable models.
  • Add pure vision and mixed vision/OCR boundary coverage.

Test entrypoints

  • Make test, test:main, test:renderer, and test:coverage explicitly one-shot.
  • Keep test:watch as the interactive entrypoint.
  • Remove the obsolete local Native SQLite test entrypoint.
  • Repair the Windows ARM64 Native Memory test path.
  • Add static contracts to prevent test script and workflow path drift.

PR Check

Run the following jobs in parallel:

  • static
  • test-main
  • test-renderer
  • test-native-memory
  • build

Additional workflow changes:

  • Add read-only repository permissions and PR-level concurrency cancellation.
  • Add timeouts to every job.
  • Remove the single-element matrix, ineffective install:sharp step, duplicated Memory scope check, and redundant Agent eval.
  • Add pr-required with explicit handling for failed, cancelled, and unexpectedly skipped dependencies.
  • Keep main-release-guard required for main targets and allow it to skip only for dev.
  • Pin all Actions to reviewed commit SHAs and disable checkout credential persistence.
  • Add a parsed-YAML workflow contract test covering topology, commands, Native ordering, permissions, and aggregation behavior.

Generated registries

  • Refresh provider and ACP registries through the canonical build preflight.
  • Add the latest Ofox and Cline Pass model data.
  • Update Junie repository metadata and Windows ARM64 distribution information.

Summary by CodeRabbit

  • New Features
    • Added support for additional AI providers and models (including new provider/model entries), plus an updated Windows ARM64 agent distribution.
  • Bug Fixes
    • Enforced the per-turn OCR image limit only for OCR candidates (vision-routed images remain available).
    • Updated Windows ARM64 native memory validation coverage and renamed the native memory CI gate to test-native-memory.
  • Documentation
    • Refreshed PR quality-gate architecture and CI/local testing guidance, including Light OCR and memory gate specifications.
  • Tests
    • Switched key test scripts to run in one-shot mode (vitest run).
    • Added/expanded contract tests for PR workflow configuration and test entrypoint rules, and strengthened OCR router tests.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR restructures pull-request validation into parallel quality gates with fail-closed aggregation, standardizes one-shot test commands, changes OCR image-limit handling to apply only to OCR candidates, updates related documentation and tests, and refreshes ACP and model registry metadata.

Changes

PR quality gates

Layer / File(s) Summary
One-shot test entrypoints and contract coverage
package.json, test/main/scripts/*, test/README.md, .github/workflows/windows-arm64-e2e.yml
Test scripts now use vitest run, the local Native SQLite script is removed, the Windows ARM64 path is updated, and entrypoint/workflow documentation and tests are added.
Parallel PR workflow and aggregate gate
.github/workflows/prcheck.yml, test/main/scripts/prcheckWorkflow.test.ts
The workflow adds static, main-test, renderer-test, native-memory, and build jobs with permissions, concurrency, pinned execution settings, ordered native checks, artifact upload, and branch-aware pr-required validation.
Quality-gate architecture records
docs/architecture/pr-check-quality-gates/*, docs/architecture/memory-quality-gates-and-observability/*
Architecture documents describe the workflow topology, acceptance criteria, safety constraints, rollout behavior, rollback boundaries, and the renamed native-memory job.

Light OCR image limits

Layer / File(s) Summary
Candidate-scoped OCR limit
src/main/ocr/attachmentCapabilityRouter.ts, test/main/ocr/attachmentCapabilityRouter.test.ts, docs/features/light-ocr-integration/spec.md, docs/issues/light-ocr-follow-up-hardening/spec.md
The eight-image limit is deferred to OCR-candidate resolution, leaving vision-routed images available while degrading only excess OCR candidates; tests and specifications reflect this behavior.

ACP and model registry refresh

Layer / File(s) Summary
Agent and provider metadata
resources/acp-registry/registry.json, resources/model-db/providers.json, package.json
Junie metadata now includes its updated repository and Windows ARM64 binary, while Ofox models and cline-pass/kimi-k3 are added to the provider registry and icon metadata is updated.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant PRWorkflow
  participant QualityJobs
  participant PRRequired
  PullRequest->>PRWorkflow: trigger validation
  PRWorkflow->>QualityJobs: run parallel quality gates
  QualityJobs-->>PRRequired: return job results
  PRRequired->>PRRequired: apply branch-specific checks
  PRRequired-->>PullRequest: report aggregate result
Loading
🚥 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 The title accurately summarizes the two main themes of the PR: restored PR gating and OCR compatibility fixes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/test-entrypoints

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.

@yyhhyyyyyy
yyhhyyyyyy merged commit dc20b94 into dev Jul 23, 2026
8 checks passed
@zhangmo8
zhangmo8 deleted the fix/test-entrypoints branch July 23, 2026 09:43
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