feat(hook): let a non-git surface declare its identity via CLAUDE_COORD_REPO
0.6.0 removed the working-directory fallback, which was right, but it left every non-git working surface with nothing to derive from. The read path declines silently by design - the hook must never fail a session - so such a surface simply stops seeing its inbox: no error, no exit code, nothing. That is the same loss-looks-like-normal shape 0.6.0 set out to remove, reintroduced one layer up. The hook now forwards CLAUDE_COORD_REPO verbatim as --repo. This is not the fallback returning, and the distinction is the whole point: the fallback GUESSED a name from wherever the session happened to stand, while a declaration is written down in that directory's settings, readable back, and deletable. Identity stays a choice someone made. Forwarding as --repo rather than reimplementing anything means it inherits every engine rule, including that an explicit override never claims <repo>/.origin - otherwise a surface borrowing a name would steal the claim from the checkout that owns it. Both halves are pinned by tests, and the shared test helper now deletes CLAUDE_COORD_REPO unless a test asks for it, so a value set globally later cannot silently satisfy the tests that prove the hook resolves nothing on its own. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6EixQo6hpoRCVtiAXdnFs
This commit is contained in:
parent
95c24cd034
commit
28e7cb42cd
7 changed files with 91 additions and 18 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "repo-mailbox",
|
||||
"version": "0.6.0",
|
||||
"version": "0.7.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"engines": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue