Skip to content

gstack-config key validator rejects brain_trust_policy@local (endpoint-hash returns literal 'local' for local engines) #2210

Closed

Description

@mmakunas

What happened

/setup-gbrain Step 9.5 persists the brain trust policy with:

~/.claude/skills/gstack/bin/gstack-config set brain_trust_policy@$_HASH personal

where _HASH=$(gstack-config endpoint-hash). For local engines (PGLite path), endpoint-hash returns the literal string local, but gstack-config's key validator only accepts hex suffixes after @ (@[a-f0-9]+), so the set call is rejected and the policy is never persisted under the per-endpoint key.

Impact

  • Step 9.5 fails on every fresh local-PGLite setup (the default try-first path).
  • On subsequent runs, gstack-config get brain_trust_policy@local returns unset, so skills see the policy as never-set and retry the auto-set each time (harmless but noisy, and the per-endpoint tracking the feature was built for never engages for local engines).
  • /sync-gbrain Step 1's trust-policy gate hits the same mismatch.

Workaround

Store under the plain key: gstack-config set brain_trust_policy personal. Works, but loses the per-endpoint scoping.

Suggested fix (either works)

  1. Allow local as a valid endpoint-hash value in the key validator (@([a-f0-9]+|local)), or
  2. Have endpoint-hash return a stable hex digest for local engines instead of the literal local.

Environment

  • gstack 1.58.5.0, macOS (Darwin 25.5.0)
  • gbrain 0.42.26.0, engine=pglite, mode=local-stdio
  • Repro: fresh /setup-gbrain picking Path 3 (PGLite local), reach Step 9.5

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions