Wave #94/#95/#96/#97: indexer scheduling decision + sync.yml fixes, multi-asset docs, refund-preflight tests, scratch gitignore - #252
Conversation
…vention (accensa#97) body.txt and issues.json were tracked at the repo root once. Ignore them and any future PR-body / issue-dump / one-off-script residue under a .scratch/ directory, documented in CONTRIBUTING.md. (Both files are already removed from the tree; this closes the recurrence path.)
…lind spot (accensa#94) - concurrency.cancel-in-progress: true -> false, so an overlapping trigger no longer kills a sync mid-range (indexing is idempotent; the run was simply lost). - loop window 55m -> 65m so it overlaps the next hourly trigger; with self-cancel gone the overlap costs one extra idempotent sync instead of leaving a gap when a trigger is dropped under load. - optional HEARTBEAT_URL pinged after every healthy sync and at clean exit, for an external dead-man's switch. If scheduling stops entirely the pings stop and the monitor alerts - the signal that did not exist when the cursor fell 207 ledgers behind retention. Every existing in-loop diagnostic (401 assertion, syncedTo check, drained / skippedLedgers warnings) is unchanged.
…i-asset constraints (accensa#94, accensa#95) - 'Indexer scheduling - the options weighed': paid Vercel Cron vs an external scheduler vs a long-running worker vs keeping the loop, compared on cost / reliability / failure modes. Decision: keep the loop with the defects fixed now (this PR), migrate to an external scheduler (cron-job.org / EventBridge, ~$0) when the team wants the runner cost gone - that step needs an account + secret a maintainer must create. - 'Settling in USDC or multiple assets': ASSET_CONTRACT_IDS, per-asset grouping (never sum across assets), the single-token RefundVault constraint and the deploy-a-vault-per-asset workaround, and the missing-trustline case that must read differently from 'no payments'.
… vault (accensa#95) Add a USDC example to the .env.local block and a 'Settling in USDC or multiple assets' subsection pointing at the fuller DEPLOYMENT.md notes.
|
@bade2brazy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@bade2brazy is attempting to deploy a commit to the ACCENSA Team on Vercel. A member of the Team first needs to authorize it. |
|
MergeKeeper review Scope: in scope for linked issue The changes correctly address issues 94 and 97 while documenting multi-asset configurations (issue 95) and adding route preflight tests (issue 96), fully matching the linked issues and instructions. Reviewed commit: |
|
MergeKeeper review unavailable AI provider review response did not contain valid JSON No approval or merge action was taken. |
Four Stellar Wave issues, one branch.
#97 — remove
body.txt/issues.jsonfrom the root ✅ mostly already doneBoth files are already gone from the tree and
db-setup.mdis already folded intoDEPLOYMENT.md(an earlier PR). This adds the missing recurrence guard:.gitignoreentries forbody.txt,issues.jsonand a.scratch/directory, plus aCONTRIBUTING.mdsection pointing tooling residue there.#94 — replace the sleep-looping Actions runner
DEPLOYMENT.mdgains "Indexer scheduling — the options weighed": paid Vercel Cron (~$20/user/mo) vs an external scheduler (cron-job.org / EventBridge,$0) vs a long-running worker ($5/mo, re-opens the extraction that caused the original outage) vs keeping the loop. Decision: keep the loop with its defects fixed now; migrate to an external scheduler when the team wants the ~660 runner-min/day gone — that step needs an account + secret a maintainer must create, so it isn't in this PR.sync.ymldefects fixed:concurrency.cancel-in-progress: true → false— an overlapping trigger no longer kills an in-flight sync.55m → 65mso it overlaps the next hourly trigger (safe now that self-cancel is gone; costs one extra idempotent sync).HEARTBEAT_URLpinged after every healthy sync and at clean exit → external dead-man's switch for scheduling cessation, the failure mode that cost 207 ledgers.Every existing in-loop diagnostic (401 assertion,
syncedTocheck,drained/skippedLedgerswarnings) is untouched. Deliberately breaking each to confirm the checks still fire, and wiring alerting on the warnings, are not done here (need the deployed environment).#95 — prove the USDC / multi-asset path
DEPLOYMENT.md+README.mddocumentASSET_CONTRACT_IDSwith a USDC example, the per-asset grouping rule (never sum across assets), the single-token RefundVault constraint + the deploy-a-vault-per-asset workaround, and the missing-trustline case that must read differently from "no payments".Not done here (needs testnet/chain access): the real testnet USDC payment + tx hash, the captured USDC event fixtures in
sac-transfer-events.json, the aggregation-code changes inrevenue-analytics.ts, and trustline detection in the dashboard.#96 — API route tests
Route tests for
routes/verify(auth)/challenge/hook/settle/paymentsalready landed (PR #234). This addsapps/web/src/app/api/refund/preflight/route.test.ts(validation paths + happy path + the float-to-i128 amount guard).Not done here (needs the CI Postgres service + a local run):
/api/syncscenarios (cold start, cursor resume,skippedLedgers, cursor-advances-across-empty-windows, cooldown/429, config errors),/api/verifydisagreement flag, and reintroducing the filed route bugs to confirm the tests catch them.Related Issues
Closes #97
Closes #94, Closes #95, Closes #96 — see the "not done here" notes above; each needs deploy/CI/chain access a checkout-less contribution can't reach.