Skip to content

repos install: a ref upgrade rewrites only the shim pin, so the pull_request trigger needs a second run #9714

Closed

Description

@waynesun09

What happens

On main f24e7d3 (the #9230 merge), upgrading a v0.56.1 install with repos.yaml:

  1. fullsend repos set github.fullsend_ref <new>, then fullsend repos install, opens a PR that changes only the two uses: pins. After it merges, .github/workflows/fullsend.yaml still triggers on pull_request_target, and repos status reports .github/workflows/fullsend.yaml differs.
  2. A second fullsend repos install opens another PR ("Repairing 1 files with content drift") that changes pull_request_target: to pull_request:.

--dry-run before step 1 printed both "Would upgrade …" and "Would repair 1 files with content drift". The live run delivered only the first.

Expected

One repos install delivers the full new shim, including the trigger. The #9230 docs say install "rewrites the trigger and the workflow pin in one commit".

Cause

In internal/repos/converge.go:

  1. convergeRefFiles queues .github/workflows/fullsend.yaml with only the version line rewritten (replaceShimRef, GitHub branch around line 3258).
  2. That path goes into refFileSet, and convergeContentDriftFiles skips paths in it (coveredPaths, around line 3603). The full template is never queued.
  3. On dry-run, convergeRefFiles returns no files, so drift is not skipped. The dry-run output promises a repair the live run drops.

Fix direction

  • When the ref changes on GitHub, queue the full expected template for the shim instead of the pin-only rewrite, or let content drift replace a queued pin-only file.
  • Make the dry run and the live run use the same skip set.
  • Add a converge test: a pull_request_target shim at an old pin upgrades to the pull_request shim at the new pin in one pass.

Repro

Reproduced on a public test repository: install opened one PR with the pin only, and a second install opened a PR with the trigger.

Related

repos status shows DRIFT none for a pull_request_target shim until fullsend_ref is bumped, so status alone does not flag an old shim. This may be worth its own check (for example, a warning when the installed shim still triggers on pull_request_target).

Activity

  1. waynesun09 commented on Nov 19, 2026

    @waynesun09
    MemberAuthor

    /fs-code
    Do not sign off. No git commit -s, no Signed-off-by trailer.

  2. fullsend-ai-coder commented on Nov 19, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Code · ⚠️ Cancelled · Started 8:33 PM UTC · Ended 8:36 PM UTC

    Commit: f24e7d3 · View workflow run →

  3. fullsend-ai-triage commented on Nov 19, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 8:33 PM UTC · Completed 8:35 PM UTC

    Commit: f24e7d3 · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.13

  4. added
    type/bug
    component/install
    priority/medium
    ready-to-code
    on Nov 19, 2026
  5. fullsend-ai-triage commented on Nov 19, 2026

    @fullsend-ai-triage

    Triage confirmed the cause you describe in internal/repos/converge.go: the pin-only shim rewrite from convergeRefFiles lands in refFileSet, and convergeContentDriftFiles then skips that path via coveredPaths. As a result the full template, including the pull_request trigger, is never queued on a live run. On dry-run convergeRefFiles returns no files, so the skip set is empty and the repair is reported. That is why dry and live output disagree.

    No open PR or duplicate issue was found for this.

    Suggested approach

    • On GitHub, when the ref changes, queue the full expected shim template at the new ref instead of the pin-only rewrite, or let content drift supersede the queued pin-only file.
    • Build the same skip set for dry-run and live runs.
    • Leave the GitLab path unchanged.
    • The repos status warning for an old pull_request_target shim is a reasonable separate follow-up.
    • Per the maintainer comment, commits should not be signed off.

    Proposed test case

    Given: GitHub shim with pull_request_target trigger at an old pin
    When:  converge runs live with a new fullsend_ref
    Then:  exactly one shim file is queued, equal to the expected template at the new ref
           (pull_request trigger + new pin); no content drift remains after one pass
    And:   dry-run reports the same file changes as the live run
    Edge:  unchanged ref + drift still repaired; SHA-pinned refs; GitLab behaviour unchanged
    

    Labels: This is a bug in the repos install convergence logic, so it matches the bug type and install component labels. The effect is limited to a two-run upgrade, which suggests medium priority.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  6. fullsend-ai-coder commented on Nov 19, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ⚠️ Cancelled · Started 8:33 PM UTC · Completed 8:36 PM UTC

    Commit: f24e7d3 · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high

  7. fullsend-ai-coder commented on Nov 19, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 8:38 PM UTC · Completed 8:52 PM UTC

    Commit: f24e7d3 · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $1.58

  8. added 3 commits that reference this issue on Nov 19, 2026
  9. added 2 commits that reference this issue on Nov 20, 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

    bugcomponent/installpriority/mediumready-to-codetype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions