Skip to content

Remove RotatingGoal.update_resource_progress (test-only helper) - #342

Merged
joryirving merged 1 commit into
mainfrom
foreman/wl-misospace-windowstead-335/issue-335
Aug 14, 2026
Merged

Remove RotatingGoal.update_resource_progress (test-only helper)#342
joryirving merged 1 commit into
mainfrom
foreman/wl-misospace-windowstead-335/issue-335

Conversation

@itsmiso-ai

Copy link
Copy Markdown
Contributor

What

Removed the test-only static helper update_resource_progress from scripts/rotating_goal.gd and removed its dedicated test test_update_resource_progress from tests/test_rotating_goal.gd. …

Fixes #335

Opened by foreman on review GO (workload wl-misospace-windowstead-335).

The static helper had no production caller; production resource-goal
progress flows through compute_resource_progress() invoked by
GoalProgression.compute_progress() each tick. Keeping the second,
untested-in-production mutation API on the goal model invited confusion
about which path was authoritative and doubled the surface that
save-validation and goal logic had to agree with.

- Drop the helper from scripts/rotating_goal.gd
- Drop test_update_resource_progress and its runner entry from
  tests/test_rotating_goal.gd; rewrite the lone call inside
  test_is_goal_complete to set goal.current_progress directly

Fixes #335

Signed-off-by: Saffron <263493777+itsmiso-ai@users.noreply.github.com>
@itsmiso-ai
itsmiso-ai requested a review from joryirving as a code owner August 14, 2026 08:02

@its-saffron its-saffron Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Automated Review

Full PR review.

Analysis engine: dsv4f@https://litellm.jory.dev/v1 (openai) — primary route

Recommendation: Approve

This is a clean, minimal dead-code removal that exactly matches linked issue PR 335. The PR deletes the test-only helper RotatingGoal.update_resource_progress and its dedicated test, and replaces the one remaining test call with a direct assignment that preserves the original intent of test_is_goal_complete.

Change-by-change findings

  • scripts/rotating_goal.gd (−6 lines): Removed update_resource_progress. The verifiable production progress path is compute_resource_progress(), which indents from game_state.harvested and is what the issue names as the authoritative live path. No other production code referenced the removed helper (repository-wide grep returns zero matches).
  • tests/test_rotating_goal.gd (−18, +1): Removed test_update_resource_progress from run_tests() and deleted its body. In test_is_goal_complete, the call gs.update_resource_progress(goal, 10) was replaced with goal["current_progress"] = 10, which preserves the "resource_complete_at_target" assertion. The new assertion calls are the documented two-argument form (assert_true(c, name)), so the repo's assert_eq parse-error trap in AGENTS.md does not apply and no test file will be dropped.

Standards Compliance (AGENTS.md / testing traps)

  • No common manifest changes; no release process impact.
  • No assert_eq 2-arg calls introduced; all changed assertions use the required named form.
  • The change does not touch save migration, orientation, or dock-sizing conventions.

Linked Issue Fit (PR 335)

  • Issue ask: "Remove RotatingGoal.update_resource_progress — it has no production caller and only tests exercise it." — satisfied by the diff.
  • Expected files (scripts/rotating_goal.gd, tests/test_rotating_goal.gd) — both touched, no scope drift.
  • Acceptance criteria:
    • update_resource_progress removed from scripts/rotating_goal.gd — ✅
    • Its test cases removed from tests/test_rotating_goal.gd — ✅
    • rg "update_resource_progress" returns nothing — ✅ (verified via repository grep: zero matches)
    • test_rotating_goal.gd and test_goal_progression.gd stay green — ✅ CI "Script test suite" passed; test_goal_progression.gd is untouched and unaffected.

Tool Harness Findings

  • Tool harness planning is reported as pending in the corpus; no harness output was available for review. This does not block approval given the repository-level evidence above.

Unknowns / Needs Verification

  • None material. The only evidence not directly observed is a local headless run of the two named suites, but the CI script test suite is green and the removed symbol has zero remaining references, so the change cannot break those suites at parse or call time.

@joryirving
joryirving merged commit 69f4dc0 into main Aug 14, 2026
8 checks passed
@joryirving
joryirving deleted the foreman/wl-misospace-windowstead-335/issue-335 branch August 14, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P3] Remove RotatingGoal.update_resource_progress — test-only helper with no production caller

2 participants