[{"content":"A security dashboard has an ugly performance profile. One page load fans out into dozens of expensive operations: summary cards, trends, per-source charts, alert counts, filters, exports, and live updates. If each request loads broad tables and builds its own cache, the dashboard becomes the incident it was supposed to report. Scale failures like this are rarely fixed by a bigger container. They are fixed by bounding each request and treating shared state as something with a lifecycle.\nUnbounded work is the first suspect The classic culprit looks harmless at small volume:\nload all rows -\u0026gt; deserialize -\u0026gt; filter in application code -\u0026gt; summarize Memory use grows with the entire result set, and it multiplies with concurrent users, especially when one page fires several of these at once. If you are tempted to raise a memory limit to stop out-of-memory kills, go looking for queries like this first.\nThe pattern I prefer:\napply tenant and time bounds -\u0026gt; aggregate in the database -\u0026gt; return a bounded response Databases are built to group, filter, sort, and window large datasets. The application should receive the summary it needs, not every row that could contribute to it. While you are there, check that the columns you filter and sort on are actually indexed. A missing index turns a bounded query back into a full scan.\nMake bounds part of the API contract Limits are not a late optimization. They belong in the contract:\nEvery list endpoint has a maximum page size, deterministic ordering, and scoped filters. Every dashboard endpoint has a defined time range, a tenant context, and a cap on buckets or categories. Every export that cannot safely finish inside an interactive request gets an asynchronous path. Beyond performance, this makes UI behavior predictable, gives load tests a stable target, and makes it easy to explain why a user saw a partial or paginated result.\nCache the work, not the leak Caches usually arrive after someone notices a slow endpoint. That helps, but an unbounded cache is just another memory problem. A few rules:\nKey by tenant and every input that changes the result. Use short, deliberate TTLs for volatile posture summaries. Cap the number of keys and locks that arbitrary request parameters can create. Make a miss safe: it should trigger a bounded query, not an unbounded rebuild. Clean up coordination state when work finishes. That last point matters for request coalescing. Collapsing identical in-flight requests is great when many users ask for the same expensive summary. But if you keep a lock around for every key you have ever seen, the coalescer itself leaks.\nReal-time needs a budget Live updates turn periodic server work into a multiplier. If every connected browser recomputes the same summary, work grows with audience. Compute a shared, tenant-scoped update on a controlled schedule, serve it from a bounded cache, and give each connection a timeout and a cancellation path. Decide how much work you will spend per update cycle before you start the next one. Real-time is not a license for unlimited concurrency.\nTest the whole interaction Load-testing one API route misses what users actually do. A real dashboard load issues concurrent requests while it opens a live connection and fills multiple charts. So test that path:\nAuthenticate as a realistic role and tenant. Load the summary, trends, and source views together. Open the live connection. Repeat with concurrent users and representative data volume. Watch memory growth, latency percentiles, errors, and cache and connection behavior. The goal is not a fast first page. It is flat memory and predictable latency over sustained use.\nTakeaway When a dashboard struggles, bound the queries, aggregate where the data lives, check the indexes, cap and expire your caches, budget your real-time work, and load test the full path. A dashboard that times out during an incident undermines trust in every number on it, so treat performance as a property you verify, not something a quiet dev environment proves.\n","permalink":"https://www.shadowtest.dev/notes/stabilizing-a-security-dashboard-under-load/","summary":"\u003cp\u003eA security dashboard has an ugly performance profile. One page load fans out into dozens of expensive operations: summary cards, trends, per-source charts, alert counts, filters, exports, and live updates. If each request loads broad tables and builds its own cache, the dashboard becomes the incident it was supposed to report. Scale failures like this are rarely fixed by a bigger container. They are fixed by bounding each request and treating shared state as something with a lifecycle.\u003c/p\u003e","title":"Bound Every Query: Keeping a Security Dashboard Alive Under Load"},{"content":"Stale documentation has always cost teams time. With AI agents in the loop it also costs you correctness, because an agent that finds an authoritative-looking document will repeat its claims with full confidence, even when the document describes an architecture that was retired a year ago.\nDrift changes decisions I do not worry about typos. I worry about an outdated statement that changes an implementation decision. Some patterns I would expect in any team:\nA release summary calls a feature \u0026ldquo;production ready\u0026rdquo; with no current deployment evidence behind it. An old plan still names a branch as the baseline after the team moved on. A checklist written for a one-off demo is treated as an active roadmap. An access document implies a capability that was never validated in the current environment. A human reader might sense something is off. An agent usually will not. It will optimize for the wrong version, rebuild work that was already retired, or write down an unverified capability as if it existed.\nTreat lifecycle as metadata The cheapest defense is making every important document declare where it is in its life:\nActive: current guidance for operating or implementing. Historical: retained for context and evidence, not an instruction. Superseded: replaced, and names its successor. Archived: out of active navigation, kept for audit. Put that at the top of the file, not in a repository convention that only insiders know. It becomes a routing rule an agent can follow: active documents guide work, historical documents explain why earlier choices were made.\nArchive instead of merely warning A warning banner helps, but a finished plan sitting in the active directory is still easy to find and easy to trust. Moving completed initiatives, old assessments, and superseded roadmaps into an archive changes what both humans and agents stumble across.\nKeep the active index pointing at the current plan. Keep an archive index that says what moved, why, and what replaced it. That gives you navigable history instead of a pile of ambiguous files.\nGive claims a verification hook For any claim that matters operationally, the document should say what could verify it:\na release or deployment reference; a branch and commit baseline; a test suite or contract test; a migration revision; an infrastructure definition; an accountable owner and a review date. With those in place, an agent, or a person, can tell the difference between \u0026ldquo;this was true in March\u0026rdquo; and \u0026ldquo;this is true because the deployment and current evidence say so.\u0026rdquo;\nTakeaway Documentation is part of the context window your AI works from. If that context is stale, you get unsafe confidence at high speed. Declaring lifecycle, archiving finished work, and attaching evidence to important claims are not cosmetic chores; they are controls on how an agent reasons about your system.\n","permalink":"https://www.shadowtest.dev/notes/documentation-drift-is-an-ai-safety-problem/","summary":"\u003cp\u003eStale documentation has always cost teams time. With AI agents in the loop it also costs you correctness, because an agent that finds an authoritative-looking document will repeat its claims with full confidence, even when the document describes an architecture that was retired a year ago.\u003c/p\u003e","title":"Documentation Drift Is an AI Safety Problem"},{"content":"Generated code often looks finished before it has earned trust: it has imports, comments, types, tests, and a tidy diff. The right response is neither blanket rejection nor blanket acceptance. I treat it as a proposal and ask what evidence would let me accept it.\nReadability is not proof Models are good at matching local style and anticipated control flow. That helps review, but it says nothing about whether the code has the right security boundary, database behavior, failure semantics, or operational fit.\nTake a background worker that ingests records. It can look entirely reasonable and still fail to scope each record to the correct tenant, fail to separate poison messages from retryable errors, mishandle duplicate deliveries, or leave no audit trail. An API route can look right and still need to prove authorization, tenant isolation, pagination limits, and error behavior.\nThe code is the hypothesis. Evidence decides whether it holds.\nMatch evidence to risk Change type Evidence to require Data model Migration upgrade and downgrade behavior, indexes, constraints, backfill plan API route Contract tests, authorization tests, tenant-isolation tests, bounded input and output Background worker Retry, idempotency, poison-message, concurrency, and observability tests External integration Sandbox or fixture contract tests, timeout behavior, reconciliation path, secret boundary UI workflow Loading, error, permission, empty-state, and high-volume rendering tests Infrastructure Plan validation, least-privilege review, alarms, rollback and local harness evidence The table is intentionally broader than unit tests. A function can be correct while the system around it is incomplete.\nKeep the reviewer\u0026rsquo;s judgment AI should reduce mechanical work, not technical judgment. A reviewer still decides whether the model has the right concept of ownership, whether a failure should be retried, whether a new permission is justified, and whether a migration is safe for real data.\nOne technique I recommend is requiring an implementation note with every substantial generated change:\nWhat behavior changed? What assumptions were made? What evidence was run? What was not verified? What approvals or environment checks remain? The note makes unknowns reviewable instead of burying them under confident prose. \u0026ldquo;What was not verified\u0026rdquo; is the line I would read first.\nTakeaway Generated code is an accelerant; evidence is what makes it engineering. Teams that ask for the right evidence can accept AI-assisted changes quickly and safely. Teams that mistake polished output for proof inherit the uncertainty without knowing where it lives.\n","permalink":"https://www.shadowtest.dev/notes/treat-generated-code-as-a-proposal-with-evidence/","summary":"\u003cp\u003eGenerated code often looks finished before it has earned trust: it has imports, comments, types, tests, and a tidy diff. The right response is neither blanket rejection nor blanket acceptance. I treat it as a proposal and ask what evidence would let me accept it.\u003c/p\u003e","title":"Treat Generated Code as a Proposal With Evidence"},{"content":"Every engineering task rests on assumptions: which branch is authoritative, whether an integration is on in production, whether a table holds historical data, whether a feature adds to or replaces something. Humans carry these informally, and AI raises the stakes because it can turn an unspoken guess into a large, polished implementation. The best use of AI is to expose uncertainty early enough for someone to decide, not to paper over it with a plausible default.\nSeparate facts, inferences, and decisions I want every AI handoff sorted into three buckets:\nVerified facts come from code, tests, deployment evidence, or an approved decision. Inferences are reasonable conclusions from incomplete evidence. Decisions needed require an owner, such as a product lead, security reviewer, or operator, to choose a direction. The common failure is presenting an inference as a fact because the sentence reads smoothly. Take an integration route to a ticketing system. Its existence proves the code can call that system. It does not prove every desired workflow is approved, idempotent, deployed, or appropriate for every team. Those are separate facts and separate decisions.\nTurn ambiguity into a bounded question When an agent hits a missing answer, it should write a question instead of inventing a policy. Good questions look like:\nWhich team owns the destination channel? What is the maximum supported input size? Should a newer report revise earlier data or be recorded as a separate observation? Who can approve linking findings from two sources? Is a given action informational, a request, or an execution command? A well-formed question names the owner, the decision, the cost of delay, and the safe default in effect until someone answers. That is what lets work continue without the guess becoming permanent.\nMake assumptions testable Many assumptions can be converted straight into checks:\n\u0026ldquo;Every request is scoped to a tenant\u0026rdquo; becomes an isolation test. \u0026ldquo;Duplicate delivery is safe\u0026rdquo; becomes an idempotency test. \u0026ldquo;Only approved users can create a case\u0026rdquo; becomes a permission test. \u0026ldquo;A stale source cannot appear healthy\u0026rdquo; becomes a freshness test. Once an assumption is a test or an explicit approval, it stops being invisible context and starts being something the system defends.\nTakeaway Ask your AI collaborator to behave like a rigorous colleague: say what it knows, label what it infers, and ask for the decisions it cannot safely make. That practice improves architecture reviews, documentation, and incident response even without AI. With AI, it is essential, because the goal is not to make uncertainty disappear. It is to make it visible, owned, and reducible.\n","permalink":"https://www.shadowtest.dev/notes/use-ai-to-surface-assumptions-not-hide-them/","summary":"\u003cp\u003eEvery engineering task rests on assumptions: which branch is authoritative, whether an integration is on in production, whether a table holds historical data, whether a feature adds to or replaces something. Humans carry these informally, and AI raises the stakes because it can turn an unspoken guess into a large, polished implementation. The best use of AI is to expose uncertainty early enough for someone to decide, not to paper over it with a plausible default.\u003c/p\u003e","title":"Use AI to Surface Assumptions, Not Hide Them"},{"content":"I build security systems that replace manual, person-dependent processes with auditable ones. A team should be able to see its posture, prove its controls and stop relying on a few people\u0026rsquo;s memory.\nI\u0026rsquo;m a security engineer in the Orlando area. My work sits where security engineering, platform engineering and compliance meet.\nWhat I work on Security posture visibility. Pulling findings from several scanners and cloud tools into one view, where every number traces back to real records. Compliance automation. Collecting audit evidence through APIs instead of screenshots, so each new assessment costs less than the last. AI security governance. Applying frameworks like NIST AI RMF to agentic systems, and treating AI-generated work as a proposal that needs evidence. Certificate and identity lifecycle. Automating the work that causes outages when nobody owns it. How I work Evidence over assertion. A status, a dashboard number or a recommendation links to the records behind it. If it can\u0026rsquo;t, it isn\u0026rsquo;t ready. Small steps, early feedback. Ship something people can use, then improve it. Plans with exit criteria. Each phase has a stated way to know it\u0026rsquo;s done, and done means demonstrated. Documentation that matches the system. Docs get checked against the code, not trusted by default. AI as a collaborator, not an oracle. Generated work gets the same review and tests as anyone else\u0026rsquo;s. Writing The notes are lessons from this work, with company and system details removed.\nContact hello@shadowtest.dev or LinkedIn.\n","permalink":"https://www.shadowtest.dev/about/","summary":"\u003cdiv class=\"callout\"\u003e\u003cp\u003eI build security systems that replace manual, person-dependent processes with auditable ones. A team should be able to see its posture, prove its controls and stop relying on a few people\u0026rsquo;s memory.\u003c/p\u003e\n\u003c/div\u003e","title":"About"}]