feat(rules): add Objective-C-specific review rules - #1061
Conversation
|
✅ OpenCodeReview: Review skipped: no items were selected. |
Qiyuanqiii
left a comment
There was a problem hiding this comment.
Focused terminology and technical-writing self-review against the current head.
The problem statement in Why This Change is clear: Objective-C routing already works, but the routed rule remained a generic checklist and therefore lacked Objective-C-specific guidance. I could not, however, confirm that the revised text is fully terminology-clean yet. The inline comments identify three technical wording issues that can affect reviewer behavior and two smaller English usage issues.
PR-description follow-ups:
- This Markdown file is embedded and loaded as a runtime review rule, so the change alters reviewer behavior. New feature (and likely
feat(rules)) describes the impact more accurately than Documentation update /docs(rules). - Move
XCTest assertionsout of the Interoperability and trust boundaries row into a separate Test correctness row. - Prefer
main-thread UI access,unstable lock identity, anddeployment-target availabilityover the less specificUI isolation,unstable locks, anddeployment availability. - Rewrite the DeepSeek sentence as: “Thinking mode does not support the
tool_choiceparameter required by that request.” This removes the ambiguous antecedent in “its requiredtool_choice.”
Submitted as a commented self-review; the author cannot approve their own pull request.
|
Addressed the PR-level follow-ups alongside the inline fixes in 23c577b:
The five inline comments have individual replies with the corresponding changes. |
|
I’ve finished my review; it is ready for you to look at now. If there are any issues, I will get up and handle them around noon. |
Co-authored-by: Kite <254839944+lizhengfeng101@users.noreply.github.com>
Co-authored-by: Kite <254839944+lizhengfeng101@users.noreply.github.com>
Co-authored-by: Kite <254839944+lizhengfeng101@users.noreply.github.com>
|
Thanks — I applied the suggestion first so that we can discuss the concrete wording. Could I confirm a few details about the intended contract?
I am happy to retain the applied wording if these are deliberate policy choices; I mainly want to ensure the rule, tool schema, resolver, and GitHub publisher describe the same behavior. |
I believe the rule definitions can be guided by the agent's capability boundaries, but they should not be tightly coupled to the agent's internal details; otherwise, this creates a reverse dependency where the agent relies on the rule definitions, which hinders future iteration. |
Description
Summary
.mcontent sniffing, resolver precedence, and user-defined rule behavior unchanged.Why This Change
PR #574 added content sniffing so
.mfiles can be routed to either MATLAB or Objective-C rules. The routing works, butobjc.mdremained effectively identical todefault.md; an Objective-C diff or full-file scan therefore received no guidance about defects specific to the language or Cocoa runtime.This change makes the existing Objective-C route useful for repositories that do not define a project rule, while preserving the current system-layer fallback behavior.
Rule Coverage
NSNull, collection exceptions, ranges and strings, format arguments,NSError **, exceptionsPrecision and Classification
The preamble follows the same high-precision approach as
matlab.md:Each section also includes scoped
Do not reportguidance where a common Objective-C pattern is valid under some build modes or lifecycle contracts.Compatibility
internal/config/rules/rule_docs/objc.mdchanges..msniffer andsystem_rules.jsonmappings are unchanged.Type of Change
How Has This Been Tested?
Validation Environment
go1.26.5 windows/amd64cfbb62e(origin/main)Automated Validation
go test -race -count=1 ./internal/config/rulesmake testequivalent passed for every package returned bygo list ./..., excluding/extensions/:go test -p 1 -v -race -count=1 ...internal/config/rulescoverage was 91.7%make checkcommands passed: license check, English-only check,go mod tidy,gofmt -s -w ., andgo vetacross the same package setgit diff --checkpassed, and the modified file is UTF-8 without BOM and uses LF line endingsGNU Make is unavailable on the validation host, so the Makefile commands were run directly. The initial full race run exhausted host memory during parallel compilation; the same package set then passed with package parallelism limited to one. Race detection, cache bypass, and test scope remained unchanged.
The repository-required OCR review completed successfully with
--audience agent --effort highagainst the fullorigin/main..HEADObjective-C document change. It selected and completed the single changed item without coverage failures and reported five comments. Each comment was validated before editing. The OCR findings led to mode-independent defect wording, clearer weak-capture and format-string rules, and an explicit typed-decoding requirement forNSSecureCoding. The subsequent terminology review aligned category collisions with Apple's documented undefined-behavior contract, standardized the Core Foundation Create Rule and Get Rule names, separated callback function-pointer compatibility from object-context bridging, and corrected stale KVC wording.DeepSeek rejected the optional comment-filter request. Thinking mode does not support the
tool_choiceparameter required by that request. This non-fatal provider limitation did not affect the completed core review or manifest coverage, and all five unfiltered comments were reviewed manually.Checklist
Known Limitations
Related Issues
Closes #1060.