Skip to content

fix(spawner): resolve repository hooks from the configured directory - #31

Merged
tylerwillis merged 1 commit into
mainfrom
codex/fix-repo-hook-resolution
Oct 29, 2026
Merged

tylerwillis merged 1 commit into
mainfrom
codex/fix-repo-hook-resolution

Conversation

@tylerwillis

@tylerwillis tylerwillis commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Before the fix: 10 new cases fail and 4 pass.
  • After the fix: 101 spawner and directory-resolution tests pass.
  • Ruff lint/format, mypy, spec lint, wheel build, and clean-wheel smoke pass.
  • Fresh independent requirements, implementation, and test-honesty reviews pass; all 12 affected requirements pass the change-scoped 2119 gate.
  • The full 2119 gate has pre-existing verdict failures/staleness on main; this PR does not repair that separate baseline. CI already excludes the corresponding repository-policy meta-test.
  • Local broad-suite run on baseline source (documentation branch): 3819 passed, 5 skipped, 4 failed. Three directory-name-sensitive assertions pass in a clean baseline checkout; the remaining native-Claude MCP test also fails on clean main because the CLI sends two valid direct requests while the assertion expects exactly one. These unrelated baseline/test-environment issues are not changed here.
  • GitHub CI and both Linux/macOS startup smoke jobs pass on this PR head.

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.
@tylerwillis
tylerwillis merged commit 1e205cd into main Oct 29, 2026
3 checks passed
@tylerwillis
tylerwillis deleted the codex/fix-repo-hook-resolution branch October 29, 2026 07:55
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