Spotnet (CONCEPT D29): - Index free.pt fully and import spots with their descriptions, categories and NZBs; a spot renames its release, since Spotnet names are more trustworthy than names derived from subjects. - Find passwords in spot descriptions too, and tell "needs a password we have" from "needs a password we don't have". Content inspection: - List the contents of 7z (.7z.001) archives, SFV sets, nicovideo uploads and other archive-like files; mark yEncBin .bin containers as encrypted. - Take real names from yEnc headers for randomly named files, and merge uploads that were split across posts. Storage (D31, D32): - Store segment lists zstd-compressed behind the FileStore accessor. - group:backfill indexes older headers at low priority and pauses when the NVMe or HDD part of the database gets too large. Grouping (D35, D36): - Lone header segments wait in staged_segments until a second segment of their file arrives, which drops the per-article junk binaries. - Counter grouping joins random-subject uploads by poster, [i/M] counter, part count and day. Search and maintenance (D33, D34): - A trigram-indexed search_text column, smaller indexes, estimated stats. - Passes that clean up nonsense names; weekly index maintenance; GC budgets per kind. - Web UI: grey out stale results while a search runs and cancel superseded requests. Count only up to 1,000 matches for the page, which made filter clicks take seconds (Newznab keeps the 10,000 cap). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
1.9 KiB
TypeScript
63 lines
1.9 KiB
TypeScript
import { assert } from '@japa/assert'
|
|
import { apiClient } from '@japa/api-client'
|
|
import app from '@adonisjs/core/services/app'
|
|
import type { Config } from '@japa/runner/types'
|
|
import { pluginAdonisJS } from '@japa/plugin-adonisjs'
|
|
import { dbAssertions } from '@adonisjs/lucid/plugins/db'
|
|
import testUtils from '@adonisjs/core/services/test_utils'
|
|
import { authApiClient } from '@adonisjs/auth/plugins/api_client'
|
|
import { sessionApiClient } from '@adonisjs/session/plugins/api_client'
|
|
import type { Registry } from '../.adonisjs/client/registry/schema.d.ts'
|
|
|
|
/**
|
|
* This file is imported by the "bin/test.ts" entrypoint file
|
|
*/
|
|
declare module '@japa/api-client/types' {
|
|
interface RoutesRegistry extends Registry {}
|
|
}
|
|
|
|
/**
|
|
* This file is imported by the "bin/test.ts" entrypoint file
|
|
*/
|
|
|
|
/**
|
|
* Configure Japa plugins in the plugins array.
|
|
* Learn more - https://japa.dev/docs/runner-config#plugins-optional
|
|
*/
|
|
export const plugins: Config['plugins'] = [
|
|
assert(),
|
|
pluginAdonisJS(app),
|
|
dbAssertions(app),
|
|
apiClient(),
|
|
sessionApiClient(app),
|
|
authApiClient(app),
|
|
]
|
|
|
|
/**
|
|
* Configure lifecycle function to run before and after all the
|
|
* tests.
|
|
*
|
|
* The setup functions are executed before all the tests
|
|
* The teardown functions are executed after all the tests
|
|
*/
|
|
export const runnerHooks: Required<Pick<Config, 'setup' | 'teardown'>> = {
|
|
setup: [],
|
|
teardown: [
|
|
// Tests that complete a file queue jobs; their Redis connections would keep the process alive.
|
|
async () => {
|
|
const { default: QueueService } = await import('#services/QueueService')
|
|
await QueueService.closeAll()
|
|
},
|
|
],
|
|
}
|
|
|
|
/**
|
|
* Configure suites by tapping into the test suite instance.
|
|
* Learn more - https://japa.dev/docs/test-suites#lifecycle-hooks
|
|
*/
|
|
export const configureSuite: Config['configureSuite'] = (suite) => {
|
|
if (['browser', 'functional', 'e2e'].includes(suite.name)) {
|
|
return suite.setup(() => testUtils.httpServer().start())
|
|
}
|
|
}
|