[GH-ISSUE #809] [Feature]: Deterministic recovery for eligible rejected LTM suggestions #417

Closed
opened 2026-10-20 17:27:21 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Promansis on GitHub (Sep 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/809

What problem does this solve?

Some rejected Long-Term Memory suggestions contain enough trustworthy information to be repaired deterministically, but the current ledger stores only a bounded display preview and diagnostics. Users must manually recreate suggestions even when a safe correction is provable.

Proposed package or change

Add per-suggestion deterministic recovery for Long-Term Memory. A successful recovery creates one ordinary pending Review Queue draft and never writes directly to the Memory Vault. Recovery must use complete preserved candidate content and evidence, rerun relevant validators and draft preflight, preserve existing pending review work, and remove the rejected ledger entry only after the linked draft is durable. Recovery is idempotent and retains manual recovery for all uncertain cases.

Approved product decisions:

  • Auto-recover means create a pending Review Queue draft; no direct Vault save.
  • Deterministic repair only; no language-model repair.
  • One rejected suggestion per action for the first version.
  • Strict server-side eligibility with exact allowlisted validator codes and one demonstrated real repair required before implementation.
  • Draft preflight occurs before durable handoff and ordinary acceptance preflight runs again later.
  • Ledger cleanup occurs only after durable linked draft persistence; cleanup failure is reported and retried without duplicate drafts.
  • One rejected-suggestion ID produces at most one recovery result, including after acceptance.
  • User-facing action name: Create review draft.
  • Create a separate pending draft; never supersede existing pending work or user edits.

Why should this be optional?

This is package-owned Long-Term Memory server, shared schema, and Review Queue behavior, not lightweight Engine core behavior.

Alternatives considered

  • Keep manual recovery only: does not reduce manual recreation for provably safe cases.
  • Language-model repair: adds nondeterminism, cost, provider failure, cancellation, and prompt-injection risk.
  • Direct Vault save: conflicts with the review-before-accept product contract.
  • Batch recovery: deferred until per-item eligibility and retry behavior are proven.

Additional context

Related diagnostics work: #719 / PR #722, merged as fc5efce8. Related rejected-suggestion persistence work: #140 / PR #141, merged as 5175d21d.

Required prerequisite evidence: identify remaining diagnostics work, trace one genuine rejection through original validators and prove one exact correction, and preserve a bounded complete recovery payload including original evidence, source hash, extraction context, and available candidate metadata. Legacy preview-only records remain manual-only.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 13, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/809 ## What problem does this solve? Some rejected Long-Term Memory suggestions contain enough trustworthy information to be repaired deterministically, but the current ledger stores only a bounded display preview and diagnostics. Users must manually recreate suggestions even when a safe correction is provable. ## Proposed package or change Add per-suggestion deterministic recovery for Long-Term Memory. A successful recovery creates one ordinary pending Review Queue draft and never writes directly to the Memory Vault. Recovery must use complete preserved candidate content and evidence, rerun relevant validators and draft preflight, preserve existing pending review work, and remove the rejected ledger entry only after the linked draft is durable. Recovery is idempotent and retains manual recovery for all uncertain cases. Approved product decisions: - Auto-recover means create a pending Review Queue draft; no direct Vault save. - Deterministic repair only; no language-model repair. - One rejected suggestion per action for the first version. - Strict server-side eligibility with exact allowlisted validator codes and one demonstrated real repair required before implementation. - Draft preflight occurs before durable handoff and ordinary acceptance preflight runs again later. - Ledger cleanup occurs only after durable linked draft persistence; cleanup failure is reported and retried without duplicate drafts. - One rejected-suggestion ID produces at most one recovery result, including after acceptance. - User-facing action name: Create review draft. - Create a separate pending draft; never supersede existing pending work or user edits. ## Why should this be optional? This is package-owned Long-Term Memory server, shared schema, and Review Queue behavior, not lightweight Engine core behavior. ## Alternatives considered - Keep manual recovery only: does not reduce manual recreation for provably safe cases. - Language-model repair: adds nondeterminism, cost, provider failure, cancellation, and prompt-injection risk. - Direct Vault save: conflicts with the review-before-accept product contract. - Batch recovery: deferred until per-item eligibility and retry behavior are proven. ## Additional context Related diagnostics work: #719 / PR #722, merged as `fc5efce8`. Related rejected-suggestion persistence work: #140 / PR #141, merged as `5175d21d`. Required prerequisite evidence: identify remaining diagnostics work, trace one genuine rejection through original validators and prove one exact correction, and preserve a bounded complete recovery payload including original evidence, source hash, extraction context, and available candidate metadata. Legacy preview-only records remain manual-only. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@Promansis commented on GitHub (Sep 13, 2026):

What problem does this solve?

Some rejected Long-Term Memory suggestions contain enough trustworthy information to be repaired deterministically, but the current ledger stores only a bounded display preview and diagnostics. Users must manually recreate suggestions even when a safe correction is provable.

Proposed package or change

Add per-suggestion deterministic recovery for Long-Term Memory. A successful recovery creates one ordinary pending Review Queue draft and never writes directly to the Memory Vault. Recovery must use complete preserved candidate content and evidence, rerun relevant validators and draft preflight, preserve existing pending review work, and remove the rejected ledger entry only after the linked draft is durable. Recovery is idempotent and retains manual recovery for all uncertain cases.

Approved product decisions:

  • Auto-recover means create a pending Review Queue draft; no direct Vault save.
  • Deterministic repair only; no language-model repair.
  • One rejected suggestion per action for the first version.
  • Strict server-side eligibility with exact allowlisted validator codes and one demonstrated real repair required before implementation.
  • Draft preflight occurs before durable handoff and ordinary acceptance preflight runs again later.
  • Ledger cleanup occurs only after durable linked draft persistence; cleanup failure is reported and retried without duplicate drafts.
  • One rejected-suggestion ID produces at most one recovery result, including after acceptance.
  • User-facing action name: Create review draft.
  • Create a separate pending draft; never supersede existing pending work or user edits.

Why should this be optional?

This is package-owned Long-Term Memory server, shared schema, and Review Queue behavior, not lightweight Engine core behavior.

Alternatives considered

  • Keep manual recovery only: does not reduce manual recreation for provably safe cases.
  • Language-model repair: adds nondeterminism, cost, provider failure, cancellation, and prompt-injection risk.
  • Direct Vault save: conflicts with the review-before-accept product contract.
  • Batch recovery: deferred until per-item eligibility and retry behavior are proven.

Additional context

Related diagnostics work: #719 / PR #722, merged as fc5efce8. Related rejected-suggestion persistence work: #140 / PR #141, merged as 5175d21d.

Required prerequisite evidence: identify remaining diagnostics work, trace one genuine rejection through original validators and prove one exact correction, and preserve a bounded complete recovery payload including original evidence, source hash, extraction context, and available candidate metadata. Legacy preview-only records remain manual-only.

Template check

  • I DID NOT read this template and provide the requested details.
<!-- gh-comment-id:5650058306 --> @Promansis commented on GitHub (Sep 13, 2026): ## What problem does this solve? Some rejected Long-Term Memory suggestions contain enough trustworthy information to be repaired deterministically, but the current ledger stores only a bounded display preview and diagnostics. Users must manually recreate suggestions even when a safe correction is provable. ## Proposed package or change Add per-suggestion deterministic recovery for Long-Term Memory. A successful recovery creates one ordinary pending Review Queue draft and never writes directly to the Memory Vault. Recovery must use complete preserved candidate content and evidence, rerun relevant validators and draft preflight, preserve existing pending review work, and remove the rejected ledger entry only after the linked draft is durable. Recovery is idempotent and retains manual recovery for all uncertain cases. Approved product decisions: - Auto-recover means create a pending Review Queue draft; no direct Vault save. - Deterministic repair only; no language-model repair. - One rejected suggestion per action for the first version. - Strict server-side eligibility with exact allowlisted validator codes and one demonstrated real repair required before implementation. - Draft preflight occurs before durable handoff and ordinary acceptance preflight runs again later. - Ledger cleanup occurs only after durable linked draft persistence; cleanup failure is reported and retried without duplicate drafts. - One rejected-suggestion ID produces at most one recovery result, including after acceptance. - User-facing action name: Create review draft. - Create a separate pending draft; never supersede existing pending work or user edits. ## Why should this be optional? This is package-owned Long-Term Memory server, shared schema, and Review Queue behavior, not lightweight Engine core behavior. ## Alternatives considered - Keep manual recovery only: does not reduce manual recreation for provably safe cases. - Language-model repair: adds nondeterminism, cost, provider failure, cancellation, and prompt-injection risk. - Direct Vault save: conflicts with the review-before-accept product contract. - Batch recovery: deferred until per-item eligibility and retry behavior are proven. ## Additional context Related diagnostics work: #719 / PR #722, merged as `fc5efce8`. Related rejected-suggestion persistence work: #140 / PR #141, merged as `5175d21d`. Required prerequisite evidence: identify remaining diagnostics work, trace one genuine rejection through original validators and prove one exact correction, and preserve a bounded complete recovery payload including original evidence, source hash, extraction context, and available candidate metadata. Legacy preview-only records remain manual-only. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#417
No description provided.