Repository navigation
feat(ios): add independent Prepared group lifecycle - #40
Merged
Merged
Conversation
Add guarded thaw and cooking transitions, lossless Backup v3 and per-group meal availability with native review controls. Preserve recovery-copy ownership and qualify genuine disk upgrades and controlled process interruptions.
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.
A user can split one 200g portion from an 800g/four-portion Prepared source, thaw and cook that group, then consume it while the other 600g stays frozen. Each action keeps the selected group/source identity and original recorded allocation; cooking does not invent a measured yield or deduct Inventory.
This PR contains the owner-accepted PR3 Slices 1–5. It targets the merged PR2 baseline
ef23d688c8e72107b60acff0c2e7755289994bd0and is for source review only. Merge, deployment and iOS publication require separate authorization.Source:
3c03285· Acceptance index. Exact committed scope: 56 files (50 source/test/fixture/runner files and all six specification/review/checklist/acceptance documents).Implementation
prepped/cooked) and storage (refrigerated/frozen). Its five keys and nullable timestamps encode explicitly and decode strictly. Begin thaw, complete thaw and mark cooked use a deterministic transition matrix, reviewed advisory expiry and stable confirmed event time/calendar on unchanged retry. No automatic completion, reverse transition, refreezing or direct-from-frozen cooking.lifecycleDataon the existing Prepared record; existing shared 18-model factory and store location retained. Genuine pre-PR2 and merged-PR2 layouts are qualified independently, opened only on copies, compared across all 18 record types, then exercised through lifecycle Store writes and distinct-process reopen. Original grouping blobs, UUIDs, ordering and exact/rounded allocations are preserved. The pre-PR2 fixture remains inherited from the baseline; the genuine PR2 fixture and producer/layout/hash provenance are included here.lifecycle: nullor complete object on every Prepared row. Original v1/v2 lifecycle keys and original v3 missing keys reject before decoding/preview normalization/writes; valid historical imports remain supported and retain original provenance.--restore-onlyremain. Hooks/fixtures are excluded from unsigned Release configuration. Specification, design/plan reviews, checklist and final acceptance index are included.Recovery-copy ownership correction: normal import owns its newly prepared copy and may resolve it after proven compensation. Explicit recovery reuses an older outstanding copy A; if recovery fails and compensation restores current kitchen B, A must remain byte-identical and outstanding. A later successful explicit retry restores A and resolves it. Unsafe compensation/reread retains recovery assets. Existing seven-domain order, publication and outcome classification remain; no global transaction/write fence was added.
Verified local evidence
cdcae1424fafba7ffbe82ccdb6c339a6d695f599and PR2ef23d688c8e72107b60acff0c2e7755289994bd0; old layouts verified to lack lifecycle, all 18 model types/old values preserved. Fresh parity is separately tested.Evidence integrity: the initial full-unit run failed one stale legacy frozen-food usage fixture (2,843 passed/1 failed/5 skipped). A bounded test-only correction preserved its label/no-mass assertions and added frozen exclusion; focused tests and one full revalidation passed. An initial artifact checker inspected only the Debug launcher; the host binding was corrected to include the actual Debug/preview dylibs and all 14 process cases were rerun. Original failures and superseded receipts are preserved. These are not presented as successful first attempts.
All 468 native inputs / 445 Swift files match the accepted final manifest. Canonical sorted-manifest SHA256:
3b52528b05a7569751b1a8d998f794ff6a4307471e427a380c6934ed4e53f0f4. Creating this commit did not change native inputs, so accepted local native evidence was reused rather than rerunning the full suite. Automatic PR checks are separate evidence; this branch does not automatically run the GitHub native simulator workflow.The complete xcresults, raw SQLite/sidecars, process snapshots/signals, original failures, rendered PNGs and manual picker receipts remain in the owner's external local evidence archive. They are not GitHub-hosted PR artifacts and are not downloadable through this PR. This body is the portable summary. The repository acceptance index includes summaries/hashes and local verification-machine pointers, which are not public artifact links.
Acceptance and retained limits
Review documents:
specs/007-prepared-group-lifecycle/{spec.md,review.md,checklists/requirements.md,plan.md,plan-review.md,acceptance.md}. Genuine fixture/provenance files are underKitchenManagerTests/Fixtures/PreparedPrePR2andPreparedPR2in the native project.