ADR-0001: Substantiate completeness and lock dependencies - #1
Merged
nicholas-ruest merged 2 commits intoJul 27, 2026
Merged
Conversation
…l build
The workspace had never resolved its dependency graph: .gitignore excluded
Cargo.lock, so no lockfile existed and the six LLM-Dev-Ops dependencies in
[workspace.dependencies] were bare registry versions. Every README claim --
the production-ready badge, the hand-typed 88% coverage badge, and 13 rows of
"Complete" -- sat downstream of a build that had never succeeded.
Supply chain: `sentinel = "0.1"` resolved by bare name to an unrelated
crates.io crate ("a sentinel-terminated slice library", first published 2015),
not this platform's anomaly-detection service. That entry is now
`llm-sentinel`, git-pinned to LLM-Dev-Ops/sentinel. Removing the ambiguous
`sentinel` key entirely means it cannot silently resolve to the foreign crate
again. All six deps are now pinned to an explicit git source and rev. Two of
the old declarations could never have resolved at all: llm-latency-lens is not
published to crates.io, and no crate named llm-config-manager exists in any
source (the real crate is llm-config-core).
Build: crates/api-grpc/build.rs pointed tonic_build at src/generated, but
lib.rs reads the modules via tonic::include_proto!, which resolves against
OUT_DIR. The generated code was written where nothing read it, and since
src/generated is not committed and tonic_build does not create it, a clean
checkout failed with ENOENT. Dropping the out_dir override fixes it.
With the graph resolved, the real result is that the workspace does not build:
processor fails on 14 never-type-fallback errors in its Redis code, which also
blocks api-rest, api-grpc, and the main binary; cli fails on an undeclared rand
import and use of the Formatter enum as a trait object. Of ~2,161 test
attributes, 20 tests pass; the test targets in collector, decision,
integrations, and benchmarks reference types that do not exist.
README is regraded against that evidence: no row claims Complete, the coverage
badge is deleted, status is alpha, and TEST_COVERAGE_REPORT.md is marked a
historical estimate rather than linked as evidence.
The matching .github/workflows/ci.yml change -- build/test with --locked and a
tarpaulin job that publishes a measured coverage number -- is NOT in this
commit. The available token lacks the `workflow` scope, so it cannot push
workflow files. The exact diff is in the PR description and needs to be applied
by someone whose token carries that scope.
Implements auto-optimizer/docs/adr/ADR-0001-substantiate-completeness-and-lock-dependencies.md
Completes the CI half of ADR-0001, which could not be pushed with the previous token because it lacked the `workflow` scope. --locked makes CI fail if Cargo.lock is missing or has drifted from Cargo.toml, so the committed lockfile is what actually gets built rather than a graph re-resolved per run. Applied to build, test, and doctests, each scoped to --workspace. The tarpaulin job now emits JSON alongside the Cobertura XML and prints the measured line coverage into the job summary. That number replaces the hand-typed 88% badge deleted from README.md: per ADR-013 Rule 1 a coverage figure has to come out of the run that computes it. The report is also uploaded as an artifact so a specific run's number can be audited after the fact. Note the test job is expected to fail until the processor and cli compile errors documented in README.md are fixed. That failure is now visible, which it was not before -- there was no lockfile and no --locked build. Implements auto-optimizer/docs/adr/ADR-0001-substantiate-completeness-and-lock-dependencies.md
nicholas-ruest
deleted the
adr/0001-substantiate-completeness-and-lock-dependencies
branch
July 27, 2026 20:27
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 ADR-0001.
Why
This repo advertised a uniformly complete, 88%-covered, production-ready system on top of a Cargo workspace whose dependency graph had never resolved. The cause was mundane:
.gitignoreline 4 excludedCargo.lock, so no lockfile ever existed, and the sixLLM-Dev-Opsdependencies were declared as bare registry versions. The production-ready badge, the hand-typed coverage badge, and 13 rows of✅ Completewere all downstream of a build that had never succeeded.The
sentineldependency was a real supply-chain holesentinel = "0.1"was an unnamespaced name. Checking what it actually resolves to:That is an unrelated third-party
no_stdFFI crate, not this platform's anomaly-detection service. Acargo buildwould have silently linked a stranger's code under the namesentinel. The platform's actual crate is published asllm-sentinel.The fix removes the ambiguous
sentinelkey entirely rather than re-pointing it, so the bare name cannot resolve to the foreign crate again:All six dependencies are now pinned to an explicit git source and rev. This goes further than the
benchmark-exchangeprecedent (Cargo.toml:97), which pins a git source but floats the branch — and which still has no lockfile of its own.Two of the original six could never have resolved under any version:
llm-cost-ops = "0.1"llm-latency-lens = "0.1"sentinel = "0.1"llm-shield-core = "0.2"0.2never existedllm-observatory-core = "0.1"llm-config-manager = "0.1"llm-config-coreNote: no workspace member currently references any of these, which is why they never entered the lockfile and why the missing lockfile went unnoticed. They are kept, correctly pinned, so the first member to adopt one inherits a correct source rather than a name-squatted registry match.
Build fix
crates/api-grpc/build.rspointedtonic_buildat.out_dir("src/generated"), butlib.rspulls the modules in withtonic::include_proto!, which resolves againstOUT_DIR. Generated code was written where nothing read it, and becausesrc/generatedis not committed andtonic_builddoes not create itsout_dir, a clean checkout failed withENOENTbeforeprotocwas ever invoked. Dropping the override fixes it.Real build and test output
cargo build --workspace --locked(rustc 1.97.1):cargo test --workspace --locked→WORKSPACE_TEST_EXIT=101, blocked on the sameprocessorfailure.Per-crate, via
cargo build --locked -p <crate>andcargo test --locked -p <crate>:typesconfiganalyzeractuatorstorageapicollectordecisionintegrationsbenchmarksprocessorcliapi-restprocessor)api-grpcprocessor)llm-optimizerprocessor)20 tests pass out of ~2,161
#[test]/#[tokio::test]attributes. The rest are in targets that do not compile, so they have never run — which is what the 88% badge was asserting over.Root causes:
processor— 14 never-type-fallback errors in Redis code (state/redis_backend.rs,state/redis_backend_enterprise.rs,storage/redis.rs,deduplication/mod.rs). Single blocker forapi-rest,api-grpc, and the main binary.cli— importsrandwithout declaring it, and uses theFormatterenum as&dyn Formatterincommands/run.rs.AnthropicConfig,CreateIssueRequest,WebhookHandler;use collector::/use decision::instead of the real crate names).README changes
grep -c "img.shields.io/badge/coverage" README.md→0).status-alpha-orange; two other "Production Ready" strings downgraded.✅ Complete, since none has passing tests in CI. Rows now read🚧/❌/📋with the blocking reason, and aCratecolumn so each row is checkable.docs/TEST_COVERAGE_REPORT.mdmarked a historical estimate and unlinked as evidence. Its own text already conceded "Estimated based on test scope. Runcargo tarpaulinfor exact coverage."CI changes (commit
d723540)Initially blocked — the original token lacked the
workflowscope and the push was rejected. A token with that scope has since been supplied and the change is now in this PR.--lockedmakes CI fail ifCargo.lockis missing or has drifted fromCargo.toml, so the committed lockfile is what actually gets built rather than a graph re-resolved per run. The tarpaulin job now emits JSON alongside the Cobertura XML, prints the measured line coverage into the job summary, and uploads the report as an artifact so a specific run's number can be audited afterwards — that measured number is what replaces the deleted hand-typed 88% badge.Expect the
testjob to fail on this PR. It will fail on theprocessorandclicompile errors documented above. That failure is the point: it is now visible, which it could not be before, when there was no lockfile and no--lockedbuild.Deliberately out of scope
Fixing the 34 compile errors is not attempted here. The
processorerrors are mechanical, but thecli's use of an enum as a trait object is a structural gap, and neither can be validated at runtime from this change. Bundling them would obscure a dependency-hygiene and claim-substantiation PR behind a large, unverifiable code change. They are documented in the README's "Known blockers" so the next change has a specific target.ADR-0001 verification checklist
Cargo.lockexists at repo root and is tracked by gitcargo build --workspace --lockedsucceeds from a clean checkout — fails; that is the finding, and status is now alpha accordinglycargo test --workspaceexecutes and reports a pass count — 20 passing, per-crate; workspace-wide blocked onprocessorgit+revsentinelexplicitly sourced, not resolved by bare name — key removed; nowllm-sentinelgit-pinnedgrep -c "img.shields.io/badge/coverage" README.mdreturns 0✅ Completerow maps to a passing CI target — vacuously true; no row claims Completeproduction--readybadge while the above is unmetcargo build --workspace --locked,cargo test, and a tarpaulin coverage job — commitd723540npm run check:claims-honestyexits 0 — that script does not exist yet inagentics-enforcement; blocked on ADR-013