Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .github/workflows/reusable-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,26 +155,14 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Validate inputs
id: validate
env:
ISSUE_NUMBER: ${{ fromJSON(inputs.event_payload).issue.number }}
REPO_FULL_NAME: ${{ inputs.source_repo }}
GITHUB_ISSUE_URL: ${{ fromJSON(inputs.event_payload).issue.html_url }}
COMMENT_BODY: ${{ fromJSON(inputs.event_payload).comment.body }}
FULLSEND_DIR: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
run: bash "${FULLSEND_DIR:+$FULLSEND_DIR/}scripts/pre-code.sh"

- name: Setup GCP and prepare credentials
if: steps.validate.outputs.skipped != 'true'
uses: ./.defaults/.github/actions/setup-gcp
with:
gcp_wif_provider: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
gcp_project_id: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}

- name: Resolve bot identity
if: steps.validate.outputs.skipped != 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
Expand All @@ -190,7 +178,6 @@ jobs:
git config --global user.name "${BOT_LOGIN}"

- name: Setup agent environment
if: steps.validate.outputs.skipped != 'true'
env:
AGENT_PREFIX: CODE_
CODE_TARGET_REPO_DIR: target-repo
Expand All @@ -200,11 +187,18 @@ jobs:
run: bash .github/scripts/setup-agent-env.sh

- name: Run code agent
if: steps.validate.outputs.skipped != 'true'
uses: ./.defaults/
env:
GITHUB_ISSUE_URL: ${{ fromJSON(inputs.event_payload).issue.html_url }}
ISSUE_NUMBER: ${{ fromJSON(inputs.event_payload).issue.number }}
# Reaches the harness pre-script inside fullsend run, which reads it
# for its --force override of the existing-PR check (pre-script
# output protocol, issue #4718). The override is not end-to-end:
# the dispatcher's own "Check for existing PRs" step gates
# stage=code first and does not honor --force, so a /fs-code
# --force comment is stopped before this value is ever read.
# env-quoted, never interpolated into run: blocks.
COMMENT_BODY: ${{ fromJSON(inputs.event_payload).comment.body }}
REPO_FULL_NAME: ${{ inputs.source_repo }}
CODE_ALLOWED_TARGET_BRANCHES: ''
TARGET_BRANCH: main
Expand Down
32 changes: 8 additions & 24 deletions .github/workflows/reusable-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -691,26 +691,14 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Validate inputs
id: validate
env:
ISSUE_NUMBER: ${{ fromJSON(needs.route.outputs.event_payload).issue.number }}
REPO_FULL_NAME: ${{ github.repository }}
GITHUB_ISSUE_URL: ${{ fromJSON(needs.route.outputs.event_payload).issue.html_url }}
COMMENT_BODY: ${{ fromJSON(needs.route.outputs.event_payload).comment.body }}
FULLSEND_DIR: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
run: bash "${FULLSEND_DIR:+$FULLSEND_DIR/}scripts/pre-code.sh"

- name: Setup GCP and prepare credentials
if: steps.validate.outputs.skipped != 'true'
uses: ./.defaults/.github/actions/setup-gcp
with:
gcp_wif_provider: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
gcp_project_id: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
fullsend-dir: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}

- name: Resolve bot identity
if: steps.validate.outputs.skipped != 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
Expand All @@ -726,7 +714,6 @@ jobs:
git config --global user.name "${BOT_LOGIN}"

- name: Setup agent environment
if: steps.validate.outputs.skipped != 'true'
env:
AGENT_PREFIX: CODE_
CODE_TARGET_REPO_DIR: target-repo
Expand All @@ -736,11 +723,18 @@ jobs:
run: bash .github/scripts/setup-agent-env.sh

- name: Run code agent
if: steps.validate.outputs.skipped != 'true'
uses: ./.defaults/
env:
GITHUB_ISSUE_URL: ${{ fromJSON(needs.route.outputs.event_payload).issue.html_url }}
ISSUE_NUMBER: ${{ fromJSON(needs.route.outputs.event_payload).issue.number }}
# Reaches the harness pre-script inside fullsend run, which reads it
# for its --force override of the existing-PR check (pre-script
# output protocol, issue #4718). The override is not end-to-end:
# the route job's own "Check for existing PRs" step above gates
# stage=code first and does not honor --force, so a /fs-code
# --force comment is stopped before this value is ever read.
# env-quoted, never interpolated into run: blocks.
COMMENT_BODY: ${{ fromJSON(needs.route.outputs.event_payload).comment.body }}
REPO_FULL_NAME: ${{ github.repository }}
CODE_ALLOWED_TARGET_BRANCHES: ''
TARGET_BRANCH: main
Expand Down Expand Up @@ -1108,16 +1102,6 @@ jobs:
fi
echo "review_file=${REVIEW_FILE}" >> "${GITHUB_OUTPUT}"

