Architecture · A1 · Ingest & Inventory

How a file earns analysis

A1 is not a path filter. It is an ordered decision contract: tests are handled first, low-confidence path roles are removed, then language support, file access, and frontend lowering must each succeed before a file may enter the analysis engines.

CUPID file intake decision tree The exact analyze_paths decision order from test detection through path context, language, frontend, file reading, lowering, and successful analysis. FILE CONSIDERED Test path? and --include-tests is off YES test-skipped No findings on the test itself Lower linkage facts for test evidence NO Path confidence at or below 0.35? YES path-context:<role> Generated · vendor · dependency build output · docs · fixture NO Language detected from the file suffix? NO not-code Docs, config, locks, unknown suffixes YES Frontend available for that language? NO unsupported-language TypeScript is detected, not lowered yet YES File readable? UTF-8 with replacement decoding NO read-error The file could not be opened YES Frontend lowering result source → ModuleIR EXCEPTION frontend-error Exception type is recorded as detail NONE parse-error No trustworthy IR was produced MODULE IR analyzed Signals → graphs → tools → ranking

This is the exact order in report/analyze.py::analyze_paths(). Every terminal node becomes either an inventory reason or the single analyzed path.

THE TERMINAL CONTRACT · one explicit outcome per considered file
01 · Inventory outcomes

The tree distinguishes exclusion policy from technical failure. A generated file and a broken parser are both skipped, but for different, inspectable reasons.

analyzed

Accepted

The ModuleIR enters signals, graphs, tools, and ranking.

THE PATH GATE · actionability before syntax
02 · What each path role does

The live scan uses SKIP_CONFIDENCE = 0.35 as a binary gate. Values at or below the cutoff do not enter the main analysis; they are not merely assigned a smaller finding score.

Path roleConfidenceLive-scan resultExamples
Product or unmatched code1.00ANALYZEsrc · app · lib · services
Test source0.45LINKAGEFull analysis only with --include-tests
Operational script0.45ANALYZEscripts · script
Data migration0.60ANALYZERunPython · RunSQL · op.execute
Generated schema migration0.30SKIPDjango / Alembic output
Docs and docs examples0.30-0.35SKIPdocs · documentation
Generated or build output0.25-0.30SKIPgenerated · dist · build
Vendor or dependency0.20-0.25SKIPvendor · node_modules · .venv
Fixture or sample0.10SKIPfixtures · samples · cases · baselines
TWO CONTENT-AWARE EXCEPTIONS · path alone is not enough
TEST LINKAGE

No test findings by default

A skipped test is still lowered for imports and referenced symbols. That evidence prevents tested functions from looking dead and feeds the static test graph.

MIGRATION REFINEMENT

Data movement is real code

Generated schema output is skipped. RunPython, RunSQL, op.execute, and equivalent data-moving logic are promoted to confidence 0.60 and analyzed.

Coverage boundary. Every file passed to the analysis orchestrator receives analyzed or an explicit skip reason. During whole-directory Web and CLI discovery, some unsupported, generated, or vendored paths can be filtered before the orchestrator; the inventory therefore describes considered files, not every physical file in the repository.
Back to the system architecture Locate A1 in the code map