Repository navigation
review: final v0.8 performance delta (do not merge) - #272
unbalancedparentheses wants to merge 12 commits into
Conversation
|
/claude Please review this complete, bounded delta against 7f609bf. The earlier #240 review was truncated before the important files, so this review-only PR exposes just the final changes; do not merge it. The diff is about 1,300 changed lines and should fit without truncation. Review token ownership/retirement and the no-side-state slot fast path; await-free generated dispatch (only messages without drop glue), macro source compatibility, lazy direct calls, receiver/context lifetimes, destructors, panic/death fences and actor tracing. Also review JobState::finish retaining the unused The +3% instruction gate is unchanged and passes. The release is still blocked on wall-clock regressions, and neither this PR nor #240 should merge until final CI, models, soak, clients and performance pass. Uncommitted handoff experiments are not in this review. |
🤖 Claude Code ReviewReview: PR #272The PR has three main parts:
The overall direction is sound and well tested. A few correctness and maintainability points need attention. Correctness1. Method generics are not checked before inlining (
|
|
/claude Please review the current complete delta, including the new compact slot commit 3acec30. This review-only PR still fits without truncation; do not merge it. Focus on value/side-state promotion, terminal refusal preserving the first reply, destructors outside locks, parking_lot/standard-Loom mutex equivalence and Send/Sync behavior. Core crates still forbid unsafe; no coarse clock or deadline change. All 47 production-core Loom tests pass, plus unit/layout, macro and paused-clock regressions; focused Codex review found no actionable regressions. Final CI/performance/soak/model gates remain required. Responses to your earlier findings:
|
🤖 Claude Code ReviewReview: PR #272The core protocol changes look careful and well tested:
Most of the risk is in the macro's body duplication and the new ownership counter. Correctness1.
|
|
/claude Please review the latest fixes at dcf3091 in this bounded review-only PR; do not merge it. Your local-static finding was reproduced, then fixed by excluding nested items from immediate specialization. A follow-up reproduction showed closure/async-block TypeId identity also changed when copied, so those now keep the async adapter too. The regression checks direct and mailbox calls across local statics, nested functions, closures and async blocks. All 94 UI cases and 14 immediate-dispatch tests pass, including a flooded-mailbox cooperative-budget regression. Production handler benchmarks contain none of these excluded constructs. The requested pipe_reply ownership-balance test also passes: external_count remains one while the token is in the job completion factory, and returns to zero after reply consumption. Grepping production reveals one ReplyTo constructor, in defer(), and no forget/ManuallyDrop use on ReplyTo (PendingReply's ManuallyDrop is a separate borrowed obligation). Job completion retains the token itself, so it retains the count. register may prune terminal slots and thus run a destructor; if that panics, the newly constructed token's Drop records its slot in the turn and releases its hold, without requiring registration to have succeeded. The exiting/dead writers remain only the owned run-loop/ActorCleanup, or Registry::drop when no handles exist; signal paths request lifecycle exit, they do not mutate this phase. The SlotMutex parity comment is clarified; the standalone thread-only example lockfile now includes the new dependency without upgrading existing packages. Native/async Clippy on pinned 1.93.0 and the Tokio-free dependency check pass. Message and Message::Result already require Send, so explicit future Send does not introduce the non-Send-result change hypothesized in your previous review. Key retention remains documented, without adding hot-path warnings. Final CI, versioned performance, soak and full model gates remain required before release. |
🤖 Claude Code ReviewReview of PR #272This PR bundles six changes:
The concurrency reasoning is mostly sound. The main gaps are in test coverage and in how robust the token counter is. Correctness / concurrency
Immediate dispatch (
|
| Area | Assessment |
|---|---|
| Slot refactor and two-publisher fix | Solid |
| Turn-end fast path | Correctly ordered, but relies on unenforced construction discipline; centralize the increment in a constructor |
| Immediate dispatch | Lacks a test proving it activates; several "direct path" tests exercise only the fallback |
Automated review by Claude · claude-opus-5-5 · custom prompt
|
/claude Final follow-up to your latest review: ReplyTo construction and its ownership increment now live together in one private ReplyTo::new. The increment runs after instrumentation construction, so a stamp panic cannot leak a hold. Forgetting a token is documented as conservatively retaining the slow path. The pipe_reply round-trip verifies count 1 -> 0. New eligible_handler_uses_the_immediate_hook positively asserts None from the hook (it fails if specialization is disabled); the drop-order test name now says mailbox/inherent rather than implying it tests the optimized branch. A mailbox-flood test verifies cooperative scheduling. The fuzz nightly literal is job-scoped, with setup referencing that job's env. Please review this small follow-up and confirm whether any release-blocking correctness issue remains. All earlier local-static and anonymous-type findings have reproducing regressions; their adapter exclusions are conservative. The remaining invalid-backend UI fixture intentionally imports threads::Handler for an async method; its extra hidden-hook error is diagnostic quality, not valid-source breakage. Existing lint UI cases confirm attributes reach the generated impl. Message::Result already requires Send. The parking_lot dependency is described in the release notes. No timeout semantics, safety guarantee, benchmark threshold, unsafe policy, or scheduling budget was weakened. |
🤖 Claude Code ReviewReview: PR #272The core protocol changes look careful and are well covered by tests. These are the most solid parts of the PR:
Some items below need verification or tightening. Correctness / concurrency1. if state(current) != OPEN || !matches!(inner.payload, Payload::Empty) {
...
debug_assert_eq!(credits(current), 0);
2.
3.
4.
5. Macro / immediate dispatch6.
7. Narrow applicability. Every macro blocks the optimization, including
8. UI diagnostics regression ( API / perf9.
10. Minor
Automated review by Claude · claude-opus-5-5 · custom prompt |
Review-only view of the final v0.8 performance delta for #240. Do not merge this PR. The base is the previously tested 7f609bf; the head is the same branch as #240. This keeps the diff small enough for the Claude workflow to read without truncation. Close this review view once its findings are resolved; merge/release happens only through #240 and #271.
Please review reply/turn token ownership, the no-drop-glue immediate dispatch adapter and macro compatibility, destructor and panic ordering, causal tracing, and precise clock behavior. The +3% instruction-count threshold and all guarantees remain unchanged.
Regression checks: 45 production-core reply/turn/job Loom tests, 270 simulated tests, 94 accepted lifecycle/reply/job traces and 133 expected model counterexamples; compile-pass/fail macro checks, future layout and panic regressions. Final source CI, full release performance/soak/model gates and both client ports remain required independently of this review.