Repository navigation
fix: wire reputation_badge to solver_registry, add webhook relay tests, generalize Makefile, complete CODEOWNERS (#512 #513 #514 #515) - #629
Closed
GoodnessJohn wants to merge 1 commit into
Conversation
…ol#513 stellar-vortex-protocol#514 stellar-vortex-protocol#515 stellar-vortex-protocol#512 — Wire reputation_badge to solver_registry tier computation - Add `caller` param to `mint_badge`/`burn_badge`; accept either the admin or the registered solver_registry contract as the caller. - Add `set_solver_registry` (admin-only) and `get_solver_registry` view. - `initialize` now takes an optional `solver_registry: Option<Address>` so the badge contract can be deployed before the registry is live. - Update test.rs: registry-driven mint/burn, tier upgrade, unknown-caller panic guards, and all pre-existing mutation-killing assertions. stellar-vortex-protocol#513 — Add test suite for examples/events-webhook-relay - Export `loadConfig`, `EventRelay`, `main` from src/index.ts. - Make `stop()` public; expose `expressApp` getter for route testing. - Gate top-level `main()` call behind an ESM entry-point check so importing the module in tests does not start the server. - Add src/__tests__/index.test.ts: 6 describe blocks (~30 assertions) covering loadConfig env-var parsing, constructor validation, Express /health and /stats routes, relayEvent retry/drop logic, pollEvents cursor advancement, and start/stop flag transitions. - Add vitest.config.ts (Node environment, no DOM). - Add `test`/`test:watch` scripts and vitest + supertest dev-deps to package.json. stellar-vortex-protocol#514 — Generalize Makefile beyond intent_settlement - Introduce ALL_CRATES (all 12 workspace members) and WASM_CRATES (the 11 cdylib crates). - Workspace-wide `fmt`, `fmt-check`, `lint`, `test`, `build`, `audit`, `clean` targets now loop over every crate — `make all` gives a genuine full-repo check. - Per-crate targets (`<crate>-fmt`, `<crate>-lint`, etc.) generated automatically via a `define`/`eval` macro so adding a new crate requires only one line change. - Remove the now-redundant hand-written `proof-registry-*` block. stellar-vortex-protocol#515 — Add CODEOWNERS entries for the eight previously uncovered crates - reputation_badge, governor, backstop_vault, fee_router, intent_periphery, treasury_streams, timelock, and vortex-common all now have explicit path-based entries routed to the appropriate reviewer team rather than falling through to the generic maintainers default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves four self-documented gaps in a single pass: #512, #513, #514, #515.
#512 — Wire
reputation_badgemint/burn tosolver_registrytier computationThe crate's own module doc stated this work was deferred until
solver_registry(issue #1) existed. Issue #1 is closed; this PR completes the follow-up.Changes —
reputation_badge/src/lib.rs:mint_badge(caller, solver, tier)andburn_badge(caller, solver)now accept an explicitcaller: Addressand authorise it against either the admin or the registeredsolver_registrycontract, replacing the admin-only placeholder.set_solver_registry(solver_registry)(admin-only) lets operators wire or rotate the registry address post-deploy without redeploying the badge contract.get_solver_registry()read view.initializeacceptssolver_registry: Option<Address>so the badge contract can be deployed before the registry is live.Changes —
reputation_badge/src/test.rs:#[should_panic]guards verifying an unknown address is rejected by both entrypoints.#513 — Add test suite for
examples/events-webhook-relayThe example shipped with zero tests despite 352 lines of non-trivial logic.
Changes —
examples/events-webhook-relay/:src/index.ts: exportloadConfig,EventRelay,main; makestop()public; addexpressAppgetter; gate top-levelmain()behind an ESM entry-point check so importing the module in tests does not start the server.src/__tests__/index.test.ts(new): 6 describe blocks, ~30 assertions covering:loadConfig— defaults, env-var overrides, numeric coercionvalidateConfig— rejects emptyCONTRACT_ID, emptyWEBHOOK_URL, invalid URL/healthshape, cursor reflection, running flag;/statscontract/webhook fieldsrelayEvent— happy path POST, retry on transient error, drop after max retries, no retry on 2xx, retry on non-2xx statuspollEvents— cursor advances on events, stays put on empty result, survives RPC failurestart/stop— flag transitionsvitest.config.ts(new): Node environment, includessrc/**/__tests__/**/*.test.ts.package.json: addedtestandtest:watchscripts; addedvitest,@vitest/coverage-v8,supertest,@types/supertesttodevDependencies.#514 — Generalize the Makefile beyond
intent_settlementmake testpreviously silently only ran tests in one of twelve crates.Changes —
Makefile:ALL_CRATES(all 12 workspace members) andWASM_CRATES(the 11cdylibcrates;vortex-commonexcluded frombuild).fmt,fmt-check,lint,test,build,audit,cleannow loop over every crate —make allis a genuine full-repo check.<crate>-fmt,<crate>-lint,<crate>-test,<crate>-build,<crate>-audit,<crate>-clean,<crate>-all) generated automatically viadefine/evalmacro; adding a new crate requires only one line inALL_CRATES.proof-registry-*block (replaced by auto-generatedproof_registry-*rules).#515 — Add CODEOWNERS entries for the eight previously uncovered crates
Changes —
.github/CODEOWNERS:Added explicit path-based entries for all eight crates that previously fell through to the generic
* @stellar-vortex-protocol/maintainersdefault:reputation_badge/src/solver-registry-reviewersgovernor/src/governance-reviewersbackstop_vault/src/intent-settlement-reviewersfee_router/src/intent-settlement-reviewersintent_periphery/src/intent-settlement-reviewerstreasury_streams/src/intent-settlement-reviewerstimelock/src/governance-reviewersvortex-common/src/maintainersTesting
reputation_badge:make reputation_badge-test(orcd reputation_badge && cargo test)events-webhook-relay:cd examples/events-webhook-relay && npm test(afternpm install)make fmt-checknow iterates all crates cleanlygit check-attr -a -- reputation_badge/src/lib.rsChecklist
fix/issues-512-513-514-515)