Skip to content

Feat/vote attribution and coverage - #1224

Merged
bryzettler merged 17 commits into
developfrom
feat/vote-attribution-and-coverage
Jul 24, 2026
Merged

Feat/vote attribution and coverage#1224
bryzettler merged 17 commits into
developfrom
feat/vote-attribution-and-coverage

Conversation

@bryzettler

Copy link
Copy Markdown
Contributor

No description provided.

Add an importable fastify app seam (export server, guard start() behind
NODE_ENV=test) so the vote service can be driven via injection against a
seeded throwaway Postgres with no live network. Includes an embedded-postgres
harness, seed helpers, and a passing baseline test proving a direct vote's
weight is attributed to the casting wallet in GET /v1/proposals/:proposal/votes.
Wire tests into the package test script and turbo test task.
…cedure

Stop silently dropping ineligible positions when building vote transactions.
The vote response gains a skipped:[{positionMint,reason}] array (reasons
maxChoicesReached and alreadyVotedThisChoice), and the all-positions-skipped
case throws a new ALL_POSITIONS_SKIPPED error carrying the same skip report.
Additive contract change; @helium/blockchain-api gets a minor changeset.
@bryzettler
bryzettler requested a review from madninja July 23, 2026 19:37
Per ADR 0003, GET /v1/proposals/:proposal/votes resolves each marker's
mint to its index-0 proxy assignment (deduped per asset across proxy
configs) so weight lands on the position owner, with the casting proxy
exposed in an additive castingProxies field. Falls back to the casting
voter when the index-0 row is gone; ownership resolution deliberately
ignores expiration.
- Skip the casting-proxy join probe for direct votes (join condition
  mirrors the aggregate FILTER)
- Drop the enum-value prose duplicated in SkipReasonSchema's describe
- Set NODE_ENV=test once (the db helper, which runs before the service
  import) instead of also in the test script
…nts index

- Order the index-0 LATERAL lookup by expiration_time DESC, address so
  attribution stays deterministic if duplicate index-0 rows disagree
- Provision proxy_assignments (asset, index) index in the vote service
  sink config to back the per-marker owner probe
- Hoist duplicated seedProposal into suite-level beforeEach
@bryzettler
bryzettler merged commit a5d7e07 into develop Jul 24, 2026
66 checks passed
@bryzettler
bryzettler deleted the feat/vote-attribution-and-coverage branch July 24, 2026 18:09
@github-actions github-actions Bot mentioned this pull request Jul 24, 2026
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.

2 participants