Repository navigation
Review planner sends Swift health, permission and on-device storage code to full review (GST-3052) - #4472
Merged
Conversation
…e should plan full review (GST-3052) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ode to full review (GST-3052) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ser data (GST-3052) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…the Swift user-data rules (GST-3052) Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#2 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… (GST-3052) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The review policy's risk classes now say which Swift lines count as security and data, matching lib/review-risk.ts. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
capy-ai Bot
added a commit
that referenced
this pull request
Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466) - An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481) - A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481) - `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470) - `revise --plan` with a different file now says the run follows that file. (#4470) - A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471) - The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460) - A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456) - A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451) - /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458) - A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458) - A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458) - A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473) - /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461) - /ship on Codex no longer stops at the test coverage audit. (#4489) - A cold first-use check before an app build reaches its owner (GST-3025). (#4465) - `skill_prefix=true` now survives updates when gbrain is installed. (#4454) - The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454) - `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454) - /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464) - /office-hours explains why it recommends a mode. (#4450) - /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463) - Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490) - A Captain can check an ask against the owner's earlier answers before sending it. (#4467) - `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488) - GitHub release notes now list every change in plain words, with a link to its pull request. (#4390) - gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442) - /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469) - /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472) - A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479) - The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457) - A security finding's location and reason no longer go into a PR body. (#4486) - The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487) - A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485) - A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452) - /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474) - A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440) - One queued record with a malformed path no longer stops artifacts sync for every project. (#4455) - A failed artifacts push stays reported until a push succeeds. (#4455) - The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455) - ### Tests (#4495) - A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495) - CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453) - Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447) - The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447) - Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484) - Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459) - Two /autoplan runs started in the same second no longer share a run id. (#4459) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
/ship's review planner now sends Swift code that asks for a privacy permission, reads HealthKit or calendar data, or writes, deletes or protects users' files on the device to the full review panel.
Why: since #4469, iOS changes that asked for microphone permission, wrote and deleted meeting transcript files, or read calendars got the light, one-reader review. Reported from the GHome iOS app's PR review.
Nothing to do: plain SwiftUI views, UserDefaults settings and file reads still plan light.
Tests
test/review-risk-routing.test.ts: 9 permission lines are security, 24 storage and data lines are data, 17 ordinary SwiftUI, UserDefaults and read lines raise nothing, and the rules ignore non-Swift and XCTest paths. A productHearingTest.swiftpermission request is security, and three calls split across lines are data. The first cases were written first and failed on main.test/review-plan-cli.test.ts: a synthetic change that creates and deletes spill files (shaped like ghome#10), and one that reads calendars through EventKit (shaped like ghome#31), each mixed with Markdown and tests, plan full. The control, a SwiftUI settings view plus a model that reads and writes UserDefaults, plans light. No GHome code is copied.test/review-risk-redos.test.ts: the new patterns run in linear time on 100k-character hostile lines.No-loss replay
Preregistered before any run. The planner ran at main 29e9502 and at the final rules (39009fa) on the last 200 gstack main commits and on all 34 merged Apple-platform PRs (garrytan/ghome 33, garrytan/imsg-reader 1).
calendars(for: .event)). Eight already-full PRs also gained the data class.import, anHKHealthStore()orEKEventStore()init, opening aFileHandle), plus one config file's file protection. At PR level, 11 of 12 are true. Those setup-only lines could raise a PR by themselves, for example animport HealthKitwith no query.Tests/GHomeTests/*.swiftas code), and it counted a ninth already-full PR (ghome#17) gaining data. The rules now skip XCTest paths. The review's two fixes in 39009fa (product*Test.swiftfiles and split calls) were replayed again, with the same result as the run before them.What changed
The rules read only
.swiftfiles outside XCTest targets (Tests/,*Tests/,*Tests.swift), so TypeScript, this module's own regexes and test temp-file cleanup never match. A product file named*Test.swiftis read like any other product file.Security (a privacy permission request, like a
consentpath today):request…Authorization(speech, HealthKit, photos, location, tracking, notifications),requestAccess,requestFullAccessToEvents,requestWriteOnlyAccessToEvents(EventKit, camera, contacts), andrequestRecordPermission(AVAudioSession and AVAudioApplication). These are in because a request is where an app first touches the user's private data. Trailing-closure calls with no(match too.Data (user data read, stored, deleted or kept on the device):
import HealthKit,HKHealthStore,HK…Query. EventKit and Contacts:import EventKit/Contacts,EKEventStore,CNContactStore,.events(matching:),.calendars(for:),predicateForEvents…,.fetchReminders(..write(to:),.write(toFile:),.write(contentsOf:),.removeItem(at:/atPath:),.trashItem(at:),.createFile(atPath:),.replaceItem…(,FileHandle(forWritingTo:/forUpdating:),OutputStream(url:/toFileAtPath:). A call split across lines (removeItem(thenat: url)) is read over the file's changed lines joined.temporaryDirectoryby itself is not a rule, because it is also read-only.NSFileProtection…,FileProtectionType,.completeFileProtection…,.protectionKey, app group containers (forSecurityApplicationGroupIdentifier,UserDefaults(suiteName: "group.…")), andisExcludedFromBackup.let/varwhose name says how long data lives (…Retention…,keepDays,maxAge,purge…,deleteAfter,ttl), andolderThan:/purgeBefore:/deleteBefore:arguments.Out, on purpose:
@AppStorage. These are settings, and flagging writes would send every settings toggle to the full panel. Calendar choices saved this way still plan full when the same change reads EventKit.authorizationStatus()checks,EKCalendar/EKEventtype mentions in views,Data(contentsOf:)and other reads, and names likeexpiresAt(token expiry, not data retention).print(…, to: &log)andwrite(to: &stream)(text streams, not files)..m,.mm): there is none in the replay population, and its selector syntax would need its own patterns.docs/review-policy.mdnow describes these rules under Risk classes.Why
Once
.swiftstopped failing closed, iOS changes that touched private user data planned the light review. These rules only add the security and data classes, so they can raise a plan to full but never lower one.Blast radius
Only review planning changes:
lib/review-risk.ts(matchRisk) and theRISK_RULEShash, which is repinned to the GST-3052 replay. Swift diffs that hit these rules now get the full review panel. Nothing else in /ship, the tests it runs or the merge checks changes.Documentation
Status: current. The docs match the Swift privacy and storage review-routing change, so no edits were needed.
Scope: base 29e9502 to head b883706 (6 commits) plus an unstaged edit to docs/review-policy.md. Changed files: lib/review-risk.ts, its tests and pins, and changelog.d/review-plan-swift-user-data.md.
Coverage debt: the Swift risk rules have reference coverage only (docs/review-policy.md). The permission list there is illustrative and omits tracking, contacts and reminders. There is no diagram drift.
Pre-Landing Review
Pre-Landing Review: 4 issues — 0 auto-fixed, 0 asked, 0 deferred, 4 noted (round 2; round 1's 2 findings were fixed in 39009fa)
Gate edits: none detected (7 listed, 4 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Two full review rounds on the plan gstack printed (gate class, full depth): a batched specialist (testing, security, state-machines), the Red Team, an adversarial reviewer and a second-model review (gpt-6.1-sol, clean). No finding met the blocking floor. A docs paragraph added after review got one scoped read, which was clean.
Below the blocking floor, recorded here and not fixed in this PR:
lib/review-risk.ts:235: the joined-lines check for permission requests can never add a hit, because none of those patterns spans a newline. It costs one extra scan per changed Swift file.lib/review-risk.ts:236: the joined-lines check allows at most 20 whitespace characters after(, so a split call whose next line is indented 20 or more spaces still plans light. Split calls never matched before this PR.lib/review-risk.ts:235: joining every changed line in a file can match across two separate hunks. That only sends more files to full review.lib/review-risk.ts:137: a singular-named XCTest file outside a*Tests/folder is now read, so its temp-file cleanup can raise data. That only sends more files to full review.Exploratory QA
Functional smoke on
matchRisk: a Swift permission request is security, an on-device delete is data, a SwiftUI setting and a TypeScript path raise nothing (pass). The Red Team's two cases (a productHearingTest.swift, a splitremoveItem() raised nothing at 539e422 and raise security and data at b883706 (pass after the fix).Issues
Refs GST-3052
Agent notes
Agent notes
GST-3052, GSTA-604. Prereg: GStack Minder drive reports/GSTA-604-prereg.md (sha256 95d75d44…). Replay data, scripts and reader labels: handoffs/GSTA-604/ (final run: run3). Decision trail: reports/GSTA-604-decisions.tsv. Out of scope: Android and Kotlin, depth policy, round caps, the Swift test-path classifier gap in lib/review-depth.ts.
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=1 fixed=2 scope=frozen dispatches=8
Approvals
No approvals recorded for branch review-planner-swift-privacy-storage.
Plan: exempt: bug fix