Skip to content

Dead code

Measured 2026-10-12.

Seven public definitions are dead code. Seven public top-level definitions under packages/*/src are never used: no code in their own module or in any other calls, reads, or imports them, and five of the seven appear only as a string in their module’s __all__. The first table below lists them. Every other public top-level definition with no reference outside its own file resolves to a use inside its own module (a call, a construction, an annotation, a default argument, or a read). What the other two tables record is a narrower defect: an export declaration with no consumer: a name in an __all__ that nothing imports.

Technique, and what it cannot see. No code index covers this repo (there is no .codegraph/, no LSP index, no AST symbol graph), and no dead-code analyzer is wired into the project: grep -n "vulture|dead|unused|deptry|knip" over pyproject.toml and mise.toml returns only unrelated hits, ty’s unused-ignore-comment rule at pyproject.toml:463 and a comment about it on line 465. The finding set is therefore derived, in these passes:

  1. AST enumeration. ast.parse every file under packages/*/src/**/*.py, collecting every top-level FunctionDef / AsyncFunctionDef / ClassDef / type alias / module-level assignment whose name does not begin with _, together with its __all__ membership, and whether its module declares an __all__ at all.
  2. Unanchored reference index. For each name, the whole-word pattern (?<!\w)NAME(?!\w) against every line of every git-tracked text file (every path git ls-files -z yields, all readable as text), excluding the defining file and the docs/ tree, whose pages (this one included) name the symbols they describe. The pattern also matches after a dot, so an attribute read such as module.NAME counts. Driving the search from git ls-files is what guarantees that no citation here lands in a gitignored path and that .md, .toml, and .yml surfaces are searched, not only Python.
  3. Read-back at the use site. A name with outside matches goes through an AST pass over every tracked Python file that resolves from ... import statements, attribute reads through an imported module, and dotted-path strings such as a monkeypatch.setattr target. A name that pass found no reference for was read by hand at every match. Every listed candidate was opened and its intra-file use read.

vulture 2.16 was run as a cross-check (uvx vulture packages --min-confidence 80, exit 3) and contributes no rows: eight of its nine findings are the exc_type and tb parameters an __exit__ signature has to declare, and the ninth is a boto3 keyword-only parameter on a signature-matching test stub. Its unit of analysis is one file, so it cannot answer the cross-module question.

The limits of this derivation, stated because no index backs it:

Enforced gates are why the list is short rather than thin. ruff runs select = ["ALL"] (pyproject.toml:207) at zero, so F401, F811, F841 and ERA001 leave no unused import, no redefinition, no unused local, and no commented-out code, with two carve-outs: pyproject.toml:285 ("**/__init__.py" = ["F401", "E402"]), and the vendored harbor tree, which ruff doesn’t lint at all (pyproject.toml:189). pyright runs typeCheckingMode = "strict" (pyproject.toml:687) over every src/ and tests/ tree plus scripts and fuzz (pyproject.toml:688-705) at zero errors, which enforces reportUnusedFunction / reportUnusedClass / reportUnusedVariable for every _-prefixed definition unused inside its own file. Neither gate can see a public symbol that no other module imports, and that gap is exactly what the tables below fill.

The names below have no reference in any tracked file outside docs/, their own module included: the definition and, for five of them, a string in their module’s __all__ are the only occurrences. Nothing in the repo calls, reads, or re-exports them, so each one can be deleted together with its __all__ entry.

Symbol Path Last modified
is_interrupt packages/atif-analytics/src/atif_analytics/domain/authorship.py:125 2026-09-27
codex_edge_ids packages/atif-converter/src/atif_converter/domain/codex_edges.py:175 2026-09-11
CODEX_CONVERTIBLE_RECORD_TYPES packages/atif-converter/src/atif_converter/domain/codex_fidelity.py:47 2026-09-11
is_claude_session_event packages/atif-converter/src/atif_converter/domain/session_events.py:206 2026-09-27
is_codex_session_event packages/atif-converter/src/atif_converter/domain/session_events.py:295 2026-09-27
convert_codex_session packages/atif-converter/src/atif_converter/infrastructure/codex_adapter.py:67 2026-09-11
LAKE_TABLE_NAMES packages/atif-duck/src/atif_duck/domain/lake.py:254 2026-09-28

