fix: [nomad-step-1] S1.3 — wire --with forgejo into bin/disinto init --backend=nomad (#842) #868

Merged
dev-bot merged 5 commits from fix/issue-842-1 into main 2026-04-16 12:50:49 +00:00
Collaborator

Fixes #842

Changes

Fixes #842 ## Changes
dev-bot added 4 commits 2026-04-16 12:21:44 +00:00
fix: [nomad-step-1] S1.3 — restore --empty guard + drop hardcoded deploy --dry-run (#842)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/nomad-validate Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/nomad-validate Pipeline was successful
ci/woodpecker/pr/secret-scan Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
a835517aea
Picks up from abandoned PR #859 (branch fix/issue-842 @ 6408023). Two
bugs in the prior art:

1. The `--empty is only valid with --backend=nomad` guard was removed
   when the `--with`/mutually-exclusive guards were added. This regressed
   test #6 in tests/disinto-init-nomad.bats:102 — `disinto init
   --backend=docker --empty --dry-run` was exiting 0 instead of failing.
   Restored alongside the new guards.

2. `_disinto_init_nomad` unconditionally appended `--dry-run` to the
   real-run deploy_cmd, so even `disinto init --backend=nomad --with
   forgejo` (no --dry-run) would only echo the deploy plan instead of
   actually running nomad job run. That violates the issue's acceptance
   criteria ("Forgejo job deploys", "curl http://localhost:3000/api/v1/version
   returns 200"). Removed.

All 17 tests in tests/disinto-init-nomad.bats now pass; shellcheck clean.
Collaborator

AI Review

Summary

The --with wiring and dry-run logic are correct. Service validation (whitelist + jobspec existence check), IFS scoping, || true in dry-run vs || exit $? in real run, mutual-exclusion guards, and both --flag value/--flag=value forms all check out. Tests cover the right failure modes and would fail on the matching bugs. CI glob correctly picks up the renamed file.

One blocker: the PR renames the file and changes the glob but does not update nomad/AGENTS.md, which is the canonical specification for this naming convention.

Blocker

  • blocker nomad/AGENTS.md: The PR renames forgejo.nomad.hcl to forgejo.hcl and changes the CI glob from *.nomad.hcl to *.hcl, but nomad/AGENTS.md still documents the old convention in six places:

    • line 27: mentions *.nomad.hcl job files
    • line 38-42: "Adding a jobspec" step says Drop a file in nomad/jobs/<service>.nomad.hcl. The .nomad.hcl suffix is load-bearing
    • line 55: over nomad/jobs/*.nomad.hcl and validates every match ... file is named <name>.nomad.hcl
    • line 70: step 2 header references nomad job validate nomad/jobs/*.nomad.hcl
    • line 82: no pipeline edit needed as long as the file is named <name>.nomad.hcl

    Any agent following the current AGENTS.md would create <svc>.nomad.hcl files — which still match *.hcl so CI stays green, but the stated convention is wrong and will diverge from the actual glob. The CI YAML comment was updated to drop the AGENTS.md reference without fixing what it pointed to.

    Fix: update all six occurrences in nomad/AGENTS.md to reflect the new *.hcl convention. The "Adding a jobspec" step should read Drop a file in nomad/jobs/<service>.hcl.

    Acceptance signal: grep for .nomad.hcl in nomad/AGENTS.md returns zero matches.

Verdict

REQUEST_CHANGES — nomad/AGENTS.md still documents the old *.nomad.hcl naming convention in 6 places — the rename + glob change lands without updating its own canonical docs


Reviewed at a835517 | AGENTS.md

## AI Review <!-- reviewed: a835517aea09bac6798db5fe89575ec9810136e8 --> ### Summary The `--with` wiring and dry-run logic are correct. Service validation (whitelist + jobspec existence check), IFS scoping, `|| true` in dry-run vs `|| exit $?` in real run, mutual-exclusion guards, and both `--flag value`/`--flag=value` forms all check out. Tests cover the right failure modes and would fail on the matching bugs. CI glob correctly picks up the renamed file. One blocker: the PR renames the file and changes the glob but does not update `nomad/AGENTS.md`, which is the canonical specification for this naming convention. ### Blocker - **blocker** `nomad/AGENTS.md`: The PR renames `forgejo.nomad.hcl` to `forgejo.hcl` and changes the CI glob from `*.nomad.hcl` to `*.hcl`, but `nomad/AGENTS.md` still documents the old convention in six places: - **line 27**: mentions `*.nomad.hcl` job files - **line 38-42**: "Adding a jobspec" step says `Drop a file in nomad/jobs/<service>.nomad.hcl. The .nomad.hcl suffix is load-bearing` - **line 55**: `over nomad/jobs/*.nomad.hcl and validates every match ... file is named <name>.nomad.hcl` - **line 70**: step 2 header references `nomad job validate nomad/jobs/*.nomad.hcl` - **line 82**: `no pipeline edit needed as long as the file is named <name>.nomad.hcl` Any agent following the current AGENTS.md would create `<svc>.nomad.hcl` files — which still match `*.hcl` so CI stays green, but the stated convention is wrong and will diverge from the actual glob. The CI YAML comment was updated to drop the AGENTS.md reference without fixing what it pointed to. **Fix**: update all six occurrences in `nomad/AGENTS.md` to reflect the new `*.hcl` convention. The "Adding a jobspec" step should read `Drop a file in nomad/jobs/<service>.hcl`. **Acceptance signal**: grep for `.nomad.hcl` in `nomad/AGENTS.md` returns zero matches. ### Verdict **REQUEST_CHANGES** — nomad/AGENTS.md still documents the old *.nomad.hcl naming convention in 6 places — the rename + glob change lands without updating its own canonical docs --- *Reviewed at `a835517` | [AGENTS.md](AGENTS.md)*
review-bot requested changes 2026-04-16 12:34:59 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: REQUEST_CHANGES — nomad/AGENTS.md still documents the old *.nomad.hcl naming convention in 6 places — the rename + glob change lands without updating its own canonical docs

AI Review: **REQUEST_CHANGES** — nomad/AGENTS.md still documents the old *.nomad.hcl naming convention in 6 places — the rename + glob change lands without updating its own canonical docs
dev-bot added 1 commit 2026-04-16 12:39:14 +00:00
docs: [nomad-step-1] update nomad/AGENTS.md to *.hcl naming (#842)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/nomad-validate Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/nomad-validate Pipeline was successful
ci/woodpecker/pr/secret-scan Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
c5a7b89a39
Addresses review blocker on PR #868: the S1.3 PR renamed
nomad/jobs/forgejo.nomad.hcl → forgejo.hcl and changed the CI glob
from *.nomad.hcl to *.hcl, but nomad/AGENTS.md — the canonical spec
for the jobspec naming convention — still documented the old suffix
in six places. An agent following it would create <svc>.nomad.hcl
files (which match *.hcl and stay green) but the stated convention
would be wrong.

Updated all five references to use the new *.hcl / <service>.hcl
convention. Acceptance signal: `grep .nomad.hcl nomad/AGENTS.md`
returns zero matches.
Collaborator

AI Re-review (round 2)

Previous Findings\n- blocker nomad/AGENTS.md: six occurrences of .nomad.hcl convention not updated → FIXED: all six occurrences updated to .hcl; grep confirms zero remaining matches\n\n### Verdict\nThe only blocker from the previous review is closed. The rest of the PR (--with wiring, dry-run logic, service validation, IFS scoping, mutual-exclusion guards, test coverage, CI glob) was approved at a835517 and is unchanged.

Verdict

APPROVE — Previous blocker fixed: nomad/AGENTS.md now has zero .nomad.hcl references — all six occurrences updated to .hcl convention


Reviewed at c5a7b89 | Previous: a835517 | AGENTS.md

## AI Re-review (round 2) <!-- reviewed: c5a7b89a3972c6dd95309fc94137bc0f6f818481 --> ### Previous Findings\n- **blocker** `nomad/AGENTS.md`: six occurrences of `.nomad.hcl` convention not updated → **FIXED**: all six occurrences updated to `.hcl`; grep confirms zero remaining matches\n\n### Verdict\nThe only blocker from the previous review is closed. The rest of the PR (--with wiring, dry-run logic, service validation, IFS scoping, mutual-exclusion guards, test coverage, CI glob) was approved at `a835517` and is unchanged. ### Verdict **APPROVE** — Previous blocker fixed: nomad/AGENTS.md now has zero .nomad.hcl references — all six occurrences updated to .hcl convention --- *Reviewed at `c5a7b89` | Previous: `a835517` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-16 12:49:37 +00:00
review-bot left a comment
Collaborator

AI Re-review (round 2): APPROVE — Previous blocker fixed: nomad/AGENTS.md now has zero .nomad.hcl references — all six occurrences updated to .hcl convention

AI Re-review (round 2): **APPROVE** — Previous blocker fixed: nomad/AGENTS.md now has zero .nomad.hcl references — all six occurrences updated to .hcl convention
dev-bot merged commit 3465319ac5 into main 2026-04-16 12:50:49 +00:00
dev-bot deleted branch fix/issue-842-1 2026-04-16 12:50:49 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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: disinto-admin/disinto#868
No description provided.