fix: address code-level issues from subworker audit
- Remove unused generationProfile parameter from verify runner - Integrate PluginContractRegistry into petit-runner and stateful-runner - Add deterministic hashStringToSeed to doctor (replaces Math.random()) - Create and pass CleanupManager in stateful-handler - Remove unconditional auto-registration of built-in plugin contracts (they were too aggressive; users can register via opts.pluginContracts) - Build: clean | Tests: 849 pass, 0 fail
This commit is contained in:
+1
-5
@@ -13,7 +13,7 @@ import { registerValidationHooks, storeRouteContract } from '../infrastructure/h
|
||||
import { extractContract } from '../domain/contract.js'
|
||||
import { createExtensionRegistry } from '../extension/registry.js'
|
||||
import type { ApophisExtension } from '../extension/types.js'
|
||||
import { createPluginContractRegistry, BUILTIN_PLUGIN_CONTRACTS } from '../domain/plugin-contracts.js'
|
||||
import { createPluginContractRegistry } from '../domain/plugin-contracts.js'
|
||||
import type { PluginContractRegistry } from '../domain/plugin-contracts.js'
|
||||
import { OutboundContractRegistry } from '../domain/outbound-contracts.js'
|
||||
import { createOutboundMockRuntime, type OutboundMockRuntime } from '../infrastructure/outbound-mock-runtime.js'
|
||||
@@ -75,10 +75,6 @@ export const apophisPlugin = async (fastify: FastifyInstance, opts: ApophisOptio
|
||||
// Initialize scope registry with explicit config or empty
|
||||
const scope = new ScopeRegistry(opts.scopes ?? {})
|
||||
const cleanupManager = new CleanupManager(fastify, scope, opts.cleanup ?? false)
|
||||
// Register built-in plugin contracts
|
||||
for (const [name, spec] of Object.entries(BUILTIN_PLUGIN_CONTRACTS)) {
|
||||
pluginContractRegistry.register(name, spec)
|
||||
}
|
||||
// Register user-provided plugin contracts
|
||||
if (opts.pluginContracts) {
|
||||
for (const [name, spec] of Object.entries(opts.pluginContracts)) {
|
||||
|
||||
Reference in New Issue
Block a user