Repository navigation
docs(recorders): confirm audit_shadow_apis has a real producer (#1148) - #1155
Merged
Merged
Conversation
…er (#1148) Investigated per #1144's population-scale validation flagging repo_data .audit_shadow_apis as 99.7% zero across 718 repos. Unlike the dead columns resolved in #1145/#1147, this one has a real producer: run_api_audit() -> calculate_api_drift() in full_api_network_map.py, wired through ecosystem_audits["api_mapper"]["shadow_count"] in galaxyscope.py Phase 10 and read by record_keeper.py. It's exercised by 16 tests in test_api_network_map.py plus galaxyscope pipeline tests. The near-zero rate is expected, not a bug: run_api_audit() only computes drift when a repo ships exactly one auto-discoverable, parseable OpenAPI/Swagger spec (any other candidate count returns 0 via "no_swagger"/"ambiguous" status). Most repos in a general-purpose corpus never satisfy that precondition, so a near-zero aggregate rate reflects how rarely repos carry a matching machine-readable API spec at all. Documents the finding in the full_api_network_map wiki page and an inline schema comment, and adds a record_keeper test asserting the ecosystem_audits.api_mapper.shadow_count -> audit_shadow_apis DB column wiring explicitly (previously only exercised incidentally). Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
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.
Summary
repo_data.audit_shadow_apis(flagged 99.7% zero across 718 repos by [EPIC] Population-Scale Validation: v2.4.7 Structural Signature Health Audit (718 repos, 1.2M files, 5.7M functions) #1144) to a real, working producer:run_api_audit()→calculate_api_drift()infull_api_network_map.py, wired throughecosystem_audits["api_mapper"]["shadow_count"]ingalaxyscope.pyPhase 10 (unconditional, every scan) and read into the DB column byrecord_keeper.py. Already covered by 16 tests intests/security_auditing/test_api_network_map.pyplusgalaxyscopepipeline tests.run_api_audit()only computes real drift when a repo ships exactly one auto-discoverable, parseable OpenAPI/Swagger spec; any other candidate count (no_swagger/ambiguous) short-circuits to 0. Most repos in a general corpus never satisfy that precondition, so near-zero in aggregate telemetry is expected.full_api_network_mapwiki page (new Limitations bullet) and an inline schema comment inrecord_keeper.py, and adds arecord_keepertest asserting theecosystem_audits.api_mapper.shadow_count→audit_shadow_apisDB wiring explicitly, since it was previously only exercised incidentally (fixture never set theapi_mapperkey).Test plan
pytest tests/tools_recorders/ tests/security_auditing/test_api_network_map.py tests/core_engine/test_galaxyscope.py— 101 passedpython tests/tools/audit_check.py --regenerate— ruff/mypy/dead-key clean (baseline shift only, from the new inline comment moving line numbers)ruff format --checkon touched files🤖 Generated with Claude Code