Security and Compliance Material Review for Unit and Component Testing: Conversation Logs and Auditing

Data comes primarily from code repository commit records, coverage reports generated by unit and component testing frameworks, Mock interface

What this category's data includes

Data comes primarily from code repository commit records, coverage reports generated by unit and component testing frameworks, Mock interface specification documents, requirement documents, and interface definition files. Data updates occur either daily or in real time alongside code commits. Daily associated documents include test cases, defect tickets, coverage reports, and similar materials. Data fields include test case ID, case execution status, Mock parameter configuration, coverage values, defect association identifiers, and more. Some fields use numerical, boolean, or text formats, with no unified fixed units.

Constraints for conversation logs and auditing workflows

Scattered data sources that update with commits require conversation logs to link to corresponding test commit IDs and case identifiers. This ensures audits can trace back to specific code changes and testing steps. Real-time update frequency requires log storage to support incremental synchronization. This avoids performance losses from full data pulls, and adapts to high-frequency test execution scenarios. Diverse daily associated documents require audit logs to cover multiple scenarios: test case execution, Mock configuration changes, defect repair associations, and more. Fields must be compatible with identifier formats from different documents. This category focuses on logic validation for individual code units or components. Audit logs must focus on interaction processes for individual test steps. This avoids including redundant integration testing data.

How to configure settings

Configuration ItemRecommended ApproachRationale
chatIdPassed with test case execution requests, bound to the corresponding case IDEnsures logs are linked to specific test cases, meets audit traceability requirements, and complies with FastGPT v4.17.0 parameter specifications
detailEnable full log modeCovers the complete interaction process of test case execution, facilitates troubleshooting failed cases and defect identification
responseChatItemIdBound to the test execution node IDLinks to interaction results for individual test steps, refines audit granularity, and accurately locates local logic issues
Maximum single log size800–1200 charactersAdapts to the text length of test case execution, avoids excessive log size impacting storage and retrieval efficiency
Log storage duration30–90 daysMatches the regression cycle of test cases and defect repair cycles, meets archiving requirements for compliance reviews
Log auto-cleanup threshold10000 log entriesPrevents excessive storage resource usage, adapts to the high-frequency execution characteristics of unit tests

Three common configuration errors

  • Phenomenon: Passing the chatId parameter during API calls does not show the corresponding identifier in backend conversation logs. Cause: The configuration switch for linking logs to chatId is disabled. The parameter is not added to audit records.
  • Phenomenon: Detailed logs for large model call failures are unavailable. Cause: The detail full log mode is not enabled. Only minimal execution status is retained. Call failure stacks and return information are not captured.
  • Phenomenon: Logs are not automatically cleaned up after exceeding the set duration. Cause: The cleanup trigger threshold is set too high. Or the automatic cleanup rule based on time is not configured. Old logs continue to occupy storage resources.

How to verify correct configuration

  • Execute a test case. Send a call request with the chatId parameter. Check if backend logs include the corresponding chatId field.
  • Send a test request for a large model call failure. Check if logs include complete call details and return content.
  • Check storage directories or the backend configuration interface. Confirm the log auto-cleanup rule has taken effect per the set duration.
  • Review audit reports. Confirm each test record links to the corresponding test case ID and commit record.

The values provided are common starting points. They should be evaluated against local deployment samples.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.