Review: var.services entry for notion-mcp-remote (ArgoCD discovery)
Verdict: NEEDS_REFINEMENT
Board item: #1043 on
board-notion-mcp-remote -- Forgejo issue forgejo_admin/pal-e-services#57. Type: Feature. Points: 3. Labels: type:feature,story:ops-deploy-gitops,arch:argocd.Template Completeness
- [x] Type (Feature)
- [x] Lineage (standalone, scoped from project-notion-mcp-remote)
- [x] Repo (forgejo_admin/pal-e-services)
- [x] User Story
- [x] Context (detailed, includes key values)
- [x] File Targets
- [x] Acceptance Criteria
- [x] Test Expectations (with run command)
- [x] Constraints
- [x] Checklist
- [x] Related
Traceability
- [x]
story:ops-deploy-gitopslabel -- maps tostory-notion-mcp-remote-ops-deploy-gitops - [x] story note verified -- listed in
project-notion-mcp-remoteuser-stories table (AC: "pal-e-services var.services entry landed via PR") - [x]
arch:argocdlabel -- component: ArgoCD (entry drives ArgoCD Application discovery) - [ ] arch note MISSING -- [SCOPE] No
arch-argocdnote exists in pal-e-docs.search_notes(query="arch-argocd")returned zero results. Createarch-argocddescribing ArgoCD's role as the GitOps sync engine for pal-e services (driven byargocd_application.serviceinterraform/services.tf). - [x] Forgejo issue --
forgejo_admin/pal-e-services#57, open
File Targets
- [x]
terraform/k3s.tfvars-- verified path. File is gitignored (per repo.gitignore:*.tfvarsexcluded, only*.tfvars.exampletracked). This is expected:sop-platform-tf-changesdocuments pal-e-services as "plan-and-apply-before-merge" withk3s.tfvarsedited locally. Agent must have localk3s.tfvarsavailable. - [ ]
terraform/services.tf-- [BODY] imprecise. Issue says "Possiblyterraform/services.tf-- if the module signature needs adjustment to passfunnel=true". This is not needed.services.tfalready handles per-service funnel viakubernetes_ingress_v1.service_funnelwithfor_each = { for k, v in var.services : k => v if v.funnel }, andvariables.tfalready exposesfunnel = boolin thevar.servicesobject type. Remove the speculative "possibly services.tf" bullet -- it's already supported. A dev agent could burn time "inspecting" a file that needs no change.
Repo Placement
Correct. Issue filed on
forgejo_admin/pal-e-services where terraform/k3s.tfvars and the var.services schema live. Single-repo change; no multi-repo coordination within this ticket.Dependencies
- Upstream (blocking):
forgejo_admin/pal-e-deployments#132-- kustomize overlay atoverlays/notion-mcp-remote/prod. Currently OPEN, board item #1044 inbacklog. Ticket correctly documents this ("Sibling overlay PR on pal-e-deployments must land first"). ArgoCD sync will fail if the overlay path doesn't exist in thepal-e-deploymentsrepo on the branch referenced bytarget_revision = main. - Downstream:
forgejo_admin/pal-e-platform#296(tofu apply to provision) -- board item #1045 inbacklog. Ticket does not name this explicitly, but it is implied by "PR reviewed and merged" -- the actualtofu applyagainst infrastructure is a separate board item handled after this PR lands. [BODY] optional: add an explicit "Downstream: pal-e-platform#296 handles the tofu apply" bullet to Related for dev-agent clarity, since this ticket's AC includes "tofu plan" but not "tofu apply" (the SOP requires manual apply-before-merge on pal-e-services).
Schema precision issues (BODY fixes)
- [BODY] source_repo value is underspecified. Issue body says
source_repo: pal-e-deployments. Verified againstvariables.tf(variable "services"schema) andservices.tf(coalesce(each.value.source_repo, each.value.forgejo_repo)interpolated ashttp://forgejo-http.forgejo.svc.cluster.local/${source_repo}.git), plus thek3s.tfvars.exampleexample which usesforgejo_admin/pal-e-deploymentsinforgejo_repo. The value MUST include theforgejo_admin/owner prefix:source_repo = "forgejo_admin/pal-e-deployments". Without the prefix, ArgoCD will attempt to sync from an invalid URLforgejo-http.forgejo.svc.cluster.local/pal-e-deployments.gitand fail. Fix in issue body. - [BODY] Clarify workflow expectation. Per
sop-platform-tf-changes, pal-e-services uses plan-and-apply-before-merge (manualtofu apply), not CI-driven apply-on-merge (which is the pal-e-platform pattern). The ticket's AC "tofu plan ... no unexpected diff" + "PR reviewed and merged" is correct, but the agent needs to know the apply is manual and happens BEFORE PR merge. Add a sentence to Constraints: "pal-e-services uses plan-and-apply-before-merge per sop-platform-tf-changes -- do NOT rely on CI apply; a human operator runstofu apply -lock=false -var-file=k3s.tfvarsafter plan review."
Acceptance Criteria
Four ACs, all verifiable by an agent:
- AC1 (entry present) -- grep-verifiable.
- AC2 (plan diff shows expected resources) -- runnable; the expected resource list is explicit (ArgoCD Application, namespace, Harbor project + robots, image pull secret, Tailscale Funnel ingress). Matches
services.tfresources exactly. - AC3 (values match pre-deploy-validation checklist rows) -- references
service-onboarding-sop(slug not found viasearch_notes; may live under a different slug but is referenced consistently across platform docs -- treat as present). - AC4 (PR reviewed and merged) -- process criterion, verifiable via PR URL.
Blast Radius
Additive-only change to a single map key in
var.services. The services.tf resources are all for_each = var.services, so no existing service's resources are touched. Harbor project names are unique (notion-mcp-remote has not been taken). Namespace collision risk: low (namespace notion-mcp-remote should not exist yet). The only subtle risk is: if any other service in the current k3s.tfvars has drifted from its declared state, tofu plan may show unexpected diffs beyond notion-mcp-remote -- the agent must verify the diff is isolated to new resources only. The recent review-1064-2026-04-20 (tf state drift) incident on pal-e-services makes this a concrete concern; flag to agent.Decomposition Assessment
1 file edit (k3s.tfvars, one map entry), 4 acceptance criteria, estimated agent work ~5-10 minutes including plan review. No decomposition needed. 3 points is reasonable given the plan-review + manual-apply coordination overhead specific to pal-e-services.
Recommendation
[BODY]Fixsource_repovalue:pal-e-deployments->forgejo_admin/pal-e-deployments(full owner/repo form; required byservices.tfURL construction).[BODY]Remove the "Possiblyterraform/services.tf" speculation under File Targets. The module already supports per-servicefunnel=true; no module adjustment is needed. Replace with explicit "File Targets: terraform/k3s.tfvars only" to prevent the agent from opening/editingservices.tf.[BODY]Add workflow clarification to Constraints: pal-e-services uses plan-and-apply-before-merge (manualtofu apply), not CI-driven apply-on-merge. Referencesop-platform-tf-changes.[BODY]Add a "Blast Radius" note: verifytofu plandiff is isolated to new notion-mcp-remote resources only; if other services' resources show drift, stop and escalate (referencereview-1064-2026-04-20).[SCOPE]Create architecture notearch-argocddescribing ArgoCD's role in the platform (GitOps sync engine,argocd_application.serviceper-service via pal-e-services Terraform, Image Updater write-back pattern). Without this note, thearch:argocdlabel points to a missing document -- same pattern as the missingarch-tailscale-funnelgap flagged inreview-788-2026-04-03.
Once refinements land
Re-review expected to verdict READY. The scope is otherwise sound, file path correct, dependencies mapped, ACs verifiable, blast radius understood.