Skip to content

Clean up unit-system loose ends (dead code + duplicate alias table)#80

Merged
windoze95 merged 1 commit into
mainfrom
chore/unit-system-cleanup
Jun 26, 2026
Merged

Clean up unit-system loose ends (dead code + duplicate alias table)#80
windoze95 merged 1 commit into
mainfrom
chore/unit-system-cleanup

Conversation

@windoze95

Copy link
Copy Markdown
Owner

Post-merge tidy of the unit-system engine — removing things I didn't want sitting in production.

  • Dead code: drop units.Scale + roundCount (zero callers — server-side scaling is a future client concern and returns with its UI consumer) and the half-wired cl/dl input units (the parser never produced them and measureKind misclassified them as imprecise).
  • Duplicate alias table: the ingredient parser now resolves tokens through units.Canonical; the near-identical service-local unitAliases map is deleted. One source of truth. units.Canonical is a content-superset, so parser behavior is unchanged (its tests pass untouched).

Full go test ./... green.

Deliberately left

  • The inert recipe.import.text/url duplicate prompt blocks (dead but correct; not worth a fragile 28-line YAML match).
  • The pre-existing -race flake in TestFinishStreamedRecipe_BackgroundImageGeneration — it's a cross-test background-goroutine/global-S3-stub lifecycle issue in the streaming harness (the mock repo itself is already mutex-safe), unrelated to units and not run by the deploy gate. Worth a separate focused fix.

🤖 Generated with Claude Code

Post-merge tidy of the unit-system engine.

- Remove the unused units.Scale + roundCount (no caller — scaling is a future
  client concern; it returns with its consumer when the UI lands) and the
  half-wired cl/dl input units (the parser never produced them and measureKind
  misclassified them).
- Unify the duplicate unit-alias table: the ingredient parser now resolves
  tokens through units.Canonical, and the service-local unitAliases copy is
  deleted. Single source of truth; parser tests unchanged and green.

Full go test ./... green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@windoze95 windoze95 merged commit 4f96f74 into main Jun 26, 2026
1 check passed
@windoze95 windoze95 deleted the chore/unit-system-cleanup branch June 26, 2026 20:17
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.

1 participant