Skip to content

fix(sync): skip archived repos and guard doc collisions - #211

Draft
hanthor wants to merge 1 commit into
tuna-os:mainfrom
hanthor:agent/issue-154-sync-guards
Draft

fix(sync): skip archived repos and guard doc collisions#211
hanthor wants to merge 1 commit into
tuna-os:mainfrom
hanthor:agent/issue-154-sync-guards

Conversation

@hanthor

@hanthor hanthor commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • exclude archived repositories from the org-wide documentation sync
  • keep the listing completeness check aligned with the active-repo filter
  • add a CI guard for case-insensitive duplicate paths under docs/
  • cover the collision detector with unit tests

Why

Archived repos can reintroduce stale hanthor/ references into generated pages. Case-only filename differences such as USER-GUIDE.md and user-guide.md break checkouts on case-insensitive filesystems and can produce duplicate routes.

Validation

  • node --check scripts/sync-org-docs.mjs
  • node --check scripts/check-doc-collisions.mjs
  • node scripts/__tests__/sync-org-docs.test.mjs (71 passed)
  • node scripts/check-doc-collisions.mjs
  • git diff --check

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@hanthor

hanthor commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Triage note — this PR is now half-landed, and the remaining half is still worth having.

Already on main, in a stronger form than this PR: the archived-repo guard. scripts/sync-org-docs.mjs now returns {names, archived} from the listing, filters archived repos out of what gets synced, and keeps the archived count so the truncation cross-check can still compare the full listing against org.public_repos (which counts archived public repos). The in-code comment records the motivating incident — 57 public repos becoming 37 active + 20 archived. That is a better design than this PR's approach of filtering inside both gh calls, which would have made the cross-check compare two differently-filtered numbers.

Not on main: the case-collision guard. There is no scripts/check-doc-collisions.mjs, no lint-workflow step, and no findCaseCollisions test.

I checked the live tree and there are currently no case-colliding paths under docs/docs/tacklebox/ has USER-GUIDE.md only, not the user-guide.md twin the test fixture references. So this is a preventive guard, not a fix for a live defect, which is why it is not urgent.

Suggested path: rebase and reduce this PR to just scripts/check-doc-collisions.mjs, its two tests, and the lint step, dropping the sync-org-docs.mjs changes that main has already solved differently. Leaving open as real work.


Generated by Claude Code

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