Skip to content

fix(#2281): use inputs.target-repo in Go setup step - #2283

Merged
rh-hemartin merged 2 commits into
mainfrom
agent/2281-go-setup-target-repo
Jun 15, 2026
Merged

fix(#2281): use inputs.target-repo in Go setup step#2283
rh-hemartin merged 2 commits into
mainfrom
agent/2281-go-setup-target-repo

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

The Go setup step added in PR #2213 hardcoded 'target-repo' in both the hashFiles condition and the go-version-file parameter. When inputs.target-repo is overridden to a custom path, hashFiles('target-repo/go.mod') returns empty, the if condition is false, and the step is silently skipped — defeating the purpose of the Go setup for non-default checkout paths.

Apply the same fallback pattern used in the Run fullsend step:

  • hashFiles: use format() with inputs.target-repo fallback
  • go-version-file: use expression with fallback to default

Note: pre-commit could not run (shellcheck hook failed to install due to network restrictions in sandbox). The post-script will run pre-commit authoritatively.


Closes #2281

Post-script verification

  • Branch is not main/master (agent/2281-go-setup-target-repo)
  • Secret scan passed (gitleaks — 967a663ac165c4c0bebde778df677d4be81f3ee4..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

The Go setup step added in PR #2213 hardcoded 'target-repo' in
both the hashFiles condition and the go-version-file parameter.
When inputs.target-repo is overridden to a custom path,
hashFiles('target-repo/go.mod') returns empty, the if condition
is false, and the step is silently skipped — defeating the
purpose of the Go setup for non-default checkout paths.

Apply the same fallback pattern used in the Run fullsend step:
- hashFiles: use format() with inputs.target-repo fallback
- go-version-file: use expression with fallback to default

Note: pre-commit could not run (shellcheck hook failed to
install due to network restrictions in sandbox). The post-script
will run pre-commit authoritatively.

Closes #2281
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Site preview

Preview: https://a00a952a-site.fullsend-ai.workers.dev

Commit: 6a33a735ffae7fcf87cc54d5cc3bfbbc111d2d18

@rh-hemartin

Copy link
Copy Markdown
Member

/fs-fix Do not add a default value for it, other usages of inputs.target-repo do not use it.

@rh-hemartin rh-hemartin self-assigned this Jun 15, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Jun 15, 2026

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Started 6:50 AM UTC · Ended 6:56 AM UTC
Commit: 4e21a60 · View workflow run →

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 6:52 AM UTC · Completed 6:56 AM UTC
Commit: 4e21a60 · View workflow run →

Remove '|| target-repo' fallback from the hashFiles condition and
go-version-file parameter to match how inputs.target-repo is used
elsewhere in action.yml (line 362), where no inline default is applied.

Addresses review feedback on #2283
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (human-triggered)

Removed the '|| target-repo' default fallback from both usages of inputs.target-repo in the Go setup step, per human instruction. Other usages of inputs.target-repo in action.yml do not use an inline default.

Fixed (1):

  1. remove default fallback from inputs.target-repo: Removed '|| target-repo' fallback from both the hashFiles condition (line 350) and go-version-file parameter (line 353) to match the pattern used elsewhere in action.yml where inputs.target-repo is referenced without an inline default.

Tests: passed

Updated by fullsend fix agent

@rh-hemartin
rh-hemartin enabled auto-merge June 15, 2026 06:59
@rh-hemartin
rh-hemartin added this pull request to the merge queue Jun 15, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Jun 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:59 AM UTC · Completed 7:09 AM UTC
Commit: 6a33a73 · View workflow run →

Merged via the queue into main with commit dbae60d Jun 15, 2026
10 checks passed
@rh-hemartin
rh-hemartin deleted the agent/2281-go-setup-target-repo branch June 15, 2026 07:03
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jun 15, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 7:07 AM UTC · Completed 7:14 AM UTC
Commit: 6a33a73 · View workflow run →

@fullsend-ai-review

Copy link
Copy Markdown

Review skipped — this PR is already merged.

The /fs-review command only reviews open pull requests.

Posted by fullsend post-review check

@fullsend-ai-retro

Copy link
Copy Markdown

Retro for PR #2283 — fix inputs.target-repo usage in Go setup step (action.yml).

Timeline: Code agent opened the PR at 06:45 UTC with a correct fix (replacing hardcoded target-repo with inputs.target-repo) but added unnecessary || 'target-repo' fallback defaults. Human reviewer (rh-hemartin) caught this at 06:48 via /fs-fix, noting other usages of inputs.target-repo don't use inline defaults. Fix agent removed the fallbacks by 06:56. Second review passed, human approved at 06:59, merged at 07:03. Total rework: ~15 minutes for a 2-line change.

Root cause: The code agent didn't check how inputs.target-repo is already used elsewhere in action.yml (e.g., line 362) before deciding to add a fallback. A simple scan of existing usages would have shown the convention is to reference the input directly without defaults.

Existing issue overlap: #2030 covers reading sibling files for pattern consistency, but is scoped to sibling scripts in the same directory. This case is about same-file variable usage consistency, which is a distinct but related pattern. One proposal filed below to cover this gap.

Proposals filed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Go setup step in action.yml ignores inputs.target-repo override

1 participant