The names below appear in their own module’s __all__ and have no reference in any other tracked file outside docs/. The symbol is live inside its module; the unreferenced thing is the export declaration, so the fix is to narrow __all__, not to delete code. Each row’s intra-module use site is named after the table.

Symbol Path Last modified
session_kind packages/atif-analytics/src/atif_analytics/domain/authorship.py:130 2026-09-27
CHARS_PER_TOKEN packages/atif-analytics/src/atif_analytics/domain/costs.py:25 2026-10-12
CLASSIFICATIONS_DIRNAME packages/atif-analytics/src/atif_analytics/domain/layout.py:25 2026-08-28
CONFLICTS_DIRNAME packages/atif-analytics/src/atif_analytics/domain/layout.py:26 2026-08-28
USER_FRICTION_DIRNAME packages/atif-analytics/src/atif_analytics/domain/layout.py:27 2026-08-28
PERCEIVED_ERRORS_DIRNAME packages/atif-analytics/src/atif_analytics/domain/layout.py:28 2026-08-28
REFUSALS_DIRNAME packages/atif-analytics/src/atif_analytics/domain/layout.py:39 2026-08-28
STATE_DB_FILENAME packages/atif-analytics/src/atif_analytics/domain/layout.py:41 2026-08-28
TOOL_INPUT_PREVIEW_CHARS packages/atif-analytics/src/atif_analytics/domain/transcript.py:68 2026-08-28
UUID_HEADER_ESCAPE packages/atif-analytics/src/atif_analytics/domain/transcript.py:79 2026-08-28
main_chain packages/atif-analytics/src/atif_analytics/domain/transcript.py:242 2026-08-28
parse_trajectory_step packages/atif-analytics/src/atif_analytics/infrastructure/corpus_reader.py:115 2026-09-28
read_trajectory_steps packages/atif-analytics/src/atif_analytics/infrastructure/corpus_reader.py:238 2026-09-28
read_edges_uuids packages/atif-analytics/src/atif_analytics/infrastructure/corpus_reader.py:249 2026-09-28
is_sharded_dir packages/atif-analytics/src/atif_analytics/infrastructure/parquet_cache.py:35 2026-08-28
write_part packages/atif-analytics/src/atif_analytics/infrastructure/parquet_cache.py:90 2026-08-28
read_all packages/atif-analytics/src/atif_analytics/infrastructure/parquet_cache.py:114 2026-08-28
MAX_ATTEMPTS_DEFAULT packages/atif-analytics/src/atif_analytics/infrastructure/sqlite_state/retry_queue.py:42 2026-08-28
StorageLayout packages/atif-cli/src/atif_cli/corpus.py:83 2026-09-28
LaneStatus packages/atif-cli/src/atif_cli/cron.py:74 2026-08-28
DuckLakeSteps packages/atif-cli/src/atif_cli/embed_lake.py:70 2026-09-28
TURNS_BATCH_SIZE packages/atif-cli/src/atif_cli/lake_sessions.py:65 2026-09-28
STEPS_BATCH_SIZE packages/atif-cli/src/atif_cli/lake_sessions.py:69 2026-09-28
emit_row_batches packages/atif-cli/src/atif_cli/output.py:181 2026-08-28
CODEX_TOOL_IMAGE_MEDIA_TYPES packages/atif-converter/src/atif_converter/domain/blobs.py:96 2026-10-08
codex_tool_image_media_type packages/atif-converter/src/atif_converter/domain/blobs.py:339 2026-10-08
codex_edge_from_record packages/atif-converter/src/atif_converter/domain/codex_edges.py:116 2026-09-11
COMMAND_TOOL_NAME packages/atif-converter/src/atif_converter/domain/codex_nested_calls.py:48 2026-10-09
VIA_EXEC packages/atif-converter/src/atif_converter/domain/codex_nested_calls.py:51 2026-10-09
PAYLOAD_LIST_MAX_ITEMS packages/atif-converter/src/atif_converter/domain/session_events.py:81 2026-09-27
CLAUDE_SYSTEM_SUBTYPES packages/atif-converter/src/atif_converter/domain/session_events.py:89 2026-09-27
CLAUDE_ATTACHMENT_TYPES packages/atif-converter/src/atif_converter/domain/session_events.py:93 2026-09-27
CLAUDE_WHOLE_RECORD_TYPES packages/atif-converter/src/atif_converter/domain/session_events.py:96 2026-09-27
CODEX_WHOLE_RECORD_TYPES packages/atif-converter/src/atif_converter/domain/session_events.py:124 2026-09-27
CODEX_EVENT_MSG_TYPES packages/atif-converter/src/atif_converter/domain/session_events.py:126 2026-09-27
REPORTED_COST_SOURCE_KEY packages/atif-converter/src/atif_converter/domain/session_events.py:339 2026-09-27
REPORTED_UNKNOWN_MODEL_COST_KEY packages/atif-converter/src/atif_converter/domain/session_events.py:340 2026-09-27
REPORTED_COST_SOURCE_COST_STATE packages/atif-converter/src/atif_converter/domain/session_events.py:342 2026-09-27
read_codex_rollout packages/atif-converter/src/atif_converter/infrastructure/codex_converter.py:39 2026-09-11
ARCHIVE_ZSTD_LEVEL packages/atif-converter/src/atif_converter/infrastructure/source_archive.py:49 2026-09-27
ArchivedSourceFile packages/atif-converter/src/atif_converter/infrastructure/source_archive.py:63 2026-09-27
Compressed packages/atif-corpus/src/atif_corpus/infrastructure/compress_artifacts.py:57 2026-09-28
Requires packages/atif-duck/src/atif_duck/domain/examples.py:49 2026-08-28
Category packages/atif-duck/src/atif_duck/domain/examples.py:54 2026-08-28
IDENTITY_COLUMNS packages/atif-duck/src/atif_duck/domain/lake.py:102 2026-09-28
COLLISION_PREFIX packages/atif-duck/src/atif_duck/domain/lake.py:110 2026-09-28
INFO_SCHEMA_VERSION packages/atif-duck/src/atif_duck/domain/lake.py:113 2026-09-28
INFO_SCHEMA_DIGEST packages/atif-duck/src/atif_duck/domain/lake.py:114 2026-09-28
INFO_COLUMNAR_SCHEMA packages/atif-duck/src/atif_duck/domain/lake.py:115 2026-09-28
LAKE_INFO_COLUMNS packages/atif-duck/src/atif_duck/domain/lake.py:121 2026-09-28
CORPORA_COLUMNS packages/atif-duck/src/atif_duck/domain/lake.py:122 2026-09-28
DUCKLAKE_EXTENSION packages/atif-duck/src/atif_duck/infrastructure/lake.py:113 2026-09-28
CLEANUP_GRACE_HOURS packages/atif-duck/src/atif_duck/infrastructure/lake.py:142 2026-09-28
LakeExtensionMissingError packages/atif-duck/src/atif_duck/infrastructure/lake.py:169 2026-09-28
ducklake_extension_installed packages/atif-duck/src/atif_duck/infrastructure/lake.py:291 2026-09-28
RebuildReport packages/atif-duck/src/atif_duck/infrastructure/lake.py:710 2026-09-28
LakeMismatch packages/atif-duck/src/atif_duck/infrastructure/lake.py:1071 2026-09-28
VerifyReport packages/atif-duck/src/atif_duck/infrastructure/lake.py:1082 2026-09-28
LakeStatus packages/atif-duck/src/atif_duck/infrastructure/lake.py:1184 2026-09-28
CompactReport packages/atif-duck/src/atif_duck/infrastructure/lake.py:1282 2026-09-28
DEFAULT_READER_MEMORY_BYTES packages/atif-duck/src/atif_duck/infrastructure/lake_sessions.py:57 2026-09-28
STEPS_TABLE packages/atif-duck/src/atif_duck/infrastructure/lake_steps.py:52 2026-09-28
STEP_TEXTS_SQL packages/atif-duck/src/atif_duck/infrastructure/lake_steps.py:67 2026-09-28
CHANGED_STEP_TEXTS_SQL packages/atif-duck/src/atif_duck/infrastructure/lake_steps.py:75 2026-09-28
STEP_KEYS_SQL packages/atif-duck/src/atif_duck/infrastructure/lake_steps.py:84 2026-09-28
REGISTERED_AT_SQL packages/atif-duck/src/atif_duck/infrastructure/lake_steps.py:90 2026-09-28
SNAPSHOT_RANGE_SQL packages/atif-duck/src/atif_duck/infrastructure/lake_steps.py:95 2026-09-28
StepMemberAccess packages/atif-duck/src/atif_duck/infrastructure/projections.py:35 2026-09-12
is_compressed packages/atif-duck/src/atif_duck/infrastructure/stored_artifacts.py:41 2026-09-28
SqlFragment packages/atif-embed/src/atif_embed/domain/sql_literal.py:30 2026-09-12
TEXT_ONLY_CONFIG packages/atif-embed/src/atif_embed/infrastructure/gemma_local.py:60 2026-10-09
INSTALL_HINT packages/atif-embed/src/atif_embed/infrastructure/gemma_local.py:68 2026-10-09
pick_device packages/atif-embed/src/atif_embed/infrastructure/gemma_local.py:121 2026-10-09
pick_dtype packages/atif-embed/src/atif_embed/infrastructure/gemma_local.py:133 2026-10-09
watermark_position packages/atif-embed/src/atif_embed/infrastructure/lake_text_rows.py:79 2026-09-28
write_schema_version packages/atif-embed/src/atif_embed/infrastructure/lance_store.py:358 2026-08-28
migrate_pre_stamp_table packages/atif-embed/src/atif_embed/infrastructure/lance_store.py:365 2026-11-03
add_chunk packages/atif-embed/src/atif_embed/infrastructure/lance_store.py:468 2026-11-03
optimize_if_needed packages/atif-embed/src/atif_embed/infrastructure/lance_store.py:486 2026-11-03
PROVIDER_DIMENSIONS packages/atif-embed/src/atif_embed/infrastructure/settings.py:30 2026-10-09
DEFAULT_DIMENSION packages/atif-embed/src/atif_embed/infrastructure/settings.py:36 2026-10-09
STORE_DIRNAME packages/atif-embed/src/atif_embed/infrastructure/settings.py:40 2026-10-09
DomainError packages/atif-models/src/atif_models/domain/ports.py:39 2026-08-28
ReasoningEffort packages/atif-models/src/atif_models/domain/registry.py:42 2026-08-28

