Repository navigation
nav: CoPH's records and stage ledger (C1) - #1210
Merged
Merged
Conversation
C1 of docs/roadmap/NAV-COPH-ROADMAP.md: the C++ twin of GRL-SNAM's grl_snam.coph (CoPH-Stagewise, vendored at c1f1ff3), up to the stage ledger. inc/cvc/nav/coph_config.h: - coph_config and coph_communication_config: every field of Config and CommunicationConfig, with Python's defaults; modes are strings, as in Python. validate() is __post_init__: the same refusals with the same messages, in the same order, and it fills replay_update_cap the same way. Python's min() is mirrored, so NaN scales pass where upstream's do. - outside_profile() and require_profile(): the mode fields that differ from the demos' profile, which the twin refuses (D7). coph_profile() and coph_communication_profile() are the demos' configurations. inc/cvc/nav/coph_ledger.h (built with -ffp-contract=off): - coph_shape (disk or slab), coph_reading, coph_transition, coph_footprint, coph_observation, coph_stage (new_stage, contains) and coph_intersects. - coph_ledger: the current stage and the previous cfg.previous, with observe, advance and set_geometry. The geometry store comes from the navigation layer. The demos' learner is crossing_demo.CrossingLearner, a MazeLearner, and its rule is not Learner.advance's, which the roadmap first described. It advances along whichever axis left the inner box, in either direction (y steps are 2.8 m), pools the readings and footprints of every kept stage, and never sets Stage.anchors, so _field_fit's overlap continuity rows are always empty in the demos. The ledger implements that rule; the roadmap's §1, §4.1, §4.3 and G4 now say so. The golden is written by GRL-SNAM (grl_snam.tools.coph_golden, CVC-Lab/GRL-SNAM#168) and committed in src/cvc/tests/data, the same blob as GRL-SNAM's tests/fixtures copy. nav_coph_test reproduces it bit for bit: - G1: all 74 Config and 5 CommunicationConfig cases (acceptance, Python's message, every value, the fields outside the profile, and that the ledger refuses those); - G4: every tick of the 360-tick script under its three configurations: each advance and its axis, each new stage's fixed fields, and each kept stage's readings, transitions, footprints and obstacles. C++-only tests cover upstream's NaN behaviour, require_profile's message, a sensor-less observation and a repeated uid across stages.
The function-local static in coph_profile_modes() is process-wide state, which libcvc does not keep; package-linux's singleton scan refused it.
transfix
enabled auto-merge (squash)
November 14, 2026 09:04
transfix
disabled auto-merge
November 14, 2026 21:24
transfix
enabled auto-merge (squash)
November 14, 2026 21:24
transfix
added a commit
that referenced
this pull request
Nov 15, 2026
Conflicts: the roadmap, coph_golden.json and both CMakeLists.txt; each takes C2's side, which already held C1's lines. The diff from master is C2's own.
transfix
added a commit
that referenced
this pull request
Nov 16, 2026
…#1253, #1255, #1256, #1264, #1268, #1271, #1273, #1277) - ci.yml: the sanitizer list keeps this branch's tests (stream_test, net_ws_client_test, ariadne_host_test) and master's segmentation_intrinsics_test. - STATE_EXEC_THREADED.md: the room-call verbs (room-run is #1273's) and #1252's segment.seeded provider in the provider table, both registered without a kind. room-call's async functions stay on the app's host: a reply settles on the relay client's reader thread through host.finish, so moving them to *ictx.host needs a finisher first.
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.
This is C1 of
docs/roadmap/NAV-COPH-ROADMAP.md. It starts the C++ twin of GRL-SNAM'sgrl_snam.coph(CoPH-Stagewise, vendored at c1f1ff3) with the configuration records and the stage ledger. It is additive and default-off: two new headers, two new TUs and one test. Nothing existing calls them yet.What lands
inc/cvc/nav/coph_config.hcoph_configandcoph_communication_config: every field ofConfigandCommunicationConfig, with Python's defaults. The modes are strings, as in Python, so a mode Python refuses is refused here with Python's message.validate()is__post_init__: the same refusals, the same messages, the same order. It fillsreplay_update_capthe same way, and leaves the config unchanged when it throws. It mirrors Python'smin(), so a NaNdt, stage width, sensor radius or safety margin passes, as it does upstream. That was checked against Python, and a test pins it.outside_profile()names the mode fields that differ from the demos' profile;require_profile()throws on them;coph_profile()andcoph_communication_profile()are the demos' configurations.inc/cvc/nav/coph_ledger.h, built with-ffp-contract=off(/fp:preciseon MSVC):coph_shape, a disk or a slab, withreach();coph_reading,coph_transition,coph_footprintandcoph_observation;coph_stage:new_stageandcontains;coph_intersects.coph_ledgerkeeps the current stage and the previouscfg.previous, withobserve,advanceandset_geometry. Its constructor validates and refuses configurations outside the profile.observe_geometry,refresh_geometry) belongs to the navigation layer, which hands it toset_geometry.A correction to the roadmap
The demos' learner is
crossing_demo.CrossingLearner, amaze_learning.MazeLearner. Its stage rule is notlearner.Learner.advance's, which is what §1 and §4.1 described:size × (1 − overlap), in either direction. So y steps are 2.8 m.Stage.anchors._field_fit's overlap continuity rows read those anchors, so the rows are always empty in the demos.coph_stagehas no anchors, and there are no overlap rows to build.The ledger implements the demos' rule, which the golden pins. The roadmap's §1 table, §4.1, §4.3's field fit and the G4 row now say so.
The golden
src/cvc/tests/data/coph_golden.jsonis written by GRL-SNAM (python -m grl_snam.tools.coph_golden --out DIR, CVC-Lab/GRL-SNAM#168). It is the same git blob as GRL-SNAM'stests/fixtures/coph_golden/coph_golden.json(c5b3e4dc). Every double is its raw bits.nav_coph_testreproduces it bit for bit.G1:
Configand 5CommunicationConfigcases, giving acceptance, Python's message, and every field's value after validation (checked against Python's field list);G4: every tick of the 360-tick script under its three configurations (the profile; small caps with
previous3;previous0 with no overlap). It checks:The path advances along both axes in both directions. The profile's reading and footprint caps fill, and in the small-caps variant every cap fills.
C++ only:
require_profile's message;Checks
nav_coph_testpasses, 12 tests.-ffp-contract=offmatters on aarch64, the same as for the belief kernels.Next