Remove RotatingGoal.update_resource_progress (test-only helper) - #342
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
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): Removedupdate_resource_progress. The verifiable production progress path iscompute_resource_progress(), which indents fromgame_state.harvestedand 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): Removedtest_update_resource_progressfromrun_tests()and deleted its body. Intest_is_goal_complete, the callgs.update_resource_progress(goal, 10)was replaced withgoal["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'sassert_eqparse-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_eq2-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_progressremoved fromscripts/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.gdandtest_goal_progression.gdstay green — ✅ CI "Script test suite" passed;test_goal_progression.gdis 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removed the test-only static helper
update_resource_progressfromscripts/rotating_goal.gdand removed its dedicated testtest_update_resource_progressfromtests/test_rotating_goal.gd. …Fixes #335
Opened by foreman on review GO (workload wl-misospace-windowstead-335).