MessagesCore at v0.2.0 does not compile with SQLite.swift 0.17.0 #6

Closed
opened 2026-11-13 11:30:36 +00:00 by svc-agent-writer · 3 comments

What happens

Package.swift asks for SQLite.swift with from: "0.15.3". The repository ignores Package.resolved, so a consumer of the MessagesCore product resolves the newest version. That version is 0.17.0 today, and the build fails:

Sources/MessagesCore/MessagesStore.swift:425:20: error: tuple pattern has the wrong length for tuple type '(message: String, code: Int32)'
Sources/MessagesCore/MessagesStore.swift:427:28: error: tuple pattern has the wrong length for tuple type '(message: String, extendedCode: Int32)'

SQLite.swift 0.17.0 removed the third value of Result.error and of Result.extendedError. The function translate(sqliteError:path:) still matches three values.

With SQLite.swift 0.16.0 the build completes.

How to reproduce

  1. Make a package with one dependency: this repository at exact: "0.2.0", product MessagesCore.
  2. Run swift build with no Package.resolved file.

What to build

  • Make translate(sqliteError:path:) compile with the current SQLite.swift.
  • State a version range in Package.swift that the code compiles with at both ends.
  • Decide whether the repository commits Package.resolved. A library does not need it, but the test run of this repository then has no fixed set of versions.

Acceptance criteria

  • A fresh consumer package that depends on the MessagesCore product builds with no Package.resolved file.
  • The MessagesCoreTests target passes at the lowest and at the highest SQLite.swift version that the range allows.
  • The change ships under a new tag.

Blocked by

  • none

Filed under: operator word "Grant" sha256:78b7d0379d5e

## What happens `Package.swift` asks for `SQLite.swift` with `from: "0.15.3"`. The repository ignores `Package.resolved`, so a consumer of the `MessagesCore` product resolves the newest version. That version is 0.17.0 today, and the build fails: ``` Sources/MessagesCore/MessagesStore.swift:425:20: error: tuple pattern has the wrong length for tuple type '(message: String, code: Int32)' Sources/MessagesCore/MessagesStore.swift:427:28: error: tuple pattern has the wrong length for tuple type '(message: String, extendedCode: Int32)' ``` `SQLite.swift` 0.17.0 removed the third value of `Result.error` and of `Result.extendedError`. The function `translate(sqliteError:path:)` still matches three values. With `SQLite.swift` 0.16.0 the build completes. ## How to reproduce 1. Make a package with one dependency: this repository at `exact: "0.2.0"`, product `MessagesCore`. 2. Run `swift build` with no `Package.resolved` file. ## What to build - Make `translate(sqliteError:path:)` compile with the current `SQLite.swift`. - State a version range in `Package.swift` that the code compiles with at both ends. - Decide whether the repository commits `Package.resolved`. A library does not need it, but the test run of this repository then has no fixed set of versions. ## Acceptance criteria - A fresh consumer package that depends on the `MessagesCore` product builds with no `Package.resolved` file. - The `MessagesCoreTests` target passes at the lowest and at the highest `SQLite.swift` version that the range allows. - The change ships under a new tag. ## Blocked by - none Filed under: operator word "Grant" sha256:78b7d0379d5e
Author
Member

This was generated by AI during triage.

Agent Brief

Category: bug
Summary: Cap the SQLite.swift range below 0.17.0, so that every version the manifest allows compiles.

Current behavior:
The manifest asks for SQLite.swift from: "0.15.3". The repository ignores Package.resolved, so a fresh consumer resolves the newest release, 0.17.0. In 0.17.0 the cases Result.error and Result.extendedError carry two values. MessagesStore.translate(sqliteError:path:) matches three values in each case, and the build fails. Triage read the code and confirmed the three-value patterns. Triage did not rebuild against 0.17.0.

