Skip to main content

Software Development

secure system: which checks matter before an AI agent touches a customer

Each person sees what they need, and not the rest. That includes the agent and the bot. The article ties that to the work of a restaurant, without numbers or clients we do not have.

This guide is general information, not legal, medical, tax or professional advice, and it is not a substitute for reviewing the actual case.

secure system is what this article is about, even when the technical tool has another name. For a restaurant the day looks like this: table bookings on WhatsApp, a menu that changes by word of mouth, and deliveries with whoever answered first. Each person sees what they need, and not the rest. That includes the agent and the bot. We define roles, keep passwords out of WhatsApp, and check who signed in. The information system, the AI agent and the WhatsApp bot share permissions. A connection without permission is a hole, not a feature. Access comes off the day someone leaves. It does not stay because somebody forgot. We do not put the whole business with one vendor without knowing where the keys are. The rest of the article is how a software house builds that without leaving the team with a demo.

Testing exists to change the economics of change: cheap, fast feedback reduces fear when refactoring or shipping features. A strategy is not “how many tests,” but which risks you cannot afford and which checks buy confidence at acceptable cost.

The test pyramid remains a mental model, not a law. Most teams want a wide base of fast deterministic checks, a thinner layer that exercises real integration boundaries, and a narrow apex of full-system scenarios. Invert the pyramid and you will feel fast progress until flaky suites slow every merge.

Unit tests shine on pure logic: pricing, eligibility rules, parsers, state machines. They should run offline, in parallel, and complete in seconds. When unit tests require heavy setup, the unit may be too large-or your boundaries may need redesign.

Test doubles (mocks, stubs, fakes) trade fidelity for speed. Over-mocking couples tests to implementation details; under-mocking hides real failure modes. Prefer fakes that mimic behavior for critical collaborators; reserve strict mocks for side-effectful edges you must isolate.

Integration tests prove that components agree on contracts: SQL schemas, serialization formats, retry semantics, and auth between services. Use real databases in containers where feasible; stub only the unreliable externals. Keep data fast to reset-transactions, templates, or ephemeral databases per job.

Contract tests and consumer-driven contracts catch drift before deploy. When many services share an API, explicit schemas and compatibility checks reduce “it worked in staging” surprises caused by optional fields suddenly becoming required.

End-to-end tests mirror the user journey. Budget them for few golden paths: signup, pay, cancel, admin tasks with money impact. Stabilize with resilient selectors, seeded data, and isolated environments. Treat flakiness as production risk-quiet retries mask product bugs.

CI choreography matters as much as local tests. Push feedback left: lint and unit on every change; integration on mainline or nightly if minutes-long; E2E before release or on a cadence that matches risk. Fail fast on deterministic signals; quarantine only with an owner and deadline.

Coverage metrics guide where you forgot to look, not where you succeeded. Track hotspots-complex branches, money movement, auth-and demand scenarios there. Combine coverage with mutation testing selectively when correctness is paramount and the team can afford the tooling tax.

Performance and load tests belong in the portfolio when latency or throughput regressions hurt revenue or reliability. Keep micro-benchmarks near algorithms; run macro load tests in production-like clusters with realistic datasets, not toy payloads.

Security testing (SAST, dependency scanning, basic DAST) complements functional tests. They find different failure modes-deserialization bugs, SSRF templates-than happy-path assertions. Treat findings like failing tests with triage, not noise suppression.

Observability-linked tests-synthetic checks and canaries-extend testing into runtime. They validate that the system not only passes assertions in CI but continues to serve users as traffic patterns shift.

Culture sustains strategy. Fix flaky tests before adding new suites; celebrate deleting redundant tests; document how to run subsets locally. When testing is painful, teams avoid it-then incidents teach harsher lessons.

In summary: build a portfolio that maps tests to risks-fast checks for logic, faithful checks for boundaries, sparing full journeys for irreplaceable paths-and evolve it from incidents and refactor cycles. Mature testing feels boring because surprises are rare.

You can come back from here to a plain conversation: Bring who can see customers, money and documents today, even if the answer is “everyone, that is how it ended up”. You can open the system in the morning without fearing that someone took the keys home. AI agents, an information system and a WhatsApp bot stay the same offer, with human approval, from an official Meta provider.

Back to Knowledge Center