Skip to content

fix: resolve issues #84, #85, #86, #87 - #150

Merged
udoyechinenyevictoria merged 2 commits into
Esureorg:mainfrom
miryatukura-jpg:fix/issues-84-85-86-87
Oct 22, 2026
Merged

udoyechinenyevictoria merged 2 commits into
Esureorg:mainfrom
miryatukura-jpg:fix/issues-84-85-86-87

Conversation

@miryatukura-jpg

Copy link
Copy Markdown

Summary

This PR addresses four backend issues in esure-backend.

#84 — Attach explicit subject references to assertion results

Added optional account, asset, and step fields to AssertionResult in domain.ts. The evaluateAssertion method in stellar-gateway.ts now populates these fields from the assertion definition for every assertion variant. No generated secrets or raw account objects are included; only the logical IDs from the scenario definition are copied.

#85 — Keep liveness probes independent of application request quotas

The onRequest hook in app.ts now exempts GET /health from the global rate limiter. All other routes (including GET /ready and all run/catalogue routes) retain their existing limits. A comment documents why readiness (/ready) is not exempted: it performs a database check whose cost should count against the caller's quota, and its failure mode (503 "unavailable") is meaningfully different from a 429 liveness false-alarm.

#86 — Reserve the generated fund-accounts step identifier

scenario-schema.ts now defines a RESERVED_STEP_IDS set (currently {"fund-accounts"}) and rejects any user step whose id collides with a reserved identifier before any network activity occurs. The error message identifies the conflicting step ID and advises renaming it. The reserved-ID set is documented so future runner-generated steps can extend it safely.

#87 — Make canonical JSON ordering independent of locale

canonicalJson in scenario-loader.ts now sorts object keys with a locale-independent byte-order comparison (< / >) instead of localeCompare. The new ordering is equivalent to RFC 7159 / ECMA-404 code-unit order and is stable across all JavaScript runtimes regardless of host locale or ICU collation data. A compatibility note documents that existing persisted hashes are unaffected because all built-in scenario keys are lowercase ASCII.

Closes

Closes #84
Closes #85
Closes #86
Closes #87

🤖 Generated with Claude Code

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@miryatukura-jpg 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! 🚀

Learn more about application limits

@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

@KingFRANKHOOD is attempting to deploy a commit to the Favour Chigozirim's projects Team on Vercel.

A member of the Team first needs to authorize it.

…eserve fund-accounts step id, fix canonical JSON ordering

- Issue Esureorg#84: add optional account/asset/step fields to AssertionResult,
  populated from the assertion definition via withSubjectRefs() in the
  gateway so clients can identify assertion targets without re-parsing
  the scenario.

- Issue Esureorg#85: skip the onRequest rate-limiter for GET /health so liveness
  probes remain reachable even when a client address has exhausted its
  application quota. All other routes, including /ready, remain covered.

- Issue Esureorg#86: add RESERVED_STEP_IDS set (containing "fund-accounts") and
  reject any user-defined step that collides with a runner-owned id
  during scenario validation, preventing ambiguous report identifiers.

- Issue Esureorg#87: replace localeCompare with a plain Unicode code-unit
  comparator in canonicalJson so key ordering is deterministic across
  all host locales and ICU collation environments. ASCII-only field
  names are unaffected, keeping existing stored hashes valid.
@udoyechinenyevictoria
udoyechinenyevictoria merged commit 927fa28 into Esureorg:main Oct 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants