GitLab forge adapter #635

Closed
opened 2026-07-07 21:47:16 +00:00 by coilyco-ops · 2 comments
Member

Parent epic: #633. Depends on: none. Follows the GitHub adapter (#489) directly.

Context. cmd/ward/forge.go already treats the forge as a dimension with Forgejo and GitHub implementations of issueForge, selected by WARD_FORGE. GitLab (git host plus native GitLab issues) is the next git host with the widest pull and does not need the tracker split, since GitLab issues live on the forge.

Proposed change.

  • Add a forgeGitLab value to the forge enum and teach parseForge its token.
  • Implement the git-host half for GitLab: clone base, push user, MR creation, and a ref regex matching GitLab issue and MR URLs (mirror githubRefRE).
  • Implement the GitLab side of the issue/tracker surface (against the Tracker port once #634 lands, or issueForge if this ships first).
  • Token resolution mirroring resolveGitHubToken: env plus a CLI fallback (glab where present).
  • Add docs/agent-gitlab.md following docs/agent-github.md.

Acceptance criteria.

  • WARD_FORGE=gitlab runs a dispatch against a GitLab-hosted repo and its issues end to end.
  • Ref parsing round-trips GitLab issue and MR URLs.
  • Self-hosted GitLab (Enterprise) base URL is configurable, not hardcoded to gitlab.com.
  • Tests cover ref parsing and token resolution.

Milestone: foreign-stack compat. Filed from the read-only director surface (she/her), part of the release-readiness issue batch.

Parent epic: #633. **Depends on:** none. Follows the GitHub adapter (#489) directly. **Context.** `cmd/ward/forge.go` already treats the forge as a dimension with Forgejo and GitHub implementations of `issueForge`, selected by `WARD_FORGE`. GitLab (git host plus native GitLab issues) is the next git host with the widest pull and does not need the tracker split, since GitLab issues live on the forge. **Proposed change.** - Add a `forgeGitLab` value to the `forge` enum and teach `parseForge` its token. - Implement the git-host half for GitLab: clone base, push user, MR creation, and a ref regex matching GitLab issue and MR URLs (mirror `githubRefRE`). - Implement the GitLab side of the issue/tracker surface (against the Tracker port once #634 lands, or `issueForge` if this ships first). - Token resolution mirroring `resolveGitHubToken`: env plus a CLI fallback (`glab` where present). - Add `docs/agent-gitlab.md` following `docs/agent-github.md`. **Acceptance criteria.** - `WARD_FORGE=gitlab` runs a dispatch against a GitLab-hosted repo and its issues end to end. - Ref parsing round-trips GitLab issue and MR URLs. - Self-hosted GitLab (Enterprise) base URL is configurable, not hardcoded to gitlab.com. - Tests cover ref parsing and token resolution. --- Milestone: foreign-stack compat. Filed from the read-only director surface (she/her), part of the release-readiness issue batch.
Author
Member

WARD-RESERVATION: held 🔒

reservation details

Holder: container engineer-codex-ward-635 on host kais-macbook-pro-2.local.

Reserved by ward agent --harness codex (reserved 2026-07-09T22:41:33Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (1h TTL). --force overrides.

Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).

run seed context — what this run is carrying (ward#609)
  • Resolved: coilyco-flight-deck/ward#635 · branch issue-635 · harness codex · workflow pull-requests-and-merge
  • Run: engineer-codex-ward-635 · ward v0.540.0 · dispatched 2026-07-09T22:41:33Z
  • Comment thread: 0 included in the pre-flight read, 0 stripped (ward's own automated comments).

Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.540.0).

— Codex, via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-codex-ward-635` on host `kais-macbook-pro-2.local`. Reserved by `ward agent --harness codex` (reserved 2026-07-09T22:41:33Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (1h TTL). `--force` overrides. **Do not comment on or edit this issue to steer the run while it is reserved.** The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a **new issue, dispatched fresh**. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494). <details><summary>run seed context — what this run is carrying (ward#609)</summary> - **Resolved:** `coilyco-flight-deck/ward#635` · branch `issue-635` · harness `codex` · workflow `pull-requests-and-merge` - **Run:** `engineer-codex-ward-635` · ward `v0.540.0` · dispatched `2026-07-09T22:41:33Z` - **Comment thread:** 0 included in the pre-flight read, 0 stripped (ward's own automated comments). Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.540.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-OUTCOME: blocked 🛑

details workflow: pull-requests-and-merge; review summary: review gate skipped by ~/.ward/config.yaml default CI check: the Forgejo test workflow for PR #888 is still running and has not reached a terminal result. implementation felt: solid; verification was bottlenecked by the remote run and local disk pressure. confidence: medium. surprises: the repo-wide local test path hit temp-space limits, and the PR check has not settled. follow-ups: let Forgejo finish or re-run the workflow, then resume merge-ready packaging.
WARD-OUTCOME: blocked 🛑 <details><summary>details</summary> workflow: pull-requests-and-merge; review summary: review gate skipped by ~/.ward/config.yaml default CI check: the Forgejo test workflow for PR #888 is still running and has not reached a terminal result. implementation felt: solid; verification was bottlenecked by the remote run and local disk pressure. confidence: medium. surprises: the repo-wide local test path hit temp-space limits, and the PR check has not settled. follow-ups: let Forgejo finish or re-run the workflow, then resume merge-ready packaging. </details>
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#635
No description provided.