<commit_before># v0.5.0+ ?

- [ ] MF task kernel integration
- [ ] Cascading store.Delete / store.Update?
- [ ] Map TODOs to Github Issues?
- [ ] Map TODOs to SG streams / items?
- [ ] Multi-part Stream receives

# v0.4.0 ?

- [ ] Versioned REST API?
- [ ] Apple / etc Push API?
- [ ] Distributed storage?
  - [ ] If so, MUST revise Surv / Resp rivers!!!
- [ ] Cassandra / etc bigtable backend?
- [ ] Offer River connections besides Websocket?
- [ ] Consider package-global caching optimizations to things such as
      user ID hashes

# v0.3.0 ?

- [ ] Refactor Streams database funcs
  - [ ] Marshal, Unmarshal, Delete, Get etc. take multi bolt Buckets
- [ ] Secure ticket "incept" endpoint (can you just hammer it with UUIDs?)
- [ ] Concurrent store.Wrap?
- [ ] Concurrent store.Wrap with dep chains?
- [ ] Dep chains?
- [ ] DB interface + cache?
- [ ] Optimize buckets / transactions in packages?  Pass needed behaviors
   through store package?  NewTickets, etc. inefficient
- [ ] Store.WrapBucket(store.Bucket(...), ...Transact)
- [ ] Decide about capnproto / protobuf for Bolt / Rivers
- [ ] Read-only Streams
- [ ] Finer-grained read authorization, public / private / circles?
- [ ] Only one notification stream exists per user
- [ ] Package user can specify how it works
- [ ] Consider using a salted hash for stream topics
- [ ] Consider globally buffering all streams

# v0.2.0 ?

- [ ] Notif global Topic
- [ ] Decide whether auth.Refresh should delete and exchange the given refresh token
- [ ] "Friendly UUIDs" -- map 4-bit chunks to phonemes or small words?
- [ ] "HTTP Errors" -- this is really two problems.
  - [ ] 1. JSON-serialized form errors that can be used to indicate problems
       in a context-friendly way
  - [ ] 2. HTTP error codes which have some relevance to the API user to help
       clarify what went wrong without passing forward sensitive data.
- [ ] Better database testing -- maybe a memory mapped file or some other
      option so our setups / teardowns don't have to thrash the filesystem.
- [ ] Testable rest.Bind
- [ ] Maybe a database mock?
- [ ] Caching database wrapper
- [ ] Use bolt batch
- [ ] Bucket threading
- [ ] Transaction type to replace func tx blah
- [ ] Better ErrorMissing / ErrorExists context messages
  - [ ] HTTP / Display Error interface which has Code and Message suitable for users
  - [ ] ValidationError interface which tells the client what keys / etc are wrong?
- [ ] Figure out whether we can find a logical mapping for UUID / base64
      shasum strings
- [ ] Notification topic performance
  - [ ] Individual publishers for GUIDs instead of API-global
    - [ ] Group.Hash -> GUID unique by users (?)
	- [ ] Create and destroy Group pub rivers on Group update
	- [ ] API pub river publishes to GUID subscribers, GUIDs publish to
	      their subscribers (???)
	- [ ] Clarify this API / sketch up some tests

# v0.1.0

## Bugs

- [ ] Users can't understand missing session Error() string since it's bytes
  - [ ] Configure error output to match expected values: base64 shasums or
        UUID strings
- [ ] Invalidate / reissue auth token after refresh
  - [ ] Figure out how to thread session context through this

## Dev mode

- [ ] Specify me
- [ ] No database?
- [ ] Use given mock file as initial store?
- [ ] Expose endpoints without sessions?
- [ ] Default superuser logins given?

## Unorganized

- [x] The design of Rivers must support a future implementation which
      permits the API to use req/rep Rivers to control the behavior of
	  receivers.
- [x] Reorganize streams package with more abstraction
- [x] Standardize on JSON camelCase vs snake_case etc

- [ ] Organize TODOs

- [ ] Remove self from stream / convo if you don't want to be in it,
      even if you don't own it.
- [ ] Redesign streams / hangup event chains
- [ ] Don't encode the same resource over and over for notifs.
- [ ] No way of cleaning up failed Scribes
- [ ] REST resources as interface / code gen?
- [ ] Tighten up convo message funcs
- [ ] Make convo message blocks
- [ ] Test convo message db funcs
- [ ] Messages keyed by ID instead of date
  - [ ] Migration for this?
- [ ] Test notif hangups
- [ ] Make a helper function to make hangups easier to use.
- [ ] ws.HangupSender a horrible mess.  Do something better, for the
      love of God!
