Skip to content

Fix first-run plstore path validation - #23

Merged
telotortium merged 4 commits into
mainfrom
codex/fix-new-plstore-safety-check
Jul 25, 2026
Merged

Fix first-run plstore path validation#23
telotortium merged 4 commits into
mainfrom
codex/fix-new-plstore-safety-check

Conversation

@telotortium

Copy link
Copy Markdown
Owner

Summary

  • recognize identical canonical plstore paths before falling back to file-equal-p
  • preserve the safety error when secret entries are actually inserted into a different buffer
  • add ERT coverage for missing files, symlinked parent directories, hard links, and wrong-buffer rejection
  • replace the placeholder test target with compilation, Checkdoc, and ERT execution
  • add an Emacs 26.1 through snapshot GitHub Actions matrix
  • reflow the manual-authentication docstring so the existing Checkdoc target passes

Root cause

file-equal-p returns nil when its target does not exist, even when both arguments name the same path. On the first OAuth save, the safety guard therefore misclassified the new plstore buffer as an unrelated file. Pre-creating an empty file made the workaround succeed only because file-equal-p could then compare filesystem identity.

Impact

First-time authentication can create the plstore normally without requiring users to pre-create an empty file, while the protection against writing secrets into Org or other unrelated buffers remains active.

This addresses the first-run failure and workaround reported in #6.

Validation

  • make all
  • 6 ERT tests pass
  • byte-compilation and Checkdoc pass
  • GitHub Actions workflow YAML parses successfully

@telotortium
telotortium marked this pull request as ready for review July 25, 2026 01:19
@telotortium
telotortium merged commit 1f04622 into main Jul 25, 2026
7 checks passed
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.

1 participant