Skip to content

[bench] global: enable governance across all projects#10

Merged
dburks-svg merged 1 commit into
mainfrom
bench/global-governance
Jul 15, 2026
Merged

[bench] global: enable governance across all projects#10
dburks-svg merged 1 commit into
mainfrom
bench/global-governance

Conversation

@dburks-svg

Copy link
Copy Markdown
Contributor

Summary

  • Resolve constitution and ledger paths from __file__ (not CWD) so the pipeline finds its resources when invoked from any project directory
  • Path normalization falls through to CWD-relative resolution for files outside the Bench repo, with a _path_normalized_external flag for pipeline-stage visibility
  • Global PreToolUse hook registered in ~/.claude/settings.json with BENCH_PROVIDER=claude_code; project-level hook retained to satisfy C-007

Test plan

  • All 322 tests pass (python -m pytest tests/ -v)
  • New TestFallbackExternalNormalization covers cross-drive ValueError, escapes-repo-root, and escapes-both-roots branches
  • PathNormalizationTests updated: out-of-repo paths produce absolute paths (not [PATH_TRAVERSAL_BLOCKED])
  • In-repo path normalization unchanged (CWD-invariant via __file__)
  • Global hook fires on Write/Edit/MultiEdit in any project directory

🤖 Generated with Claude Code

Resolve resource paths (constitution, ledger) from __file__ instead of
CWD so the pipeline works when invoked from any project directory.
Path normalization now falls through to CWD-relative resolution for
files outside the Bench repo, with a _path_normalized_external flag
so pipeline stages can distinguish externally governed edits.

Global hook registered in ~/.claude/settings.json; project-level
hook retained to satisfy C-007 self-governance constraint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dburks-svg
dburks-svg merged commit c3b8e69 into main Jul 15, 2026
3 checks passed
@dburks-svg
dburks-svg deleted the bench/global-governance branch July 15, 2026 06:15
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