- [ ] REST Stream tests brittle
- [ ] Survey response errors need a useful error implementation.
- [ ] Swagger HTTP API doc
- [ ] Poms / some kind of work measure
- [ ] Some kind of psych features
- [ ] Make a decision on Rust
- [ ] Switch to encoding/gob instead of JSON on the backend and benchmark it
  - [ ] Why not protobuf, msgpack, colfer, capnproto?
  - [ ] Some other dynamic schema?
  - [ ] Make a simple call and defer this decision.
- [ ] "store" package tests
- [ ] Make a call about frontend hashing.  Do we really want to?
      Not really secure unless salted, and even then it's "just another password".
- [ ] https://cdn.jsdelivr.net/sjcl/1.0.4/sjcl.js for browser
      http://jsfiddle.net/kRcNK/40/
- [ ] Scour for cases where Put or Marshal could fail and return credentials
  - [ ] ???
- [ ] Return x.ErrMissing, not store.ErrMissing, in Unmarshal cases
- [ ] User logout by uname + pwhash (DELETE /tokens ?)
  - [x] Lookup from username to session
- [ ] Users can GET /streams with search parameters
- [ ] More streams abstraction (better Filters, IsMember, etc. moved into package API)
- [ ] Make plan to reduce / eliminate rest.Stream API redundancy
  - [ ] ???
- [ ] Make plan to reduce all rest redundancy
- [ ] Chat endpoint which uses rest.ConnectStream with a river.Messager under the hood!
- [ ] Sanely handle stream errors
- [ ] Thoroughly test ws package
- [ ] client package uses custom HTTP client instead of global

# v0.0.1

## Bugs

- [x] Fix Windows timestamp UUID generation (use uuid.NewV4)
- [x] Fix Windows startup BoltDB panic (nil transaction or db?)
- [x] body of POST to /incept/:ticket must include pwhash field
- [x] AuthAdmin expects base64 hashed sha256 of auth.Token (uuid Bytes)
- [x] Admin API key stored insecurely, must hash + salt first
  - [x] Report base64 encoded value
- [x] Can't log out because session is not URL-encoded
- [x] River Bind never returns, so River is never cleaned up
- [x] Fix failing or blocking tests
- [x] Bus and Sub Rivers must never overwrite existing IDs
- [x] river.Surveyor and river.Respondent require a slight pause between
      Dial and usage.  Data race found due to mangos Init!
	  https://github.com/go-mangos/mangos/issues/236
- [x] Convo message parse errors are NOT sent to the websocket!
- [x] Convo Delete does not do anything if no errors.
- [x] Stream Delete does not do anything if no errors.
- [x] Convo connect/disconnect notifs don't specify convo ID.
- [x] Stream connect/disconnect notifs don't specify stream ID.
- [x] Stream Put does not require the user to own the Stream.
- [x] Convo Put does not require the user to own the Convo.
- [x] Convo Messages GET has incorrect range
- [x] Convo delete notif should not use stream delete
- [x] 404 on empty messages, should be populated on convo create.
- [x] Convo Delete should hang up Scribe and users.
- [x] Stream Delete should hang up users.
- [x] Convo Delete should remove Scribe checkins bucket.
- [x] Convo Delete should remove convo's messages bucket.
- [x] Convo Delete should have correct auth error message on DELETE.
- [x] Convo.Bind should never silently drop an error on NewPub.
- [x] convo.Scribe.DeleteCheckins should not panic if the Checkins
      bucket is missing; this is normal and means no checkins exist yet.
- [x] If user tries to check out of deleted convo (i.e. closes websocket), fatal error occurs:
  > failed to check out of convo: no such bucket `81c4b367-7cd0-46a1-90d0-618fb5c790b8`
- [x] Empty GET on /convos should return [], not null
- [x] Notifs arrive with contents base64-encoded
- [ ] Old Bus buckets should be deleted after the convo or stream is deleted.o
- [ ] Diagnose occasional test failures in RiverSuite.TestNewBus
- [ ] Convo / Stream PUT which removes users must also hang them up.
- [ ] Potential races, e.g. on Convo DELETE with Surveys.
- [ ] Better testing of REST resource security.
- [ ] Deleting the user's profile doesn't close his Streams.
- [ ] Surveyor / Respondent don't keep track of who's still alive.  If a
      Responder removes itself from its bucket, the Survey will fail.
- [ ] If a survey has a problem, responders are in an unknown state.
- [ ] Refresh tokens must be concatenated to auth tokens in header
- [ ] Refresh tokens must not zombify expired auth tokens, instead<commit_msg>Update TODO for convo hangup bugfix<commit_after># v0.5.0+ ?

