Repository navigation
📝 Plan: the library warns a writer when a resolver settles nothing or a scene lists someone twice - #140
Open
ebigunso wants to merge 3 commits into
Conversation
… a scene lists someone twice Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 22, 2026
Open
…2/v0-2-write-warnings-plan Co-Authored-By: Codex <noreply@openai.com>
…2/v0-2-write-warnings-plan Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The plan has contract discrepancies, missing serialization coverage, and repository-rule violations.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Documents a plan for advisory write-time warnings without changing stored data or recall behavior.
Changes:
- Plans resolver-scope and duplicate-participant warnings.
- Defines validation, tests, documentation, and compatibility expectations.
- Records rejected warning candidates and measurement exemption.
| File | Description |
|---|---|
docs/coding-agent/plans/active/v0-2-write-warnings-plan.md |
Defines the implementation plan and acceptance criteria. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - work_type: code | ||
|
|
||
| ## Goal | ||
| - An application author who writes a memory that will silently misbehave later learns it at the moment of writing, in the same place the library already reports its one existing warning, and is never refused. Two situations this phase found: a memory that settles a matter but shares no subject and no thread with what it settles, so "we settled it" never comes on meeting the person; and a person listed twice by key in one scene, so the stored scene says they were there twice and their words are indexed twice. Each is stored exactly as given (ADR-D-0029) and reported as a warning the writer can read by kind. |
| - An application author who writes a memory that will silently misbehave later learns it at the moment of writing, in the same place the library already reports its one existing warning, and is never refused. Two situations this phase found: a memory that settles a matter but shares no subject and no thread with what it settles, so "we settled it" never comes on meeting the person; and a person listed twice by key in one scene, so the stored scene says they were there twice and their words are indexed twice. Each is stored exactly as given (ADR-D-0029) and reported as a warning the writer can read by kind. | ||
|
|
||
| ## Definition of Done | ||
| - `validate_plan` and `remember` report, on the candidate concerned, a warning when a `Resolves` or `FulfillsCommitment` link's resolving memory shares no subject (entity) and no thread with the memory it resolves, and when one participant key appears more than once in a scene. Each warning is a variant of the existing `CandidateValidationIssue`, carried in the existing `warnings` list of the existing `CandidateValidation`, and its `kind` tag (the enum's existing serde tag) is the stable identifier a reader asserts on. No new public type; no new field on any public type. |
| - justification: no external consumers; the companion evaluation repository matches on `CandidateValidationStatus` only and is unaffected by new variants unless it matches exhaustively, which the task checks. | ||
|
|
||
| ## Context (workspace) | ||
| - Related files/areas: `src/domain/write_validation.rs` (`CandidateValidation` with `warnings`, `CandidateValidationIssue` tagged `kind`, `DuplicateObservationEcho` at 123), `src/usecases/write_planning.rs` (`WritePlanValidator` at 690, `PlanValidationContext` at 744 with `existing_refs` holding references only, link endpoint collection at 844, `validate_candidate` at 891, `echo_surface_warning` at 1079, `caller_hint_links` deduplicating participant keys at 354), `src/api/types/write_plan.rs` (`RememberDiagnostics::refresh_validation_warning_messages` at 617), `src/usecases/remember.rs:90` (validations with warnings kept on the accepted path), `src/memory.rs:74` (`validate_plan` returns `Vec<CandidateValidation>`), `src/domain/scene.rs` (`without_blank_participants`, `participant_keys`), `src/policy/embedding_surface.rs:28` (participant words joined per entry), `src/usecases/scope.rs` (scope keys from source scenes), `src/policy/graph_expansion.rs:118` (`resolved_by` read from `Resolves` and `FulfillsCommitment`), README lines 161 to 217 (`validate_plan` and `remember`); the companion `C:/Users/Kohta/GitLocal/CharacterMemoryEvals/crates/cmem-eval/src/adapter.rs` (status-only reads at 1816, 3828, 4768); the load-bearing decisions list items 2, 3, 13, 36, 42; the state plan Task_3 (resolution ends being current state). |
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.

Small slice plan, stacked on the time plan (#138). One task, about six hours.
At prepare or validate_plan time the library warns, without refusing or rewriting (the scene is stored as given, ADR-D-0029), when what is about to be stored will not do what the writer probably means:
Dropped on review, with the reason recorded: a warning for a scene time later than the record's creation (it compared the wrong instants: visibility to recency and "last met" depends on the retrieval scene's time, and the library never judges what the application perceived). Warnings are identified by the kind tag the result already carries; no new public type, no configuration, no added read.
This plan changes no recall, so its measurement item is an explicit exemption under the measurement rule; the driver's warning drift test is the evidence.
Reviews: Tier D feasibility (Codex) with one finding closed; Tier A altitude and value audit (Claude) that dropped the third warning and folded two tasks into one.
🤖 Generated with Claude Code