Skip to content

Wave 1: bind Grok account leases to immutable Codeg profiles #226

Description

@James3014

Status

P0 / OWNER_AUTHORIZED / READY_AFTER_GROK_POOL_REBIND / AUTO_CHAIN=false

Owner goal: complete multi-account Wave 0 + Wave 1 without widening provider routing authority.

Current source watermarks at creation:

Goal

Bind an already-selected Grok AccountLease / credential profile to one immutable Codeg execution profile so two Grok accounts can execute without mutating a machine-global active account.

The host-level provider remains grok. This Issue does not choose provider/model or perform cross-provider fallback.

Authority boundary

Nexus / account owner
   -> ExternalAccountPool / Grok pool selects account lease
        -> DevSpace thin bridge consumes opaque binding
             -> Codeg immutable execution profile
                  -> Grok with profile-scoped GROK_HOME
  • Nexus-new owns account selection, health, cooldown, failure classification and lease lifetime.
  • DevSpace owns durable execution binding and safe projection.
  • Codeg owns process/session execution.
  • Grok owns credential/session bytes.
  • CapabilityPlanner/provider routing, acceptance, merge, release and production authority remain unchanged.

Preferred no-upstream-Codeg adaptation

First prove Codeg's existing custom-agent registry can represent immutable Grok profiles:

  • one profile definition per leased credential home;
  • pinned Grok package/command compatible with built-in Grok ACP;
  • profile env contains only the machine-local GROK_HOME binding and required non-secret launch settings;
  • host/API never receives raw credential bytes;
  • Codeg work task may use the immutable custom profile internally.

If this experiment preserves the required physical identity/readback, prefer it over modifying Codeg upstream.

If custom-agent identity cannot truthfully satisfy the logical Grok provider receipt/verification contract, STOP and require a contract delta for a typed per-task account_binding_id; do not expose arbitrary runtime_env.

Required DevSpace behavior

  1. Public dispatch remains logical route grok; caller cannot submit arbitrary Codeg custom agent IDs or environment variables.
  2. Request may bind an opaque, prevalidated account lease/profile reference. DevSpace does not select another account.
  3. Persist logical provider, non-secret account hash/lease identity, and physical Codeg profile ID/task ID in the durable operation receipt.
  4. Exact replay of one attempt/lease returns the same operation; conflicting lease/profile reuse fails closed.
  5. Restart/reconcile preserves the same account binding and physical task identity; never reacquire a different account silently.
  6. Cancel affects only the bound task and does not release/rotate unrelated leases.
  7. Secret-safe projection: no raw alias, GROK_HOME physical path, auth/session bytes, token or Codeg bearer token leaves the trusted machine boundary.
  8. Provider/account failures are reported back as structured evidence for the canonical Grok pool; DevSpace MUST NOT itself decide rotation.
  9. Existing Wave 2: add durable DevSpace -> Codeg thin execution bridge #224 authority guards remain: Codeg auto_process=false, auto_merge=false, delegation=false.
  10. No existing local-agent adapter removal, merge/cutover, release, production activation or Wave 2 auto-chain.

Runtime evidence already available

Machine-local metadata currently reports three enabled Grok profile homes:

  • primary
  • grok-02
  • grok-03

Only profile existence/state metadata may be used for planning. Credential bytes must not be read or committed.

Acceptance — Wave 1

Source:

  • focused tests prove opaque lease/profile binding, replay conflict, restart preservation, exact cancel, secret-safe receipt, non-selector behavior and authority containment;
  • strict MCP schema rejects raw path/env/custom-agent injection;
  • typecheck/build/diff checks pass.

Disposable runtime:

  1. create/resolve two distinct existing Grok profiles A/B without copying credentials;
  2. Codeg launches A and B with distinct immutable GROK_HOME values/profile identities;
  3. two concurrent/overlapping consumers cannot contaminate each other's HOME/session state;
  4. each profile can produce an independently attributable Grok ACP/session result when its provider entitlement is available;
  5. deliberately exhausted/unavailable account evidence is surfaced to the account pool without DevSpace selecting B itself;
  6. release/reacquire is fenced and stale lease replay fails closed;
  7. disposable baseline and Candidate worktrees remain clean.

Wave 1 completion ceiling:
GROK_ACCOUNT_LEASE_TO_CODEG_PROFILE_BINDING_VERIFIED

This does not close #224 W2.6 automatically and does not imply independent acceptance/merge/release.

Execution guidance

  • lane: bounded DIRECT_DELEGATED
  • implementation: local isolated DevSpace worktree stacked on Wave 2: add durable DevSpace -> Codeg thin execution bridge #224 Candidate
  • worker: Codex CLI / Luna xhigh after fresh preflight
  • coordinator independently inspects diff and reruns verifiers
  • claim mode: MANUAL_DISPATCH
  • no worker self-merge
  • AUTO_CHAIN=false

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions