Repository navigation
Module boundaries and CI ratchets - #1951
Merged
Merged
Conversation
.agents/modules.json maps every Sources/ file to one of 17 modules and says what each may depend on, with Core split into tiers. check-module-boundaries.py flags a reference to a type outside those edges; today's 70 crossings are baselined and can only shrink. check-file-size.py fails on a new Swift file over 800 lines and on a baselined one that grows. Both run in linux-checks.sh (so check.sh quick and repo-hygiene) and have a test-matrix rule. agent-context.py prints the module for each changed Sources/ path. UI/Shared and UI/MenuBar get module cards.
The concurrency census runs in its own macOS workflow. When the head is over the baseline it counts the PR's base with the same compiler and only fails if a folder is above both, so a runner toolchain that reports more warnings than the dev Mac can't turn every PR red. Each module's AGENTS.md gets a card: what it owns, public surface, what it may depend on, grandfathered crossings, entry points, tests, rules. Support, Observability and UI/Overlay cards live in Sources/AGENTS.md until #1946 and #1941 land, since those PRs edit their folder docs. Root AGENTS.md: the Core rule now says what's true (tiers, Meeting gets all of it), a Module edges trap, real pin and hotspot numbers. repo-layout gets a modules table and a hotspot list from check-file-size. The split PR's doc notes are applied everywhere outside the #1946/#1941 docs.
onStartFailed is now non-optional on the native start paths, so passing nil can't silently drop the background-hotkey focus recovery. That's what the deleted pin's commit message already claimed. Census workflow: - pushes to main get the same parent-commit fallback as PRs - the base gets its own deps when Core or the deps recipe changed - a head that doesn't typecheck fails outright instead of being compared
Owner
Author
|
Review verdict, applied in f9bec06. All four findings were real; all four fixed.
Checks: 🤖 Generated with Claude Code |
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.
Stacked on #1950 (split the hotspot files) with #1948 (docs pass, which includes #1947) merged in. Review the last two commits; the rest is those PRs. Merge after them.
What this does
.agents/modules.jsonmaps everySources/Swift file to one of 17 modules and says what each may depend on. Core is split into tiers:core-vocabfor anyone,mic-primitivesfor Speech, all of it for Meeting.scripts/dev/check-module-boundaries.pyflags a type reference across an edge the manifest doesn't allow. Today's 70 crossings are in.agents/module-boundary-baseline.json, which can only shrink. Also--explain <file>,--graph,--self-test.agent-context.pynow prints the module for each changedSources/path.scripts/dev/check-file-size.py: no new Swift file over 800 lines, and the 45 that already are can't grow (.agents/file-size-baseline.json).--hotspotsprints the over-1,500 list.linux-checks.sh(socheck.sh quickand repo-hygiene) and have a test-matrix rule. Repo-hygiene also gets a named step for module boundaries, file size, test shape and source pins..github/workflows/concurrency-census.ymlon macos-26, only when Sources or the census change. To avoid flakes: if head is over the baseline, it counts the PR's base with the same compiler and fails only if a folder is above both (concurrency-census.py --allow-up-to). Kept out ofswift-ci.ymlbecause Transcripted Live: your meeting, live in Claude Code (mod + bundled helper) #1945 edits it. Costs one hosted macOS slot per Sources PR.UI/SharedandUI/MenuBar. Support, Observability and UI/Overlay cards live inSources/AGENTS.mdfor now because Notch island is the only dictation window #1946 and Keep runtime heartbeat preference reads off the main thread #1941 edit those folder docs. Root AGENTS.md: the Core rule now matches reality (tiers), a "Module edges" trap, real pin counts (39 files) and hotspot numbers (4 files over 1,500).docs/repo-layout.mdgets a modules table and a regenerated hotspot list. The split PR's doc notes are applied everywhere outside the Notch island is the only dictation window #1946/Keep runtime heartbeat preference reads off the main thread #1941 docs.No Swift changed, so no behavior change and no product-surface change.
Not done, and why
HomeMeetingPreviewFormatterandSupportDiagnosticsBundleare named by path inSources/UI/AGENTS.md(Notch island is the only dictation window #1946);SpeakerEmbedderLoadFailureMemory,MeetingInviteeSuggestionPolicyandWritingSidebarNewBadgeneedrun-tests.sh(Notch island is the only dictation window #1946, Keep runtime heartbeat preference reads off the main thread #1941);SpeakerEmbedderFactoryandMissedCallNudgePreferencesare listed inSources/Support/AGENTS.md(Notch island is the only dictation window #1946). They're in the baseline and the module cards say which move fixes each.Owner decisions
Heads-up for other PRs
#1946 and #1924 grow
TranscriptedSettingsView.swift/SpeakerPeopleSettingsSection.swift. If they merge after this, the file-size check will ask them for a reviewed baseline bump or a split. The test-matrix edit here is in a different hunk from #1945's.Checks
check-module-boundaries.py --self-test,check-file-size.py --self-test,concurrency-census.py --self-test: passbash check.sh quick: pass (64 checks)bash build-deps.sh --force,bash build.sh --no-open: passbash run-tests.sh: 20339 passed, 0 failedbash scripts/dev/concurrency-census.sh --check: pass (114, same as baseline)bash check.sh: every runnable check passed (build, tests, integration smoke, swift test, Tools tests, doc paths, the new ratchets). 3 matrix commands were BLOCKED as not runnable here (Labbuild_and_run.sh --verifyand the speaker-eval self-test flagged invalid-command,build-beta.shneeds operator input); they come from the stacked split/docs diff.🤖 Generated with Claude Code