Fix: broken DST fallback path and dead test_files/test_dst_generator.py (found in #63 research) #74
Labels
No labels
blocked:children
blocked:depends-101
blocked:depends-103
blocked:depends-104
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:preflight
bug
chore
feature-request
in-progress
lint-cleanup
needs-decompose
performance
quality
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/easystitch#74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
During the research phase of #63 (SVG → DST round trip), kilo surfaced two latent issues in the embroidery pipeline that are out of scope for #63 but worth fixing:
1. Broken DST fallback in
src/output_generators/dst_generator.pyThe
_generate_fallback_dst()method was introduced in commit0a0a3b4(the refactor that replaced the working triplet encoder with apyembroidery-first path + hand-written fallback). The fallback was never validated against the DST spec or against pyembroidery round-trip. It produces invalid output:LA:)pyembroideryis normally installed, so the broken fallback is silent until exercisedThe refactor commit
0a0a3b4also removed the functionsencode_command_triplet,encode_coordinate_triplet, andgenerate_dst_headerfromdst_generator.py.2. Stale tests in
test_files/test_dst_generator.pyThe file
test_files/test_dst_generator.pystill imports the removed functions:encode_command_tripletencode_coordinate_tripletgenerate_dst_headerThese imports will fail with
ImportErrorif anyone tries to run them. CI runs onlytests/(nottest_files/), so the stale file has been silently dead since the refactor.What's needed
_generate_fallback_dst()to produce valid DST bytes (with header, stitch data, END record), OR remove the fallback and requirepyembroideryas a hard dependency with a clear error at import time.test_files/test_dst_generator.py. If kept, it should test the current generator class API (not the removed standalone functions). If deleted, also delete thetest_files/directory if it has no other contents.test_files/is referenced by the CI workflow (so stale tests can't silently rot).Acceptance
process(input_bytes=..., output_format="dst")produces valid DST bytes whether or notpyembroideryis installed. (If pyembroidery is missing, fail with a clear ImportError, not a corrupt fallback.)test_files/imports functions that don't exist.test_files/failures if anyone runs them.Decomposed from easystitch#63
Auto-triage: needs decompose
Marked
triage-approved+needs-decompose. decompose-executor will pick this up and break it into implementable sub-issues.