When paster setup-app is run, the ForgeChat-created ChatChannel on the default project has a channel of ''. While this works for the first time, if say, more than one project were to be created in setup-app, this would fail.
The error is a little hard to debug, as it will occur only when the session is being flushed, as a DuplicateKeyError, with no reference to ChatChannel. I thought it was about another Tool altogether (downloads) which happened to show up next in entry_points and flush.
Presumably, this is because the options created for the ForgeChat in allura.model.Project.install_app do not contain a channel value.
Possible solutions (not sure which one makes the most sense):
unique_index on ChatChanneldefault_override_options callback so that an app can make something up#<projectname> if one isn't in optionsinstall_on_setup (default True) if ForgeChat shouldn't be installed by default