chore: comment and test cleanup against the new rules - #18
Merged
Merged
Conversation
fix: dev-loop hygiene and the electron named exports
…uplicate objc classes, queue pre-load sends
…start in dev, shipped beside the executable
…nstall staged updates for real
… windows session callbacks
… the first cookie op
…tore, delegate and block leak fixes
…tes flow, renderer guide, changelog
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.
Applies the rewritten comment and test rules from
.admin/CONTRIBUTING.mdacross the tree. No behaviour change.Comments
docs: correct the comments that describe behaviour the code no longer hasfixes ~24 sites where the prose was wrong, not just verbose. The Windows backend landed after mostapi/headers were written, so a dozen files described a two-platform world while importing awindows*Backendat the top of the same file. Also:exec-wrappersaid "both backends" on line 4 and "all three" on line 24;window-controlspromised "up to three things" and listed two;native-imagelistedgetAspectRatioas deferred 112 lines above its implementation;auto-updaterpromised a detached install helper that does not exist;build-windowscarried a danglingNofrom a copy-paste;(D30)should have been(D030)and was invisible to any decision sweep.docs: cut narration comments across srcthen does the volume pass.Net −1,607 lines across 173 files.
Verification: every file was transpiled with comments stripped and code-hashed before and after. All 189 hashes match, so the diff is provably comment-only. The verifier was itself checked both ways — a comment-only edit reports zero drift, a one-line code change is caught.
Kept deliberately: the GTK clipboard deadlock rule, the Carbon
EventHotKeyIDstruct-by-value derivation, every "never close aJSCallbackinside its own invocation" note, thesetReleasedWhenClosed:NOuse-after-free note, ordering rules, security arguments, all 92D0xxcitations, and every C prototype above an FFI table —FFIType.u64does not tell you which pointer is the out-param.Tests
Removes change-detector tests: 12 Linux
*-ffi.test.tsfiles (114it()cases) that read aFFITypeliteral out of the source and assert it equals the same literal five lines away. Replaced by onelinux-ffi-abi.test.tskeeping only assertions that encode a real C gotcha —gbooleanisi32notbool, a getter returnspointernotcstringso NULL is guardable, a variadic pinned to one arity, the finiteDBUS_CALL_TIMEOUT_MSthat is the four-hour-CI-hang scar.Also: four platform-guard files merged into one table-driven
platform-guards.test.ts;cocoa-msgsend-variants.test.tscollapsed from 24 near-identical cases to one;entry-barrel.test.tsrewritten to cover strictly more — it now loopsIMPLEMENTED_MODULESand asserts every claimed module is really exported, which nothing checked before and whichsrc/electron.tsdepends on.Two guards got stronger, not just smaller: the 14 Linux loader guards used to execute zero assertions on the Linux runner via an early
return, and now report honestly as skips.Deleted as dead:
src/main/platform/windows/win32-window.ts(266 lines, imported by nothing insrc/, kept alive only by its own test) and the unusedhas/clearon the Cocoa class and selector caches.Net −1,514 lines. The darwin budget is ratcheted to the measured number (1400/90); linux and win32 keep the loose floor until their real counts can be read off a green CI run, since a guessed bound would false-fail.
bun run validateEXIT=0 locally on macOS at every commit.