- [ ] MF task kernel integration
- [ ] Cascading store.Delete / store.Update?
- [ ] Map TODOs to Github Issues?
- [ ] Map TODOs to SG streams / items?
- [ ] Multi-part Stream receives

# v0.4.0 ?

- [ ] Versioned REST API?
- [ ] Apple / etc Push API?
- [ ] Distributed storage?
  - [ ] If so, MUST revise Surv / Resp rivers!!!
- [ ] Cassandra / etc bigtable backend?
- [ ] Offer River connections besides Websocket?
- [ ] Consider package-global caching optimizations to things such as
      user ID hashes

# v0.3.0 ?

- [ ] Refactor Streams database funcs
  - [ ] Marshal, Unmarshal, Delete, Get etc. take multi bolt Buckets
- [ ] Secure ticket "incept" endpoint (can you just hammer it with UUIDs?)
- [ ] Concurrent store.Wrap?
- [ ] Concurrent store.Wrap with dep chains?
- [ ] Dep chains?
- [ ] DB interface + cache?
- [ ] Optimize buckets / transactions in packages?  Pass needed behaviors
   through store package?  NewTickets, etc. inefficient
- [ ] Store.WrapBucket(store.Bucket(...), ...Transact)
- [ ] Decide about capnproto / protobuf for Bolt / Rivers
- [ ] Read-only Streams
- [ ] Finer-grained read authorization, public / private / circles?
- [ ] Only one notification stream exists per user
- [ ] Package user can specify how it works
- [ ] Consider using a salted hash for stream topics
- [ ] Consider globally buffering all streams

# v0.2.0 ?

- [ ] Notif global Topic
- [ ] Decide whether auth.Refresh should delete and exchange the given refresh token
- [ ] "Friendly UUIDs" -- map 4-bit chunks to phonemes or small words?
- [ ] "HTTP Errors" -- this is really two problems.
  - [ ] 1. JSON-serialized form errors that can be used to indicate problems
       in a context-friendly way
  - [ ] 2. HTTP error codes which have some relevance to the API user to help
       clarify what went wrong without passing forward sensitive data.
- [ ] Better database testing -- maybe a memory mapped file or some other
      option so our setups / teardowns don't have to thrash the filesystem.
- [ ] Testable rest.Bind
- [ ] Maybe a database mock?
- [ ] Caching database wrapper
- [ ] Use bolt batch
- [ ] Bucket threading
- [ ] Transaction type to replace func tx blah
- [ ] Better ErrorMissing / ErrorExists context messages
  - [ ] HTTP / Display Error interface which has Code and Message suitable for users
  - [ ] ValidationError interface which tells the client what keys / etc are wrong?
- [ ] Figure out whether we can find a logical mapping for UUID / base64
      shasum strings
- [ ] Notification topic performance
  - [ ] Individual publishers for GUIDs instead of API-global
    - [ ] Group.Hash -> GUID unique by users (?)
	- [ ] Create and destroy Group pub rivers on Group update
	- [ ] API pub river publishes to GUID subscribers, GUIDs publish to
	      their subscribers (???)
	- [ ] Clarify this API / sketch up some tests

# v0.1.0

## Bugs

- [ ] Users can't understand missing session Error() string since it's bytes
  - [ ] Configure error output to match expected values: base64 shasums or
        UUID strings
- [ ] Invalidate / reissue auth token after refresh
  - [ ] Figure out how to thread session context through this

## Dev mode

- [ ] Specify me
- [ ] No database?
- [ ] Use given mock file as initial store?
- [ ] Expose endpoints without sessions?
- [ ] Default superuser logins given?

## Unorganized

- [x] The design of Rivers must support a future implementation which
      permits the API to use req/rep Rivers to control the behavior of
	  receivers.
- [x] Reorganize streams package with more abstraction
- [x] Standardize on JSON camelCase vs snake_case etc

- [ ] Organize TODOs

- [ ] Remove self from stream / convo if you don't want to be in it,
      even if you don't own it.
- [ ] Redesign streams / hangup event chains
- [ ] Don't encode the same resource over and over for notifs.
- [ ] No way of cleaning up failed Scribes
- [ ] REST resources as interface / code gen?
- [ ] Tighten up convo message funcs
- [ ] Make convo message blocks
- [ ] Test convo message db funcs
- [ ] Messages keyed by ID instead of date
  - [ ] Migration for this?
- [ ] Test notif hangups
- [ ] Make a helper function to make hangups easier to use.
- [ ] ws.HangupSender a horrible mess.  Do something better, for the
      love of God!
