Review: ScheduleDigester team assignment + test updates (crew grouping 4/4)

review-1577-2026-06-23 Review

review approved

Verdict: APPROVED

Round 3 re-review. Previous rounds flagged missing spec files. The issue body now correctly enumerates all 7 spec files with their WorkQueueItem.create!/new call counts. All file targets verified against the codebase. Scope is tight and accurate.

Template Completeness

  • [x] Type — Feature
  • [x] Lineage — child of #260, sub-ticket 4/4, depends on #262 and #263
  • [x] Repo — ldraney/landscaping-assistant
  • [x] User Story — admin wants digested items assigned to team
  • [x] Context — explains ScheduleDigester, team_id requirement, caller change
  • [x] File Targets — 9 files listed (2 app, 7 spec), with "NOT to touch" exclusions
  • [x] Feature Flag — none (internal model change, correct)
  • [x] Acceptance Criteria — 5 ACs
  • [x] Test Expectations — service test + 7 spec files + run command
  • [x] Constraints — 3 constraints listed
  • [x] Checklist — present
  • [x] Related — #260, #262, #263

Traceability

  • [x] story:auth label — "auth" story found in project-landscaping-assistant user-stories section (role-based auth covers team-scoped access)
  • [x] story note verified — "auth" row exists: "All roles / Log in with Keycloak, see role-appropriate tabs and features"
  • [x] arch:rails-app label — rails-app architecture component
  • [ ] arch note MISSING — [SCOPE] No arch-rails-app note found in pal-e-docs. This is a pre-existing gap across multiple board items, not a blocker for this ticket.
  • [x] Forgejo issue — ldraney/landscaping-assistant#265, state: open

File Targets

  • [x] app/services/schedule_digester.rb — verified: create_work_queue_items at line 38, creates WorkQueueItems at line 54 without team_id. Correctly targeted for adding team_id parameter.
  • [x] app/controllers/uploads_controller.rb — verified: line 92 calls ScheduleDigester.create_work_queue_items. One-line change to pass team_id confirmed feasible.
  • [x] spec/services/schedule_digester_spec.rb — verified: 1 WorkQueueItem.create! call (line 123)
  • [x] spec/requests/weeks_spec.rb — verified: 10 WorkQueueItem.create! calls
  • [x] spec/requests/uploads_spec.rb — verified: 1 WorkQueueItem.create! call (line 231)
  • [x] spec/requests/work_queue_items_spec.rb — verified: 28 WorkQueueItem.create! calls (ticket does not claim a specific count, just lists it for update)
  • [x] spec/models/paper_trail_spec.rb — verified: 1 WorkQueueItem.create! call (line 41)
  • [x] spec/requests/days_spec.rb — verified: 17 WorkQueueItem.create!/new calls — matches ticket claim of 17
  • [x] spec/models/work_queue_item_spec.rb — verified: 7 WorkQueueItem.create!/new calls — matches ticket claim of 7 (3 .new + 4 .create!)
No other spec files contain WorkQueueItem.create!/new calls — the 7-file list is exhaustive.

Repo Placement

OK. Issue is filed on ldraney/landscaping-assistant. All file targets are within this repo. Single-repo change.

Dependencies

  • #262 (Team model) — HARD DEPENDENCY. Adds Team model, team_id column to work_queue_items, and NOT NULL constraint. This ticket cannot be implemented until #262 is merged. Board item 1574, currently in backlog. Documented in issue Lineage section.
  • #263 (current_team helper) — HARD DEPENDENCY. Provides the current_team method used in uploads_controller.rb. Neither Team model nor current_team helper exist yet. Board item 1575, currently in backlog. Documented in issue Lineage section.
  • Both dependencies are correctly documented in the issue body.

Acceptance Criteria

5 ACs, all verifiable by an agent:
  • AC1: ScheduleDigester accepts team_id — testable via service spec
  • AC2: uploads_controller passes current_team.id — testable via grep/read
  • AC3: Default team fallback — testable via spec. Note: the fallback must be consistent with ApplicationController's current_team fallback from #263, which doesn't exist yet.
  • AC4: All 7 spec files updated — testable by running rspec
  • AC5: bundle exec rspec passes — direct test command
All ACs are automatable. Run command provided: bundle exec rspec.

Blast Radius

Low blast radius. The ScheduleDigester change is additive (new parameter). All spec files that inline-create WorkQueueItems are correctly identified — no other spec files were missed. The "NOT to touch" exclusion list is correct for separating scope from sub-tickets 2 and 3.

Decomposition Assessment

9 file targets in 1 repo, 5 ACs. The 7 spec file changes are mechanical (add team association to existing create!/new calls). The 2 app changes are small (add parameter + pass it). Estimated agent time: ~3 minutes. No decomposition needed.

Recommendation

No action needed. Scope is solid after round 3 refinement. All 7 spec files now correctly enumerated with verified occurrence counts. Dependencies are documented and ordered correctly (must wait for #262 and #263 before implementation).
Pre-existing gap (not blocking):
  • [SCOPE] Create architecture note arch-rails-app for the rails-app component (affects many board items, not specific to this ticket)