feat: sync compact_columns with the cortex registry - #9
Merged
Merged
Conversation
R/registry.R records the raw registry keys marked deprecated or sunsetted in cvr-cortex (features/slicer/slicer_fields.yaml), plus helpers that convert them to cleaned column names. This package has no schema-sync machinery, so the lists are maintained by hand and dated. yaml moves into Suggests so the test suite can verify them against the registry whenever a cvr-cortex checkout is available. Refs DS-1046
compact_columns carried ten keys the registry marks deprecated: app_performance, immersion_score, orientation_score, ergonomics_score, boundary_score, controller_events_score, controller_engagement_score, dynamic_engagement_score, battery_efficiency, and standing_percentage. Eight of them were already absent from the sibling Python package's compact list, so this also restores parity between the two. c3d_metric_components_posture_standing_percentage takes the place of standing_percentage, which it replaced upstream — new sessions carry only the posture_* trio, and the same-named StarRocks column is a melder compatibility alias rather than a contract. battery_efficiency has no single successor: it is superseded by a drain rate computed from battery_drain_sum and battery_drain_time_millis. c3d_metrics_average_fps stays. Melder intends to delete the emission but the org dashboard tile still reads it, so the registry deliberately keeps it active; noted inline so it is not removed by mistake. Compact output goes from 57 to 47 columns. Everything dropped is still returned by compact = FALSE. Refs DS-1046
test-compact-columns.R fails if compact_columns contains a duplicate or a key the registry has deprecated or sunsetted, with lifecycle_exceptions as the escape hatch for a documented retention. A fourth test cross-checks R/registry.R against slicer_fields.yaml itself, so the hand-maintained lists cannot silently go stale; it skips when no cvr-cortex checkout is present, which is the case in CI. test-sessions.R reads controller_engagement_score from full mode now that it is no longer curated into compact, and asserts that the other dropped columns still come back with compact = FALSE. Refs DS-1046
Derya
approved these changes
Aug 12, 2026
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.
Closes DS-1046 — https://linear.app/cognitive3d/issue/DS-1046
Mirrors CognitiveVR/cognitive3dpy#34 (DS-1045), which lands the same guard on the Python package.
Problem
compact_columns(R/sessions.R) is a hand-curated list copied from the Python package. This repo has no schema-sync machinery, so it drifts from the cortex field registry with nothing to catch it. The drift turned out to be larger than the ticket recorded: ten entries name keys the registry marksdeprecated: true, not two. Eight of them were retired from the Python compact list some time ago and never mirrored here.Changes
R/registry.Rrecords the registry keys flaggeddeprecatedorsunsetted, with helpers that convert them to cleaned column names. The lists are hand-maintained and dated, since there is no sync script —yamlmoves intoSuggestsso the suite can verify them against the registry itself.compact_columnsgoes from 57 to 47 columns. Removed:app_performance,immersion_score,orientation_score,ergonomics_score,boundary_score,controller_events_score,controller_engagement_score,dynamic_engagement_score,battery_efficiency,standing_percentage. Addedc3d_metric_components_posture_standing_percentage, which replacedstanding_percentageupstream — new sessions carry only the posture trio, and the same-named StarRocks column is a melder compatibility alias rather than a contract.c3d_metrics_average_fpsstays. Melder intends to delete the emission but the org dashboard tile still reads it, so the registry deliberately keeps it active; noted inline.tests/testthat/test-compact-columns.Rfails on duplicates or on any compact column the registry has deprecated or sunsetted, withlifecycle_exceptionsas the escape hatch for a documented retention. A fourth test cross-checksR/registry.Ragainstslicer_fields.yamlso the hand-maintained lists cannot silently go stale — it skips when no cvr-cortex checkout is present, which is the case in CI.test-sessions.Rreadcontroller_engagement_scoreout of compact output and would have gone red; it now reads it from full mode, and a new test asserts the dropped columns still come back withcompact = FALSE.Verification
testthat::test_local()→ 417 passed, 0 failed, 0 skipped across 7 filesslicer_fields.yamland matched both lists exactlyc3d_metrics_immersion_scoreinto the list producesFAIL 1with the intended messageNote for reviewers
This is the user-visible half of the change: default compact output loses ten columns. All of that data is still returned by
compact = FALSE. Unlike the Python package, this one has no deprecation-warning machinery, so dropped columns disappear silently rather than warning first — worth deciding whether that is acceptable or whether a warning layer should follow.🤖 Generated with Claude Code