Skip to content

fix: refuse headless session activate that would silently drop project lifecycle hooks - #1219

Draft
gominimal-aw-bot[bot] wants to merge 1 commit into
mainfrom
inbox-patch/fix/session-activate-drops-hooks-non-vcs-a6028e01c10e0045
Draft

fix: refuse headless session activate that would silently drop project lifecycle hooks#1219
gominimal-aw-bot[bot] wants to merge 1 commit into
mainfrom
inbox-patch/fix/session-activate-drops-hooks-non-vcs-a6028e01c10e0045

Conversation

@gominimal-aw-bot

Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABMzEkjQ

Run headlessly (--no-prompt/--no-input/non-TTY) against a project directory that is not a VCS root, min session activate skips the workspace tree upload. That upload is the only path the project's minimal.toml takes to the daemon, so the lifecycle hooks it declares were silently dropped and never ran while activation still exited 0 — the sole signal being a generic "skipping file upload" warning that never mentions hooks. This inspects minimal.toml at the resolved upload root before that skip and, if it declares lifecycle hooks, fails with a non-zero exit naming how many would be dropped and pointing to --sync tarball (upload them) or --sync none (opt out on purpose). A hook-less project keeps the existing skip-and-warn behaviour.

Verification

cargo fmt --all --check --manifest-path target/Cargo.toml — clean
cargo clippy --workspace --locked --manifest-path target/Cargo.toml -- -D warnings — 0 warnings
cargo build --workspace --locked --manifest-path target/Cargo.toml — Finished, ok
cargo test --workspace --locked --manifest-path target/Cargo.toml — all pass (added project_lifecycle_hook_count_detects_declared_hooks)

A project directory that is not a VCS root has its tree upload skipped
on the headless path (--no-prompt, --no-input, or a non-TTY). That
upload is the only way the project's minimal.toml reaches the daemon,
so the lifecycle hooks it declares were silently discarded while
activation still exited 0.

Inspect the project's minimal.toml at the resolved upload root before
taking the SkipHeadless skip: if it declares lifecycle hooks, bail
with a non-zero exit naming how many would be dropped and pointing to
--sync tarball or --sync none, rather than proceeding silently. A
hook-less project keeps the existing skip-and-warn behaviour.
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a6783bc5-12f6-4922-8eee-3a4e8ae00e06

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

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.

0 participants