Skip to content

GitLab webhook: dispatcher CI scaffold for signed pipeline-input dispatch #7771

Closed

Description

@ggallen

Parent epic: #7766 · ADRs: 0125 — hybrid webhook/poller dispatch, 0131 — signed pipeline-input transport

Wave 1 · Depends on: #7769 (hardened gate pattern; completed) · Completed transport foundations: #7850, #7851 · Runs in parallel with: #7770 · Consumed by: #7773

Scope

Add the control-plane dispatcher CI job fired by GitLab's native “use a webhook” pipeline trigger. Add the root/include admission and scaffold lifecycle registration needed to deliver it, while preserving existing poller and agent behavior.

This issue owns the CI scaffold and bootstrap script. #7770 owns event normalization/provenance; #7773 owns the working gitlab-webhook CLI driver and agent-pipeline submission. Live webhook provisioning remains downstream in #7772, after #7773, so events are not provisioned onto an unwired dispatcher.

New scaffold

Accepted least-privilege dispatch transport

ADR 0131 defines the transport implemented by merged #7945, with forge input support from #7851 and live verification recorded in completed #7850. The new scaffold must preserve that contract:

  • Keep ci_pipeline_variables_minimum_override_role=no_one_allowed and Developer-level runtime dispatch credentials. Do not reintroduce Owner-level dispatch or rely on pipeline-variable overrides.
  • Preserve the eleven scalar metadata inputs and nine bounded base64 payload inputs (event_payload_chunk_00 through event_payload_chunk_08, each at most 1000 characters), together with the existing dispatch HMAC.
  • Keep fixed payload reconstruction, chunk validation and literal/non-expanding input bridges intact; payload data must never become interpolated shell statements.
  • Use native TRIGGER_PAYLOAD for the incoming webhook job. Do not add webhook data as extra root inputs beyond the existing 20-input contract.
  • No separately stored opaque dispatch-record/reference mechanism is required. Reuse the existing signed chunk transport when ADR 0125: gitlab-webhook CLI driver wiring → dispatch spine → CreatePipeline #7773 submits the downstream agent pipeline.

Root and include wiring

  • .gitlab-ci.yml workflow:rules — add trigger-source admission for the dispatcher on the protected default branch, with debug-trace deny-before-admit first. Preserve existing schedule/API admission and input forwarding.
  • .gitlab/ci/fullsend-pipeline.yml — add a dispatcher include gated by $CI_PIPELINE_SOURCE == "trigger" alongside the schedule-only poll include and API-only agent include; add a dispatch stage without changing existing poll/agent behavior.
  • A trigger pipeline must run only the dispatcher, never directly admit the agent job. The dispatcher launches agents through a separate signed-input API pipeline.

Scaffold registration and lifecycle

Register the dispatcher template and bootstrap script in the remote/embedded scaffold and managed-install file lists, including internal/repos/remote_scaffold.go, the WalkGitLabPerRepo embedded walk and internal/scaffold/installfiles.go. Cover installation, convergence and uninstall handling of the new managed paths without colliding with the retired dispatch filename or removing user-owned CI content.

Implementation constraint

The root .gitlab-ci.yml and .gitlab/ci/ files are installed pipeline configuration, not optional documentation. The implementation path must be authorized and configured to modify these workflow-shaped scaffold templates; do not silently omit CI changes because they resemble workflow configuration.

Key files / anchors

  • internal/scaffold/fullsend-repo-gitlab/.gitlab-ci.yml — root input contract and workflow admission.
  • internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/fullsend-pipeline.yml — includes, stages and metadata/chunk forwarding.
  • internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/fullsend-poll.yml — control-runner and schedule-only job pattern.
  • internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/fullsend-agent.yml — existing signed-input bridge and API-only agent job.
  • internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/scripts/ — shared identity, CA trust, role selection and poll bootstrap helpers.
  • internal/repos/remote_scaffold.go, internal/scaffold/installfiles.go, WalkGitLabPerRepo, FormatRunnerTags — scaffold delivery and registration.
  • internal/poll/dispatch.go, internal/forge/gitlab/ci.go — established signed-input launch contract and CreatePipelineWithInputs.

Acceptance criteria