Desired behavior:

  • The manifest asks for SQLite.swift "0.15.3"..<"0.17.0". A fresh consumer resolves 0.16.x and builds.
  • If the code does not compile or the tests do not pass at 0.15.3, raise the lower bound to the lowest version that does both. State the new range in the CHANGELOG.
  • Package.resolved stays ignored. That is the library convention.
  • translate(sqliteError:path:) does not change.

Triage rulings (operator, 2026-11-15): these supersede two bullets of "What to build" in the issue body.

  • Range: cap below 0.17.0. This supersedes "Make translate(sqliteError:path:) compile with the current SQLite.swift".
  • Package.resolved: do not commit it. This settles "Decide whether the repository commits Package.resolved".

Key interfaces:

  • The SQLite.swift dependency declaration in the package manifest. The same declaration carries the SQLCipher trait that #5 changes.

Acceptance criteria:

  • A fresh consumer package that depends on the MessagesCore product builds with no Package.resolved file.
  • MessagesCoreTests pass at the lowest and at the highest SQLite.swift version that the range allows. The PR states both versions and how the run pinned each one.
  • stallari-harness resolves and builds against the new tag with no change to its manifest. It declares SQLite.swift from: "0.15.3" and resolves 0.16.0 today, so it fits the range.
  • The CHANGELOG states the range and why it stops below 0.17.0.
  • The change ships under a new tag.

Out of scope:

  • Support for SQLite.swift 0.17.0. That needs a change to translate(sqliteError:path:) and a range decision that affects consumers. It is a separate issue.
  • Committing Package.resolved.
  • The SQLCipher trait. That is #5.

Order: #5 and #6 change the same dependency declaration. Land #6 first, or land both on one branch. One tag can carry both.

> *This was generated by AI during triage.* ## Agent Brief **Category:** bug **Summary:** Cap the `SQLite.swift` range below 0.17.0, so that every version the manifest allows compiles. **Current behavior:** The manifest asks for `SQLite.swift` `from: "0.15.3"`. The repository ignores `Package.resolved`, so a fresh consumer resolves the newest release, 0.17.0. In 0.17.0 the cases `Result.error` and `Result.extendedError` carry two values. `MessagesStore.translate(sqliteError:path:)` matches three values in each case, and the build fails. Triage read the code and confirmed the three-value patterns. Triage did not rebuild against 0.17.0. **Desired behavior:** - The manifest asks for `SQLite.swift` `"0.15.3"..<"0.17.0"`. A fresh consumer resolves 0.16.x and builds. - If the code does not compile or the tests do not pass at 0.15.3, raise the lower bound to the lowest version that does both. State the new range in the CHANGELOG. - `Package.resolved` stays ignored. That is the library convention. - `translate(sqliteError:path:)` does not change. **Triage rulings (operator, 2026-11-15):** these supersede two bullets of "What to build" in the issue body. - Range: cap below 0.17.0. This supersedes "Make `translate(sqliteError:path:)` compile with the current SQLite.swift". - `Package.resolved`: do not commit it. This settles "Decide whether the repository commits `Package.resolved`". **Key interfaces:** - The `SQLite.swift` dependency declaration in the package manifest. The same declaration carries the `SQLCipher` trait that #5 changes. **Acceptance criteria:** - [ ] A fresh consumer package that depends on the `MessagesCore` product builds with no `Package.resolved` file. - [ ] `MessagesCoreTests` pass at the lowest and at the highest `SQLite.swift` version that the range allows. The PR states both versions and how the run pinned each one. - [ ] `stallari-harness` resolves and builds against the new tag with no change to its manifest. It declares `SQLite.swift` `from: "0.15.3"` and resolves 0.16.0 today, so it fits the range. - [ ] The CHANGELOG states the range and why it stops below 0.17.0. - [ ] The change ships under a new tag. **Out of scope:** - Support for `SQLite.swift` 0.17.0. That needs a change to `translate(sqliteError:path:)` and a range decision that affects consumers. It is a separate issue. - Committing `Package.resolved`. - The `SQLCipher` trait. That is #5. **Order:** #5 and #6 change the same dependency declaration. Land #6 first, or land both on one branch. One tag can carry both.
Collaborator

⏸ SVD architect gate: dev/apple-messages-blade-mcp#6 messagescore-at-v0-2-0-does-not-compile-with-sqlite-swift-0

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity standard · dispatch effort medium

Run: 20261115T231235Z-d638a2a8

Held because: CLEAN but 4 open risk(s) (2 verification · 2 decision) — HOLD-ALL parks everything. The risks, verbatim:

Open risks:

  1. Should this PR carry the 0.2.1 version bump (Version.swift, testSemver, a CHANGELOG [0.2.1] section), or leave the entry under [Unreleased] so #5 and #6 share one release commit and tag (the brief says 'One tag can carry both')? Lean: bump here. #6 makes the package uninstallable for every fresh consumer, so it should not wait on #5. If the architect wants a shared tag, drop the Version.swift and UnitTests.swift rows. [decision]
  2. Does the architect accept a lower bound above 0.15.3? The tag manifests of SQLite.swift 0.15.3 and 0.15.4 are tools-version 5.9 and declare no traits, so they cannot satisfy this manifest's traits: ["SQLCipher"]. 0.15.5 is the first tag that declares SQLCipher. Half-A did not build, so dispatch measures L by pinning (Approach step 1), following the brief's raise-the-lower-bound rule. Raising L drops any consumer pinned to 0.15.3 or 0.15.4. Lean: accept. [decision]
  3. After merge the owner tags v0.2.1. Then a scratch package with .package(url: "https://git.groupthink.asia/dev/apple-messages-blade-mcp.git", exact: "0.2.1") and product MessagesCore runs swift build with no Package.resolved, and the build succeeds. Dispatch cannot create a tag; the pre-tag proof uses a path dependency. [verification]
  4. After the tag, stallari-harness runs swift package update apple-messages-blade-mcp and swift build, which succeed with no Package.swift change, and its Package.resolved shows sqlite.swift inside ""..<"0.17.0". The sandbox denied Half-A access to /Users/piers/src/stallari-harness, so its from: "0.15.3" declaration and 0.16.0 resolution come only from the triage brief. [verification]

Change: Change only the version requirement of the SQLite.swift declaration at Package.swift:56-58 from from: "0.15.3" to "<L>"..<"0.17.0". Keep traits: ["SQLCipher"] byte-identical, because #5 owns it. Add a short note to the comment at Package.swift:52-55 saying why the range stops below 0.17.0. Before the first edit, measure L on the pristine manifest with swift package resolve SQLite.swift --version 0.15.3 (then 0.15.4), swift build and swift test --filter MessagesCoreTests. L is expected to be 0.15.5: tags 0.15.3 and 0.15.4 are tools-version 5.9 and declare no traits, and 0.15.5 is the first tag that declares the SQLCipher trait. Do not change MessagesStore.translate(sqliteError:path:) (MessagesStore.swift:422-436, operator ruling). Its three-value Result patterns compile at every tag from 0.15.3 to 0.16.0. Do not commit Package.resolved. Mirror release commit 3a8262d: Version.swift:10 and UnitTests.swift:71 testSemver go to "0.2.1", and CHANGELOG gets a [0.2.1] section above [0.2.0] (Fixed, Changed with the range and the reasons for both bounds, and Notes). The owner applies the v0.2.1 tag after merge. Prove the change at the low end (pinned to L) and the high end (fresh unpinned resolve, 0.16.x), and with a scratch consumer package that uses a path dependency on the MessagesCore product.

Files: Package.swift · CHANGELOG.md · Sources/AppleMessagesBlade/Version.swift · Tests/AppleMessagesBladeTests/UnitTests.swift

Decision: accept the 4 open risk(s) above and dispatch this spec (svd:go), or park (svd:skip) / re-spec (svd:respec)?

