Validation: Profile tab: business code join form

validation-309-2026-07-26 Doc

validation pass

Verdict: PASS

Ticket

ldraney/landscaping-assistant#309 — Business code join form on Profile tab. Users enter a crew leader's business code to request membership, gated behind the business_codes feature flag.
Merged PR: #322 (commit 547b4b5)

Environment

Production cluster: landscaping-assistant namespace, pod landscaping-assistant-6979f7644b-lsbv4
Production URL: https://landscaping-assistant.app
ArgoCD app: landscaping-assistant — Synced/Healthy
Woodpecker pipelines: #853 (merge commit, all steps green, overall status anomalously "failure"), #856 (latest main, SUCCESS)
Deployed image: harbor.tail5b443a.ts.net/landscaping-assistant/app:8e5a1a0

Checks

# Criterion How Verified Result Evidence
1 GET /join-crew shows business code form when <code>business_codes</code> flag enabled Code review of committed view at HEAD; CI test "shows business code form" PASS View checks <code>feature_enabled?(:business_codes)</code>, renders form with <code>name="join_code"</code> input
2 GET /join-crew shows placeholder when flag disabled Code review; CI test "shows placeholder when flag disabled" PASS Else branch renders disabled Business Name and Notes inputs
3 POST /join-crew with valid code creates UserBusiness(pending, crew_member) Code review of create action; CI test "creates UserBusiness with valid code" PASS Controller creates with <code>role: "crew_member", status: "pending"</code>; test asserts count change and attribute values
4 Success message: "Request sent to [Business Name]..." Code review; CI test "shows success message with business name" PASS <code>@success = "Request sent to #{business.name}..."</code>
5 Existing pending/approved UserBusiness shows status instead of form Code review of <code>load_membership_status</code>; CI tests for pending and approved states PASS View hides form when status is pending or approved; shows member/pending message with business name
6 Denied membership shows denial with retry option Code review; CI test "shows denied status with form" PASS Denied case renders denial message AND still shows the join code form for retry
7 Invalid codes trigger inline error Code review; CI test "returns error for invalid code" PASS <code>@error = "No business found with that code. Check with your crew leader."</code>; returns 422
8 Code input case-insensitive with upcase transformation Code review; CI test "handles case-insensitive code" PASS <code>code = params[:join_code].to_s.strip.upcase</code>; test submits "smith26" and matches "SMITH26"
9 Form uses Turbo without full page reload Code review of <code>form_with</code> usage PASS Rails 7+ <code>form_with</code> defaults to <code>data-turbo="true"</code>
10 Auth enforced, redirects unauthenticated users Code review; CI tests for GET and POST auth redirect PASS Both GET and POST redirect to <code>/login</code> when unauthenticated

Tier Results

Tier Result Evidence
Tier 1 (CI) PASS Pipeline #853: all 6 steps green, 634 tests pass (0 failures), image built and pushed. Pipeline #856 (includes #322+#323): SUCCESS, all steps green.
Tier 3 (Prod) PASS Image <code>8e5a1a0</code> confirmed deployed. Pod <code>landscaping-assistant-6979f7644b-lsbv4</code> Running, 0 restarts. Health endpoint <code>/up</code> returns 200. Previously blocked on image propagation — resolved after kustomize overlay update deployed via ArgoCD. Confirmed by parallel validation of #310 (same image tag).

Regression Check

Production health endpoint (/up) returns 200. Pod running with 0 restarts. ArgoCD shows Synced/Healthy. No regressions detected.

Discovered Issues

  • Image tag not propagated to production (RESOLVED). Initial validation found the old image tag (2776d03) still deployed. Root cause: kustomize overlay in pal-e-deployments had not been updated with the new tag. Resolved after overlay update; image 8e5a1a0 now confirmed deployed.
  • Pipeline #853 overall status anomaly. Pipeline #853 (PR #322 merge commit) reports overall "failure" status despite all 6 individual steps showing "success" with exit_code 0. This may have prevented automatic deployment triggers. Pipeline #856 (latest commit) correctly shows SUCCESS. Non-blocking for this ticket.

Validation History

  • Run 1 (2026-07-26): PARTIAL — all 10 acceptance criteria passed via code review and CI tests (Tier 1 PASS). Tier 3 FAIL: image tag 8e5a1a0 not yet propagated to production pod.
  • Run 2 (2026-07-26): PASS — Deployment blocker resolved. Image 8e5a1a0 confirmed deployed via kubectl. Pod Running, 0 restarts. Health endpoint 200. All tiers green.