Skip to content

fix(app): enforce compiled lock before run - #504

Merged
pawellisowski merged 7 commits into
mainfrom
fix/501-stale-app-lock
Sep 8, 2026
Merged

fix(app): enforce compiled lock before run#504
pawellisowski merged 7 commits into
mainfrom
fix/501-stale-app-lock

Conversation

@pawellisowski

Copy link
Copy Markdown
Contributor

Summary

  • refuse aware app run when the compiled lock is missing, invalid, or stale
  • bind top-level and nested execution to one approved source snapshot
  • enforce exact compiled agent pins for real and dry-run dispatch while keeping simulation machine-independent
  • make app validate emit the approval lock and document the run gate

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --manifest-path cli/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path cli/Cargo.toml
  • regression tests for missing/stale locks, nested apps, preview modes, unsafe IDs, source snapshots, and agent-pin drift

Refs #501

Review rounds: 6 (self-feeding: 4) — rounds: nested dispatch/runtime snapshot; preview nesting; snapshot/path fencing; exact agent pins/validate lock; fail-closed missing pins; final adversarial pass; outcome: clean after approved rebuild; operator: approved rebuild

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T19:45:26.552789Z 30408c3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30408c353c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cli/src/commands/app.rs
let app = crate::manifest::loader::load_app(&manifest_path)?;
// Parse and hash one source buffer so the compiled sidecar approves the
// exact app we execute. Gate every run mode before provenance or dispatch.
let (app, approved_lock) = crate::app_lock::load_approved_app_with_lock(&manifest_path)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add compilation to the documented install-and-run flows

When an app is installed from an uncompiled source, this unconditional gate now rejects every run with E_APP_LOCK_MISSING. That is exactly how the main README, 30-apps/_examples/README.md, and the persona onboarding guides instruct users to proceed—install or edit a raw example and immediately run it—and the repository contains no example .lock files, so the advertised quickstart and scheduled-app flows now fail universally. Update those flows to compile the final installed source before running/scheduling it, or otherwise ensure installation carries an explicitly approved lock.

Useful? React with 👍 / 👎.

@pawellisowski
pawellisowski merged commit f845b96 into main Sep 8, 2026
14 checks passed
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.

1 participant