Skip to content

Fit the contour generate_airfoils is handed, not a second wrap of it - #314

Merged
1-Bart-1 merged 4 commits into
mainfrom
agent/BeyondTheSim.jl-17
Sep 12, 2026
Merged

Fit the contour generate_airfoils is handed, not a second wrap of it#314
1-Bart-1 merged 4 commits into
mainfrom
agent/BeyondTheSim.jl-17

Conversation

@1-Bort-1

Copy link
Copy Markdown
Contributor

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)", evaluated relative_error(jac_fd, jac_fwd) = 0.04207 < 1e-4 on 4b261f0. 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 on main before 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_airfoils is handed drops the wingtip panel incidence at that test's operating point from 19.04/18.93 deg to 14.99/14.94 deg, and norm(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 into extrap_flat, where dcl/dalpha is 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_err stays in 3e-8…5e-8 across solver rtol 1e-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 worst rel_err of 2.3e-7. What is left is the fixture, #291 — the failing runner reported norm(jac_fwd) = 3.28551 where this box gets 3.29711 on 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.md on main now 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

  • CI: re-run of Julia 1.12 - ubuntu-latest - x64 - pull_request on 4b261f0, no code change — green, all seven checks green on that commit
  • test/airfoil_aero/test_airfoil_aero.jl green with main merged in, incl. generate_airfoils fits the wrapped contour it is handed | 2 2 (juliaserver, tables regenerated)
  • test/solver/test_forwarddiff.jl green here, 7/7, rel_err = 4.84e-8 — 2000x inside the bound CI missed
  • Risk: the ~0.040 jump is still unexplained, so the check can come back red on a runner whose generated tables differ. Nothing here makes that likelier — main's doubly-wrapped fit measures 4.80e-8 on this box against this branch's 4.84e-8.

Task VortexStepMethod.jl-294

1-Bort-1 and others added 3 commits September 12, 2026 13:00
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 1-Bort-1 added agent:running Agent task state agent:queued Agent task state agent:ci Agent task state and removed agent:running Agent task state labels Sep 12, 2026

@1-Bort-1 1-Bort-1 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@1-Bort-1 1-Bort-1 added agent:running Agent task state and removed agent:queued Agent task state agent:ci Agent task state labels Sep 12, 2026
@1-Bort-1

Copy link
Copy Markdown
Contributor Author

Local full suite: FAIL (11 min, Julia 1.12.7, one cell of the matrix)

  generated_slices reads the deflected .dat under its generated name |    6                    6      3.1s
  Audit slices (Makie)                                               |    7                    7     18.0s
  Kite Geometry Tests                                                |   21             1     22     17.5s
  Test settings.jl                                                   |    9                    9      1.0s
  mesh and airfoil blocks                                            |   17                   17      1.4s
  an unnamed mesh block slices as an unconfigured call               |    2                    2     26.4s
  Solver Constructor Tests                                           |    3                    3     20.5s
  NONLIN solve! re-runs across calls                                 |    2                    2      0.3s
  NONLIN converges past stall, where LOOP already did                |    3                    3      0.0s
  LOOP converges on the residual, not on the relaxed step            |    1     1              2      4.7s
RNG of the outermost testset: Random.Xoshiro(0x84dba20f1e342af0, 0x572b6fe4f0766484, 0xd1ec3bdbb64bdb2c, 0x8f976c9abb5c4024, 0x911f15439e986154)
ERROR: LoadError: Some tests did not pass: 5259 passed, 1 failed, 0 errored, 1 broken.
in expression starting at /home/agent/worktrees/VortexStepMethod.jl-294/test/runtests.jl:73
ERROR: Package VortexStepMethod errored during testing
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types ~/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/Types.jl:68
  [2] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/Operations.jl:2642
  [3] test
    @ ~/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/Operations.jl:2487 [inlined]
  [4] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{io::IOContext{IO}})
    @ Pkg.API ~/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/API.jl:552
  [5] test(pkgs::Vector{PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/API.jl:169
  [6] test(pkgs::Vector{PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/API.jl:158
  [7] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::PackageMode, subdir::Nothing, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/API.jl:186
  [8] test()
    @ Pkg.API ~/.julia/juliaup/julia-1.12.7+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/API.jl:175
  [9] top-level scope
    @ none:1
 [10] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [11] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:283
 [12] _start()
    @ Base ./client.jl:550

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@1-Bart-1
1-Bart-1 merged commit 8b0c6bc into main Sep 12, 2026
7 checks passed
@1-Bart-1
1-Bart-1 deleted the agent/BeyondTheSim.jl-17 branch September 12, 2026 12:50
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:done Agent task state and removed agent:running Agent task state agent:queued Agent task state labels Sep 12, 2026
@1-Bort-1

Copy link
Copy Markdown
Contributor Author

The red Local full suite: FAIL above is not this branch's. It is test/solver/test_solver.jl:136, the test #306 added to main, and this branch carries no code — git diff main d86811a is the changelog move plus one comment line in test/airfoil_aero/test_airfoil_aero.jl, which runtests.jl runs after solver/.

Same commit through juliaserver: 6348 passed, 1 broken, 0 failed, that testset 4/4. All seven GitHub checks green. The assertion passes here by 1.07x because the unrelaxed map is expansive at that operating point, so rtol — measured on the step at the iterate before the one returned — does not bound the residual of what comes back. Numbers and the walk are in #315.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:done Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants