The Vikunja SMTP credential carries both fields #42

Merged
pit merged 1 commit from hermes/smtp-username into main 2026-11-05 16:31:39 +00:00
Owner

Summary

secret/services/vikunja/prod/smtp is one credential, so it now carries both of its fields:

-secret/services/vikunja/prod/smtp         VIKUNJA_SMTP_PASSWORD
+secret/services/vikunja/prod/smtp         VIKUNJA_SMTP_USERNAME VIKUNJA_SMTP_PASSWORD

The role reads the username through vault_vikunja_smtp_username, and falls back to thepit when the environment carries none, so the Test leg and an .env fetched before the field existed keep working. VIKUNJA_SMTP_USERNAME joins .env.example, the README and the service reference; it stays out of require_service_secrets for the same reason the password does.

Evidence

  • make check green: env-check (17 names, map and example agree), env-test (every assertion), tofu fmt -check, three Stack validates and both plan tests.
  • ansible-playbook -i inventories/prod/hosts --syntax-check site.yml green.
  • The store path is already at version 2 with VIKUNJA_SMTP_USERNAME=thepit and the current password unchanged; make env ACTOR=pit fetched both (rev 2). No fetch refuses once this merges.

Not done here

The credential value itself is unchanged. Rotating it is: change the SMTP2GO user and password, write both fields, then apply the service. No service was applied in this change.

Merge Danger

Door: two-way — reverting restores the one-name map; the store path keeps the extra field, which the old map ignores.

Blast Radius: the Vikunja mailer's credential only; no Guest, Edge or account changes.

## Summary `secret/services/vikunja/prod/smtp` is one credential, so it now carries both of its fields: ```diff -secret/services/vikunja/prod/smtp VIKUNJA_SMTP_PASSWORD +secret/services/vikunja/prod/smtp VIKUNJA_SMTP_USERNAME VIKUNJA_SMTP_PASSWORD ``` The role reads the username through `vault_vikunja_smtp_username`, and falls back to `thepit` when the environment carries none, so the Test leg and an `.env` fetched before the field existed keep working. `VIKUNJA_SMTP_USERNAME` joins `.env.example`, the README and the service reference; it stays out of `require_service_secrets` for the same reason the password does. ## Evidence - `make check` green: `env-check` (17 names, map and example agree), `env-test` (every assertion), `tofu fmt -check`, three Stack validates and both plan tests. - `ansible-playbook -i inventories/prod/hosts --syntax-check site.yml` green. - The store path is already at version 2 with `VIKUNJA_SMTP_USERNAME=thepit` and the current password unchanged; `make env ACTOR=pit` fetched both (`rev 2`). No fetch refuses once this merges. ## Not done here The credential value itself is unchanged. Rotating it is: change the SMTP2GO user and password, write both fields, then apply the service. No service was applied in this change. ## Merge Danger **Door:** two-way — reverting restores the one-name map; the store path keeps the extra field, which the old map ignores. **Blast Radius:** the Vikunja mailer's credential only; no Guest, Edge or account changes.
The Vikunja SMTP credential carries both fields
All checks were successful
checks / static (pull_request) Successful in 35s
checks / edge (pull_request) Has been skipped
checks / guest (pull_request) Has been skipped
checks / execute (pull_request) Successful in 2m47s
ba9fc99c04
pit changed title from WIP: The Vikunja SMTP credential carries both fields to The Vikunja SMTP credential carries both fields 2026-11-05 16:25:41 +00:00
Member

Review started (round 1/5) on ba9fc99c04 — reading the diff now.

**Review started** (round 1/5) on ba9fc99c04c8a6917f9d8c14c5d2b190af3ba299 — reading the diff now.
bot-minos approved these changes 2026-11-05 16:29:32 +00:00
bot-minos left a comment

repo=olympus/infra-tracker · PR #42 · head ba9fc99c04 · round 1/5 (the dispatch said 1/5; this is the thread's count: reviews already posted + 1) · verdict: merge

Recommendation: merge

Fixed point: main 414856a (merge-base = base sha); the delta is git diff 414856a ba9fc99 — 6 files, +21/−9, one commit. Round 1: no prior review, nothing to re-drive. refs/pull/42/head on the host resolved to the dispatch SHA before and after the probes.

Spec source: the PR description. It cites no ticket. I searched Infra Tracker (project 3) for smtp / mailer / username and found no task that carries this change (TR-8, TR-23, TR-26, TR-29, TR-36 are closed and unrelated). That is a process note, not a finding: the repo's PR convention (AGENTS.md §Pull requests) asks for the three-section body, not a closing keyword. The body's own claims are the contract.

Standards sources: AGENTS.md §Environment (changing a name is a change to env.map and .env.example together; make env-check fails when only one moved), AGENTS.md §Pull requests + .agents/skills/pr/SKILL.md (Summary / Evidence / Merge Danger), olympus/workshop docs/adr/0007 and 0009 at main, and olympus/infra-secrets docs/store-layout.md at main (the doc env.map says owns the paths).

Standards

  1. ADVISORY — env.map:40-42, rule workshop docs/adr/0007 §Decision ("a path is one credential: fields share a path only when they rotate together") and infra-secrets docs/store-layout.md:35 (same sentence). The rationale the change writes down is "SMTP2GO issues the username and password together, and a reset moves the password" — by those words the username does not move on a reset, which is the case the rule says must not share a path. The PR body says the opposite ("change the SMTP2GO user and password, write both fields"). If the body is right, the comment is the defect; if the comment is right, the row breaks the rule. Why it matters here: scripts/env.sh:145-152 refuses the whole fetch when a mapped name is missing from a path, so a password-only kv put (what "a reset moves the password" describes) drops VIKUNJA_SMTP_USERNAME and every make env after it refuses, for every path. Clears with: reword the comment to say the two fields are rotated together by one write (the PR body's account), or drop the clause "and a reset moves the password". (ADR-0007 is Proposed, which is why this is advice and not a block.)

Standards that held: env.map and .env.example moved together (make env-check: "17 names, all declared in .env.example"); the PR body carries the three required sections; no secret value appears anywhere in the diff.

Spec

  1. ADVISORY — vikunja/service/roles/vikunja/defaults/main.yml:73 (+ vikunja/service/verify.yml:129). The body promises "the Test leg and an .env fetched before the field existed keep working", and I confirmed it (below), but nothing in the repo's suite pins the new line. Mutant: replace line 73 with the old vikunja_mailer_username: thepit — make env-check env-test stays green (rc 0), and make check never loads the role; the only role evidence in the body is --syntax-check, which parses the Jinja without evaluating it. verify.yml:129 asserts only config.mailer.enabled == false; the Test leg renders the config but never asserts the username. Clears with: one line in that that: list, config.mailer.username == 'thepit' (the Test leg has no VIKUNJA_SMTP_USERNAME, so it exercises exactly the fallback).

What I verified, by my own hand

Claim How Result
make check green, 17 names mise exec -- make check at head rc 0; "env-check: the pin and the map agree", 17 names
--syntax-check site.yml green ansible-playbook -i inventories/prod/hosts --syntax-check site.yml rc 0
Fallback to thepit role defaults evaluated by ansible with the env: unset / empty / set / set-at-base unset → thepit, empty → thepit, smtp-user-7 → smtp-user-7; the base revision gives thepit for the same set value (the field is new); enabled still keys on the password alone
Fetch gains exactly one name env.sh fetch at base and head against a stub store built from each side's own env.map both rc 0, 8 secret reads each, .env 711 → 760 bytes, name diff = +VIKUNJA_SMTP_USERNAME, mode 600, the name reaches a sourced child
Fetch is all-or-nothing on the new row the smtp path answering 404 rc 1, refusal names the path, no .env written
Reverting is a two-way door ("the old map ignores the extra field") read scripts/env.sh:287 each mapped name is read by key (.data.data[$k]); an unmapped field is never looked at
Makefile hunk is comment-only non-comment +/- line census of git diff -- Makefile 0 lines
.env.example, README, docs/reference/service.md agree with the map read at head names, path and "five names" agree; the "four secrets" wording stays true (four credentials, five names)

Not verified

  • That the live store path secret/services/vikunja/prod/smtp holds VIKUNJA_SMTP_USERNAME at version 2: a review agent's class is refused by make env, so this rests on the author's statement. Merge condition for the human: the fetch is all-or-nothing, so confirm the field is there before merging.
  • That the SMTP2GO credential actually works with the username the role now reads; no mail was sent.

Named, not charged

  • infra-secrets docs/store-layout.md:415 lists vikunja/prod/smtp as holding vault_vikunja_smtp_password only (and :181, "four paths"). It will lag the new field. Another repo's page; worth a follow-up there, not charged here.
  • config.yml.j2:31 interpolates the username inside double quotes with no escaping, the same way line 32 treats the password. A username containing " would break the YAML. Pre-existing pattern, the diff does not touch the template.
  • ADR-0009 makes a merge to main the deploy. This repo has only .forgejo/workflows/checks.yaml, so no merge deploys the Service yet, which is consistent with the body's "no service was applied". Once a deploy exists, the next run will render the new username.

Summary

Axis Findings BLOCKER ADVISORY Worst
Standards 1 0 1 env.map:40-42 — the rationale says "a reset moves the password", against the one-rotation rule it invokes
Spec 1 0 1 defaults/main.yml:73 — the fallback is pinned by no test (mutant stays green)

Two advisories, no blocker: state is APPROVED, Recommendation: merge, label review/merge-ready. The count is below the three-advisory volume trip. Both advisories are optional polish; neither needs another round.

<!-- minos review-loop: repo=olympus/infra-tracker pr=42 head=ba9fc99c04c8a6917f9d8c14c5d2b190af3ba299 round=1/5 axes=standards,spec --> repo=olympus/infra-tracker · PR #42 · head ba9fc99c04c8a6917f9d8c14c5d2b190af3ba299 · round 1/5 (the dispatch said 1/5; this is the thread's count: reviews already posted + 1) · verdict: merge Recommendation: merge Fixed point: `main` 414856a (merge-base = base sha); the delta is `git diff 414856a ba9fc99` — 6 files, +21/−9, one commit. Round 1: no prior review, nothing to re-drive. `refs/pull/42/head` on the host resolved to the dispatch SHA before and after the probes. **Spec source:** the PR description. It cites no ticket. I searched Infra Tracker (project 3) for smtp / mailer / username and found no task that carries this change (TR-8, TR-23, TR-26, TR-29, TR-36 are closed and unrelated). That is a process note, not a finding: the repo's PR convention (`AGENTS.md §Pull requests`) asks for the three-section body, not a closing keyword. The body's own claims are the contract. **Standards sources:** `AGENTS.md §Environment` (changing a name is a change to `env.map` and `.env.example` together; `make env-check` fails when only one moved), `AGENTS.md §Pull requests` + `.agents/skills/pr/SKILL.md` (Summary / Evidence / Merge Danger), `olympus/workshop` `docs/adr/0007` and `0009` at `main`, and `olympus/infra-secrets` `docs/store-layout.md` at `main` (the doc `env.map` says owns the paths). ## Standards 1. **ADVISORY** — `env.map:40-42`, rule `workshop docs/adr/0007 §Decision` ("a path is one credential: fields share a path only when they rotate together") and `infra-secrets docs/store-layout.md:35` (same sentence). The rationale the change writes down is "SMTP2GO issues the username and password together, **and a reset moves the password**" — by those words the username does *not* move on a reset, which is the case the rule says must not share a path. The PR body says the opposite ("change the SMTP2GO user and password, write both fields"). If the body is right, the comment is the defect; if the comment is right, the row breaks the rule. Why it matters here: `scripts/env.sh:145-152` refuses the whole fetch when a mapped name is missing from a path, so a password-only `kv put` (what "a reset moves the password" describes) drops `VIKUNJA_SMTP_USERNAME` and every `make env` after it refuses, for every path. Clears with: reword the comment to say the two fields are rotated together by one write (the PR body's account), or drop the clause "and a reset moves the password". (ADR-0007 is `Proposed`, which is why this is advice and not a block.) Standards that held: `env.map` and `.env.example` moved together (`make env-check`: "17 names, all declared in .env.example"); the PR body carries the three required sections; no secret value appears anywhere in the diff. ## Spec 1. **ADVISORY** — `vikunja/service/roles/vikunja/defaults/main.yml:73` (+ `vikunja/service/verify.yml:129`). The body promises "the Test leg and an `.env` fetched before the field existed keep working", and I confirmed it (below), but nothing in the repo's suite pins the new line. Mutant: replace line 73 with the old `vikunja_mailer_username: thepit` — `make env-check env-test` stays green (rc 0), and `make check` never loads the role; the only role evidence in the body is `--syntax-check`, which parses the Jinja without evaluating it. `verify.yml:129` asserts only `config.mailer.enabled == false`; the Test leg renders the config but never asserts the username. Clears with: one line in that `that:` list, `config.mailer.username == 'thepit'` (the Test leg has no `VIKUNJA_SMTP_USERNAME`, so it exercises exactly the fallback). ## What I verified, by my own hand | Claim | How | Result | | --- | --- | --- | | `make check` green, 17 names | `mise exec -- make check` at head | rc 0; "env-check: the pin and the map agree", 17 names | | `--syntax-check site.yml` green | `ansible-playbook -i inventories/prod/hosts --syntax-check site.yml` | rc 0 | | Fallback to `thepit` | role defaults evaluated by ansible with the env: unset / empty / set / set-at-base | unset → `thepit`, empty → `thepit`, `smtp-user-7` → `smtp-user-7`; the base revision gives `thepit` for the same set value (the field is new); `enabled` still keys on the password alone | | Fetch gains exactly one name | `env.sh fetch` at base and head against a stub store built from each side's own `env.map` | both rc 0, 8 secret reads each, `.env` 711 → 760 bytes, name diff = `+VIKUNJA_SMTP_USERNAME`, mode 600, the name reaches a sourced child | | Fetch is all-or-nothing on the new row | the `smtp` path answering 404 | rc 1, refusal names the path, no `.env` written | | Reverting is a two-way door ("the old map ignores the extra field") | read `scripts/env.sh:287` | each mapped name is read by key (`.data.data[$k]`); an unmapped field is never looked at | | Makefile hunk is comment-only | non-comment `+/-` line census of `git diff -- Makefile` | 0 lines | | `.env.example`, README, `docs/reference/service.md` agree with the map | read at head | names, path and "five names" agree; the "four secrets" wording stays true (four credentials, five names) | ## Not verified - That the live store path `secret/services/vikunja/prod/smtp` holds `VIKUNJA_SMTP_USERNAME` at version 2: a review agent's class is refused by `make env`, so this rests on the author's statement. **Merge condition for the human:** the fetch is all-or-nothing, so confirm the field is there before merging. - That the SMTP2GO credential actually works with the username the role now reads; no mail was sent. ## Named, not charged - `infra-secrets docs/store-layout.md:415` lists `vikunja/prod/smtp` as holding `vault_vikunja_smtp_password` only (and `:181`, "four paths"). It will lag the new field. Another repo's page; worth a follow-up there, not charged here. - `config.yml.j2:31` interpolates the username inside double quotes with no escaping, the same way line 32 treats the password. A username containing `"` would break the YAML. Pre-existing pattern, the diff does not touch the template. - ADR-0009 makes a merge to `main` the deploy. This repo has only `.forgejo/workflows/checks.yaml`, so no merge deploys the Service yet, which is consistent with the body's "no service was applied". Once a deploy exists, the next run will render the new username. ## Summary | Axis | Findings | BLOCKER | ADVISORY | Worst | | --- | --- | --- | --- | --- | | Standards | 1 | 0 | 1 | `env.map:40-42` — the rationale says "a reset moves the password", against the one-rotation rule it invokes | | Spec | 1 | 0 | 1 | `defaults/main.yml:73` — the fallback is pinned by no test (mutant stays green) | Two advisories, no blocker: state is APPROVED, `Recommendation: merge`, label `review/merge-ready`. The count is below the three-advisory volume trip. Both advisories are optional polish; neither needs another round.
pit merged commit 5f5d1fb810 into main 2026-11-05 16:31:39 +00:00
pit deleted branch hermes/smtp-username 2026-11-05 16:31:39 +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
olympus/infra-tracker!42
No description provided.