Skip to content

fix: give compile notes a machine-readable kind (info/warn/error) (#170)#171

Merged
pawellisowski merged 1 commit into
mainfrom
fix/170-typed-compile-notes
May 27, 2026
Merged

fix: give compile notes a machine-readable kind (info/warn/error) (#170)#171
pawellisowski merged 1 commit into
mainfrom
fix/170-typed-compile-notes

Conversation

@pawellisowski
Copy link
Copy Markdown
Contributor

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 benign exec provenance as amber warnings.

Each note is now a structured { kind, text } map:

notes:
  - kind: info        # info | warn | error
    text: "command exec is mode-overridable; using author-declared mode: read"

Classification

kind notes
info author-declared mode / mode-overridable exec provenance (the #165 common case)
warn "… defaulting to write-mode for safety" (silent fallback), "agent … not installed", dangling {{ x.y }} input reference
error reserved (run-blocking)

AWARE owns severity; consumers render by kind and stay correct across wording changes — they must never key on the text prose again. Documented in the app-spec lock contract.

Review

  • Codex (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 — clean
  • E2E: aware app compile on a read-only exec app emits kind: info / text: …

Closes #170.

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.
@pawellisowski pawellisowski merged commit 16a0fe4 into main May 27, 2026
@pawellisowski pawellisowski deleted the fix/170-typed-compile-notes branch May 27, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile notes are untyped strings — add a severity/kind so consumers can render info vs warning without parsing prose

1 participant