Skip to content

Fix nutrition operation authority and preserve pending recipe edits - #88

Merged
kryptek2000 merged 1 commit into
mainfrom
fix/nutrition-operation-authority
Dec 3, 2026
Merged

kryptek2000 merged 1 commit into
mainfrom
fix/nutrition-operation-authority

Conversation

@kryptek2000

Copy link
Copy Markdown
Owner

Summary

Integrates the independently approved NUT-AUTH-02 F3 candidate. It closes the confirmed nutrition authorization/lifecycle defect where a standing nutrition save could persist unrelated pending recipe edits, and later lifecycle gaps could lose newer user work.

Approved candidate manifest SHA-256: d658d7e1c5ce4ff2b1a9da6191d149b0569f45504a12af46bebc1723d9507d1d

Confirmed original defect

Standing nutrition authorization could persist unrelated pending recipe edits through the shared working copy. A standing save was not bound to the exact reviewed operation, and later lifecycle paths could clear or rebase newer unsaved work.

Implemented corrections

  • Operation-scoped nutrition write authority.
  • Mixed-draft persistence protection.
  • Exact operation, draft-generation and edit-history ownership.
  • Guarded persistence enforcement through the final reversible commit checkpoint.
  • Revocation before irreversible commit dispatch.
  • Vault transition cancellation at transition start.
  • Preservation of newer pending edits across save completion.
  • Edit-history ownership and safe Undo reconciliation.
  • Single canonical draft-completion ownership.
  • Separation of auxiliary nutrition-history recording.

Capability preservation

  • Clean standing nutrition Apply/Save remains automatic.
  • Explicit full-recipe Save remains available.
  • The existing canonical writer and Markdown format remain unchanged.
  • USDA validation, authentication and provenance remain unchanged.
  • Existing SHISO editing capabilities remain available.
  • Production nutrition authority continues to supply zero authorized ingredient references.

Independent verification

Luna's final independent verdict: PASS.

Independent focused verification for the approved candidate:

  • Real-App lifecycle: 17/17.
  • Guarded adapter boundary: 7/7.
  • Authority and original mixed-draft diagnostics: 23/23.
  • Independent F3 fixtures: 2/2.
  • TypeScript typecheck and git diff --check: PASS.

The final independent audit and verified per-file manifest are held with the engineering records. Local commit tree matches the approved 18-file candidate exactly.

Accepted limitations

  • Production nutrition authority currently supplies zero authorized ingredient references.
  • A trusted production nutrition-specific ingredient correction operation remains future development work.
  • Conservative conflict recovery uses the existing Discard/reapply/Save path.
  • Cancellation does not undo an already-dispatched irreversible write.
  • Native packaged acceptance remains outstanding.
  • Existing stale manual-nutrition presentation is unchanged.

Integration note

This pull request is for hosted CI and review. It must remain unmerged pending the authorized integration process.

…recipe drafts

Scope automatic nutrition writes to an exact reviewed operation, preserve mixed and newer working drafts, enforce guarded persistence through the final reversible checkpoint, invalidate staged standing saves when a Vault transition starts, and retain only verifiable pending Undo history.
@kryptek2000
kryptek2000 merged commit ed6e414 into main Dec 3, 2026
15 checks passed
@kryptek2000
kryptek2000 deleted the fix/nutrition-operation-authority branch December 3, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant