Repository navigation
fix(spawner): resolve repository hooks from the configured directory - #31
Merged
Merged
Conversation
Resolve stored hook names with the existing confined path helper before execution. This makes dashboard-selected hooks run independently of the runner working directory and rejects escaping paths before image or container work. Existing skip, environment, workspace, and failure behavior is preserved. Add file-scoped requirements and real-process regressions for nested names, changing config roots, cwd decoys, environment overrides, path and symlink escapes, optional hooks, and nonzero exit lifecycle details. Include independently reviewed verdicts for all twelve affected requirements. Validation: 10 regression cases fail before the fix; all 101 spawner/directory tests pass afterward. Ruff, format, mypy, spec lint, wheel build, clean-wheel smoke, and the changed-scope 2119 gate pass. Fresh independent spec, code, and test-honesty reviews approve the change. The unrelated full-gate verdict baseline remains separate.
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.
Problem and fix
A repository hook selected in the dashboard is stored as a name under the configured hooks directory. The runner instead checks that raw name relative to its process working directory, so a valid configured hook is skipped.
Resolve the stored name through the existing
hook_file_path()helper before execution. Keep the existing hook timing, workspace working directory, environment, and failure behavior. Regression tests execute real temporary hook scripts, cover nested names and dynamic configuration, reject escaping paths and symlinks before image/container work, and preserve missing/nonexecutable skipping and nonzero-exit failure reporting.Validation
main; this PR does not repair that separate baseline. CI already excludes the corresponding repository-policy meta-test.mainbecause the CLI sends two valid direct requests while the assertion expects exactly one. These unrelated baseline/test-environment issues are not changed here.