Skip to content

⚠️ The library warns a writer when a resolver settles nothing or a scene lists someone twice - #142

Open
ebigunso wants to merge 5 commits into
feature/2026-09-22/v0-2-write-warnings-planfrom
feature/2026-09-22/write-warnings
Open

ebigunso wants to merge 5 commits into
feature/2026-09-22/v0-2-write-warnings-planfrom
feature/2026-09-22/write-warnings

Conversation

@ebigunso

Copy link
Copy Markdown
Owner

The write-warnings plan's one task, stacked on #140.

At prepare or validate_plan time, without refusing or rewriting anything (the scene is stored as given), the library now warns:

  • when a memory that resolves or fulfils another shares no subject and no thread with it: the settled matter would silently leave where things stand, and "we settled it" would never come to mind on meeting the person;
  • when a scene lists the same key twice: recall would report the person present twice and their words would count twice.

Warnings use the kind tag the result already carries; no new public type, no configuration, no added graph read (the check uses what validation already fetched), and no change to what is stored or recalled: every retrieval outcome and stored link set equals the parent, with exactly one link per distinct key.

Evidence: Codex Tier D approved at e1ff33e (nine-case observer red at the parent, green at the tip, links and outcomes equal; 458 tests); Claude Tier A approved with two small changes, applied at 0d6502a (the warning states its consequence; a redundant test block removed); orchestrator gates pass. This task changes no recall, so its measurement item is an explicit exemption under the measurement rule.

🤖 Generated with Claude Code

@ebigunso
ebigunso added this pull request to stack #149 September 22, 2026 22:00
…/2026-09-22/write-warnings

Co-Authored-By: Codex <noreply@openai.com>
Copilot AI balanced review requested due to automatic review settings September 22, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The claimed prepare-time warnings are not implemented; correct the contract or add that behavior.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds non-blocking validation warnings for unrelated resolver links and duplicate scene participants without changing storage or recall behavior.

Changes:

  • Adds structured warning variants and validation logic.
  • Adds integration coverage and documentation.
  • Records implementation-plan completion.
File Description
src/​usecases/​write_planning.rs Emits the new validation warnings.
src/​memory.rs Tests warning propagation and persistence behavior.
src/​domain/​write_validation.rs Defines typed warning variants.
README.md Documents warning behavior.
docs/​coding-agent/​plans/​completed/​v0-2-write-warnings-plan.md Records plan completion.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md

### Write warnings

A valid write can carry warnings. Read each candidate's `warnings` in the validations returned by `validate_plan`, or in `RememberOutcome.diagnostics.validations` after `remember` or `commit`. Each warning has a `kind` tag and identifies the affected memories or participant key; `candidate_index` and `candidate_kind` identify the candidate. The same warnings are also projected into `diagnostics.messages` with warning severity and the code `WritePlanValidationWarning`. Warnings neither refuse a write nor change what is stored.
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.

2 participants