fix: align config filename between read and write paths (#161)#168
Open
patchwright wants to merge 1 commit into
Open
fix: align config filename between read and write paths (#161)#168patchwright wants to merge 1 commit into
patchwright wants to merge 1 commit into
Conversation
The read path (determine_app_config_fname) generated filenames like 'tw__google_tasks__configs.yaml' while the write path (tw_gtasks_sync.py) stored combinations in 'tw_gtasks_configs.yaml' — different name (full vs abbreviated) AND joiner (double vs single underscore). Combinations were written but could not be read back (bergercookie#161). Add a service-name-to-abbreviation mapping so determine_app_config_fname produces the same filename the sync scripts use. Fixes bergercookie#161. Note: full test suite could not run locally (missing xattr + __version__ deps); function output verified via doctests for all 6 sync pairs. Assisted-by: Claude (Anthropic). Co-Authored-By: claude-flow <ruv@ruv.net>
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.
Problem
Fixes #161. Combinations are written to
tw_gtasks_configs.yaml(bytw_gtasks_sync.py) but read fromtw__google_tasks__configs.yaml(bydetermine_app_config_fname) — the filenames never matched, so saved combinations were unreadable.Root cause
determine_app_config_fname("TW", "Google Tasks")generatedtw__google_tasks__configs.yaml(double-underscore + full name), while every sync script writes totw_<short>_configs.yaml(single-underscore + abbreviated name, e.g.tw_gtasks_configs). The two naming conventions were never aligned.Fix
Add a
_SERVICE_ABBREVIATIONSmapping (Google Tasks -> gtasks, Google Calendar -> gcal, Google Keep -> gkeep) sodetermine_app_config_fnameproduces the same filename the sync scripts use. Verified for all 6 sync pairs (gtasks, gcal, gkeep, asana, notion, caldav).How to test
Note: full test suite requires optional deps (xattr) that are not available in my environment. Function output verified via doctests for all 6 pairs.
Backward compatibility
The read-path file (
tw__google_tasks__configs.yaml) was always empty (per #161 — the write path never matched). All user data lives in the write-path files (tw_gtasks_configs.yaml), which are now correctly found by the read path. No migration needed.Assisted-by: Claude (code generation, reviewed and tested locally)