Your call (when this issue is held at the gate via svd:hold):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-messagescore-at-v0-2-0-does-not-compile-with-sqlite-swift-0.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-messagescore-at-v0-2-0-does-not-compile-with-sqlite-swift-0.md

### ⏸ SVD architect gate: dev/apple-messages-blade-mcp#6 messagescore-at-v0-2-0-does-not-compile-with-sqlite-swift-0 **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `standard` · dispatch effort `medium` **Run:** `20261115T231235Z-d638a2a8` **Held because:** CLEAN but 4 open risk(s) (2 verification · 2 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. Should this PR carry the 0.2.1 version bump (Version.swift, testSemver, a CHANGELOG [0.2.1] section), or leave the entry under [Unreleased] so #5 and #6 share one release commit and tag (the brief says 'One tag can carry both')? Lean: bump here. #6 makes the package uninstallable for every fresh consumer, so it should not wait on #5. If the architect wants a shared tag, drop the Version.swift and UnitTests.swift rows. [decision] 2. Does the architect accept a lower bound above 0.15.3? The tag manifests of SQLite.swift 0.15.3 and 0.15.4 are tools-version 5.9 and declare no traits, so they cannot satisfy this manifest's traits: ["SQLCipher"]. 0.15.5 is the first tag that declares SQLCipher. Half-A did not build, so dispatch measures L by pinning (Approach step 1), following the brief's raise-the-lower-bound rule. Raising L drops any consumer pinned to 0.15.3 or 0.15.4. Lean: accept. [decision] 3. After merge the owner tags v0.2.1. Then a scratch package with .package(url: "https://git.groupthink.asia/dev/apple-messages-blade-mcp.git", exact: "0.2.1") and product MessagesCore runs `swift build` with no Package.resolved, and the build succeeds. Dispatch cannot create a tag; the pre-tag proof uses a path dependency. [verification] 4. After the tag, stallari-harness runs `swift package update apple-messages-blade-mcp` and `swift build`, which succeed with no Package.swift change, and its Package.resolved shows sqlite.swift inside "<L>"..<"0.17.0". The sandbox denied Half-A access to /Users/piers/src/stallari-harness, so its from: "0.15.3" declaration and 0.16.0 resolution come only from the triage brief. [verification] **Change:** Change only the version requirement of the SQLite.swift declaration at Package.swift:56-58 from `from: "0.15.3"` to `"<L>"..<"0.17.0"`. Keep `traits: ["SQLCipher"]` byte-identical, because #5 owns it. Add a short note to the comment at Package.swift:52-55 saying why the range stops below 0.17.0. Before the first edit, measure L on the pristine manifest with `swift package resolve SQLite.swift --version 0.15.3` (then 0.15.4), `swift build` and `swift test --filter MessagesCoreTests`. L is expected to be 0.15.5: tags 0.15.3 and 0.15.4 are tools-version 5.9 and declare no traits, and 0.15.5 is the first tag that declares the SQLCipher trait. Do not change MessagesStore.translate(sqliteError:path:) (MessagesStore.swift:422-436, operator ruling). Its three-value Result patterns compile at every tag from 0.15.3 to 0.16.0. Do not commit Package.resolved. Mirror release commit 3a8262d: Version.swift:10 and UnitTests.swift:71 testSemver go to "0.2.1", and CHANGELOG gets a [0.2.1] section above [0.2.0] (Fixed, Changed with the range and the reasons for both bounds, and Notes). The owner applies the v0.2.1 tag after merge. Prove the change at the low end (pinned to L) and the high end (fresh unpinned resolve, 0.16.x), and with a scratch consumer package that uses a path dependency on the MessagesCore product. **Files:** `Package.swift` · `CHANGELOG.md` · `Sources/AppleMessagesBlade/Version.swift` · `Tests/AppleMessagesBladeTests/UnitTests.swift` **Decision:** accept the 4 open risk(s) above and dispatch this spec (`svd:go`), or park (`svd:skip`) / re-spec (`svd:respec`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-messagescore-at-v0-2-0-does-not-compile-with-sqlite-swift-0.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-15-messagescore-at-v0-2-0-does-not-compile-with-sqlite-swift-0.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/apple-messages-blade-mcp#6 messagescore-at-v0-2-0-does-not-compile-with-sqlite-swift-0 completed integration verify.

  • PR: #7
  • Branch: feat/svd-dev-apple-messages-blade-mcp-6-messagescore-at-v0-2-ccae8845
  • Commit: 3e2e041d9b
  • Build: green
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Check commit statuses on PR head 3e2e041: absent
  • Checks: PR #7 head 3e2e041: no remote checks exist (absent). Local full swift test passed at sqlite.swift 0.16.0. MessagesCoreTests passed at 0.15.3 with 34 tests. No blockers.
  • Warning: No remote CI statuses exist on the PR head. Local runs are the only integration evidence.
  • Warning: The PR body does not give the step-1 measurements for 0.15.3 and 0.15.4. It also omits the pin commands. Agent Adjustment 5 sets L = 0.15.3, so this is non-blocking.
  • Warning: The CHANGELOG [0.2.1] date 2026-11-16 is anticipated. Fix it at merge if the date differs.
  • Warning: SwiftPM warns at 0.15.3 that the package declares no traits. The SQLCipher trait request is ignored there. This is the expected and accepted behaviour.
  • Warning: Post-merge checks stay with the architect: the owner tags v0.2.1, then verify a fresh consumer and the stallari-harness build against the tag.
  • Warning: The PR body trailer reads Co-Authored-By: gpt-6.1-terra. This is cosmetic.
  • Warning: no CI for commit statuses on PR head 3e2e041: The Forgejo statuses endpoint returns [] for the PR head. The repo has no CI configured and no run in its history. No tracking pointer exists. — reported as absent, not blocking (gh#633)
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261116T041654Z-ccae8845 --confirm-merge)
spec-verify-dispatch Half B for dev/apple-messages-blade-mcp#6 messagescore-at-v0-2-0-does-not-compile-with-sqlite-swift-0 completed integration verify. - PR: https://git.groupthink.asia/dev/apple-messages-blade-mcp/pulls/7 - Branch: feat/svd-dev-apple-messages-blade-mcp-6-messagescore-at-v0-2-ccae8845 - Commit: 3e2e041d9b9f147f6f9c7c298b224cc507ee9ca5 - Build: green - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Check commit statuses on PR head 3e2e041: absent - Checks: PR #7 head 3e2e041: no remote checks exist (absent). Local full swift test passed at sqlite.swift 0.16.0. MessagesCoreTests passed at 0.15.3 with 34 tests. No blockers. - Warning: No remote CI statuses exist on the PR head. Local runs are the only integration evidence. - Warning: The PR body does not give the step-1 measurements for 0.15.3 and 0.15.4. It also omits the pin commands. Agent Adjustment 5 sets L = 0.15.3, so this is non-blocking. - Warning: The CHANGELOG [0.2.1] date 2026-11-16 is anticipated. Fix it at merge if the date differs. - Warning: SwiftPM warns at 0.15.3 that the package declares no traits. The SQLCipher trait request is ignored there. This is the expected and accepted behaviour. - Warning: Post-merge checks stay with the architect: the owner tags v0.2.1, then verify a fresh consumer and the stallari-harness build against the tag. - Warning: The PR body trailer reads Co-Authored-By: gpt-6.1-terra. This is cosmetic. - Warning: no CI for commit statuses on PR head 3e2e041: The Forgejo statuses endpoint returns [] for the PR head. The repo has no CI configured and no run in its history. No tracking pointer exists. — reported as absent, not blocking (gh#633) - Decision: review the PR and merge? (`codex-svd ship --run-id 20261116T041654Z-ccae8845 --confirm-merge`)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/apple-messages-blade-mcp#6
No description provided.