Repository navigation
fix(desktop): idiomatic Go names for the desktop-kind fields - #75
Merged
Merged
Conversation
The four desktop kinds landed in #74 without @go() annotations, so cue:gen produced snake-cased identifiers with a leading capital: Entry_name, Browser_arg, Mime_type, Startup_wm_class, Config_path_template, and a bare Url. Every other def in this schema annotates, and these are types a plugin consumer writes against directly -- the desktop-kind provider decodes into them field by field -- so leaving them non-idiomatic makes every consumer read wrong. 18 annotations, no shape change: the yaml/json tags and therefore the authored wire surface are byte-identical, so nothing needs migrating and #SchemaVersion does not move. entry_name -> EntryName url -> URL browser_arg -> BrowserArgs mime_type -> MimeTypes startup_wm_class -> StartupWMClass config_path_template -> ConfigPathTemplate *_template -> *Template cursor_theme -> CursorTheme icon_theme -> IconTheme extra_file -> ExtraFiles session_desktop -> SessionDesktop theme_render -> ThemeRender Found while writing the plugin-desktop-kind provider against them. Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3
Review — PASSHead SHA: Security screen: PASS — no secrets, exfiltration, scope mismatch, guardrail weakening, or supply-chain change. The diff does exactly what the description claims. Checklist: All applicable rules PASS or NA.
No comments on the thread to intake. Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
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.
Summary
The four desktop kinds landed in #74 without
@go()annotations, socue:genproduced snake-cased identifiers with a leading capital:Every other def in this schema annotates, and these are types a plugin consumer writes
against directly — the
plugin-desktop-kindprovider decodes into them field by field —so leaving them non-idiomatic makes every consumer read wrong.
Every file in the diff
schema/desktop.cue@go()annotationsspec/cue_types_gen.gotask cue:genentry_nameEntry_nameEntryNameurlUrlURLbrowser_argBrowser_argBrowserArgsmime_typeMime_typeMimeTypesstartup_wm_classStartup_wm_classStartupWMClassconfig_path_templateConfig_path_templateConfigPathTemplate*_template*_template*Templatecursor_theme/icon_themeCursor_theme/Icon_themeCursorTheme/IconThemeextra_fileExtra_fileExtraFilessession_desktopSession_desktopSessionDesktoptheme_renderTheme_renderThemeRenderNo shape change, so nothing migrates
@go()renames only the Go identifier. Theyaml:andjson:tags — and therefore theauthored wire surface — are byte-identical, so no manifest changes, nothing needs a migration
op, and
#SchemaVersiondoes not move.How it was found
Writing the
plugin-desktop-kindprovider against these types. The compiler saide.URL undefined (type *spec.DesktopEntry has no field or method URL, but does have field Url)— which is the schema telling a consumer it was authored carelessly.How tested
The corpus-and-teeth suite from #74 passes unchanged — 41 assertions across 11 tests.
That is the substantive check here: those tests unify authored bodies against the shipped
schema, so if an annotation had altered the wire surface rather than just the Go name, they
would fail. They do not.
Go names changed, tags identical.
Rulebook compliance
/charly-internals:git-workflow.Urlwas traced to a missingannotation in my own merged PR rather than worked around in the consumer with a local
alias — the consumer is right and the schema was wrong.
to reach.
@go()is the existing mechanism; no second naming scheme isintroduced.
e.Urlin every consumer — would havespread the defect instead of fixing it.
main, PR-only, noforce-push, no direct push to
main, no hook bypass.the wire surface did not move; a build alone would not.
task cue:genfrom this worktree; tests-count=1.N/A — schema repo, no bed.N/A — a naming fix; no new claim, no roster.Change classification
task cue:gen,go build, and feat(desktop): the theme, session, displaymanager and desktopentry kinds #74's corpus-and-teeth suite passingunchanged.
authored-surface tests confirm nothing but the Go names moved.
Assisted-by: Claude Code claude-opus-5[1m] (fully tested and validated)