Repository navigation
feat: trace instance observations and bounded observation reads - #242
Conversation
Bounded TTL cache for the web DNS/NFM query layers, trace instance observations in the graph, and read-only tool-contract and prompt rules for the network, cost, CloudWatch, Flow Monitor and Tempo agent tools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 AI Code Review (two independent reviewers)Reviewer responses: batch 1/2: codex/ALL claude/ALL; batch 2/2: codex/ALL claude/ALL Status: PASSED — No blocking issues found Reviewed in 2 complete batches split at file boundaries; every batch must pass. Batch 1/2 — PASSAll gate-relevant claims are now verified. The one panel MAJOR (missing dimensions/unit echo in PR #242 — Chair Review (Batch 1 of 2): trace instance observations and bounded observation readsSummaryThis batch hardens the AgentCore read-only tool surface (validated CloudWatch metric requests, Compute Optimizer evidence projection with rank/freshness/missing-metric disclosure, bounded Tempo instance-identity claims, flow-log truncation disclosure), fixes a real Issues per lensL2 — Code correctnessNo CRITICAL/MAJOR. Confirmed-correct fixes both panels accepted:
L3 — Security / AWS mutation safetyBoth panels independently agree: no ADR-005 violation, no IAM widening, no secrets. Chair-verified: every touched AWS call is read-only (
L4 — Observability / data-integration correctness
L5 — Docs / ADR consistencyNo blocking inconsistency; codex found none, claude confirmed the ADR-005 boundary is uncontradicted, the
Suggestions
VerdictNo CRITICAL or MAJOR finding survives verification in this batch. The sole panel MAJOR was downgraded with a concrete resulting-code reconciliation, and one codex MINOR was rejected against the AWS service model. All remaining findings are MINOR or out of diff scope. The cross-batch IMAGE_COVERAGE: NOT_REQUIRED Batch 2/2 — PASSBoth panels' MAJOR candidates are now verified against BASE. Claude's performance MAJOR runs in a default-off background rebuild bounded by existing caps (1000 spans × 4000 nodes), and codex's orphaned-query MAJOR is pre-existing BASE behavior that this diff strictly improves — I'm downgrading both to MINOR with the reasoning recorded below. Here is the synthesized chair review: PR #242 — batch 2/2 chair reviewSummaryThis batch replaces the unbounded TTL/in-flight cache in L2 — Code correctnessBoth panels confirmed the subtle parts of the new cache are correct: the generation guard plus the
L3 — Security / AWS mutation safetyNo findings — both models agree, and chair verification concurs. Every AWS call in this batch is read-only or a self-initiated query-lifecycle call ( L4 — Observability / data-integration correctness
Confirmed unchanged by the diff: Insights query strings, L5 — Docs/ADR consistency
Verified consistent: both new doc anchors resolve bidirectionally; the runbook's Suggestions
VerdictNo CRITICAL findings. Both panel MAJORs were downgraded on chair verification: the quadratic scan is bounded by existing caps and confined to a default-off background rebuild (efficiency, not correctness), and the orphaned-query cleanup gap is pre-existing BASE behavior that this diff partially fixes rather than regresses. All remaining findings are MINOR. Security review is clean with both models in agreement: read-only AWS surface, no IAM change, no secrets, ADR-005 intact. IMAGE_COVERAGE: NOT_REQUIRED Triggered by commit |
… is not I/O evidence The NFM and DNS-log menu-gate routes return a retryable 503 (no internal message) for cache saturation/deadline or SDK request timeouts instead of the 200 'not onboarded' payload, matching the query routes. Compute Optimizer EBSVolumeStorageSpaceUtilization no longer counts as I/O pressure evidence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nable cache benchmark The DNS analytics data read, the CoreDNS group read and the NFM top-contributors read now map cache saturation/deadline or SDK timeouts to the retryable 503 used by the lookups (no internal message, no fabricated empty result). CacheUnavailableError declares its field explicitly so Node's type stripping can import bounded-cache.ts, and web/lib/CLAUDE.md names the benchmark command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…che loaders - isTransientRead covers throttling, 429 and 5xx; allow-list lookups return a retryable 503 only for transient errors and a non-retryable 502 otherwise - BoundedTtlCache passes an AbortSignal to loaders, aborts it at the deadline and holds the in-flight slot until the loader settles; NFM/DNS loaders thread it into SDK sends and polling sleeps and stop server-side queries on abort - document trace edge instance observation fields and the SQL view exclusion Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Part 1 of 4 split from #227 (six-pillar discovery diagnosis), merged in order A → B → C → D. This part has no worker diagnosis code.
BoundedTtlCachefor NFM/DNS-log reads (LRU 128, 32 in-flight, 90 s load deadline) with SDK request timeouts; saturation or deadline returns a retryable 503 instead of a wrong 404.get_metric_data/get_metric_metadata, Compute Optimizer rows with provider guards and utilization evidence, flow-log samples disclose window/limit/truncation, Tempo trace budget; catalog schemas use only SchemaDefinition keys; chat prompt rules for network/cost tools.web/lib/CLAUDE.mddocuments the bounded cache.Test plan
🤖 Generated with Claude Code