refactor(core): converge wiki logs on the accepted-change vocabulary - #1396
refactor(core): converge wiki logs on the accepted-change vocabulary#1396phernandez wants to merge 1 commit into
Conversation
Name the accepted-change journal in the domain model and collapse the projector's twin operation enum: - docs/DOMAIN_MODEL.md gains 'Accepted Change Journal' and 'Event Surfaces And Derivation': RuntimeAcceptedProjectNoteChange plus Project.partition_position is the canonical temporal record; wiki, search/graph/vector, activity, and temporal reads are projections; delivery events, run ledgers, and product telemetry are separate families that never stand in for the journal. - indexing/wiki_projector.py reuses RuntimeProjectNoteOperation for WikiChangeOperation instead of duplicating the same four-value StrEnum. The wiki-facing name stays as an alias so existing call sites keep working while the vocabularies can no longer drift. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp Signed-off-by: phernandez <paul@basicmachines.co>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01bd452c20
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| storage notifications / webhooks ingress evidence | ||
| -> reconciliation commands | ||
| -> accepted change journal canonical time | ||
| -> wiki projections index.md, log.md, navigation |
There was a problem hiding this comment.
Scope the journal diagram to DB-first mutations
For direct file edits handled by the observed-object index_file path or by run_external_file_delete, reconciliation never calls advance_partition_position() or record_accepted_note_change(); repository-wide, those calls exist only in accepted_note_mutation_runner.record_accepted_project_note_change(). Therefore the documented storage notifications / webhooks -> reconciliation commands -> accepted change journal flow is not currently true: local file-first mutations leave the journal watermark unchanged and are invisible to journal consumers. Either journal those reconciliation paths or explicitly scope this diagram and the canonical-record claim to DB-first accepted-note mutations.
AGENTS.md reference: AGENTS.md:L156-L160
Useful? React with 👍 / 👎.
Why
PR #1382 landed the accepted-change journal (
RuntimeAcceptedProjectNoteChange+Project.partition_position) and the deterministic Wiki Projector, and the SPEC-88 cloud stack builds on both. The domain documentation doesn't yet name that substrate, and the projector carried a private twin of the operation enum. Several event-shaped surfaces now exist across core and cloud (accepted changes, activity feeds, live updates, storage notifications, run ledgers, telemetry), so the derivation relationships need one canonical statement before more consumers land.Convergence decision (SPEC-83): the shipped names are the canonical ones.
RuntimeAcceptedProjectNoteChange+partition_positionis the v0 accepted-event journal; the fullerMemoryEventenvelope (causation, correlation, depth, workspace scope) is that record's growth path, not a second journal to build beside it.What changed
docs/DOMAIN_MODEL.md— two new Core Concepts sections:src/basic_memory/indexing/wiki_projector.py—WikiChangeOperationbecomes an alias ofRuntimeProjectNoteOperationinstead of a duplicate four-valueStrEnum. The wiki-facing name survives, so all call sites (including cloud'sWikiChangeOperation(change.operation)inwiki_projection_snapshot.py) keep working, and the two vocabularies can no longer drift.Verification
uv run ruff check/ruff format --check— cleanuv run ty check src/basic_memory/indexing/wiki_projector.py— cleanuv run pytest tests/indexing/test_wiki_projector.py tests/runtime/test_project_partition.py tests/repository/test_project_partition_repository.py— 90 passedRelated
bm log/bm show).🤖 Generated with Claude Code
https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp