Skip to content

Make the KA-frame change load against the KiteUtils 0.13 that shipped - #56

Draft
1-Bort-1 wants to merge 3 commits into
frame-unificationfrom
agent/54-update-kiteutils
Draft

1-Bort-1 wants to merge 3 commits into
frame-unificationfrom
agent/54-update-kiteutils

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Depends-On: OpenSourceAWE/KiteModels.jl#312
Depends-On: OpenSourceAWE/KiteModels.jl#321
Depends-On: aenarete/WinchModels.jl#26

TL;DR

#50 was written before KiteUtils 0.13 was released and calls a two-argument quat2viewer that the release does not define, which stops KiteViewers precompiling at all; the caller now converts a KS attitude itself with fromKS2KA. examples/Project.toml follows the root project to KiteUtils = "0.13".

The call that is not there

KiteUtils v0.13.0 was released today with quat2viewer(attitude) and no second method — src/transformations.jl:140. A KS orientation is the caller's job to convert, which is what the release notes of OpenSourceAWE/KiteUtils.jl#130 say: quat2viewer(fromKS2KA(q)).

This is not a wrong-looking kite on an old log. update_system is called from the @compile_workload in src/KiteViewers.jl:139, so the method that does not exist is reached while the package is being precompiled, and using KiteViewers fails outright:

ERROR: LoadError: MethodError: no method matching
  quat2viewer(::KiteUtils.FrameQuat{KiteUtils.SysState{11,...}, Float32}, ::KiteUtils.FrameConvention)
Closest candidates are: quat2viewer(::Any)
  @ KiteUtils ~/.julia/packages/KiteUtils/xNJLj/src/transformations.jl:140
Stacktrace:
 [1] update_system(kv::KiteViewers.Viewer3D, state::KiteUtils.SysState{11,...}; scale, kite_scale, frame, wind)
 ...
 @ ~/worktrees/KiteViewers.jl-54/src/KiteViewers.jl:139
Failed to precompile KiteViewers [2e593061-95e7-45e4-95f4-df0491f2e601]

test/test_frames.jl pins what #50 promises and what this restores — that a KS attitude and the KA attitude it converts to are drawn the same way round. It reads back KiteViewers.quat[], the quaternion the kite mesh is actually rotated by, so it fails on the wrong conversion as well as on no conversion, and it does so over five attitudes rather than the demo state's one: the demo attitude, the identity, two with all four components at 0.5, and one more about a single axis. Each is written into state.orient as KA, drawn, then written again as its fromKA2KS image and drawn with frame=KS. Deleting the conversion in src/common.jl turns all five red; restoring it turns all five green. atol=1e-6 rather than the default relative tolerance, which components sitting at zero can never meet.

What stops this going green, and what is being done about it

The registered packages give this branch no environment it can install: ERROR: empty intersection between KiteUtils@0.11.13 and project compatibility 0.13. That is also why the red check stops in Pkg.test()'s resolve, before any test file. It is neither a code bug nor a test bug. Two of the four packages that held KiteUtils down have since released with 0.13 (AtmosphericModels v0.3.11, KitePodModels v0.4.2). The other two are fixed from this task:

With both upstream branches and a local merge of #312 carrying those four renames, this branch's whole suite runs green against KiteUtils 0.13.0: test_frames.jl 5/5, then test_parking.jl (the 20 s KPS4 run) with its elevation, azimuth and winch-force assertions 3/3. The overrides lived only in the gitignored live manifest, so the tracked .defaults still pin KiteUtils 0.11.13. They move by the minimal resolve once WinchModels and KiteModels release, and until then this stays draft.

Found on the way, not fixed here

Verification

  • Reproduced first: Failed to precompile KiteViewers, MethodError: no method matching quat2viewer(::FrameQuat, ::FrameConvention) — full output above
  • test/test_frames.jl red before, green after, in a KiteUtils 0.13.0 environment (juliaserver, 5 passed; 0 passed, 5 failed with the conversion removed)
  • Local full suite against KiteUtils 0.13.0: PASS (test/runtests.jl on Julia 1.12.7, examples env, KiteModels = this migration + #312 + the four renames, WinchModels = the fork branch; local overrides, not what CI installs)
  • Docs build: not run; no public symbol is added or renamed, and update_system is already on docs/src/reference.md
  • agent ci-local / GitHub CI: red at the resolve (Unsatisfiable requirements detected for package KiteUtils, run 34886316033), as above, until Accept KiteUtils 0.13, support Julia 1.12/1.13 only, test every line of src/ aenarete/WinchModels.jl#26 and Build SysState with the KiteUtils 0.12 constructor and one-slot winch fields KiteModels.jl#321 are released
  • Risk: test_parking.jl now drives the viewer from a real KPS4 run writing KA, but asserts position and force, not the drawn orientation; that the kite is drawn the right way round is proven only for the five hand-written attitudes in test_frames.jl.

Scope

+22 / -9 across four files, of which src/common.jl is two lines of conversion and the deletion of a commented-out three-line-kite block in the same function. Stacked on #50; test/test_frames.jl is new.

Opened elsewhere

Opened by 1-Bort-1, an AI agent working for @1-Bart-1.
Closes #54 · task KiteViewers.jl-54

1-Bort-1 and others added 2 commits September 14, 2026 20:42
KiteUtils 0.13 defines `quat2viewer(attitude)` and nothing else, so the
two-argument call did not just mis-draw a KS log: the `@compile_workload`
calls `update_system`, and the package failed to precompile.

Also drops the commented-out three-line kite enlargement from the same
function.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8gC66GuqKbtyojKrcQP9M
It still allowed 0.11.13 and 0.12, against the 0.13 the root project
asks for, so the workspace could not resolve even in principle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8gC66GuqKbtyojKrcQP9M
@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 14, 2026
@1-Bort-1

1-Bort-1 commented Sep 14, 2026 •

Copy link
Copy Markdown
Member Author

Local full suite: FAIL (0 min, Julia 1.13.0, one cell of the matrix)

   [7] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{PackageSpec}, julia_version::VersionNumber, installed_only::Bool)
     @ Pkg.Operations ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:818
   [8] up(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}, level::UpgradeLevel; skip_writing_project::Bool, preserve::Nothing)
     @ Pkg.Operations ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:2519
   [9] up
     @ ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:2493 [inlined]
  [10] up(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; level::UpgradeLevel, mode::PackageMode, preserve::Nothing, update_registry::Bool, skip_writing_project::Bool, workspace::Bool, kwargs::@Kwargs{})
     @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:479
  [11] up
     @ ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:446 [inlined]
  [12] up
     @ ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:177 [inlined]
  [13] instantiate(ctx::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Base.BinaryPlatforms.Platform, allow_build::Bool, allow_autoprecomp::Bool, workspace::Bool, julia_version_strict::Bool, kwargs::@Kwargs{})
     @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:1296
  [14] instantiate
     @ ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:1268 [inlined]
  [15] 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.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:3034
  [16] test
     @ ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:3026 [inlined]
  [17] 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.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:586
  [18] kwcall(::@NamedTuple{io::IOContext{IO}}, ::typeof(Pkg.API.test), ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec})
     @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:562
  [19] test(pkgs::Vector{PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{})
     @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:172
  [20] test(pkgs::Vector{PackageSpec})
     @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:161
  [21] 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.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:189
  [22] test()
     @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:178
  [23] top-level scope
     @ none:1
  [24] eval(m::Module, e::Any)
     @ Core ./boot.jl:489
  [25] exec_options(opts::Base.JLOptions)
     @ Base ./client.jl:310
  [26] _start()
     @ Base ./client.jl:577

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

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

Copy link
Copy Markdown
Member 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 WITH COMMENTS · 1 inline, 0 off the diff

Good

  • The two-line fix matches the released KiteUtils 0.13 API — src/common.jl:373-374 now converts with fromKS2KA and calls the single-argument quat2viewer, which is what the precompile workload (src/KiteViewers.jl:139, default frame=KA) hits, so using KiteViewers can precompile again.
  • The new test pins the actual rendered value: it reads KiteViewers.quat[], the quaternion the kite mesh is rotated by, not an intermediate, so it goes red on a missing conversion.
  • Scope is exactly the stated idea (+17/-9, four files); the only extra is deleting a commented-out three-line-kite block inside the same function, which §6 asks for and the card names.
  • examples/Project.toml following the root project to KiteUtils = "0.13" is consistent — leaving it at 0.11.13, 0.12 inside one workspace would be unresolvable either way.
  • No CHANGELOG entry is the right call and is argued: #50's Unreleased entry already states the behaviour, and a line saying the previous commit did not precompile is about the branch, not the release.

Not good

  • test/runtests.jl:8 — test_frames.jl creates a Viewer3D at top level and test_parking.jl then creates a second one in the same session, which CLAUDE.md calls unsupported — the two share quat, textnode and the rest of the module globals. The assertions survive only because test_frames reads its quaternion before test_parking starts; a later reorder or a second frame test would break silently.
  • The test compares the KS path against the KA path; if the KA↔KS transform is an involution (as the card implies) it would also pass with fromKA2KS in src/common.jl:373 — numerically equivalent, but the test does not pin the name.
  • frame == KS ? ... : state.orient treats every non-KS member of FrameConvention as KA silently; harmless if the enum has exactly two members, worth a thought if it ever grows.
  • One attitude from demo_state is the whole coverage for frame=KS — flagged in the card, and acceptable while nothing else resolves.
  • Neither the new test nor the suite can actually run until KiteModels ships its 0.13 support, so this lands unverified by CI; the card is explicit about it and the PR stays draft.

claude, rubric CLEAN_CODE.md. A different lab from the implementer
on purpose: a reviewer sharing its blind spots would not flag its mistakes.

Comment thread test/runtests.jl
using Test

cd("..")
include("test_frames.jl")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

MINOR: test_frames.jl creates a Viewer3D at top level and test_parking.jl then creates a second one in the same session, which CLAUDE.md calls unsupported — the two share quat, textnode and the rest of the module globals. The assertions survive only because test_frames reads its quaternion before test_parking starts; a later reorder or a second frame test would break silently.

@1-Bort-1

Copy link
Copy Markdown
Member Author

CI: Julia 1 - ubuntu-latest - x64 - pull_request failed on 97e8898d9.

https://github.com/OpenSourceAWE/KiteViewers.jl/actions/runs/34886316033/job/104117740896

@1-Bort-1 1-Bort-1 added agent:queued Agent task state and removed agent:ci Agent task state labels Sep 24, 2026
@1-Bort-1 1-Bort-1 added agent:running Agent task state agent:ci Agent task state agent:queued Agent task state and removed agent:queued Agent task state agent:running Agent task state agent:ci Agent task state labels Sep 24, 2026
1-Bort-1 added a commit to OpenSourceAWE/KiteModels.jl that referenced this pull request Sep 27, 2026
- fromKS2KA / fromKS2KA_body / fromENU2NED replace the names KiteUtils 0.13
  did not ship; calc_heading(s) hands it a KA attitude.
- examples_3d and test take KiteViewers from OpenSourceAWE/KiteViewers.jl#56's
  branch until a release accepts KiteUtils 0.13.
- Minimal resolve on 1.12 and 1.13: KiteUtils 0.12.2 -> 0.13.1,
  WinchModels 0.3.10 -> 0.3.11, nothing else.
- Tests assert the KA orientation, euler_KS round trip and KA turn rate;
  the parking examples stop overwriting sys_state.orient with KS and plot
  the KS body rate next to heading_rate.
- test-kps3: heading at azimuth 0 is checked modulo 2π; ≈ 0 had no
  absolute tolerance and failed on 2.8e-17.
- calc_orient_quat is on the functions page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

agent:ci Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant