test(FN-1414): add run-audit integration tests for core and engine
- Add core run-audit integration regression tests covering task activity logging - Add engine run-audit integration tests covering executor lifecycle and mutations - Stabilize run-audit ordering with inline comments for deterministic behavior - Update memory with run-audit testing learnings and patterns - Fix test naming and use valid GitMutationType in tests
This commit is contained in:
@@ -194,8 +194,15 @@ export function createRunAuditor(store: TaskStore, context: EngineRunContext | n
|
||||
},
|
||||
|
||||
database: async (input: DatabaseAuditInput) => {
|
||||
// Infer taskId from target when it looks like a task ID (FN-*, KB-*).
|
||||
// This handles cases like "task:update" where target is the task ID itself,
|
||||
// falling back to context.taskId when target is not a task ID (e.g., document keys).
|
||||
const inferredTaskId = input.target.startsWith("FN-") || input.target.startsWith("KB-")
|
||||
? input.target
|
||||
: context.taskId;
|
||||
|
||||
const eventInput: RunAuditEventInput = {
|
||||
taskId: input.target.startsWith("FN-") || input.target.startsWith("KB-") ? input.target : context.taskId,
|
||||
taskId: inferredTaskId,
|
||||
agentId: context.agentId,
|
||||
runId: context.runId,
|
||||
domain: "database",
|
||||
|
||||
Reference in New Issue
Block a user