Intra-module use sites, one per file, all opened and read. Where a symbol is used more than once, the citation carries the first site and the remaining line numbers follow it as plain numbers.

Further public-by-naming symbols have no outside reference and are not listed, because their modules make no export claim about them. Most live in modules that declare no __all__ at all, so they’re module-internal helpers:

The rest sit in modules that do declare an __all__ and are deliberately absent from it, which is the module saying they aren’t exported: packages/atif-cli/src/atif_cli/app.py:2330 (search_rows), packages/atif-cli/src/atif_cli/corpus.py:71 (SessionLayout) and :158 (CorpusSlimReport), and packages/atif-duck/src/atif_duck/infrastructure/lake.py:117 (DEFAULT_AGENT).

_none_

The import graph reports some source modules with no inbound first-party import. All of them are framework-dispatched and none is removable, so the bucket is empty:

__init__.py files are the only linted files where F401 is off (pyproject.toml:285), so outside the vendored harbor tree, which ruff skips, they’re the only place an import with no consumer survives lint (an isolated ruff run of F401, F811, and F841 over the vendored tree finds none). Two members’ __init__.py files re-export names. atif-converter’s vendored domain/atif/__init__.py re-exports harbor’s model classes; the converter imports them through it (packages/atif-converter/src/atif_converter/domain/claude_code_conversion.py:66), and packages/atif-converter/tests/test_vendored_atif.py:112 pins every name against upstream. atif-duck’s three __init__.py files hold the rest, and every one of those re-exports is consumed by nothing in the repo. Each name is listed in its file’s __all__, which is what keeps the statement alive to the linter; no tracked file imports any of them through a package __init__. The members aren’t published on their own, but the one atif-sql wheel ships atif_duck as an importable package (pyproject.toml:98), so an installed copy can reach the facade although nothing in the repo does.

