You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default (fake grok, always-on) unit test that materializeGrokHome writes the live 1.0.13 config.toml[[hooks.PreToolUse]] shape, copies grok-guardrail-hook.js next to guardrails.js on the overlay, and does not put the gate on the GROK_HOME_LINKShooks/ symlink.
Why
#826 proved live grok 1.0.13 loads overlay config.toml as source.type=configToml and honors {decision:deny} / exit 2. This worktree is missing the #812 inject. The live canary stays skip-unless-GROK_LIVE. CI must not set GROK_LIVE.
Must
Overlay config.toml has the proven shape:
[[hooks.PreToolUse]]
matcher = ""hooks = [
{ type = "command", command = "<hook>", timeout = N },
]
Overlay dest contains regular files grok-guardrail-hook.js and guardrails.js (not symlinks).
User ~/.grok/hooks (the GROK_HOME_LINKS target) is untouched.
Always-on unit tests are in electron/test/grok-home.test.js (materializeGrokHome PreToolUse inject (#812)).
This worktree had no inject. Re-implemented from #812 comments, with matcher = "" so the overlay matches the live 1.0.13 / #826 shape.
Overlay config.toml has [[hooks.PreToolUse]] + matcher = "" + inline { type = "command", ... }.
Copies grok-guardrail-hook.js next to guardrails.js as regular files on the overlay.
Does not write the gate through the GROK_HOME_LINKShooks/ symlink.
CODER_GUARDRAILS=off skips the inject.
Live canary electron/test/grok-live-hook.test.js stays skip-unless-GROK_LIVE=1 (and never when CI=true). CI does not set GROK_LIVE. No control_request path.
Verified: node --test on grok-home / grok-guardrail-hook / guardrails / grok-home-reclaim / grok / guardrails-runner — all pass; live canary SKIP.
Activity
currentbits commentedon Sep 2, 2026
Always-on unit tests are in
electron/test/grok-home.test.js(materializeGrokHome PreToolUse inject (#812)).This worktree had no inject. Re-implemented from #812 comments, with
matcher = ""so the overlay matches the live 1.0.13 / #826 shape.config.tomlhas[[hooks.PreToolUse]]+matcher = ""+ inline{ type = "command", ... }.grok-guardrail-hook.jsnext toguardrails.jsas regular files on the overlay.GROK_HOME_LINKShooks/symlink.CODER_GUARDRAILS=offskips the inject.electron/test/grok-live-hook.test.jsstays skip-unless-GROK_LIVE=1(and never whenCI=true). CI does not setGROK_LIVE. Nocontrol_requestpath.Verified:
node --teston grok-home / grok-guardrail-hook / guardrails / grok-home-reclaim / grok / guardrails-runner — all pass; live canary SKIP.