Skip to content

Setup Test is failing - #312

Merged
1-Bart-1 merged 2 commits into
mainfrom
agent/311-setup-test-is-failing
Sep 12, 2026
Merged

1-Bart-1 merged 2 commits into
mainfrom
agent/311-setup-test-is-failing

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

TL;DR

The audit plot_slices_3d crashed on a generated deflection .dat that reads back with no coordinates, taking the whole Setup Test down with ram_air_kite.jl; it now skips that overlay and warns, naming the file and whether it was blank or absent.

What was wrong

ram_air_kite.jl:79 runs the audit plot over the generated polars_xfoil directory at delta=1.0. generated_slices read airfoils/<id>_d1.dat, got zero points back, and handed the empty contour to the Kulfan fit: ArgumentError: reducing over an empty collection out of argmin in normalize_airfoil (src/airfoil_aero/kulfan.jl:71), through fit_pts at ext/VortexStepMethodMakieExt.jl:1676. The file was there, so the isfile branch that already warns and draws nothing for a deflection that was never generated did not fire.

It reads back empty because it holds NaN NaN rows and read_dat_coordinates drops any line that does not start with a digit, - or .. A deflection column of SectionAero.x stays at its fill(NaN, …) initial value when no angle of that deflection lands a solution of the grid's modal node count (src/airfoil_aero/section_aero_gen.jl:27-38), and write_section_aero writes that column out unguarded — three lines above the guard that already refuses to write {id}.dat all-NaN for exactly this reason.

So the audit plot has two ways to have no deflected contour to draw and only handled one of them. It now handles both the same way, and the warning says which: Skipping the delta=1.0° overlay for 4_d1.dat: no finite coordinates; … against … 4_d1.dat: no such file; ….

Is the blank column a regression in the wrapping under delta deflection?

Asked on the thread, and worth the check — a plot that skips a contour is a plot that can hide a bad one. I measured the deflected wrap directly rather than through the plot, on the example's own geometry and settings (10 slices of ram_air_kite_body.obj, wingtip_distance=0.1, ShrinkWrap(clearance=0.0), crease_frac=0.75, Re=1e6, XFoil npan=160/ncrit=9/xtrip=(0.05, 0.05), α = −8:2:26°).

Sections 1 and 10 are thrown out on thickness (0.424 against a 0.225 limit) before any deflection is formed — that is the Reused the nearest valid airfoil for: section 1 → airfoil 2, section 10 → airfoil 9 line in the CI log, and it is about the raw tip slices, not about δ. For the eight sections that remain, the 1° deflected wrap is indistinguishable in health from the undeflected one: 239 contour nodes either way, no non-finite coordinate, chord normalised to [0, 1], no fold on either surface, enclosed area within 0.1% of δ=0, and XFoil converges at exactly the same 16–17 of the 18 angles. No blank column reproduces on this box at all.

That matches what the mechanism says it should be. The contour that reaches the .dat is deform_section's own output — #301 measured XFoil handing it back unchanged at repanel=false, max|dx| = max|dy| = 0.0 — so the shape never depends on the solver converging; only its presence does. A blank column therefore means "no angle of that deflection landed", not "the deflected wrap produced garbage". generate_airfoils validates only sols[1], the δ=0 column (src/airfoil_aero/geometry_gen.jl:48), so a dead deflection column leaves no trace anywhere else.

Per-section numbers, δ=0 against δ=1°
sliced 10 sections; thickness limit 0.2253; degenerate: [1, 10]
section 2:  d=0  n=239 nonfinite=0 chord=[0.0000,1.0000] tmax=0.1155 area=0.12906 folds=0/0  converged 16/18
            d=1  n=239 nonfinite=0 chord=[0.0000,1.0000] tmax=0.1165 area=0.12915 folds=0/0  converged 16/18
section 3:  d=0  n=239 area=0.13949 folds=0/0  converged 16/18      d=1  n=239 area=0.13962 folds=0/0  converged 17/18
section 4:  d=0  n=239 area=0.13247 folds=0/0  converged 16/18      d=1  n=239 area=0.13256 folds=0/0  converged 16/18
section 5:  d=0  n=239 area=0.13016 folds=0/0  converged 17/18      d=1  n=239 area=0.13026 folds=0/0  converged 17/18
section 6:  d=0  n=239 area=0.13018 folds=0/0  converged 16/18      d=1  n=239 area=0.13028 folds=0/0  converged 16/18
section 7:  d=0  n=239 area=0.13249 folds=0/0  converged 16/18      d=1  n=239 area=0.13259 folds=0/0  converged 16/18
section 8:  d=0  n=239 area=0.13955 folds=0/0  converged 16/18      d=1  n=239 area=0.13967 folds=0/0  converged 16/18
section 9:  d=0  n=239 area=0.12914 folds=0/0  converged 17/18      d=1  n=239 area=0.12924 folds=0/0  converged 17/18

What this change can and cannot hide

It cannot hide a wrong deflected contour. The skip fires only on a contour with no usable coordinate at all; anything finite is fitted and drawn exactly as before, and the fit_pts guard returns an empty point vector only for an input that previously threw. The deflected contour is also the only one that can reach it empty: write_section_aero already refuses to write {id}.dat all-NaN, and the live path's shrink_wrap throws rather than hand back nothing — so no overlay goes quiet without the warning above. What it does change is that a deflection the solver never landed now reaches the reader as a named warning rather than as a stack trace — and, after this round, as a warning that does not read like a missing file, which is the case #298 is about.

Found on the way

