Skip to content

fix(tabs): forward the step's power settings to the tab generator - #680

Merged
knipknap merged 1 commit into
mainfrom
fix/issue-667-tab-power
Nov 4, 2026
Merged

knipknap merged 1 commit into
mainfrom
fix/issue-667-tab-power

Conversation

@knipknap

@knipknap knipknap commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #667.

The Tab Power setting never reached the tab generator. When the
toolpath was built, IntentBuilder._transformer_settings()
assembled the settings dict handed to the transformers' to_spec()
from a fixed list, and the step's power and tab_power were
simply missing from it. TabOpsTransformer.to_spec() therefore
always fell back to its default of tab_power=0.0 and degraded
every tab to the gap (skip) mode, no matter what the user entered in
the Tab Power field.

This forwards both values so a step with Tab Power above 0% now cuts
through the tab at reduced power (tab_power * power), exactly as
the reporter expected. With the test machine configured for
1000 max power, a 70% Tab Power now emits the expected reduced-power
S700-style segment through the tab instead of M5 + G0 skip.

Both FrameStep and ShrinkWrapStep are LaserStep subclasses,
so they pick up the same fix.

Test plan

  • pixi run lint passes
  • New regression tests in tests/pipeline/test_intent_builder.py:
    • power/tab_power forwarded into the TabsSpec with correctly
      scaled clip data
    • 0% tab power still produces the gap mode
    • changing tab_power invalidates the compute token (cache
      regeneration)
    • end-to-end: executing the pipeline stages produces ops with the
      reduced tab power present (SET_POWER 0.7)
  • All four fail on main (verified by reverting the fix) and pass
    with it
  • pixi run test tests/pipeline/ rayforge/builtin_addons/rayforge-addon-post/tests/ rayforge/builtin_addons/rayforge-addon-laser/tests/: 714 passed

Docs

The holding-tabs docs only described the gap mode. Added a "Tab
Power" section describing both modes and updated the intro/tab-width
wording, in all 8 languages. The translated setting names use the
exact strings from the app's UI catalogs (e.g. Haltesteg-Leistung,
Puissance des languettes, 定位片功率).

IntentBuilder._transformer_settings() assembled the settings dict
handed to the transformers' to_spec() from a fixed list, and the
step's power and tab_power were missing from it. TabOpsTransformer
therefore always saw tab_power=0 and degraded every tab to the gap
mode, no matter what the user entered in the Tab Power field
(#667). Forward both values so tabs with Tab Power above 0% are cut
at reduced power (tab_power * power) instead of being skipped.
@knipknap
knipknap merged commit 2b04422 into main Nov 4, 2026
31 checks passed
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🤖 Estimated LLM implementation cost

Replayed each of the 1 commits in this pull request and counted the code lines each commit added or rewrote:

Commit Message Lines (add/rewrite) Est. output tokens Est. output cost
30856de7 fix(tabs): forward the step's power settings to the tab generator 266 / 74 3,400 $0.0510
Total 340 3,400 $0.0510

Added lines by language: Markdown 161, Python 105

Full estimate

Component Est. tokens Est. cost
Code emission (340 add/rewrite lines) 3,400 $0.0510
Context input (reading touched files) 27,276 $0.0818
Conversation replay (≈15× output) 51,000 $0.1530
Prompting (pull request description) 355 $0.0011
Lower bound (output only) 3,400 $0.0510
Best estimate 82,031 $0.2869

Cost model: ≈10 tokens per code line at $15/Mtok output and $3/Mtok input (assuming heavy prompt caching); input ≈ 15× output for conversation replay; a review round ≈ 42,000 tokens; a failed CI run ≈ 21,000 tokens; file reads capped at 20 kB each.

Active window from first commit to merge: <1 day.

⚠️ Caveat: the lower bound covers only the tokens for emitting the code. The best estimate adds modeled overhead for exploration, conversation replay, review and debug turns, but real sessions vary by tool and task — treat it as an order-of-magnitude figure. Human engineering time is not included.

This branch was previously deployed

1 inactive deployment
pypi — 30856de7 Deployed Nov 4, 2026 by knipknap via Build and Publish Wheel #2582
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.

Tab Power setting ignored.

1 participant