Skip to content

fix(core): make Markdown note permalinks mandatory - #1477

Merged
phernandez merged 4 commits into
mainfrom
fix/mandatory-permalinks
Sep 5, 2026
Merged

fix(core): make Markdown note permalinks mandatory#1477
phernandez merged 4 commits into
mainfrom
fix/mandatory-permalinks

Conversation

@phernandez

@phernandez phernandez commented Sep 4, 2026

Copy link
Copy Markdown
Member

Why

Markdown notes need a canonical semantic address throughout indexing and accepted writes. Removing the opt-out resolves #1395 and eliminates the null-permalink identity regime.

What Changed

  • Remove disable_permalinks; legacy config values and BASIC_MEMORY_DISABLE_PERMALINKS are ignored, not rejected. Normalization removes the retired JSON key.
  • Backfill legacy null-permalink rows during ordinary scans and reconcile collision suffixes to Markdown and database state.
  • Preserve malformed Markdown bytes and established identity across local and DB-first moves.

Implementation Details

Config uses its existing unknown-key handling without a special legacy validator. Preparation and indexing enforce Markdown identity; non-Markdown resources remain unchanged. Integration coverage exercises real config loading, indexing, collisions, and moves.

Testing

  • uv run pytest tests/test_config.py test-int/test_mandatory_permalinks_integration.py --no-cov -q: 147 passed.
  • just fast-check: lint, formatting, and typecheck passed.
  • Earlier branch validation: 271 focused tests, just doctor, and just package-check passed.
  • Local codex review --uncommitted is required before pushing each follow-up.

Risks / Follow-ups

Permalinks are mandatory even for installations with an old opt-out. Per maintainer direction, concurrent permalink writes retain last-write-wins behavior and eventual consistency; this change adds no checksum guards, locks, reparsing, or retries for that race. A later normalization write can win over an intervening custom permalink edit. Existing FileService whitespace serialization is unchanged and outside this PR.

Closes #1395

Signed-off-by: phernandez <paul@basicmachines.co>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T16:14:07.847237Z a086e22 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@phernandez

Copy link
Copy Markdown
Member Author

/review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aac7d28794

ℹ️ 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".

Comment thread src/basic_memory/indexing/batch_indexer.py
Comment thread src/basic_memory/services/note_preparation.py
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1bc9044ce

ℹ️ 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".

Comment thread src/basic_memory/indexing/batch_indexer.py
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

Added an integration regression for the collision finding; it passes with no production changes. See the resolved thread for the existing database ownership check that prevents this collision. Local review found no actionable defects, all six permalink integration tests pass, and typecheck/lint/format pass. The previously discussed whitespace serialization changes remain out of scope per maintainer direction.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e6824c9ae

ℹ️ 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".

Comment thread src/basic_memory/indexing/batch_indexer.py

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e6824c9ae

ℹ️ 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".

Comment thread src/basic_memory/config_models.py Outdated
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

Latest follow-up removes the retired config validator entirely. The PR description records the maintainer-approved last-write-wins behavior and unchanged FileService serialization. Local review found no actionable regressions; all 147 targeted tests and fast-check passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a086e22955

ℹ️ 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".

Comment thread src/basic_memory/index/local_moves.py
@phernandez
phernandez merged commit 6d6e7fe into main Sep 5, 2026
36 checks passed
@phernandez
phernandez deleted the fix/mandatory-permalinks branch September 5, 2026 17: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.

Remove disable_permalinks and make note permalinks invariant

1 participant