ADR-015: Fix fabricated infra-* module names (dormant dependency) - #1
Merged
Conversation
llm-research-{api,cli,sdk} declared nine `infra-*` dependencies via
`.workspace = true`. The prefix was correct -- the infra repo really does
publish unprefixed `infra-*` crates -- but seven of the nine modules do not
exist under any prefix, and none of the nine were present in the root
`[workspace.dependencies]`, so the `.workspace = true` inheritance had
nothing to resolve against.
Mapped each fabricated name to its real equivalent:
infra-core -> dropped (infra has no aggregator crate)
infra-config -> infra-config (already correct)
infra-logging -> infra-otel
infra-tracing -> infra-otel
infra-metrics -> infra-otel
infra-cache -> infra-cache (already correct)
infra-resilience -> infra-retry + infra-rate-limit
infra-health -> dropped (no equivalent; health checks stay local)
infra-error -> infra-errors
Added the six surviving crates to the root `[workspace.dependencies]` as git
dependencies pinned to rev a8bc89c on LLM-Dev-Ops/infra. The infra repo has
no git tags and nothing published to crates.io, so a pinned rev is the only
resolvable source.
Also corrected the matching re-export block in llm-research-api/src/lib.rs,
which aliased the same seven fabricated crate names, and prepended a
correction notice to PHASE_2B_INFRA_INTEGRATION.md, the document that
described the invented module surface as though it shipped.
This failure was dormant: the three crate directories are not workspace
members, so nothing built them and nothing surfaced the error. It would have
become a hard build failure the moment any of them were added to
`workspace.members`.
Implements the research-lab portion of agentics-enforcement/plans/adr/ADR-015
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.
Implements the
research-labportion (step 8) ofagentics-enforcement/plans/adr/ADR-015— Platform Package Naming Authority and Dependency Name Resolution.The bug
llm-research-api/Cargo.toml:32-40,llm-research-cli:43-45, andllm-research-sdk:43-45declared nineinfra-*crates via.workspace = true.Unusually for this bug class, the prefix was correct — the
infrarepo genuinely publishes unprefixedinfra-*crates, so nollm-prefix belongs here. The problem was purely ADR-015's Axis B, fabricated module surface: seven of the nine modules do not exist under any prefix.infrahas 19 crates and no aggregator, nologging, notracing, nometrics, noresilience, nohealth, and spells errorsinfra-errors.Compounding it, none of the nine were declared in the root
[workspace.dependencies], so.workspace = truehad nothing to inherit from.Why it was dormant
The three crate directories are not listed in the root
Cargo.tomlmembersarray (which contains onlyllm-research-lab,llm-research-core,llm-research-agents). Nothing builds them, so nothing surfaced the error. Verified:This is a latent trap, not a live outage — it becomes a hard failure the moment anyone adds these to
workspace.members.The mapping
infra-coreinfrahas no aggregator crateinfra-configinfra-configinfra-logginginfra-otelinfra-tracinginfra-otelinfra-otelcovers all three (init.rs,span.rs,metrics.rs)infra-metricsinfra-otelinfra-cacheinfra-cacheinfra-resilienceinfra-retry+infra-rate-limitinfra-healthobservability/health.rsstays localinfra-errorinfra-errorsChanges
Cargo.toml— added the six surviving crates to[workspace.dependencies]as git deps pinned to reva8bc89c190f63b139812f30a54e21a25b8f70e81onLLM-Dev-Ops/infra. Per ADR-015 decision 4, a pinned rev is required:infrahas zero git tags and is not on crates.io, so neither a tag nor a registry form would resolve.llm-research-{api,cli,sdk}/Cargo.toml— the 16 declarations corrected to the real names.llm-research-api/src/lib.rs:30-40— thepub mod infrare-export block aliased the same seven fabricated crates (pub use infra_core as core;…). Corrected to match; otherwise the manifest fix alone would still fail to compile.PHASE_2B_INFRA_INTEGRATION.md— prepended a correction notice. This document is where the invented surface came from: it describes all nine modules with feature flags as though they shipped, and also claims npm@llm-dev-ops/infra-{logging,tracing,metrics,…}packages that ADR-015 confirms do not exist (the real package is a single@llm-dev-ops/infrawith subpath exports). Left uncorrected it would seed the same fabrication again.Verification — real output
The crates are not workspace members, so they cannot be built in place:
So verification was done two other ways.
1. The pinned rev genuinely resolves all six names. A throwaway crate outside the repo depending on exactly the six declarations added here:
All six resolve at the pinned rev.
a8bc89cis confirmed present onorigin/main, so the pin is fetchable from CI, not just locally.2. ADR-015's
workspace = truerule now passes for everyinfra-*key. Applying the check ("assert the key exists in the root manifest's[workspace.dependencies]"):Zero
infra-*entries remain unresolved. Rootcargo metadata --no-depsstill exits 0 with members unchanged — no regression to the crates that do build.Left undone (deliberately)
infrakeys above are pre-existing and out of scope. Note thatllm-research-{api,cli}cannot become workspace members until those 8 and 10 keys are also added to[workspace.dependencies]— that is the real remaining blocker, and it is a separate change.llm-research-sdkis the one crate with nothing left unresolved.llm-research-apistill uses its localobservability/,performance/, andresilience/modules; only the re-export aliases were corrected. Whetherinfra-otelis a drop-in for the three local observability modules is unverified — it was never compiled against.PHASE_2B_INFRA_INTEGRATION.mdbody was not rewritten, only annotated. Its per-file tables and code snippets still show the fabricated API.