deform_section's docstring (src/airfoil_aero/airfoil_solvers/common.jl:100-102) still promises that the re-wrap "bridges the crease with a min_concave_radius fillet". Since 1e13d92 the wrap offsets the ball's contact polygon instead of sweeping its rim, so a concavity narrower than the ball is bridged straight (src/airfoil_aero/shrink_wrap.jl:139-146), and at the clearance = 0.0 that path uses, the contour is the contact polygon itself. The crease geometry the solvers are handed is therefore not what that docstring says. It is behaviour-neutral to fix and in a file this diff has no other reason to open, so it is not in here.

The producer-side half — that write_section_aero writes the all-NaN column at all, and that generate_airfoils never notices a deflection that converged nowhere — is #300, open as #301. The two are complementary: with #301 merged the file is absent rather than blank and this plot takes its other branch, and until then (or for a directory generated before it) this is what stops the crash.

Verification

  • Reproduced first: ArgumentError: reducing over an empty collection from normalize_airfoil/argmin, ext/VortexStepMethodMakieExt.jl:1632kulfan.jl:71, identical to the Setup Test stack on run 34653119608
  • test/plotting/test_plotting.jl "Audit slices (Makie)" red before, green after (juliaserver): the empty-contour assertions errored before 4c799ad; the warning assertion failed before 8ded002 with the old text No generated .dat for delta=1.0° (4_d1.dat); now 7/7, file 84/84
  • Local full suite: PASS (7 min) on 8ded002 · GitHub CI on 8ded002: Setup Test green, CI green on the rerun
  • The one red job on the first CI attempt was test/solver/test_forwarddiff.jl's AD-against-finite-difference check, relative_error = 0.0400 against 1e-4, with norm_fwd = 2.114327230856032The generated ram-air polar fixture is not reproducible, so every test asserting numbers on it draws a fresh geometry each run #291's documented draw of the regenerated ram-air fixture, in code this diff does not touch (no src/ change at all); green on rerun of that job alone
  • Docs build: not run — no docstring, export or docs/src page changed
  • Benchmark: n/a
  • Risk: the blank column is a solver outcome that does not reproduce on this box, so the crash path itself is exercised only by the regression test's synthetic blank .dat, not by a generated one.

Scope

+48 / −10 across 3 files: ext/VortexStepMethodMakieExt.jl (the skip and the warning), test/plotting/test_plotting.jl (the regression test), CHANGELOG.md. No stack; #301 touches the writer and the readers, not this.

Closes #311 · task VortexStepMethod.jl-311

write_section_aero writes an all-NaN deflected .dat when a deflection never
converges; read_dat_coordinates drops it to empty, and the audit-mode
plot_slices_3d crashed on the Kulfan fit of the empty contour, taking the
ram-air kite example (and the setup test) down with it. generated_slices now
treats such a contour like a missing one -- warn and skip the overlay -- and
fit_pts guards empty input. Regression test: test/plotting/test_plotting.jl.
@1-Bort-1 1-Bort-1 added agent:running Agent task state agent:ci Agent task state and removed agent:running Agent task state labels Sep 11, 2026
@1-Bort-1

1-Bort-1 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Local full suite: PASS (6 min, Julia 1.12.7, one cell of the matrix)

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@1-Bort-1 1-Bort-1 added agent:review Agent task state and removed agent:ci Agent task state labels Sep 11, 2026
@1-Bart-1

Copy link
Copy Markdown
Member

Are you sure this is not a regression for the wrapping under delta deflection?

@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:review Agent task state agent:queued Agent task state labels Sep 12, 2026
A deflected `.dat` that is present but holds no finite coordinates and one that
was never written both produced the same warning, which read as a missing file.
The warning now tags each skipped file with which of the two it was.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PxVf66FdRwo7h2e6nWosBp
@1-Bort-1

Copy link
Copy Markdown
Contributor Author

No — I measured the deflected wrap itself rather than through the plot. At δ=1° all eight non-degenerate sections of the example's own geometry give 239 contour nodes (as at δ=0), no non-finite point, no fold, enclosed area within 0.1% of δ=0, and XFoil converges at the same 16–17 of 18 angles; sections 1 and 10 are dropped on thickness before any deflection is formed. The blank _d1.dat is a deflection that landed no angle, not a bad wrap: the contour written there is deform_section's own output, which XFoil hands back unchanged. Per-section numbers are in the PR description. The skip also could not hide a wrong wrap — it fires only on a contour with no usable coordinate — and 8ded002 makes the warning say which file was blank instead of reading as a missing one.

@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:review Agent task state and removed agent:running Agent task state agent:ci Agent task state labels Sep 12, 2026
@1-Bart-1
1-Bart-1 merged commit 50b1454 into main Sep 12, 2026
15 of 16 checks passed
@1-Bart-1
1-Bart-1 deleted the agent/311-setup-test-is-failing branch September 12, 2026 09:43
@1-Bort-1 1-Bort-1 added agent:done Agent task state and removed agent:review Agent task state labels Sep 12, 2026
1-Bort-1 added a commit that referenced this pull request Sep 12, 2026
…ection

Main's #312 rewrote the same block of `generated_slices` to skip a blank
deflected .dat. Kept its `skipped_deltas` structure and its blank-vs-missing
message, and put back the `delta_suffix` tag and the dropped naming-scheme
sentence; the skipped file is now named by its path under `out_dir`, which the
warning states. The changelog entry moved to a fresh `## Unreleased` section,
v5.1.0 having been cut in between.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017d2wohXpAyJ9qCV1FhoDJd
1-Bort-1 added a commit that referenced this pull request Sep 12, 2026
…-def

Only CHANGELOG.md conflicted: v5.1.0 shipped and #312's audit-plot entry landed
in the Fixed block this branch's entry sat in. The entry moves to Unreleased.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLm7oza8A7H8xtGQP2hp7Z
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.

Setup Test is failing

2 participants