Skip to content

Conversation

@lawrence-forooghian
Copy link
Collaborator

@lawrence-forooghian lawrence-forooghian commented Oct 17, 2025

Due to LLM limitations, LLM coding assistants frequently steamroller these and convert them into straight quotes. We have two choices: fight them at every step and keep reverting their changes, or just give up on fancy quotes. I think that realistically, we wouldn't do the first one, and would instead just keep introducing noise into diffs.

Summary by CodeRabbit

  • Style
    • Normalized apostrophes and quotation marks throughout the codebase, replacing typographic characters with ASCII equivalents across comments, documentation, and user-facing messages for improved consistency and display compatibility.

Due to LLM limitations, LLM coding assistants frequently steamroller
these and convert them into straight quotes. We have two choices: fight
them at every step and keep reverting their changes, or just give up on
fancy quotes. I think that realistically, we wouldn't do the first one,
and would instead just keep introducing noise into diffs.
@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2025

Walkthrough

This PR normalizes typographic apostrophes and quotation marks to ASCII equivalents across configuration files, source code comments, documentation, and test files. All changes are cosmetic textual updates with no functional modifications to logic, control flow, or public APIs.

Changes

Cohort / File(s) Change Summary
Configuration & Documentation
.github/workflows/check.yaml, .prettierignore, .swiftlint.yml, CONTRIBUTING.md, Sources/AblyLiveObjects/.swiftformat, Sources/AblyLiveObjects/.swiftlint.yml
Normalized typographic/curly apostrophes and quotes to ASCII equivalents in comments and documentation text; no functional changes to configurations or workflows
Source Files – BuildTool
Sources/BuildTool/BuildTool.swift, Sources/BuildTool/DestinationFetcher.swift, Sources/BuildTool/ProcessRunner.swift, Sources/BuildTool/XcodeRunner.swift
Updated comments and user-facing error/status message strings to replace typographic apostrophes and quotes with ASCII equivalents; no logic or control-flow changes
Source Files – AblyLiveObjects
Sources/AblyLiveObjects/Utility/Logger.swift
Normalized apostrophe in documentation comment from typographic to ASCII style
Test Files
Tests/AblyLiveObjectsTests/Helpers/TestLogger.swift, Tests/AblyLiveObjectsTests/JSONValueTests.swift, Tests/AblyLiveObjectsTests/WireValueTests.swift
Updated comment text to replace typographic apostrophes with ASCII equivalents; no test logic modifications

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

This is a homogeneous, large-scale cosmetic change—the same type of apostrophe/quote normalization applied consistently across many files. While the file count is substantial, the repetitive nature and lack of functional changes reduce review complexity. Verification focuses on ensuring consistency of the transformation rather than evaluating distinct logic in each file.

Poem

🐰 Curly quotes to straight, a quest so fine,
Apostrophes dancing in a single line,
From BuildTool's messages to tests that shine,
Consistency reigns—now everything's divine!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Remove fancy quotes" is directly and fully related to the main change in the changeset. The raw summary shows that all modified files involve replacing typographic apostrophes (curly quotes) with ASCII apostrophes (straight quotes) across configuration files, comments, documentation, and string literals. This aligns perfectly with the PR objective stated in the description, which explains the motivation to eliminate fancy quotes to avoid conflicts with LLM coding assistants. The title is concise, clear, and specific enough for a teammate scanning the project history to immediately understand the primary change.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-fancy-quotes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Sources/BuildTool/BuildTool.swift (1)

167-171: Fix “Optional(…)” leaking into $GITHUB_OUTPUT.

String(data:…, encoding: .utf8) returns an optional; the current interpolation yields “matrix=Optional("…")”. Use non‑optional decoding.

-        // I'm assuming the JSONSerialization output has no newlines
-        let keyValue = try "matrix=\(String(data: JSONSerialization.data(withJSONObject: matrix), encoding: .utf8))"
+        // JSONSerialization produces UTF-8 data; decode without Optional
+        let jsonData = try JSONSerialization.data(withJSONObject: matrix)
+        let keyValue = "matrix=\(String(decoding: jsonData, as: UTF8.self))"
🧹 Nitpick comments (4)
Sources/BuildTool/DestinationFetcher.swift (1)

14-15: Optional: cap error payload size for readability.

The failure message prints the entire devices dictionary; for large outputs this can flood logs. Consider logging only keys/counts.

- throw Error.simulatorLookupFailed(message: "Couldn't find a simulator with runtime \(runtimeIdentifier) and device type \(deviceTypeIdentifier); available devices are \(simctlAvailableDevicesOutput.devices)")
+ let availableRuntimes = Array(simctlAvailableDevicesOutput.devices.keys).sorted()
+ throw Error.simulatorLookupFailed(
+   message: "Couldn't find simulator with runtime \(runtimeIdentifier) and device type \(deviceTypeIdentifier); available runtimes: \(availableRuntimes.joined(separator: \", \")), devices count: \(simctlAvailableDevicesOutput.devices.values.flatMap { $0 }.count)"
+ )
Sources/BuildTool/BuildTool.swift (2)

212-214: Doc comment has trailing “///”.

Ends with “kept in sync.///”. Drop the extra slashes.

-    /// Checks that the Swift version specified by the `Package.swift`'s `"swift-tools-version"` matches that in the `.swift-version` file (which is used to tell SwiftFormat the minimum version of Swift supported by our code). Per [SwiftFormat#1496](https://github.com/nicklockwood/SwiftFormat/issues/1496) it's currently our responsibility to make sure they're kept in sync.///
+    /// Checks that the Swift version specified by the `Package.swift`'s `"swift-tools-version"` matches that in the `.swift-version` file (which is used to tell SwiftFormat the minimum version of Swift supported by our code). Per [SwiftFormat#1496](https://github.com/nicklockwood/SwiftFormat/issues/1496) it's currently our responsibility to make sure they're kept in sync.

340-399: Regex only allows single‑digit m/n in @specOneOf.

The pattern uses (\d)? for index/total, so 10/12 won’t parse. Widen to (\d+) for robustness.

-            let conformanceTagSourceLineRegex = /^\s+\/\/ @spec(OneOf|Partial|Untested|NotApplicable)?(?:\((\d)?\/(\d)?\))? (.*?)(?: - (.*))?$/
+            let conformanceTagSourceLineRegex = /^\s+\/\/ @spec(OneOf|Partial|Untested|NotApplicable)?(?:\((\d+)\/(\d+)\))? (.*?)(?: - (.*))?$/
Sources/BuildTool/XcodeRunner.swift (1)

4-5: Add explicit ACL to satisfy explicit_acl guideline

Declare the access level on the type.

Apply:

