Skip to content

#812 overlay inject: materializeGrokHome writes PreToolUse config.toml (ask=deny) #832

Closed

Description

@currentbits

Goal

Copy the #812/#827 overlay inject onto this worktree so materializeGrokHome writes a live 1.0.13 config.toml [[hooks.PreToolUse]] matcher="" and copies grok-guardrail-hook.js next to guardrails.js.

Source

coder/fork-fork-fork-fork-fork-fork-solenta-gu-86edef (later sibling of f47cc9 / daf14a).

Constraints

  • Isolated overlay writes the gate through config.toml, not the hooks/ symlink
  • Ask is deny
  • CODER_GUARDRAILS=off skips the inject
  • No control_request path
  • Do not enable GROK_LIVE in CI
  • Always-on fake-grok runner is the last describe in electron/test/grok-guardrail-hook.test.js

Steps

  • RED: copy electron/test/grok-guardrail-hook.test.js
  • GREEN: copy hook + materializeGrokHome inject + runner notice
  • WIN32: add the test to scripts/test-electron.js (sibling already lists it; always-on via writeFakeBin)
  • Verify unit + runner tests; no GROK_LIVE in CI

Activity

  1. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Landed on coder/fork-fork-fork-fork-fork-fork-fork-fork--d40e1a.

    • electron/grok-guardrail-hook.js — ask is deny; overlay [[hooks.PreToolUse]] matcher = ""
    • materializeGrokHome copies the hook next to guardrails.js and injects that table; CODER_GUARDRAILS=off skips
    • Always-on fake-grok runner is the last describe in electron/test/grok-guardrail-hook.test.js (consults config.toml, no control_request)
    • scripts/test-electron.js WIN32_FILES includes the test (sibling did; always-on via writeFakeBin)

    Verified: node --test electron/test/grok-guardrail-hook.test.js plus grok-home / grok / guardrails-runner (30 pass). No GROK_LIVE in CI. Did not run a live vendor turn.

  2. added
    plan:done
    and removed
    plan:doing
    on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions