feat(rate-of-closure, #4103): land the capability-optimization cluster (12 files) - #4545
Merged
Conversation
Adds 12 files: the optimization panel and results view, the useCapabilityOptimization hook, the run facade and worker client, the dedicated optimization Web Worker, and their tests. This required taking the branch's capabilityOptimizer.ts (+190/-38), which 1.17.35 explicitly declined. It adds an optional fourth CapabilityOptimizationOptions argument to optimizeCapability carrying observationSink and shouldCancel, and threads those hooks through the candidate loop so a run can stream per-sample observations and be cancelled mid-flight. capabilityRun.ts calls the four-argument form directly, so the cluster and the optimizer had to land together. The 38 deleted lines are not main-newer work: they are parseLanding, limitingConstraints, summarize and evaluateCandidate being reshaped to thread the hooks, and the export surface is identical on both sides. The proof is behavioural -- all 192 of main's existing test files pass unchanged with the branch optimizer swapped in, before any of this slice's own tests were added. The capabilityOptimizer re-exports reverted in 1.17.35 as dead are restored here, now that their consumers land alongside them. Verified: tsc clean, eslint clean, 1,573 tests across 193 files, production build succeeds, zero deletions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
dieterolson
enabled auto-merge (squash)
August 18, 2026 15:38
…line The capability tests add hex digest fixtures; without them in .secrets.baseline the detect-secrets gate fails. Rescanned then normalised to forward slashes, in that order, because the scan writes native separators on Windows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dieterolson
added a commit
that referenced
this pull request
Aug 18, 2026
…s mypy advice) (#4546) * docs(rate-of-closure, #4103): bring the handoff doc back to current state Twenty slices have merged since this was last accurate. The remaining-work table is re-measured against origin/main and now names the real blocker: the ~60 files left are not blocked on effort but on the camera-controls cluster, which is a reimplementation rather than a migration -- wiring CameraViewportMixin into simulation_view and flight_view passes 20 of 20 camera GUI tests while regressing three main-owned ones, and reproducing the branch's Face-On behaviour needs ~20 further ui/pyqt6 files that delete shipped work. Corrects one entry that was actively harmful. The doc told the next agent to check mypy files individually, which is exactly what made #4531 fail quality-gate: CI passes every changed file to one invocation with MYPYPATH=src, so per-file checking invents no-any-return findings CI does not have and hides the redundant-cast findings it does. The replacement gives the exact command, including that Python 3.12 is required. Adds the traps found since -- pathlib.write_text rewriting LF as CRLF, the detect_secrets scan/normalise ordering, and purely-additive files that still fail against main -- and balances the "branch is not uniformly newer" rule with its converse, since applying it blindly cost two good ports. Deletions are not disqualifying; the bar is main's whole suite green against the swapped-in version first, as #4542 and #4545 both cleared. 149 lines, inside the 150-line policy. No code changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(rate-of-closure): re-measure the remaining-work table after #4536 #4536 landed while this PR was open, so the table would have merged already stale. Re-measured against origin/main: 52 files, not ~60, and the split moved -- 19 tests, 18 web/src, 15 elsewhere. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: codex-scheduled <codex-scheduled@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lands the capability-optimization surface — and takes the
capabilityOptimizerchange that #4541 declined, now that there's evidence it's safe.What lands
The optimization panel and results view, the
useCapabilityOptimizationhook, the run facade (capabilityRun), the worker client, the dedicatedcapabilityOptimization.worker.ts, and their tests — 12 files.Reversing an earlier call, with evidence
#4541 skipped
capabilityOptimizer.ts(+190/−38) on the general rule that a file which deletes content can't be taken. That rule was right to apply then and wrong to keep here, so I checked the specifics:main-newer work — they areparseLanding,limitingConstraints,summarizeandevaluateCandidatebeing reshaped to thread new hooks through the candidate loop.CapabilityOptimizationOptions, carryingobservationSinkandshouldCancel, letting a run stream per-sample observations and be cancelled mid-flight.capabilityRun.tscalls the four-argument form directly, so the cluster and the optimizer had to land together — this could not be split.The proof is behavioural, not structural: all 192 of
main's existing test files passed unchanged with the branch optimizer swapped in, before any of this slice's own tests were added. That is the same standard used for the flight integrator in #4542.A dead re-export becomes live
#4541 added
capabilityOptimizerre-exports, found they had no consumer (capabilityObservationEnsembleimports straight fromcapabilityObservationContract), and reverted them rather than ship dead surface. They're restored here — the panel, run facade and worker client landing in this PR are exactly the consumers that were missing.Verification
tsc --noEmit— cleaneslint .— cleanvitest run— 1,573 passed across 193 files, 0 failednpm run build— production Vite build succeeds1.17.38)🤖 Generated with Claude Code