- name: Validate inputs
env:
PR_NUMBER: ${{ steps.context.outputs.pr_number }}
REPO_FULL_NAME: ${{ github.repository }}
TRIGGER_SOURCE: ${{ needs.route.outputs.trigger_source }}
FIX_ITERATION: ${{ steps.context.outputs.iteration }}
HUMAN_INSTRUCTION: ${{ steps.context.outputs.instruction }}
FULLSEND_DIR: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
run: bash "${FULLSEND_DIR:+$FULLSEND_DIR/}scripts/pre-fix.sh"

- name: Setup GCP and prepare credentials
uses: ./.defaults/.github/actions/setup-gcp
with:
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/reusable-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,16 +368,6 @@ jobs:
fi
echo "review_file=${REVIEW_FILE}" >> "${GITHUB_OUTPUT}"

- name: Validate inputs
env:
PR_NUMBER: ${{ steps.context.outputs.pr_number }}
REPO_FULL_NAME: ${{ inputs.source_repo }}
TRIGGER_SOURCE: ${{ inputs.trigger_source }}
FIX_ITERATION: ${{ steps.context.outputs.iteration }}
HUMAN_INSTRUCTION: ${{ steps.context.outputs.instruction }}
FULLSEND_DIR: ${{ inputs.install_mode == 'per-repo' && '.fullsend' || '' }}
run: bash "${FULLSEND_DIR:+$FULLSEND_DIR/}scripts/pre-fix.sh"

- name: Setup GCP and prepare credentials
uses: ./.defaults/.github/actions/setup-gcp
with:
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ script-test:
$(call run-timed,bash scripts/check-e2e-authorization-test.sh)
$(call run-timed,bash internal/scaffold/fullsend-repo/scripts/reconcile-repos-test.sh)
$(call run-timed,bash internal/scaffold/fullsend-repo/scripts/pre-fetch-prior-review-test.sh)
$(call run-timed,bash internal/scaffold/fullsend-repo/scripts/pre-code-test.sh)
$(call run-timed,python3 skills/topissues/scripts/topissues_test.py)
$(call run-timed,python3 -m pytest gitlint_rules_test.py -v)

Expand Down
1 change: 0 additions & 1 deletion docs/guides/dev/cli-internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,6 @@ Since `embed.FS` doesn't preserve Unix permissions, executable files are tracked
var executableFiles = map[string]struct{}{
"scripts/fullsend-check-output": {},
"scripts/install-precommit-tools.sh": {},
"scripts/pre-code.sh": {},
"scripts/prepare-sandbox-credentials.sh": {},
"scripts/reconcile-repos.sh": {},
"scripts/resolve-precommit-tools.py": {},
Expand Down
16 changes: 16 additions & 0 deletions docs/guides/user/customizing-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ env:
REPO_DIR: "${GITHUB_WORKSPACE}/target-repo"
```

> **Where relative script paths resolve.** A **local** harness — the case for
> the example above — resolves `pre_script` / `post_script` against your
> workspace root, so `scripts/pre-code.sh` means *your* `scripts/` directory
> and the harness must ship its own copy. A **URL-sourced** harness resolves
> them against the parent of the harness file's directory in the source repo;
> for the stock agents that is [`fullsend-ai/agents`](https://github.com/fullsend-ai/agents),
> which owns `scripts/pre-code.sh` and `scripts/post-code.sh`.
>
> The fullsend scaffold no longer ships `scripts/pre-code.sh` or
> `scripts/pre-fix.sh`, so copying a stock agents harness into a local file
> without also copying its scripts will fail validation. Reference the
> agents-repo harness by URL instead, or supply your own scripts.
>
> A `pre_script` can also stop the run before the sandbox starts — see the
> [pre-script output protocol](../../normative/prescript-output/v1/README.md).

**Optional fields** (all have secure defaults and can be omitted):

```yaml
Expand Down
Loading
Loading