Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…TECTURE.md says where each number lives Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task
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.
Part of #73, point 6.
What and why
The comment pass (#71) moved timings, limits and rules out of the code into
docs/ARCHITECTURE.md, with one-line// See docs/ARCHITECTURE.md, "<section>".pointers. Since then the docs are the source of truth for numbers the code no longer comments, and nothing kept a pointer and its heading, or a number and its constant, in step.scripts/check-doc-pointers.sh(bash 3.2 and POSIX awk, no Swift). It reads the level 1 to 3 headings of everydocs/*.md, outside code fences and with backticks removed, then every.swiftunderSources/andTests/. A run of consecutive//lines is read as one comment, so a pointer split over two lines is checked too (FillerRemover, PasteboardOutput, AXPasteObserver, OutputMuteController, UtteranceSlot, ClipboardKeeper, StreamingTranscriptionEngine, CustomWordCorrector). Both forms are matched:docs/X.md, "Section"and"Section" in docs/X.md(BenchProcess). A baredocs/X.mdis allowed if the file exists (TimingLine). A failure printsfile:line: no heading "<section>" in docs/X.mdorfile:line: no file docs/X.mdand exits 1; on success it prints the count..github/workflows/docs.ymlruns only that script on ubuntu-latest, for pushes to main and pull requests touchingdocs/**,Sources/**,Tests/**, the script or the workflow.ci.ymlis unchanged.docs/ARCHITECTURE.md, "Where the numbers live": a table from each number the docs and CLAUDE.md quote to its constant and file. A change to a constant updates its row and the prose that quotes it. The measured figures (the 110 ms cold pass, the 0 to 25 ms read after Cmd+V, Universal Clipboard's 15 ms) are listed as measurements, not constants. The doc's intro now says pointers are checked, so a section is renamed together with its pointers.PermissionMonitor.pollInterval: the two-second poll was an unnamed literal; it is aprivate static letnow so the table can name it. No behaviour change.Verified
./scripts/check-doc-pointers.shon the tree:29 pointers to docs/ headings checked in 168 Swift files.grep -rn 'docs/' Sources Testsgives 30 lines: the 29 pointers plus TimingLine's bare file name./bin/bash3.2.57 and/usr/bin/awk(BSD). The ubuntu run is this PR's Docs check.## Paste and clipboardfailed both pointers to it, ClipboardKeeper.swift:6 and the split one in PasteboardOutput.swift:10; changing the second line of FillerRemover's split pointer to"Processor"failed at FillerRemover.swift:3; a wrong section in BenchProcess's"…" in docs/BENCHMARKS.mdform failed; a misspeltdocs/BENCHMARK.mdin TimingLine failed withno file. Each run exited 1. A second scratch tree checked that a##line inside a code fence is not taken as a heading, that a backticked heading matches without its backticks, and that a pointer naming a missing file is reported once.swift buildandswift testgreen. Nothing touches the release-to-paste path, so no benchmark.🤖 Generated with Claude Code