skill(apm-integrations): database-category rule sharpening (SPI-first, eager connect metadata, muzzle) - #12114
Draft
jordan-wong wants to merge 2 commits into
Draft
skill(apm-integrations): database-category rule sharpening (SPI-first, eager connect metadata, muzzle)#12114jordan-wong wants to merge 2 commits into
jordan-wong wants to merge 2 commits into
Conversation
…gory, add eager-connect idiom From the database eval cycle (reference PRs #11996/#11997/#12032). Most database findings turned out to be adherence gaps against rules that already exist, not missing rules — so this sharpens the existing rules with the concrete failure modes, plus adds one genuinely-new idiom. instrumenter-module.md: - SPI rule: the ForTypeHierarchy exception now explicitly covers being handed a CONCRETE driver that implements a JDK SPI (e.g. org.postgresql.jdbc.PgStatement implements java.sql.Statement), not just interface-only spec jars. The old wording only triggered on "interface-only jar", so an agent given a single concrete driver didn't apply it — the PostgreSQL regen (R-DB-2) fell into exactly this trap and shipped a concrete-class module that also collides at runtime with the existing jdbc/ SPI module. - New: database clients must populate connection metadata eagerly at connect/factory time (JDBC DriverInstrumentation; R2DBC ConnectionFactoryOptions), not lazily per query (R-DB-3). muzzle.md: - assertInverse rule reinforced with the concrete-driver failure mode (R-DB-4): a pinned dependency version is not an API-shape boundary. Draft — will be refined as feedback comes in from the database reference PR reviews. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
…ame (R-DB-1)
Database category gap sweep (2026-08-05) confirmed R-DB-1 is category-wide,
not a Cassandra quirk: any library with a version-sibling family directory
whose name differs from the integration slug will collide. The existing
"modify in place, don't create a parallel module" rule (line 47) doesn't
cover the case the Cassandra regen actually hit:
- eval slug `cassandra` != family dir `datastax-cassandra/`
- surviving siblings (datastax-cassandra-3.0/-3.8) already declare
super("cassandra")
- under the blind protocol the same-version (4.0) module was DELETED, so
"modify it in place" had no target — but the name was still taken
The agent created a new top-level instrumentation/cassandra/ module with a
duplicate super("cassandra") registration -> silent tracing outage (advice
never applied, zero spans, tests timed out, no build error).
Fix: grep the tree for the intended super() name BEFORE creating a module;
if any module (including untouched version-siblings) holds it, join that
family directory rather than minting a new top-level slug. Placement and
name are one decision: a taken name dictates the directory. If there is no
collision-free home, STOP and surface it.
Verified against #12114's existing commit (37e661c): the SPI-collision
case (R-DB-2) and eager-connect (R-DB-3) are already covered there; this is
the distinct version-sibling-family placement case they don't address.
Other sweep findings routed elsewhere (N-DBM-2 silent-downscope -> toolkit
prompt; reviewer-check candidates -> toolkit repo), not this skill PR.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update — 2026-08-05 autonomous category gap sweep (commit
bb7c329778)An oracle-anchored database category sweep (static diff-vs-master + generation-transcript root-cause across Cassandra/PostgreSQL/R2DBC) re-derived every prior finding and confirmed dedup against this PR's existing commit. Net-new result landing here:
datastax-cassandra-3.0/-3.8already declaresuper("cassandra"), so any new top-levelcassandramodule collides regardless of the deleted 4.0). The existing "modify in place, don't create a parallel module" rule did not cover the case actually hit: the eval slug (cassandra) differs from the family directory (datastax-cassandra/), AND under the blind protocol the same-version module was deleted so "modify in place" had no target — yet the name was still taken by siblings. Added a module-placement rule toinstrumenter-module.md: grep for the intendedsuper()name before creating a module; a taken name dictates the directory (join the family), never a new top-level slug. Failure mode it prevents: duplicate@AutoServiceregistration → silent tracing outage (zero spans, no build error).Everything else the sweep surfaced was already covered here (SPI-miss R-DB-2, eager-connect R-DB-3, muzzle R-DB-4) or routed off-PR (N-DBM-2 silent-downscope → toolkit prompt;
db-no-parallel-modulegrep → toolkit reviewer_check), consistent with the "Not included yet" section below.What
Sharpens the
apm-integrationsagent skill with lessons from the database eval cycle (reference PRs #11996 Cassandra / #11997 PostgreSQL / #12032 R2DBC). Draft — a living container that will be refined as feedback comes in from those PR reviews. Only the strongest, review-independent clarifications are in here now; library-specific rules await reviewer validation.Key insight
Most database findings turned out to be adherence gaps against rules that already exist, not missing rules:
ForTypeHierarchyfor JDBC'sjava.sql.*) was already ininstrumenter-module.md, but its wording only triggered on "interface-only spec jar" — so an agent given a concrete driver (org.postgresql:postgresql) didn't apply it.assertInverseguidance was already inmuzzle.mdbut was violated.super(...)verbatim / scan for an existing module" was already present but violated.So this PR sharpens the existing rules with the concrete failure modes rather than adding redundant prose, plus adds one genuinely-new idiom.
Changes
references/instrumenter-module.mdCallDepthThreadLocalMap.incrementCallDepth(<SpiType>.class)guard → mutual span suppression. (Root cause of [reference] eval: blind regeneration of PostgreSQL JDBC driver (toolkit output) #11997's spring-boottest_sql_tracesfailures.)DriverInstrumentationand R2DBCConnectionFactoryOptionsas the reference points; explains why R2DBC'sConnectionMetadatacannot supply host/port/db/user (root cause of [reference] R2DBC net-new instrumentation (io.r2dbc:r2dbc-spi 1.0.0, toolkit output) #12032's dominant finding).references/muzzle.mdassertInverserule reinforced with the concrete-driver failure mode: a pinned dependency version is not an API-shape boundary (the PostgreSQL[42.0.0,)+assertInverseexample that failed on six pre-42 releases).Not included yet (deliberately)
db-no-parallel-moduleenforcement — that's a toolkit-sidereviewer_check, not canonical skill content; tracked separately.Research provenance:
docs/eval-research/hypotheses/{cassandra,postgresql,r2dbc}.mdon the toolkit repo (R-DB-1 through R-DB-4, N-DBM-2).🤖 Generated with Claude Code