Skip to content

[codex] fix issue 601 manifest dedupe#602

Merged
tractorjuice merged 1 commit into
mainfrom
fix/issue-601-manifest-dedupe
Jun 17, 2026
Merged

[codex] fix issue 601 manifest dedupe#602
tractorjuice merged 1 commit into
mainfrom
fix/issue-601-manifest-dedupe

Conversation

@tractorjuice

Copy link
Copy Markdown
Owner

Summary

Fixes #601 by hardening the Claude update-manifest.mjs hook against legacy docs/manifest.json entries that omit documentId.

Root Cause

The manifest dedupe path assumed every existing manifest entry had a string documentId, then called .replace() while computing the base document ID. Older or partial manifest rows can contain only path and title, which made the PostToolUse Write hook throw after /arckit:principles wrote a global artifact.

Changes

  • Guard baseId() against missing or non-string values.
  • Add entryBaseId() so dedupe uses documentId when present and falls back to the entry path basename for legacy rows.
  • Add Node regression tests for global and project manifest entries missing documentId.
  • Update root and Claude plugin changelogs for error hooks/update-manifest.mjs:73 #601.

Validation

  • node tests/plugin/test_update_manifest.mjs
  • node tests/plugin/test_hook_utils.mjs
  • git diff --check HEAD~1 HEAD

@tractorjuice tractorjuice marked this pull request as ready for review June 17, 2026 14:13
@tractorjuice tractorjuice merged commit 48b2fd6 into main Jun 17, 2026
2 checks passed
@tractorjuice tractorjuice deleted the fix/issue-601-manifest-dedupe branch June 17, 2026 14:13
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.

error hooks/update-manifest.mjs:73

1 participant