Fit the contour generate_airfoils is handed, not a second wrap of it - #314
Conversation
v5.1.0 was cut while this branch was open, so the merge left the entry inside a released section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011SsYFmCTCdHi4sygUaabfs
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011SsYFmCTCdHi4sygUaabfs
1-Bort-1
left a comment
There was a problem hiding this comment.
Independent review (advisory)
Verdict: APPROVE · 0 inline, 0 off the diff
Good
- Single focused change: removes the second shrink-wrap from generate_airfoils and nothing else.
- Tests the fix it ships: new testset directly checks that written coordinates match the once-fitted contour within 1e-4.
- Changelog entry is behavior-facing, compact, and names the defect (coordinates at 1e2..1e4 instead of 0..1).
- No new public symbols, no docstrings needing reachability, no manifest or version bumps.
Not good
- Test at line 287-288 could compare extrema tuples directly instead of collect() .- collect(), but it is still readable.
opencode, rubric CLEAN_CODE.md. A different lab from the implementer
on purpose: a reviewer sharing its blind spots would not flag its mistakes.
# Conflicts: # CHANGELOG.md
|
Local full suite: FAIL (11 min, Julia 1.12.7, one cell of the matrix) |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
The red Same commit through |
The red check was not this branch's, and it has since gone green on its own.
test/solver/test_forwarddiff.jl:87, testset "AutoForwardDiff matches AutoFiniteDiff (LOOP, POLAR_MATRICES)", evaluatedrelative_error(jac_fd, jac_fwd) = 0.04207 < 1e-4on4b261f0. Re-running that same job on that same commit, without one line changed, turned it green — and with it all seven checks. The same testset had already failed twice onmainbefore this branch existed, at 0.04001 (6af7183) and 0.040003 (fb1eea7). It is #287's flake, which #292 closed without removing; I reopened it with everything measured below.Chasing it turned up one thing this change owes the reader. Fitting the contour
generate_airfoilsis handed drops the wingtip panel incidence at that test's operating point from 19.04/18.93 deg to 14.99/14.94 deg, andnorm(jac_fwd)from 2.21 to 3.30. The doubly-wrapped fit had been pushing the tips 4 deg past the polar table's top knot intoextrap_flat, wheredcl/dalphais zero and a tip carries no alpha sensitivity at all. That is the fix working, on a wing this diff never touches.It is not what makes the check flake, and neither is the finite-difference step #292 shrank.
rel_errstays in 3e-8…5e-8 across solverrtol1e-11…1e-7 crossed with steps 1e-8…1e-4 — flat, so nothing is trading truncation against solver noise. Walking the operating point across the knot the tips now sit under changes nothing either: 268 points (alpha 0:0.25:20 at zero sideslip, then alpha 5:0.5:10 crossed with beta -4:0.5:4) give a worstrel_errof 2.3e-7. What is left is the fixture, #291 — the failing runner reportednorm(jac_fwd) = 3.28551where this box gets3.29711on the same commit, so it was not generating the same NeuralFoil tables. That axis cannot be walked from here.One loose end this merge left behind: v5.1.0 was cut while the branch was open, so
CHANGELOG.mdonmainnow files this fix under## VortexStepMethod v5.1.0 2026-09-11, a release that shipped without it. The two commits that put it back under## Unreleased(5a4b7ec, and @a820826 folding a two-line inline comment into one) landed on the branch after the merge. Queued as #313 to cherry-pick.Verification
Julia 1.12 - ubuntu-latest - x64 - pull_requeston4b261f0, no code change — green, all seven checks green on that committest/airfoil_aero/test_airfoil_aero.jlgreen withmainmerged in, incl.generate_airfoils fits the wrapped contour it is handed | 2 2(juliaserver, tables regenerated)test/solver/test_forwarddiff.jlgreen here, 7/7,rel_err = 4.84e-8— 2000x inside the bound CI missedmain's doubly-wrapped fit measures 4.80e-8 on this box against this branch's 4.84e-8.Task
VortexStepMethod.jl-294