Skip to content

ENG-685: chore(graphql): regenerate public schema and hooks from API main - #770

Merged
islandbitcoin merged 1 commit into
mainfrom
jabariennis/eng-685
Oct 14, 2026
Merged

islandbitcoin merged 1 commit into
mainfrom
jabariennis/eng-685

Conversation

@islandbitcoin

@islandbitcoin islandbitcoin commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

app/graphql/public-schema.graphql was last copied on 2026-09-25. It was byte-identical to lnflash/flash@362c9725a0 (ENG-608, #515). Since then the API's main gained ENG-653 payment splits (lnflash/flash#526). Codegen cannot see fields the snapshot lacks, so ENG-684 Phase 1 would cite and generate against a stale schema. This is Phase 0 of ENG-684 (spec in #769, docs/ai-assistant-tool-registry.md §10 step 0). No behavior change.

Closes #765, which schema-drift-check filed on 2026-10-12 for exactly the 11 changes below. The workflow never closes its own issue: on a match it exits 0, and on the next drift it comments on whichever tracking issue is still open. Left open, #765 would bury that next drift under a body describing this one.

Change

  • Source commit: lnflash/flash main at 374e5b90f300bdbe9c6d3296530672d3518d5691 (ENG-660, ENG-660: reject and disable payment splits to inactive destination accounts flash#527, 2026-10-12). The last commit there to touch src/graphql/public/schema.graphql is aeef6b75f8ce0024e60043a2fadb67d3ec853c15 (ENG-653, [Enhancement] - Refactor map screen #526). ENG-660 did not change the public schema.
  • Refresh step: the repo's own, as printed by schema-drift-check (.github/workflows/schema-drift.yml):
    curl -fsSL https://raw.githubusercontent.com/lnflash/flash/main/src/graphql/public/schema.graphql -o app/graphql/public-schema.graphql, then yarn dev:codegen.
    The fetched file (sha256 558e8793…4767) is byte-identical to the same path fetched at the pinned commit through raw.githubusercontent and through the GitHub contents API, and flash main did not move during the fetch.
  • Generated output: app/graphql/generated.ts is exactly what codegen emitted, with no hand edits. app/graphql/generated.gql did not change.

What changed in the schema

All additive. graphql-inspector diff (old snapshot vs new) reports 11 changes, no breaking changes.

Kind Added
Field splits: [WalletSplit!]! on the Wallet interface and on UsdWallet, UsdtWallet and BTCWallet (always empty on BTC)
Mutation walletSplitsSet(input: WalletSplitsSetInput!): WalletSplitsSetPayload!
Mutation walletSplitDelete(input: WalletSplitDeleteInput!): SuccessPayload!
Type WalletSplit { id, destinationWalletId, percent, enabled, createdAt }
Type WalletSplitsSetPayload { errors, splits }
Input WalletSplitInput { destination, percent }, WalletSplitsSetInput { walletId, splits }, WalletSplitDeleteInput { walletId, splitId }

Removed: none. Renamed: none. No screen or operation is affected.

generated.ts gains the new types plus MutationWalletSplitsSetArgs and MutationWalletSplitDeleteArgs. It does not gain useWalletSplitsSetMutation or useWalletSplitDeleteMutation: codegen emits hooks only for operations the app declares, and no app document uses these mutations yet. The hooks appear when the first PR that needs them adds the gql document. Every added export is export type, so nothing changes at runtime.

How it was tested

In a fresh worktree after yarn install --frozen-lockfile (Node 24.18.0, yarn 1.22.22):

  • yarn check-code: pass. tsc, check:translations, check:codegen (regeneration reproduces the committed generated.ts byte-for-byte), graphql-check ("All documents are valid").
  • yarn tsc:check: pass (735 app files, 177 test files, including generated.ts).
  • yarn test: pass. 182 suites passed, 1 skipped (card-topup-cardsim, env-gated); 2365 tests passed, 6 skipped.
  • yarn check:translation-drift: pass. No locale changes.
  • BASE_SHA=<merge-base> node scripts/ci/lint-changed.mjs (the CI Lint gate): pass, no ESLint errors on changed lines.
  • typos --config typos.toml: pass.
  • graphql-inspector diff <old snapshot> <new snapshot>: 11 additions, no breaking changes.
  • yarn eslint:check: fails with 1297 problems (1187 errors, 110 warnings) in 212 files. The report is identical with origin/main's copies of the two changed files, none of the problems are in them, and CI runs the changed-lines gate above instead.
  • Prettier: not applied. Both files are generated byte copies and Prettier 2.8.8 reformats them on origin/main too. Formatting them would break check:codegen and the strict schema-drift-check.

No tests added: no behavior changes. The additions are erased TypeScript types. check:codegen, graphql-check and schema-drift-check already guard the snapshot, and idempotency-support.spec.ts, which reads it, still passes.

Follow-ups

  • Re-point docs: Flash AI Assistant tool registry + action-card spec (design v0.2) #769's schema:N citations after this merges and before docs: Flash AI Assistant tool registry + action-card spec (design v0.2) #769 merges. docs/ai-assistant-tool-registry.md cites 40 distinct lines of the 2026-09-25 snapshot, and this PR's six insertions move 35 of them onto other text: fygaroCheckoutCreate schema:1748 would land on createInvite, UsdWallet schema:2515 on LIVENESS_FRAME, and interface Wallet schema:2828-2836 on a blank line. Shift by old line: 1-387 none, 388-1879 +3, 1880-2527 +15, 2528-2575 +20, 2576-2839 +25, 2840-2889 +28 (nothing is cited past 2889). No cited range straddles an insertion, so each range moves whole. The table below lists all 35, each checked line by line against both snapshots. Citing by symbol instead would survive the next weekly refresh. The same pass updates the spec preamble (regenerated 2026-09-25, commit ce85783bd) to 2026-10-13 and this PR's commit on main (branch head ea22f81e0; the merge gives it a new sha), marks §10 step 0 done, and can cite walletSplitsSet (schema:1894) and walletSplitDelete (schema:1887) in the declined-for-v1 list.
  • ENG-697 tracks that re-point and the same one for the Phase 1 briefs. ENG-687's and ENG-688's briefs and plans cite the 2026-09-25 line numbers too (ENG-686's cite none). After this merges, ENG-688's CashoutOffer schema:786 would land on ROLLED_BACK and ENG-687's realtimePrice schema:2177 on globals: Globals. Merging this PR moves ENG-685 to Done, which clears ENG-687's blocked-by, so ENG-697 is blocked by ENG-685 and blocks ENG-687 and ENG-688. Its remap covers the table below plus three ranges only the plans cite.
  • Splits UI, when built, adds walletSplitsSet / walletSplitDelete documents; their hooks generate then.
#769 citation remap: 2026-09-25 snapshot line to this snapshot
Points at Old New
type CashoutOffer schema:786 schema:789
CashoutRate.feeBasisPoints docstring schema:823 schema:826
scalar FractionalCentAmount schema:977 schema:980
input InitiateCashoutInput schema:1282-1291 schema:1285-1294
IntraLedgerPaymentSendInput.idempotencyKey schema:1315 schema:1318
IntraLedgerUsdPaymentSendInput.idempotencyKey schema:1340 schema:1343
input LnInvoiceCreateInput schema:1407 schema:1410
input LnInvoiceFeeProbeInput schema:1436-1441 schema:1439-1444
LnInvoicePaymentInput.idempotencyKey schema:1450 schema:1453
input LnNoAmountInvoiceCreateInput schema:1479 schema:1482
LnNoAmountInvoicePaymentInput.idempotencyKey schema:1523 schema:1526
LnNoAmountUsdInvoicePaymentInput.idempotencyKey schema:1550 schema:1553
input LnUsdInvoiceCreateInput schema:1577 schema:1580
input LnUsdInvoiceFeeProbeInput schema:1608-1611 schema:1611-1614
LnurlPaymentSendInput.idempotencyKey schema:1625 schema:1628
type MapMarker schema:1642-1645 schema:1645-1648
Mutation.createInvite schema:1745 schema:1748
Mutation.fygaroCheckoutCreate schema:1748 schema:1751
Mutation.initiateCashout schema:1755 schema:1758
Mutation.lnUsdInvoiceCreate expiry docstrings schema:1826-1837 schema:1829-1840
Mutation.requestCashout schema:1861 schema:1864
Query.accountDefaultWallet schema:2135 schema:2150
Query.businessMapMarkers schema:2148 schema:2163
Query.realtimePrice schema:2177 schema:2192
Query.transactionDetails schema:2179 schema:2194
type RealtimePrice schema:2206-2221 schema:2221-2236
input TransactionDetailsInput schema:2424-2427 schema:2439-2442
enum TxDirection schema:2443-2446 schema:2458-2461
type UsdWallet schema:2515-2523 schema:2530-2538
type UsdtWallet schema:2563-2571 schema:2583-2591
User.contacts schema:2622 schema:2647
type UserContact schema:2652-2678 schema:2677-2703
interface Wallet schema:2828-2836 schema:2853-2861
Wallet.balance schema:2834 schema:2859
enum WalletCurrency schema:2881-2885 schema:2909-2913

🤖 Generated with Claude Code

https://claude.ai/code/session_01XkM7Bm1cnzugSFi6pGnoWj

…-685)

Copy src/graphql/public/schema.graphql from lnflash/flash main at
374e5b90f300bdbe9c6d3296530672d3518d5691 (ENG-660, #527) with the
refresh step that schema-drift-check prints, then run
`yarn dev:codegen`. generated.ts is unedited codegen output.
generated.gql does not change because no app document changed.

The old snapshot was byte-identical to lnflash/flash@362c9725a0
(ENG-608, #515, 2026-09-25). The only schema change since then is
ENG-653's payment splits (#526, aeef6b75f8), and all of it is
additive:

- Wallet.splits: [WalletSplit!]! on the interface and on BTCWallet,
  UsdWallet and UsdtWallet
- Mutation.walletSplitsSet and Mutation.walletSplitDelete
- new types WalletSplit and WalletSplitsSetPayload
- new inputs WalletSplitInput, WalletSplitsSetInput and
  WalletSplitDeleteInput

Codegen emits hooks only for operations the app declares. No app
operation uses the new mutations yet, so generated.ts gains their
types and argument types but no new hooks. Nothing the app sends
changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkM7Bm1cnzugSFi6pGnoWj
@linear

linear Bot commented Oct 14, 2026

Copy link
Copy Markdown

ENG-685

islandbitcoin pushed a commit that referenced this pull request Oct 14, 2026
…G-685 schema

ENG-685 (#770) regenerates public-schema.graphql from lnflash/flash main
374e5b90f; the regen only inserts lines, so every schema:N citation moved
down by 3 to 69. Remapped programmatically via a line diff and verified
against 15 known anchors (CashoutOffer, initiateCashout, FractionalCentAmount,
WalletCurrency, BTCWallet, the six idempotencyKey inputs, ...).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkM7Bm1cnzugSFi6pGnoWj
@islandbitcoin
islandbitcoin merged commit 83e0701 into main Oct 14, 2026
10 checks passed
@islandbitcoin
islandbitcoin deleted the jabariennis/eng-685 branch October 14, 2026 03:39
islandbitcoin added a commit that referenced this pull request Oct 14, 2026
…2) (#769)

* docs: Flash AI Assistant tool registry + action-card spec (design v0.2)

Design doc for the assistant's safety layer: a closed-intent tool registry
over the two payment rails (GraphQL custodial USD/USDT, Breez Spark BTC),
propose/dispose action cards with expiry, and the phased build plan.

v0.2 corrects v0.1 against the checkout: BTC is a separate rail, conversion
is a swap not a mutation, prepared actions expire, amounts are integers in
minor units, contact resolution never auto-selects a low-confidence match,
and citations are fixed. See section 11 of the doc.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkM7Bm1cnzugSFi6pGnoWj

* docs(assistant): spec v0.2.1 — corrections from the Phase 1 plans

Conversion fee probes were swapped (BTC→USD uses fetchBreezFee, USD→BTC
uses lnUsdInvoiceFeeProbe); six idempotency inputs not five; sendPayment()
and BtcRail move to app/payments/; BtcRail gains listPayments and a
disabled state (Breez only initializes in advance mode); passcode-only
devices fail closed; hand-written schema validator; decode-only
decodePaymentRequest; single-use cashout offers; line fixes. See §11.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkM7Bm1cnzugSFi6pGnoWj

* docs(assistant): spec v0.2.2 — owner decisions (auth policy hook, home entry, shipped intents)

No mandatory biometric for text-initiated actions in v1; an authPolicy hook
returns "none" for text and "biometric" for voice. Ask Flash opens from a
home-screen entry point, not a tab. The grammar tier ships five intents and
adding one must be additive (new §7.2). ENG-686 ship gate recorded.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkM7Bm1cnzugSFi6pGnoWj

* docs(assistant): spec v0.2.3 — schema citations re-anchored to the ENG-685 schema

ENG-685 (#770) regenerates public-schema.graphql from lnflash/flash main
374e5b90f; the regen only inserts lines, so every schema:N citation moved
down by 3 to 69. Remapped programmatically via a line diff and verified
against 15 known anchors (CashoutOffer, initiateCashout, FractionalCentAmount,
WalletCurrency, BTCWallet, the six idempotencyKey inputs, ...).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkM7Bm1cnzugSFi6pGnoWj

* docs(assistant): mark Phase 0 done and cite the wallet-split operations (ENG-697)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkM7Bm1cnzugSFi6pGnoWj

---------

Co-authored-by: Dread <dread@example.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

public-schema.graphql has drifted behind lnflash/flash

1 participant