Skip to content

feat: coroutine#78

Merged
siyul-park merged 3 commits into
mainfrom
feature/coroutine
Jun 16, 2026
Merged

feat: coroutine#78
siyul-park merged 3 commits into
mainfrom
feature/coroutine

Conversation

@siyul-park

Copy link
Copy Markdown
Owner

Changes Made

Related Issues

Additional Information

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.21782% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.77%. Comparing base (bd9d20a) to head (838575a).

Files with missing lines Patch % Lines
interp/threaded.go 78.66% 16 Missing and 16 partials ⚠️
interp/fuse.go 28.57% 9 Missing and 1 partial ⚠️
interp/coroutine.go 90.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   63.53%   63.77%   +0.24%     
==========================================
  Files          65       66       +1     
  Lines       11898    12098     +200     
==========================================
+ Hits         7559     7716     +157     
- Misses       3546     3572      +26     
- Partials      793      810      +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siyul-park siyul-park merged commit c1bf9be into main Jun 16, 2026
5 checks passed
@siyul-park siyul-park deleted the feature/coroutine branch June 16, 2026 23:59

Copy link
Copy Markdown
Owner Author

PR Review — feat: coroutine

Decision

Request Changes — Merge readiness blocked by missing PR description.

Merge Readiness Summary

The implementation is technically sound, well-tested, and properly documented in code. However, the PR description is empty — it contains only template headers with no actual content. For a 1000+ line feature addition, a proper description is required to explain the feature, its API, and its purpose before merge.


Blocking Findings

1. Missing PR Description

Issue: The PR body contains only template sections ("Changes Made", "Related Issues", "Additional Information") with no actual content.

Why it matters:

  • Future maintainers won't have context about the design decisions
  • Reviewers can't verify the PR matches the original requirement
  • The PR title alone doesn't explain how coroutines work or why they matter

Minimal fix: Add a PR description that includes:

  • What coroutines do (yield/resume suspension points for lightweight async patterns)
  • Why they were added to minivm
  • How the API works at a high level (coroutine-function call returns handle, RESUME continues, CORO_VALUE reads result)
  • Any related issue/specification link
  • Key design decisions (e.g., asymmetric yield/resume, why deopt on YIELD in inlined frames)

2. Missing Issue Link

Issue: The PR references no issue or specification document.

Recommendation: Link to the issue that prompted this feature.


Positive Findings

Implementation is technically correct

  • Suspension/resume semantics are sound
  • Memory management is safe and refcount-correct
  • GC properly roots active coroutines and captured frames
  • Design decisions are sound (coroutine-function calls excluded from fusion, deopt strategy for YIELD/RESUME)

Comprehensive test coverage covering root-frame yield, function-local yield/resume, completion tracking, error handling, and nested coroutines across both threaded and JIT modes

Excellent documentation in code:

  • docs/architecture.md explains the design in detail
  • docs/instruction-set.md documents the four new opcodes clearly
  • docs/jit-internals.md explains the suspend/deopt/resume strategy
  • Roadmap updated

CI passing (ubuntu + WIP checks green)

Proper code organization — implementation split across coroutine.go, threaded.go, jit_arm64.go, fuse.go, and trace.go as appropriate


Test & Coverage Notes

Core functionality: ✅ Pass — root yield, coroutine calls, resume, completion detection all tested

Code coverage: 78.21% of changes

  • interp/fuse.go (28.57%): early return paths for skipping fusion on coroutine-functions
  • interp/threaded.go (78.66%): likely ARM64 JIT paths not fully exercised
  • interp/coroutine.go (90%): minor Refs() edge cases

While coverage could be better, the untested lines are mostly optimization and JIT-specific paths; core functionality is well-tested.


Readiness Checklist

Criterion Status
Scope control ✅ Pass — focused feature, no unrelated changes
Correctness ✅ Pass — matches documented design, edge cases handled
Test coverage ✅ Pass (with notes) — core paths tested, some JIT paths untested
Architecture ✅ Pass — follows patterns, proper GC/error integration
Compatibility ✅ Pass — new feature, backward compatible
Maintainability ✅ Pass — clear naming, well-commented
CI / validation ✅ Pass — green

Path to Merge

  1. Update the PR description (see blocking finding chore: Configure Renovate #1)
  2. Optionally link to the related issue/spec (see blocking finding chore(deps): update dependency go to v1.25.2 #2)
  3. Ready to merge

The code is solid. Once the PR metadata is complete, this is ready.


Generated by Claude Code

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