Additive / no-migration

This adds a new include/job/script and trigger admission to the already-migrated ADR 0131 setup. Preserve existing poller/agent behavior; no new variable-to-input migration is required. Webhook provisioning is not part of this issue.

Activity

  1. added
    type/feature
    component/dispatch
    component/ci
    on Sep 27, 2026
  2. fullsend-ai-triage commented on Sep 27, 2026

    @fullsend-ai-triage

    🤖 Triage · ⚠️ Cancelled · Started 1:22 PM UTC · Ended 1:23 PM UTC

    Commit: e0f1d30 · View workflow run →

  3. fullsend-ai-triage commented on Sep 27, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 1:25 PM UTC · Completed 1:30 PM UTC

    Commit: e0f1d30 · View workflow run →

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

  4. added
    blocked
    security
    on Sep 27, 2026
  5. fullsend-ai-triage commented on Sep 27, 2026

    @fullsend-ai-triage

    This issue (ADR 0125 Wave 2) explicitly depends on #7769 (Wave 0, the hardened gate pattern), which is still open. The dispatcher job scaffold described here is meant to reuse the disjoint source-allowlist and debug-trace deny-before-admit pattern that #7769 is hardening on the existing poll and agent jobs, so the target pattern to mirror isn't finalized yet.

    A search of open PRs and of issues/PRs that close #7771 or #7769 turned up nothing in flight for either, so this is a genuine blocking dependency rather than duplicate work already underway.

    Once #7769 merges, this issue's scope and acceptance criteria look well-specified and should be ready to implement without further clarification. One note for whoever picks this up: the changes here touch GitLab CI scaffold templates (.gitlab-ci.yml, .gitlab/ci/*.yml) that get installed into enrolled repos as their pipeline configuration -- worth confirming the implementing agent/tooling has permission to modify workflow-shaped files before dispatching.

    Blocked by:


    Labels: The issue is explicitly blocked on open issue #7769, and the dispatcher job it introduces reuses the security-sensitive hardened gate/admit pattern from that same security-labeled work.

  6. changed the title [-]ADR 0125 W2: dispatcher CI scaffold — include, job, run-dispatcher-job.sh, trigger admit rule[/-] [+]ADR 0125: dispatcher CI scaffold — include, job, run-dispatcher-job.sh, trigger admit rule[/+] on Sep 27, 2026
  7. fullsend-ai-triage commented on Sep 27, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 9:16 PM UTC · Completed 9:20 PM UTC

    Commit: e0a89e2 · View workflow run →

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

  8. fullsend-ai-triage commented on Sep 27, 2026

    @fullsend-ai-triage

    Re-checked this issue and its stated dependency: it remains blocked on issue #7769 (the hardened gate pattern this dispatcher job scaffold is meant to reuse), which is still open with no merged or in-flight PR. No open PR in this repository references either #7771 or #7769, or matches dispatcher/gate-hardening keywords, so this is still a genuine blocking dependency rather than duplicated effort.

    Once #7769 lands, the scope, key files, and acceptance criteria described here look sufficiently specified to implement without further clarification from the reporter.

    One flag for whoever picks this up: the acceptance criteria call for edits to .gitlab-ci.yml and files under .gitlab/ci/, which are workflow-shaped scaffold templates installed into enrolled repos as their pipeline configuration. Confirm the implementing agent/tooling has permission to modify workflow files before dispatching, since automated code agents are typically restricted from editing CI/workflow configuration.

    Blocked by:

  9. added 2 commits that reference this issue on Sep 29, 2026
  10. 1 remaining item

  11. ggallen commented on Sep 30, 2026

    @ggallen
    MemberAuthor

    The dispatcher scaffold must be compatible with #7850/#7851: its agent launch path cannot depend on user-defined pipeline variables once is enforced. Keep the control-plane runner split from #7761, and ensure the scaffold exposes the authenticated input/opaque-record path needed by the final dispatcher.

  12. ggallen commented on Sep 30, 2026

    @ggallen
    MemberAuthor

    Clarification: the scaffold must not depend on user-defined pipeline variables after no_one_allowed is enforced. It needs the authenticated pipeline-input and opaque dispatch-record path from issues 7850 and 7851.

  13. fullsend-ai-triage commented on Oct 1, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 7:05 PM UTC · Completed 7:10 PM UTC

    Commit: 2d56b14 · View workflow run →

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

  14. fullsend-ai-triage commented on Oct 1, 2026

    @fullsend-ai-triage

    Progress update: the dependency this issue previously cited (#7769, the hardened in-job gate pattern) has merged via PR #7817, and #7851 (GitLab pipeline-input support in pipeline creation) has also merged via PR #7926. Thank you for the clarifying comments reiterating the #7850/#7851 compatibility requirement.

    However, this issue's acceptance criteria still require the dispatcher scaffold to be compatible with the authenticated opaque dispatch-record transport that #7850 ("GitLab dispatch: replace user-defined pipeline variables with inputs and signed dispatch records") is defining and validating, and #7850 remains open with no PR in flight. Until that transport contract lands, the dispatcher launch path can't fully satisfy the "uses authenticated pipeline inputs and opaque dispatch records as appropriate" criterion, so this issue stays blocked rather than ready to implement.

    Once #7850 lands, the scope, key files, and acceptance criteria here look well-specified and should be implementable without further clarification.

    One note for whoever picks this up: the scope calls for edits to .gitlab-ci.yml and files under .gitlab/ci/, which are workflow-shaped scaffold templates installed into enrolled repos as pipeline configuration. The issue body asserts the implementation path is already authorized to modify these, but that should be confirmed with maintainers rather than assumed -- automated code agents are typically restricted from editing CI/workflow configuration under current permissions, and this may need manual intervention or explicit sign-off before dispatching implementation work.

    Blocked by:

    Blocked by:

  15. changed the title [-]ADR 0125: dispatcher CI scaffold — include, job, run-dispatcher-job.sh, trigger admit rule[/-] [+]GitLab webhook: dispatcher CI scaffold for signed pipeline-input dispatch[/+] on Oct 3, 2026
  16. fullsend-ai-triage commented on Oct 3, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 1:19 AM UTC · Completed 1:21 AM UTC

    Commit: 6a4e490 · View workflow run →

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

  17. added
    feature
    triaged
    and removed
    blocked
    on Oct 3, 2026
  18. fullsend-ai-triage commented on Oct 3, 2026

    @fullsend-ai-triage

    The blockers noted in earlier triage comments are resolved: the hardened gate pattern (#7769) is closed, and the signed pipeline-input transport (#7850, #7851, merged PR #7945) has landed, as has the control-runner tag split (#7761). #7770 runs in parallel and #7773 consumes this work, so neither blocks it. No open or merged PR references this issue, so there is no work in flight.

    The scope and acceptance criteria are specific enough to implement without further clarification. One point from the comment thread: the earlier comments mention an opaque dispatch-record mechanism, but the current issue body says none is required and that the existing signed chunk transport is reused. This triage follows the body.

    Workflow-file warning: the work edits the root .gitlab-ci.yml and files under .gitlab/ci/ in the scaffold, which are CI pipeline configuration. The code agent cannot modify workflow files under current permissions, so automatic code dispatch is skipped. A maintainer or human contributor needs to make these changes or explicitly grant the permission.

    Suggested test coverage:

    - Registration: remote + embedded scaffold lists include fullsend-dispatcher.yml and run-dispatcher-job.sh; retired fullsend-dispatch.yml stays delete-only.
    - Lifecycle: install/converge/uninstall handle the new managed paths and preserve user-owned CI content.
    - Rules: trigger -> dispatcher only; schedule -> poll only; api -> agent only; debug-trace denial precedes admission; dispatcher gate allowlist is exactly {trigger}.
    - Contract: root input set stays at 20 inputs; TRIGGER_PAYLOAD is passed natively; no pipeline-variable overrides are needed.
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  19. ggallen commented on Oct 3, 2026

    @ggallen
    MemberAuthor

    /fs-code

  20. fullsend-ai-coder commented on Oct 3, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 1:36 AM UTC · Completed 2:01 AM UTC

    Commit: 6a4e490 · View workflow run →

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

  21. added 2 commits that reference this issue on Oct 3, 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

    component/cicomponent/dispatchfeaturesecuritytriagedtype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions