← Back to Pull requests

Index Grok Build native histories #141

Open
unknown opened this pull request with 168 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 24, 2026 18:31 UTC
Author

Split out from #130 as requested — standalone Grok Build (grok) native reader based on 0.34.26 (47d68fa), without any alias/configured-path machinery.

Changes

  • Adds adapters::GrokBuild (Default and in_home) reading canonical $GROK_HOME/sessions/<encoded-cwd>/<session-id>/ directories (summary.json + chat_history.jsonl / history.jsonl).

  • Uses existing core sync_store and Adapter::modified_at (already merged in #131). No path_keys.rs, sync_aliased, path_key_depth, or keep_configured_paths().

  • Adds a sanitized native fixture captured from Grok Build 1.0.92 (b06756fd6256) on Linux under tests/fixtures/grok/grok-1.0.92-linux/ with tests/fixtures/grok/README.md and tests/grok_fixture.rs.

  • Capturing the live 1.0.92 session also caught three real-format issues fixed here:

  • 1. Skipping leading <user_info> preamble records (which arrive without synthetic_reason).
    2. Unwrapping <user_query> tags around user prompts so title fallback works instead of yielding "(no user prompt)".
    3. Recording edits provenance (not just touched) for Grok Build's search_replace edit tool ({file_path, old_string, new_string}).

    Validation


  • cargo fmt --check

  • cargo clippy --all-targets -- -D warnings

  • cargo test (full suite + 14 new unit/integration/age tests passing)
  • Diff: 168 lines (+126 / -42) across 2 files Reviewer: youdie006 Review duration: 8376m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.35) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 168 lines diff across 2 files
    0.35
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.307
    Real PR Conversation Timeline
    1 comments
    "Review active on #141"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 35.1% (MEDIUM) · Higher = larger blast radius
    35.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.7% · Safe to merge
    18.7%