Conversation
system_definition(s) takes the points and the springs the model integrates; topology_metadata(s) carries its structure document in a log under topology. KiteGeometry is pinned through [sources] until it is registered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1-Bort-1
commented
Sep 30, 2026
1-Bort-1
left a comment
Member
Author
There was a problem hiding this comment.
Independent review (advisory)
Verdict: APPROVE WITH COMMENTS · 3 inline, 0 off the diff
Good
- Connectivity comes straight from
s.springs, so there is no second copy ofSPRINGS_INPUT, as the card says; checked againstinit_springs!/loop!insrc/KPS4.jl - KCU extra mass is
set.kcu_massand nots.masses[segments+1], so the tether half-masses thatloop!adds atKPS4.jl:484are not counted twice pos_ENUis anSVectorfield in KiteGeometry'sPoint, so the definition copies the pose and does not alias the liveMVectors; confirmed in_structure.jl:73unit_stiffness = axial_stiffness * lengthgives the stiffness per length that the schema field asks for (N); matches theset.axial_stiffness / L_0construction- Both model methods share one 3-argument assembler, so there is one path from model to definition
- Deferring
connectivity_shaandto_jsonto KiteGeometry and not adding a third preimage writer is the right call; the reason is in the card - The round-trip testset protects the actual contract, a saved log parsing back to the same structure document
Not good
src/system_definition.jl:17— All 9 kite springs getd_lineandrho_tether, but KPS4 puts no mass on them (the kite points already hold all ofset.mass), and several are canopy struts, not lines. Anything that sums segment mass will read a heavier system than the one that was simulated.src/system_definition.jl:52— A 7-argument positionalMetadata(...)with two empty strings, a version literal and another empty string can't be reviewed from the diff. Keyword construction, or a KiteGeometry default, would nameconnectivity_shaand make the placeholder visible.test/test-system-definition.jl:31— This compares an immutable snapshot with spring endpoints thatloop!never changes, so it passes whatever the step does. Thenext_step!and the assertion add runtime but protect nothing beyond a check before the step.- The
[sources]pin to an unregistered KiteGeometry means./bin/releasecannot register KiteModels until the pin comes out; merging to main blocks releases until then @reexport using KiteGeometryis only in the changelog; the card never gives a reason for pushingPoint,Segment,Tether,Winch,Metadatainto every user's namespace- The
"1.0.0"and"structure_schema.yml"literals copy constants KiteGeometry owns and will drift when its schema version moves stiffness_factoris left out ofunit_stiffness, so the example (stiffness_factor=0.1) logs 10x the stiffness it actually simulated; the docstring says nothing about this- The 3-argument
system_definition(s, segments, extra_masses)is a helper, but it becomes a documented method of an exported function - Prose in
docs/src/functions.mdand the changelog is hard-wrapped, against §6
claude, rubric CLEAN_CODE.md. A different lab from the implementer
on purpose: a reviewer sharing its blind spots would not flag its mistakes.
Member
Author
|
Local full suite: FAIL (1 min, Julia 1.13.0, one cell of the matrix) |
…nwrapped prose The bridle springs carry no mass in KPS4, so their segments get zero density. The shared constructor becomes assemble_system_definition instead of a third method of the exported system_definition. The KPS4 test drops a next_step! that no assertion depended on and pins unit_stiffness at the nominal value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
system_definition(s)describes a KPS3 or KPS4 model as a KiteGeometrySystemDefinition: its points, the springs it integrates as segments, one tether and one winch.topology_metadata(s)puts that definition into a saved log under the keytopology. Until now a KPS4 run described its system only as a segment count, so nothing that reads a definition could draw it.What it builds
s.pos, named"1"upwards as the schema asks of index-keyed writers. Point 1, the winch, isSTATIC.s.springsas they stand: the 6 tether springs and the 9 bridle springs, with theirp1/p2, rest length andaxial_stiffness * lengthasunit_stiffness. Connectivity therefore comes from whatloop!integrates, not from a second copy ofSPRINGS_INPUT. The bridle segments have density 0, because KPS4 puts no mass on them, and keepd_lineas the diameter they have in the drag term. KPS3 has no spring vector, so its segments joiniandi + 1.unit_stiffnessis the nominal value.stiffness_factoris left out on purpose: it is a start-up ramp thatnext_step!raises by 0.01 per step up to 1.0 (src/KiteModels.jl:749), and the torque-control example ends its run at 1.0. The test pins the nominal value.densityanddiameter.segments + 1. The winch sits at point 1 and takesgear_ratioanddrum_radiusfrom the settings.mirrorsayspos_ENUis the initial pose, and that pose depends oninit!'s arguments (delta,upwind_dir, steady-state solve). Building the definition right afterinit!is therefore the only way to get it, and the docstrings say so.Where I'd push back
examples/reel_out_4p_torque_control.jlgains two lines:metadata = topology_metadata(kps4)afterinit!, and; metadataon itssave_log.Logger(particles, STEPS)never sees the model, and KiteUtils'Loggerhas no metadata slot, so an untouched script cannot carry the definition without global state. The simulation itself is unchanged. The other log-saving examples are left alone.connectivity_shais written as"", andawesIO_versionandschemaas the literals"1.0.0"and"structure_schema.yml", through a positionalMetadata(...). KiteGeometry'sMetadatahas no keyword constructor, no defaults and no exported schema version, and it has no SHA writer yet. Unitdocumentadds the writer tostructure_document. The defaults belong in KiteGeometry too, so that is where the literals should go. A third copy of the preimage rule here, beside SAM's and the coming KiteGeometry one, is the duplication the plan forbids.@reexport using KiteGeometryis what the thread asks for. It lets a KiteModels user build, read and compare the definition (SystemDefinition,Segment,structure_document) without a secondusing, as KiteModels already does for KitePodModels, WinchModels and AtmosphericModels. What it costs isPoint,Segment,Tether,WinchandMetadatain every user's namespace. Aqua finds no ambiguity.structure_documentround-trips today, and a JSON reader cannot parse it.to_jsonis also unitdocument's. Swapping the writer is then one line intopology_metadata.aero_force_bandtether_induced_forceper step. It writes neither.rgoversrc/,examples/andtest/finds no hits. Thesysstaterename has nothing to change here. What this unit needed from that side was KiteUtils 0.13'ssave_log(…; metadata), which Write KA orientations to SysState, keep KS inside the model #312 brings.mirror. KPS3 and KPS4 hold state in the model struct, as their integrators require, and no definition type mirrors it. The definition is built fresh from the model and carries no per-step fields.Dependencies
[sources]to OpenSourceAWE/KiteGeometry.jl@1ca16d8, which is the merge of Generate SystemDefinition and its components from a recorded awesIO commit KiteGeometry.jl#26.[compat]is"0.1". The General registry rejects a package with a[sources]URL dependency, so while the pin stays,./bin/releasecannot register KiteModels. KiteGeometry has to be registered first, and then the[sources]entry comes out..defaultmoves by the oneKiteGeometryentry and nothing else. The test project gainsYAMLto read the log back.Verification
UndefVarError: system_definition not defined in Main.test/test-system-definition.jlred before, green after: 15/15 across 3 testsets (10 + 4 + 1). The KPS4 testset checks point count, segment endpoints againstkps4.springs, positions, rest lengths, nominalunit_stiffness, tether, winch, total extra mass and massless bridle segments. The KPS3 testset covers its layout. A third testset checks that a saved and reloaded log parses back to the same structure document. Before the review round the bridle-density assertion failed against the previous code (8 passed, 2 failed), and it passes now.examples/reel_out_4p_torque_control.jlran to the end and logged 1800 rows of 11 points. Its log'stopologyparses ton_points11 (length(kps4.pos)11) and 15 segments, whose endpoints equalkps4.springs(true). The metadata keys arecreated,frame_convention,kiteutils_versionandtopology.test/test-aqua.jl9/9 (after the review round) ·test/test-update-sys-state.jlandtest/test-kps3.jlgreen.agent ci-local,Pkg.test(), Julia 1.13.0, fail-fast): FAIL,337 passed, 0 failed, 1 errored, 11 broken. The one error istest/test-kps4.jl:581test_find_steady_state("solver returned non-finite values"). That is find_steady_state! does not converge for KPS4 on Julia 1.13, and CI hides it #314, which reports this error on main under 1.13, and it comes beforetest-system-definition.jlruns. The 11 broken are the ones already marked intest-kps4.jl. The box's later full-suite run failed at the same test, andtest/test-kps4.jlalone in the session reproduces it with find_steady_state! does not converge for KPS4 on Julia 1.13, and CI hides it #314's signature:find_steady_state!: solver did not converge! (... iterations=247), then "non-finite values" at:581. The branch's onlysrcchanges aresrc/system_definition.jland its include/reexport, and none of that is onfind_steady_state!'s path. So this is neither a bug in the change nor in its test. find_steady_state! does not converge for KPS4 on Julia 1.13, and CI hides it #314 owns it, and nothing here was loosened.fsfe/reusecontainer) · stacked on Write KA orientations to SysState, keep KS inside the model #312's head 6bf76f9.pos_ENUof a definition built after the run has started is the current pose, not the initial one. The docstrings say to build it afterinit!.Scope
+190 / −5 across 10 files.
src/system_definition.jl(73 lines) and its test (57 lines) are the change. The rest is the two-line example edit, the docs section (which also lists the internalassemble_system_definition), the changelog file, and 9Project.tomllines across the root and test projects, plus 10 per.defaultfor the KiteGeometry entry. Stack: on #312 (frame unification), which is on #321.Opened by
1-Bort-1, an AI agent working for @1-Bart-1.Closes #322 · task
KiteModels.jl-322