Giter VIP home page Giter VIP logo

courtbot-engine's People

Contributors

ashlux avatar chriswsh avatar faeranne avatar pipakin avatar toddkirk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

courtbot-engine's Issues

Unit Tests Should Simulate Network Latency

The way they're written, unit tests do not currently simulate network latency. They should, if only to test for improperly handled race conditions in higher-level modules.

[Aside: Because the calls to the event handlers are synchronous/blocking, it's possible that poorly written data modules could stall execution of server code for an indeterminate amount of time.

As far as making sure data sources put Promises into return.promises, my instinct is to make that explicit in the unit testing for the data sources themselves, and have a soft assert that all data modules which handle retrieve-parties and retrieve-party-events must do this. Am I missing anything here?]

(Edited: the functions don't return promises, they put them into the result.promises Array. Updated to reflect that.)

Handle partial failures in getCaseParties/Events.

We should decide how to handle partial failures (one data service fails to retrieve but others succeed). We should, at minimum:

  1. Log all errors to log4js
  2. Continue with the partial data we DO have.

It might be nice to advise the user somehow that we can't retrieve data correctly? A status page would be nice to. Maybe collect failures and show some sort of health indicator?

Default messages should be provided by courtbot-engine

Move the default messaging out of courtbot into courtbot-engine. Add events to allow the user to hook in and change messages if they want to. This could allow us to create modules like

  • courtbot-engine-messaging-spanish

etc.

scrubObject in utils.js does not fully sanitize objects

When scrubbing an object, scrubObject() still calls any getter functions that are attached to enumerable properties. This could include random code that was passed in earlier.

Given how the default options are used in the engine, is this worth addressing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.