-enum XcodeRunner {
+internal enum XcodeRunner {

As per coding guidelines.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ace838e and bef4b85.

📒 Files selected for processing (14)
  • .github/workflows/check.yaml (5 hunks)
  • .prettierignore (1 hunks)
  • .swiftlint.yml (4 hunks)
  • CONTRIBUTING.md (2 hunks)
  • Sources/AblyLiveObjects/.swiftformat (1 hunks)
  • Sources/AblyLiveObjects/.swiftlint.yml (1 hunks)
  • Sources/AblyLiveObjects/Utility/Logger.swift (1 hunks)
  • Sources/BuildTool/BuildTool.swift (13 hunks)
  • Sources/BuildTool/DestinationFetcher.swift (1 hunks)
  • Sources/BuildTool/ProcessRunner.swift (1 hunks)
  • Sources/BuildTool/XcodeRunner.swift (1 hunks)
  • Tests/AblyLiveObjectsTests/Helpers/TestLogger.swift (1 hunks)
  • Tests/AblyLiveObjectsTests/JSONValueTests.swift (1 hunks)
  • Tests/AblyLiveObjectsTests/WireValueTests.swift (2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.swift

📄 CodeRabbit inference engine (.cursor/rules/swift.mdc)

**/*.swift: Specify an explicit access control level (SwiftLint explicit_acl) for all declarations in Swift code (tests are exempt)
When extending a type, put the access level on the extension declaration rather than on each member (tests are exempt)
Prefer implicit .init(...) when the type can be inferred in initializer expressions
Prefer enum case shorthand (.caseName) when the type can be inferred
For JSONValue or WireValue, prefer using literal syntax via ExpressibleBy*Literal where possible
Prefer Swift raw string literals for JSON strings instead of escaping double quotes
When an array literal begins with an initializer expression, place the initializer on the line after the opening bracket

Files:

  • Sources/BuildTool/XcodeRunner.swift
  • Tests/AblyLiveObjectsTests/WireValueTests.swift
  • Sources/BuildTool/DestinationFetcher.swift
  • Sources/AblyLiveObjects/Utility/Logger.swift
  • Sources/BuildTool/ProcessRunner.swift
  • Tests/AblyLiveObjectsTests/Helpers/TestLogger.swift
  • Tests/AblyLiveObjectsTests/JSONValueTests.swift
  • Sources/BuildTool/BuildTool.swift
Sources/**/*.swift

📄 CodeRabbit inference engine (.cursor/rules/testing.mdc)

For testsOnly_ property declarations, do not add generic explanatory comments (their meaning is understood)

Files:

  • Sources/BuildTool/XcodeRunner.swift
  • Sources/BuildTool/DestinationFetcher.swift
  • Sources/AblyLiveObjects/Utility/Logger.swift
  • Sources/BuildTool/ProcessRunner.swift
  • Sources/BuildTool/BuildTool.swift
Tests/**/*.swift

📄 CodeRabbit inference engine (.cursor/rules/testing.mdc)

Tests/**/*.swift: Use the Swift Testing framework (import Testing), not XCTest, in test files
Do not use fatalError for expectation failures; prefer Swift Testing’s #require
Only add labels to test cases or suites when the label differs from the suite struct or test method name
Tag tests per CONTRIBUTING.md’s "Attributing tests to a spec point" with exact comment format; distinguish @spec vs @specPartial; do not repeat @spec for the same spec point
Add comments in tests to clarify when certain test data is irrelevant to the scenario
In tests, import Ably using import Ably
In tests, import AblyLiveObjects using @testable import AblyLiveObjects
In tests, import _AblyPluginSupportPrivate using import _AblyPluginSupportPrivate (do not use internal import)
When passing a logger to internal components in tests, use TestLogger()
When unwrapping optionals in tests, prefer #require over guard let

Files:

  • Tests/AblyLiveObjectsTests/WireValueTests.swift
  • Tests/AblyLiveObjectsTests/Helpers/TestLogger.swift
  • Tests/AblyLiveObjectsTests/JSONValueTests.swift
Sources/AblyLiveObjects/**/*.swift

📄 CodeRabbit inference engine (.cursor/rules/swift.mdc)

In AblyLiveObjects library (non-test) code, import modules as: Ably with import Ably, and _AblyPluginSupportPrivate with internal import _AblyPluginSupportPrivate

Files:

  • Sources/AblyLiveObjects/Utility/Logger.swift
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: check-documentation
  • GitHub Check: generate-matrices
🔇 Additional comments (14)
Sources/AblyLiveObjects/.swiftformat (1)

1-1: Consistent with PR objective to remove fancy quotes.

This cosmetic update normalizes the typographic apostrophe to ASCII equivalent, which directly addresses the stated PR goal of preventing LLM-induced diff noise.

Sources/BuildTool/ProcessRunner.swift (1)

7-7: Consistent with PR objective; comment formatting unchanged.

The typographic apostrophes have been normalized to ASCII equivalents without affecting the comment's meaning or code functionality.

Tests/AblyLiveObjectsTests/JSONValueTests.swift (1)

104-104: Consistent with PR objective; test logic unchanged.

The typographic apostrophe in the comment has been normalized to ASCII equivalent. No changes to test assertions or behavior.

.prettierignore (1)

1-1: Consistent with PR objective; configuration behavior unchanged.

The typographic apostrophe in the comment has been normalized to ASCII. File functionality and Prettier exclusion rules remain unchanged.

Tests/AblyLiveObjectsTests/WireValueTests.swift (2)

223-223: Consistent with PR objective; test logic unchanged.

The typographic apostrophe in the comment has been normalized to ASCII. Test assertions and behavior remain unchanged.


277-277: Consistent with PR objective; test logic unchanged.

The typographic apostrophe in the comment has been normalized to ASCII. Test assertions and behavior remain unchanged.

Sources/AblyLiveObjects/Utility/Logger.swift (1)

5-5: Consistent with PR objective; documentation clarity preserved.

The typographic apostrophe in the documentation comment has been normalized to ASCII. Type definition and all code implementations remain unchanged.

.github/workflows/check.yaml (1)

23-23: Consistent with PR objective; workflow behavior unchanged.

Five instances of typographic apostrophes in workflow comments have been normalized to ASCII equivalents. CI/CD job definitions, step implementations, and workflow execution logic remain unchanged.

Also applies to: 52-52, 71-71, 152-152, 229-229

Tests/AblyLiveObjectsTests/Helpers/TestLogger.swift (1)

7-7: Consistent with PR objective; test logger functionality unchanged.

The typographic apostrophe in the comment has been normalized to ASCII. TestLogger implementation and all logging behavior remain unchanged.

CONTRIBUTING.md (2)

39-41: LGTM: quote normalization only.

ASCII apostrophes read well and avoid tooling churn. No semantic changes.


115-117: LGTM: consistent tag wording.

Straight quotes in examples and CI note look good; matches the PR’s goal.

Also applies to: 119-121

.swiftlint.yml (1)

19-21: LGTM: comments normalized to ASCII apostrophes.

Purely cosmetic; no rule or behavior changes.

Also applies to: 37-66, 67-78, 79-85

Sources/AblyLiveObjects/.swiftlint.yml (1)

2-3: LGTM: comment normalization.

No config changes; safe.

Sources/BuildTool/BuildTool.swift (1)

130-148: LGTM: ASCII quote normalization across comments/docstrings.

All these hunks are text‑only; no behavior change. Matches the repo’s decision to avoid curly quotes.

Also applies to: 236-241, 451-454, 628-633, 691-694, 772-789, 815-833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants