Skip to content

feat(automations): add Factory Droid hook host adapter, .factory/hooks.json config, and recursion guard tests (#249) - #299

Open
Sanjai-Gopal wants to merge 4 commits into
secfoo-com:mainfrom
Sanjai-Gopal:feat/automations-droid-249
Open

Sanjai-Gopal wants to merge 4 commits into
secfoo-com:mainfrom
Sanjai-Gopal:feat/automations-droid-249

Conversation

@Sanjai-Gopal

Copy link
Copy Markdown
Contributor

Fixes #249

Depends on #291.

Summary

  • Add src/secfoo/automations/hosts/droid.py reusing claude.parse with FACTORY_PROJECT_DIR / DROID_VERSION, exit 2 blocking on PreToolUse, and decision: "block" on Stop.
  • Update manager.py to write .factory/hooks.json / ~/.factory/hooks.json with Create|Edit|ApplyPatch matcher (never emitting onFailure: "block").
  • Add docs/DROID_AUTOMATIONS.md, fixtures, and tests/test_automations/test_droid_automations.py including a nested droid exec SECFOO_HOOK_ACTIVE recursion guard test.

Verified

  • pytest tests/test_automations/ tests/test_docs_consistency.py -v (31 passed)
  • ruff check . & bandit -r src/secfoo -c .bandit -ll -q

@Sanjai-Gopal
Sanjai-Gopal requested a review from vsn411 as a code owner December 6, 2026 15:36
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.

Automations for Factory Droid: Claude-compatible hooks, with a recursion guard for droid exec

1 participant