fix: give compile notes a machine-readable kind (info/warn/error) (#170)#171
Merged
Conversation
Compile notes were a bare `notes: string[]`, mixing benign provenance, warnings, and errors with no machine-readable distinction. Consumers had to string-match the prose to decide how loud to be — which broke when the #165 fix changed note wording (0.46 -> 0.47), silently defeating floless.app's `"defaulting to write-mode"` substring match. Each note is now a `{ kind, text }` map with `kind: info | warn | error`: - info — benign provenance (author-declared mode / mode-overridable exec, #165) - warn — silent write-mode fallback ("defaulting …"), uninstalled agent, dangling `{{ x.y }}` input reference - error — reserved (run-blocking) AWARE owns the severity; consumers render by `kind` and stay correct across wording changes. Documented in app-spec lock contract. Tests updated to assert kinds + the serialized `{kind,text}` shape. Bump 0.47.0 -> 0.48.0.
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
Fixes #170. Compile notes were a bare
notes: string[], mixing benign provenance, warnings, and errors with no machine-readable distinction — so every consumer had to string-match the prose to decide severity. That broke when the #165 fix changed note wording (0.46→0.47), silently defeating floless.app's"defaulting to write-mode"substring match and making it render benignexecprovenance as amber warnings.Each note is now a structured
{ kind, text }map:Classification
infomode-overridableexec provenance (the #165 common case)warn"… defaulting to write-mode for safety"(silent fallback),"agent … not installed", dangling{{ x.y }}input referenceerrorAWARE owns severity; consumers render by
kindand stay correct across wording changes — they must never key on thetextprose again. Documented in the app-spec lock contract.Review
codex exec review --base main): no correctness issues.Test plan
cargo test— 503 passed, 0 failed (new kind + serialized-shape assertions)cargo clippy --all-targets -- -D warnings+cargo fmt --all --check— cleanaware app compileon a read-only exec app emitskind: info/text: …Closes #170.