Repository navigation
fix(factorydroid): move docs links to docs.factory.com and pass preserveRiskLevel - #3977
Merged
Merged
Conversation
…rveRiskLevel Point every Factory Droid citation at the docs.factory.com page the old docs.factory.ai URL redirects to, and carry Droid's per-hook preserveRiskLevel (PreToolUse only) through generate and import. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes out the remaining Factory Droid follow-ups from #3414: the stale
docs.factory.ailinks and the per-hookpreserveRiskLevelfield. The other items in the issue already landed in #3447 (permissionRules), #3644 (enabledTools) and 983e792 (failClosed->onFailure).Changes
docs.factory.aiURL insrc/,docs/and.rulesync/skills/rulesync-feature-research/references/factorydroid.mdwith the finaldocs.factory.compage each one redirects to (checked with curl). Moved paths follow the redirect target, not just the new host:cli/configuration/agents-md->harness/agents-mdcli/configuration/custom-droids->harness/subagentscli/configuration/custom-slash-commands->harness/custom-slash-commandscli/configuration/settings->droid-cli/settingscli/configuration/skills->harness/skillsreference/hooks-reference->harness/hookssoftware-factory/*->automations/*src/generated/docs-content.ts.preserveRiskLevelboolean toHookDefinitionSchema. Factory Droid's converter passes it through to.factory/hooks.json/~/.factory/hooks.jsonand reads it back on import. Droid documents it as "PreToolUseonly" (hooks reference), so it is restricted topreToolUse: atrueon another event is dropped with a warning in both directions.preserveRiskLevelto the hook field list indocs/reference/file-formats.md.factorydroid-hooks.test.ts.Design decisions
preserveRiskLevelreuses the existingbooleanPassthroughFieldsmechanism with aneventsfilter, like other tool-specific booleans (continueOnBlock,enabled). The triage plan said to emit onlytrue. That mechanism also writes an authoredfalse, which equals Droid's default, so it changes nothing; I kept the shared behavior instead of adding a special case. Non-boolean values are dropped on import.Skipped items
permissionRulesby default: declined. Droid's docs say the feature must be "enabled for your organization and supported by your Droid version". Each rule needs passingtests: a failing rule is skipped, and duplicate ids skip the whole source. The legacy allow/deny lists "remain respected". Generating rules and tests automatically from glob patterns would be guesswork, and on orgs without the feature it could silently drop policy. Users can already authorfactorydroid.permissionRulesdirectly (feat(factorydroid): round-trip native permissionRules through the override #3447).Verification
pnpm run checkandpnpm run cicheck:contentpass. The factorydroid hooks tests andsrc/types/hooks.test.tspass.opencode-hooks(real Bun runtime),glob,shell-command-categories,antigravity-command-skill-nameandmcp/docs. They still failed when run on their own, because the host was overloaded (load average about 110). CI is the reference for these.Closes #3414
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4