Skip to content

feat(rate-of-closure, #4103): land the capability-optimization cluster (12 files) - #4545

Merged
dieterolson merged 2 commits into
mainfrom
feat/roc-capability-optimization
Aug 18, 2026
Merged

feat(rate-of-closure, #4103): land the capability-optimization cluster (12 files)#4545
dieterolson merged 2 commits into
mainfrom
feat/roc-capability-optimization

Conversation

@dieterolson

Copy link
Copy Markdown
Collaborator

Lands the capability-optimization surface — and takes the capabilityOptimizer change that #4541 declined, now that there's evidence it's safe.

What lands

The optimization panel and results view, the useCapabilityOptimization hook, the run facade (capabilityRun), the worker client, the dedicated capabilityOptimization.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:

  • The export surface is identical on both sides.
  • The 38 deleted lines are not main-newer work — they are parseLanding, limitingConstraints, summarize and evaluateCandidate being reshaped to thread new hooks through the candidate loop.
  • The addition is an optional 4th argument, CapabilityOptimizationOptions, carrying observationSink and shouldCancel, letting a run 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 — 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 capabilityOptimizer re-exports, found they had no consumer (capabilityObservationEnsemble imports straight from capabilityObservationContract), 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 — clean
  • eslint . — clean
  • vitest run1,573 passed across 193 files, 0 failed
  • npm run build — production Vite build succeeds
  • Staged diff: 13 files, zero deletions
  • SPEC.md: exactly one insertion (row 1.17.38)

🤖 Generated with Claude Code

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dieterolson
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
dieterolson merged commit 0c9d5e3 into main Aug 18, 2026
14 of 19 checks passed
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>
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