Repository navigation
Swift keyword families: io, time_date_logic, bitwise_ops, regex_execution read their contracts (Part of #9341, #8863) - #9374
Merged
Conversation
…rals, regex options (Part of #9341, #8863) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…#9341) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
Contributor
Contributor
|
No description provided. |
This was referenced Nov 26, 2026
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.
Checklist: done [c:swift-keyword-families]
What changed
Swift's 4 red cells were measured on vapor (the pinned crucible has too few Swift functions to score them). Re-measured on current main, then fixed:
~ ^ << >>inside string fixtures)bitwise_ops: outside_literalsscope filter in swift.py.range(of:, options: .regularExpression)).range/.replacingOccurrenceswith.regularExpression; rule also coversreplacingOccurrencesDate(...),timeIntervalSince*,addingTimeInterval, ISO8601DateFormatter, DateComponents, TimeZone, clocks, Duration);Timer.scheduledTimerremoved (a timer is thread_sleeps', per the ruling)Data(contentsOfFile:),String(contentsOf...))Remaining bitwise over-count (14 fire vs 13): one default-parameter shift (
max: Int? = 1 << 14) the oracle does not read; a real shift, no change.Class / Sibling gaps
Class: Swift family rules disagreeing with their contract or the oracle's reading, on the four red cells. Same-mechanism siblings handled here:
replacingOccurrences(... .regularExpression)(regex),String(contentsOf...)(io), the clock/duration/timezone constructors (time). Sibling gaps: none in Swift;&and|are not counted by the rule (oracle counts them) but recall is 1.00 so left alone, risk of inout/pattern false positives. Other languages' cells are their own issues.Evidence
family_oracle.py --lang swiftbefore/after; cells recorded with--update-baseline(not pinned);family_red_cells.py --lang swift: 0 red cells.bitwise_operationsandtime_date_logicsignal files plus aggregates/snapshots, matching the two changed rules on the crucible's Swift files (io/regex did not move there).rebless.py swift --dry-run: nothing moved.pr_gates --fast9/9;--ratchets9/9.Family-validity checklist
test_swift_strict.py, oracle cases infamily_oracle_cases.json)Lessons for agents
/nvme-data/gitgalaxy-data/vapor), thenfamily_oracle.py --corpus vapor --update-baselineandfamily_validity_chart.py --write._scope_filtersoutside_literalsworks per rule key, not justbranch; test it throughStructuralExtractor(...).splice(code, "")["equations"].Cross-repo: no companion PRs. Overlaps in
tests/family_validity_baseline.jsonand the chart SVGs with other open family-validity PRs: whichever merges second re-merges main and re-runsfamily_validity_chart.py --write.Facts checked: all 4 cells green by re-scan; ratchets pass; no files over 5 hand-written (swift.py, test_swift_strict.py, family_oracle_specs_a.py, family_oracle_cases.json).
🤖 Generated with Claude Code