feat(figma): drift detection and mapping cache reuse (Phase E — T2F.10) - #2
Open
canonical-muhammadbassiony wants to merge 1 commit into
Open
feat(figma): drift detection and mapping cache reuse (Phase E — T2F.10)#2canonical-muhammadbassiony wants to merge 1 commit into
canonical-muhammadbassiony wants to merge 1 commit into
Conversation
T2F.10: LoadPreviousMeta looks up most recent matching run by docID + figmaFileKey T2F.10: LoadMappings reads mappings.json from a previous run artifact T2F.10: generateChunksWithFigma checks Figma version before re-fetching T2F.10: version unchanged => reuse stored mappings (skips GetNodes + screenshot DL) T2F.10: version changed => warn + full re-fetch T2F.10: RunMetadata.FigmaVersion stored after each figma fetch T2F.10: low-confidence/fallback mappings flagged with status: unresolved
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.
Summary
Implements drift detection for Figma-backed runs, allowing Bauer to skip expensive API calls when the design file has not changed since the last run.
Tasks Implemented
--figma-url, Bauer now callsGetMetafirst to retrieve the file version. If unchanged versus the previous run, stored mappings are reused andGetNodes/screenshot downloads are skipped. If changed, a warning is logged and a full re-fetch proceeds.Resolver.Buildwas hardened with post-process normalization that marks any chunk withConfidence < 0.5,Method == "fallback", orMethod == "none"asStatus: "unresolved".Files Changed
internal/artifacts/manager.go—FigmaVersionfield;LoadPreviousMeta,LoadMappings,UpdateRunFigmaVersionmethodsinternal/orchestrator/orchestrator.go— drift detection ingenerateChunksWithFigma; cache-hit early-returninternal/source/mapping/resolver.go— post-process normalization loop for low-confidence mappingsHow to Review
git diff feat/figma-phase-d-cli..feat/figma-phase-e-drift -- .Part of the Bauer v2 stacked PR series (Branch 8 of 12).