chore: stop iCloud duplicates and internal docs from reaching the index - #423
Merged
Conversation
On 2026-08-07 one `git add -A` staged 176 untracked files and pushed them to this PUBLIC repo (#421, closed). scripts/check_no_internal_docs.sh caught it, but the branch had already been pushed and the commit is still reachable through GitHub's PR refs. The gate worked; nothing upstream of it did. Two holes let it happen, and neither was closed by the closing of that PR. The 2026-07-31 ignore list carries the note "root-anchored so docs/ content is unaffected". Of the 141 internal documents in that commit, 50 were not at the root — 49 under `docs/`, plus `MachineRootHelper/SHIP_RUNBOOK.md` — so the anchoring itself was the hole. Worse, `PROJECT_FIX_*` had no entry at all, and it was 91 of the remaining 141: the largest class, and the one the working habit still produces. The patterns are now un-anchored and mirror LAYER 1 of check_no_internal_docs.sh, so the ignore file and the gate block the same set instead of each covering what the other misses. The other 21 files were iCloud Drive collision copies — " 2", " 3" appended silently on conflict. Among them `scripts/check_no_internal_docs 2.sh` (a stale copy of the gate itself) and two duplicates of migrate_v0.72_provider_accounts. That last one is the dangerous shape: migrations are matched by number and are the only record of what has run against production, so a second v0.72 turns "did v0.72 run?" into "which v0.72?". Verified the new patterns mask nothing: zero tracked files match, checked with `git ls-files | xargs git check-ignore`. A future real `Figure 2.png` fails loudly at `git add` rather than being dropped silently, and `git add -f` remains the override. Also removed from the working tree, separately from this commit: 14 untracked duplicates, each diffed against its canonical sibling first. Thirteen were byte-identical; `doctor 2.sh` was a strict subset of the tracked doctor.sh (the pre-#421 wording), and AnonymousTelemetryCoordinator.swift was the pre-#418 copy left at the old app-target path, superseded by the CLIPulseCore original and referenced nowhere in project.pbxproj. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the
git add -Aincident of 2026-08-07 (#421, closed). That PR pushed 176 untracked files to this public repo.scripts/check_no_internal_docs.shcaught it and the branch was deleted, but the commit is still reachable through GitHub's PR refs — and nothing upstream of that gate had changed, so the same command would do the same thing again today.What was actually still broken
I re-fetched the closed PR's head and measured it rather than trusting the summary:
" 2"/" 3"collision copiesTwo distinct holes:
Root-anchoring. The 2026-07-31 ignore list says "root-anchored so
docs/content is unaffected". 50 of the 141 documents were not at the root — 49 underdocs/, plusMachineRootHelper/SHIP_RUNBOOK.md. The anchoring was the hole.PROJECT_FIX_*had no entry at all — and it was 91 of the other 141. The largest single class, and the one the working habit still produces.The patterns are now un-anchored and mirror LAYER 1 of
check_no_internal_docs.sh, so the ignore file and the gate block the same set instead of each covering what the other misses. Only the gate matches case-insensitively; the comment says why that asymmetry is left in place rather than papered over.iCloud duplicates. 21 files, including
scripts/check_no_internal_docs 2.sh— a stale copy of the gate itself — and two duplicates ofmigrate_v0.72_provider_accounts. That last one is the shape that actually costs something later: migrations are matched by number and are the only record of what has run against production, so a secondv0.72turns "did v0.72 run?" into "which v0.72?" (AGENTS.md).Verification
git ls-files -z | xargs -0 git check-ignorereturns nothing.README.md,docs/index.html,scripts/dev/doctor.sh,submit_v1_10_8.py, a futuremigrate_v0.74_*.sql, …) confirmed not ignored.spike/Sources 2/) and extensionless ones (test_codable 2) covered, both seen in the bad commit.check_no_internal_docs.sh✓ ·check_migration_numbers.sh✓ (73 migrations, all unique).Figure 2.pngwill be ignored — butgit addon it fails out loud ("paths are ignored by one of your .gitignore files") rather than dropping it silently, andgit add -fis the override.Working-tree cleanup (not in this diff — untracked files)
14 untracked files deleted from the working tree, each diffed against its canonical sibling first. 12 were byte-identical iCloud copies. The two that were not:
scripts/dev/doctor 2.sh— a strict subset of trackeddoctor.sh; its unique content is the pre-fix(doctor): report a locked screen as locked, not as a missing credential #421 "the profile evaporated" wording that the locked-screen fix replaced.CLI Pulse Bar/CLI Pulse Bar/AnonymousTelemetryCoordinator.swift— the pre-fix: activation was never sent on the launch that shows the disclosure #418 copy left behind at the old app-target path when the type moved to CLIPulseCore. Superseded (the CLIPulseCore version adds the public API and the test seam) and referenced zero times inproject.pbxproj, so it was never compiled.Three untracked files were deliberately kept and are now ignored, with a comment each explaining why:
xcode_devid_fan_embed.sh(local-only build phase wired by an uncommitted pbxproj edit),scripts/dev/*_tmp.*(AI review prompts that quote internal DEV_PLANs while carrying none of the names the gate greps for), andsubmit_v1_10_7.py(a dead 2026-04 one-off, nobody's duplicate — safe to delete, so not deleted here).One thing this PR does not fix
~50 internal documents at the repo root (
DEV_PLAN_*,HANDOFF_*,CODEX_*,PROJECT_REVIEW_*, …) exist on this machine and are not incli-pulse-internal— I checked all 175 blobs in that repo, not justprivate-repo-root-docs/. They are safely ignored here, so they are not a staging hazard, but this working tree is currently their only copy outside the pre-2026-07-31 git history. Left in place deliberately; deleting them would have destroyed the only copy.🤖 Generated with Claude Code