Repository navigation
fix(tkc): Stabilization R1 — Recipe Integrity, Vault Intelligence & Image Refresh - #79
Merged
Merged
Conversation
|
|
||
| function parseTimeString(value: string | undefined): number | null { | ||
| if (typeof value !== "string" || !value.trim()) return null; | ||
| const hours = value.match(/(\d+(?:\.\d+)?)\s*(?:hours?|hrs?)\b/i); |
| function parseTimeString(value: string | undefined): number | null { | ||
| if (typeof value !== "string" || !value.trim()) return null; | ||
| const hours = value.match(/(\d+(?:\.\d+)?)\s*(?:hours?|hrs?)\b/i); | ||
| const minutes = value.match(/(\d+)\s*(?:minutes?|mins?|min)\b/i); |
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
Stabilization R1 fixes three owner-observed defects and the R1-F1 cooking-time discrepancy:
The implementation and regression tests are complete. This PR contains the verified changes only.
R1-A — Generated Recipe Content Integrity
Failure reproduced: a 98-character smoked-chicken ingredient name was silently cut to exactly 80 characters by
normalizeGeneratedRecipeDraft.Correction:
Regression coverage:
R1-B — Vault Intelligence Data Integrity
Failures reproduced on the baseline:
Baking & Breadsbecause the instructions mention a baking sheet.8 hr 20 minscook time.6 mins(the owner's 7-line list produced 14 minutes).#baking #bread.1 whole chicken,1/2 tsp black pepper,1 tsp salt) →3 kcaldisplayed as “3 kcal / serving”.Correction:
Seasonings & Rubsrequires a title marker.caloriesis per-serving;nutritionis clearly total-batch.instructions_explicit/body_parsedfields; speculative values are excluded.Owner sequence verified:
Because the active durations are ranges, cookTime is omitted. Passive-only controls produce no cook time. A precise-active control (
45 min+2 min) produces47 minsand explicitly excludes4 hr 5 minspassive time. Bulk recovery for the actual recipe has no cook-time field to persist.A complete explicit-serving recipe reports
166 kcalper serving and664 kcaltotal batch across 4 servings.R1-C — Image Save Immediate Refresh
Failure reproduced: the save flow advanced the collection revision before the success handler compared it, producing a false conflict (
start=1,current=2) and suppressing the in-memory image update.Correction:
Corrected sequence:
start=1,committed=1,postMark=2,current=2→ publish.Verification
tsc --noEmitgit diff --checkThe focused suite covers generated-recipe schema/save/editor, metadata recovery, nutrition estimator safety, Vault Intelligence defaults and bulk recovery, image save/revision/persistence, protected previews, no-auto-generation, and Vault session authority.
Verification is deterministic and scripted. It proves the application contracts, regression behavior, and safety gates. It does not constitute live-model culinary acceptance, a live paid image-provider run, or owner acceptance of the rendered UI.
Scope and safety
Not merged.