← Back to Pull requests

fix(install): the shims are copies, so a branch cannot change what is installed #152

Open
unknown opened this pull request with 391 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 25, 2026 13:50 UTC
Author

<!-- pr-agent-generated -->

User description


make install-gh-shim symlinked ~/.local/bin/gh into this checkout, so the
installed tool behaved as whichever branch the checkout happened to be on.

Measured: this checkout had been on a feature branch for two days, whose
gh-app-shim still keyed agent identity on PASEO_AGENT_ID. A subagent carries
no agent id — the case the daemon flag (OMP_GIT_IDENTITY) exists for — so gh
fell through to the human's stored account, and the-loft PR #160 was authored by
them. That human then cannot approve it (GitHub greys Approve on your own PR),
and the desk's whole gate assumes the bot is the author.

The shims are now copies, refreshed by make install:

  • ~/.local/bin/gh, ~/.local/bin/git, ~/.local/libexec/omp-bot-credential-helper;

  • .local/libexec/omp-shims.installed-commit records the commit they came from,

  • so drift is answerable rather than invisible;
  • uninstall removes the stamp with the shims.
  • A copy changes behaviour only when someone installs — not when a branch moves.
    The cost is that testing a shim edit on a branch needs make install-gh-shim
    first, which is explicit and one command.

    Verified after installing (the two cases that matter):

    env -u PASEO_AGENT_ID OPENCODE=1 OMP_GIT_IDENTITY=bot gh auth status
      ✓ omp-harness[bot] (GH_TOKEN) — active
    env -u PASEO_AGENT_ID -u OMP_GIT_IDENTITY gh auth status
      ✓ ashbywinch (keyring) — active
    

    make test: 170 tests OK, lucidlint GATE: PASS.

    ___

    PR Type


    Bug fix

    ___

    Description


  • Shims are now copies, not symlinks
  • Installed behavior no longer changes with branch
  • Records installed commit for drift tracking
  • Uninstall also removes the commit stamp
  • ___

    Diagram Walkthrough

    flowchart LR
      A["Symlink (old)"] -- "branch moves" --> B["Installed gh changes"]
      C["Copy (new)"] -- "branch moves" --> D["Installed gh unchanged"]
      C -- "make install" --> E["Copy from main"]
      E --> F["Records commit in .installed-commit"]
    

    <details> <summary><h3> File Walkthrough</h3></summary>

    <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table>
    <tr>
    <td>
    <details>
    <summary><strong>Makefile</strong><dd><code>Shims installed as copies with commit stamp</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>

    Makefile

    <ul><li>Changed <code>install-gh-shim</code> and <code>install-git-shim</code> from symlink to copy<br> <li> Added <code>SHIMS_COMMIT</code> variable and stamp file recording installed commit<br> <li> Updated help text to describe copy behavior<br> <li> Added <code>rm -f</code> before copy to ensure clean replacement<br> <li> Updated <code>uninstall</code> to remove the commit stamp</ul>

    </details>

    </td>
    <td><a href="https://github.com/ashbywinch/omp-config/pull/152/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52">+22/-6</a>&nbsp; &nbsp; </td>

    </tr>
    </table></td></tr></tbody></table>

    </details>

    ___

    Diff: 391 lines (+293 / -98) across 4 files Reviewer: github-actions[bot] Review duration: 4m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.43) × (1 − Review Confidence (0.30)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 391 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 49% · Reviewer familiarity: 35%
    29%
    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
    Diff Size diff_size
    0.357
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #152"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 29.6% 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: 43.1% (MEDIUM) · Higher = larger blast radius
    43.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: 29.6% · Lower = rushed or shallow review
    29.6%
    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: 30.3% · Safe to merge
    30.3%