Skip to content

fix(install): validate app before installing — refuse write-without-safety#137

Merged
pawellisowski merged 1 commit into
mainfrom
fix/134-install-validates
May 22, 2026
Merged

fix(install): validate app before installing — refuse write-without-safety#137
pawellisowski merged 1 commit into
mainfrom
fix/134-install-validates

Conversation

@pawellisowski
Copy link
Copy Markdown
Contributor

What

aware app install now refuses apps with validation errors — specifically write-mode nodes missing a safety: block — instead of installing them and failing at run time.

Repro fixed

$ aware app install ./nosafety
✗ [E_APP_WRITE_WITHOUT_SAFETY] node "post" (microsoft-365 / teams.channel.post-message) is write-mode without a `safety:` block
error: app install refused: app failed validation (fix errors above and retry)

$ ls ~/.aware/apps/nosafety   # nothing written
ls: cannot access ...         # correct — install-dir never created

How

In install(), before calling install_app_from_path (which copies files), the source manifest is loaded and passed through validate_app + validate_app_safety — the same checks validate_cmd runs. If any errors are found, they are printed to stderr and the function returns early with an error. Nothing is written to ~/.aware.

Warnings don't block install (same policy as validate — only errors do).

Fixes #134

…afety

aware app install now runs the same validation as aware app validate
before copying any files. A write-mode node missing its required safety:
block (E_APP_WRITE_WITHOUT_SAFETY) is surfaced at install time with the
full issue list printed to stderr; nothing is written to ~/.aware on
failure. Previously the invalid app installed cleanly and only failed
much later at run pre-flight.

Fixes #134
@pawellisowski pawellisowski merged commit f40a4da into main May 22, 2026
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.

aware app install accepts write-without-safety apps that validate + run both reject

1 participant