mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-12 19:44:48 +01:00
ios-clean/fix/sync: match the generator's real header, package shape and regen command (s10 H2, H3, H4, H5, M9, M12)
- H2: inventory greps the header the generator actually writes. - H4/H5: remove the local .package(path:) entry and DebugBridge* product deps; delete the generated DebugBridge/ and DebugBridgeGenerated/ dirs so the Phase 3 check can pass. - H3: regenerate accessors with /ios-sync (gstack-ios-qa-regen). - M12: ios-fix writes the regression with the project's own test runner. - M9: drop migration-relative sentence. ios-qa DEMO MODE (M8) is a UC2 gate and keeps its wording. Template-only commit: generated SKILL.md is expected red until the regeneration commit.
This commit is contained in:
1 parent
ffd5ece2f2
commit
305a83f1d8
3 files changed
+17
-12
No files matched your search
+10
-6
@@ -52,7 +52,9 @@ Each item is reverted only after AskUserQuestion confirmation:
|
||||
`DebugBridgeManager.shared.start()`.
|
||||
3. Any standalone `// @Snapshotable` generator marker comments on the
|
||||
canonical app state class.
|
||||
4. Generated `StateAccessor.swift` files anywhere under the app source.
|
||||
4. The generated `DebugBridge/` package directory and `DebugBridgeGenerated/`
|
||||
(accessors and `.gstack-version`) that `gstack-ios-qa-regen` wrote under
|
||||
the app source, plus any other generated `StateAccessor.swift` files.
|
||||
5. The `gstack-ios-qa.token` file under `NSTemporaryDirectory()` on the
|
||||
device (best-effort — only works if device is connected when /ios-clean
|
||||
runs).
|
||||
@@ -67,8 +69,8 @@ Each item is reverted only after AskUserQuestion confirmation:
|
||||
|
||||
1. Glob for `import DebugBridge` across the app source.
|
||||
2. Glob for `#if DEBUG ... DebugBridgeManager` blocks.
|
||||
3. Glob for `// Auto-generated state accessor` headers in
|
||||
`StateAccessor.swift` files.
|
||||
3. Grep `StateAccessor.swift` files for the generator header
|
||||
`// AUTO-GENERATED — DO NOT EDIT. Regenerate with /ios-sync.`
|
||||
4. Parse `Package.swift` for the DebugBridge dependency entry.
|
||||
5. Show the user what's about to be removed (file list + line counts).
|
||||
AskUserQuestion: proceed, dry-run, or abort.
|
||||
@@ -79,9 +81,11 @@ For each item the user approved:
|
||||
|
||||
1. Use Edit tool to strip the import + the `#if DEBUG` block (keep the
|
||||
surrounding code intact).
|
||||
2. Use Edit tool to remove the `.package(url:...DebugBridge...)` entry
|
||||
from `Package.swift` and any `targets` referencing `"DebugBridge"`.
|
||||
3. Delete generated `StateAccessor.swift` files.
|
||||
2. Use Edit tool to remove the local `.package(path: ...DebugBridge...)`
|
||||
entry from `Package.swift` and every target dependency on a
|
||||
`DebugBridge*` product (`DebugBridgeUI`, `DebugBridgeCore`, `DebugBridgeTouch`).
|
||||
3. Delete the generated `DebugBridge/` and `DebugBridgeGenerated/`
|
||||
directories and any other generated `StateAccessor.swift` files.
|
||||
4. Run `xcodebuild -scheme <SchemeName> -destination 'platform=iOS,id=<UDID>'
|
||||
build install -configuration Release` to verify Release builds without
|
||||
the bridge. If it fails on a missing DebugBridge symbol, the removal
|
||||
|
||||
@@ -82,12 +82,14 @@ user pick the one to fix.
|
||||
|
||||
## Phase 5: Add regression test
|
||||
|
||||
Write a test in `test/fixtures/ios-fix/<bug-slug>.test.ts` that:
|
||||
Write a regression test with the project's own test runner and conventions
|
||||
(the test command in CLAUDE.md; if it has none, ask the user and record the
|
||||
answer there). The test:
|
||||
|
||||
1. Loads the pre-bug snapshot.
|
||||
2. Restores it via `POST /state/restore`.
|
||||
3. Asserts the post-fix behavior on a real device (gated
|
||||
`GSTACK_HAS_IOS_DEVICE=1`, periodic tier).
|
||||
3. Asserts the post-fix behavior on a real device, skipped when no device is
|
||||
connected.
|
||||
|
||||
Commit the snapshot fixture + test file alongside the fix.
|
||||
|
||||
@@ -96,6 +98,6 @@ Commit the snapshot fixture + test file alongside the fix.
|
||||
| Symptom | Action |
|
||||
|---|---|
|
||||
| 3 iterations, bug still present | STOP, report to user with current best hypothesis |
|
||||
| `409 schema_mismatch` on /state/restore after rebuild | Re-codegen accessors (`swift run gen-accessors`), re-snapshot |
|
||||
| `409 schema_mismatch` on /state/restore after rebuild | Regenerate accessors with `/ios-sync` (`gstack-ios-qa-regen`), re-snapshot |
|
||||
| Device disconnects mid-fix | Daemon auto-reconnects; resume from Phase 4 |
|
||||
| Build fails | Revert Swift edits; investigate compile error before re-applying fix |
|
||||
@@ -41,8 +41,7 @@ This skill regenerates the relevant artifacts in place.
|
||||
|
||||
**Templates live in upstream gstack.** The installed
|
||||
`gstack-ios-qa-regen` launcher resolves its own gstack root and copies only
|
||||
the supported bridge files from `ios-qa/templates/`. The fork's HTTP-fetch
|
||||
and wildcard-copy patterns are gone.
|
||||
the supported bridge files from `ios-qa/templates/`.
|
||||
|
||||
## Phase 1: Detect installed version
|
||||
|
||||
|
||||
Reference in new issue
Block a user