Path Symbol Imported from
packages/atif-duck/src/atif_duck/__init__.py:18 DEFAULT_PRICING packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/__init__.py:19 MACRO_NAMES packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/__init__.py:20 MACRO_SIGNATURES packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/__init__.py:21 VIEW_NAMES packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/__init__.py:22 VIEW_SCHEMA packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/__init__.py:25 RawSources packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/__init__.py:26 register packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/__init__.py:27 register_macros packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/__init__.py:28 register_raw packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/__init__.py:29 register_views packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/domain/__init__.py:12 DEFAULT_PRICING packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/domain/__init__.py:13 DESCRIPTIONS packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/domain/__init__.py:14 MACRO_NAMES packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/domain/__init__.py:15 MACRO_SIGNATURES packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/domain/__init__.py:16 TABLE_MACRO_NAMES packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/domain/__init__.py:17 VIEW_NAMES packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/domain/__init__.py:18 VIEW_SCHEMA packages/atif-duck/src/atif_duck/domain/catalog.py
packages/atif-duck/src/atif_duck/domain/__init__.py:20 ExampleQuery packages/atif-duck/src/atif_duck/domain/examples.py
packages/atif-duck/src/atif_duck/domain/__init__.py:20 build_examples packages/atif-duck/src/atif_duck/domain/examples.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:11 ColumnarArtifactProducer packages/atif-duck/src/atif_duck/infrastructure/columnar.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:12 ColumnarCoverage packages/atif-duck/src/atif_duck/infrastructure/columnar.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:13 columnar_coverage packages/atif-duck/src/atif_duck/infrastructure/columnar.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:14 session_has_columnar packages/atif-duck/src/atif_duck/infrastructure/columnar.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:17 RawSources packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:18 register packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:19 register_macros packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:20 register_raw packages/atif-duck/src/atif_duck/infrastructure/registry.py
packages/atif-duck/src/atif_duck/infrastructure/__init__.py:21 register_views packages/atif-duck/src/atif_duck/infrastructure/registry.py

The absence is checked against the exact import form a consumer would have to write, over every tracked file:

Every real consumer bypasses the facade for the deep module:

The one dynamic reference to the package, packages/atif-cli/tests/test_lean_import.py:21, names "atif_duck.infrastructure" inside the _FORBIDDEN_EAGER_IMPORTS tuple at packages/atif-cli/tests/test_lean_import.py:17-37, an assertion that the module must not load on import atif_cli.app, which is the opposite of a consumer.

Each __init__.py presents the facade as intentional: packages/atif-duck/src/atif_duck/__init__.py:6 documents register(con, corpus_root) as the package entry point. Read against pyproject.toml:17 (one distribution named atif-sql, bundling every module tree in a single wheel rather than shipping any of them as an install target), the facade’s only possible consumer is code outside the repo that imports the installed wheel.