- [ ] REST Stream tests brittle
- [ ] Survey response errors need a useful error implementation.
- [ ] Swagger HTTP API doc
- [ ] Poms / some kind of work measure
- [ ] Some kind of psych features
- [ ] Make a decision on Rust
- [ ] Switch to encoding/gob instead of JSON on the backend and benchmark it
  - [ ] Why not protobuf, msgpack, colfer, capnproto?
  - [ ] Some other dynamic schema?
  - [ ] Make a simple call and defer this decision.
- [ ] "store" package tests
- [ ] Make a call about frontend hashing.  Do we really want to?
      Not really secure unless salted, and even then it's "just another password".
- [ ] https://cdn.jsdelivr.net/sjcl/1.0.4/sjcl.js for browser
      http://jsfiddle.net/kRcNK/40/
- [ ] Scour for cases where Put or Marshal could fail and return credentials
  - [ ] ???
- [ ] Return x.ErrMissing, not store.ErrMissing, in Unmarshal cases
- [ ] User logout by uname + pwhash (DELETE /tokens ?)
  - [x] Lookup from username to session
- [ ] Users can GET /streams with search parameters
- [ ] More streams abstraction (better Filters, IsMember, etc. moved into package API)
- [ ] Make plan to reduce / eliminate rest.Stream API redundancy
  - [ ] ???
- [ ] Make plan to reduce all rest redundancy
- [ ] Chat endpoint which uses rest.ConnectStream with a river.Messager under the hood!
- [ ] Sanely handle stream errors
- [ ] Thoroughly test ws package
- [ ] client package uses custom HTTP client instead of global

# v0.0.1

## Bugs

- [x] Fix Windows timestamp UUID generation (use uuid.NewV4)
- [x] Fix Windows startup BoltDB panic (nil transaction or db?)
- [x] body of POST to /incept/:ticket must include pwhash field
- [x] AuthAdmin expects base64 hashed sha256 of auth.Token (uuid Bytes)
- [x] Admin API key stored insecurely, must hash + salt first
  - [x] Report base64 encoded value
- [x] Can't log out because session is not URL-encoded
- [x] River Bind never returns, so River is never cleaned up
- [x] Fix failing or blocking tests
- [x] Bus and Sub Rivers must never overwrite existing IDs
- [x] river.Surveyor and river.Respondent require a slight pause between
      Dial and usage.  Data race found due to mangos Init!
	  https://github.com/go-mangos/mangos/issues/236
- [x] Convo message parse errors are NOT sent to the websocket!
- [x] Convo Delete does not do anything if no errors.
- [x] Stream Delete does not do anything if no errors.
- [x] Convo connect/disconnect notifs don't specify convo ID.
- [x] Stream connect/disconnect notifs don't specify stream ID.
- [x] Stream Put does not require the user to own the Stream.
- [x] Convo Put does not require the user to own the Convo.
- [x] Convo Messages GET has incorrect range
- [x] Convo delete notif should not use stream delete
- [x] 404 on empty messages, should be populated on convo create.
- [x] Convo Delete should hang up Scribe and users.
- [x] Stream Delete should hang up users.
- [x] Convo Delete should remove Scribe checkins bucket.
- [x] Convo Delete should remove convo's messages bucket.
- [x] Convo Delete should have correct auth error message on DELETE.
- [x] Convo.Bind should never silently drop an error on NewPub.
- [x] convo.Scribe.DeleteCheckins should not panic if the Checkins
      bucket is missing; this is normal and means no checkins exist yet.
- [x] If user tries to check out of deleted convo (i.e. closes websocket), fatal error occurs:
  > failed to check out of convo: no such bucket `81c4b367-7cd0-46a1-90d0-618fb5c790b8`
- [x] Empty GET on /convos should return [], not null
- [x] Notifs arrive with contents base64-encoded
- [x] Fatal race in convo Scribe hangup on DELETE
- [ ] Old Bus buckets should be deleted after the convo or stream is deleted.o
- [ ] Diagnose occasional test failures in RiverSuite.TestNewBus
- [ ] Convo / Stream PUT which removes users must also hang them up.
- [ ] Potential races, e.g. on Convo DELETE with Surveys.
- [ ] Better testing of REST resource security.
- [ ] Deleting the user's profile doesn't close his Streams.
- [ ] Surveyor / Respondent don't keep track of who's still alive.  If a
      Responder removes itself from its bucket, the Survey will fail.
- [ ] If a survey has a problem, responders are in an unknown state.
- [ ] Refresh tokens must be concatenated to auth tokens in header
- [ ] Refresh tokens must not zombify expired auth tokens, instead
{'fraction_non_alphanumeric': 0.0879025741659933, 'fraction_numerical': 0.007849474777790603, 'mean_word_length': 3.1923542221146866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '427055', 'n_tokens_mistral': 5213, 'n_tokens_neox': 4974, 'n_words': 2339}