Files
codebase-memory-mcp/scripts/memory-core-baseline.txt
Martin Vogel beba7f8c0c C/C++: re-extract a header's includers in an incremental refresh
A C-family file's preprocessed pass reads the repository files its quoted
#include lines name, so its graph changes with their bytes even when its
own bytes do not. An incremental refresh after an edit to a header alone
re-extracted only the header, and its includers kept their old expansion.

- The #include lookup resolves only to files the index run covers (its
  discovery, through CBMIncludeScope and the pipeline context's
  indexed_files), so every file an expansion depends on is in the run's
  manifest.
- Each file's lsp_surface row records the files its lookup read
  (included_files; transitive, since the headers a header includes are on
  the includer's own list). It is not part of surface_sha.
- The closure planner adds every stored file whose record names a changed
  or deleted file to the delta as a changed file, which then goes through
  the same surface comparison. One pass over the stored rows.
- CBM_INDEX_FORMAT_VERSION 6 -> 7: an index written before records no
  included files, so it is rebuilt once.
- The graph and content digests cover the new column; a database without
  it keeps its previous digest stream.

Tests: pipeline_c_header_edit_refreshes_includers_incrementally (a header
edit reaches a direct and a transitive includer; the refresh equals a
fresh full index) and index_format_v6_included_files_rebuild.

Refs #2993

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-18 04:05:30 +01:00

88 lines
2.5 KiB
Plaintext

# memory-core-baseline.txt -- raw allocator call sites per file.
# Generated by scripts/lint-memory-core.py --write-baseline.
# A file may only ever go DOWN. Lower a line in the same change that
# migrates the file to src/foundation/mem_core.h; never raise one.
internal/cbm/ac.c 20
internal/cbm/arena.c 3
internal/cbm/cbm.c 13
internal/cbm/extract_defs.c 4
internal/cbm/helpers.c 3
internal/cbm/lsp/c_lsp.c 4
internal/cbm/lsp/perl_lsp.c 21
internal/cbm/macro_table.c 1
internal/cbm/service_patterns.c 2
internal/cbm/sqlite_writer.c 74
src/cli/activation_transaction.c 78
src/cli/agent_clients.c 73
src/cli/agent_profiles.c 7
src/cli/cli.c 166
src/cli/client_adapter.c 3
src/cli/config_edit_path.c 2
src/cli/config_json_like.c 142
src/cli/config_text_edit.c 72
src/cli/config_toml_edit.c 73
src/cli/config_yaml_edit.c 117
src/cli/hook_augment.c 31
src/cypher/cypher.c 125
src/daemon/application.c 107
src/daemon/bootstrap.c 13
src/daemon/daemon.c 31
src/daemon/frontend.c 12
src/daemon/ipc.c 146
src/daemon/project_lock.c 6
src/daemon/runtime.c 45
src/daemon/service.c 6
src/daemon/version_cohort.c 9
src/discover/discover.c 31
src/discover/gitignore.c 12
src/discover/userconfig.c 15
src/foundation/diagnostics.c 7
src/foundation/lock_registry.c 18
src/foundation/platform.c 11
src/foundation/platform.h 5
src/foundation/private_file_lock.c 56
src/foundation/str_intern.c 7
src/foundation/subprocess.c 17
src/foundation/win_utf8.h 7
src/foundation/workspace.c 3
src/foundation/yaml.c 10
src/git/git_context.c 18
src/main.c 32
src/mcp/compact_out.c 39
src/mcp/index_supervisor.c 8
src/mcp/mcp.c 765
src/pipeline/artifact.c 38
src/pipeline/fqn.c 23
src/pipeline/lsp_resolve.h 4
src/pipeline/lsp_surface.c 4
src/pipeline/pass_calls.c 22
src/pipeline/pass_compile_commands.c 17
src/pipeline/pass_configlink.c 3
src/pipeline/pass_cross_repo.c 8
src/pipeline/pass_definitions.c 9
src/pipeline/pass_enrichment.c 15
src/pipeline/pass_ensemble_routing.c 10
src/pipeline/pass_githistory.c 27
src/pipeline/pass_importance.c 4
src/pipeline/pass_infrascan.c 2
src/pipeline/pass_k8s.c 6
src/pipeline/pass_lsp_cross.c 49
src/pipeline/pass_parallel.c 29
src/pipeline/pass_pkgmap.c 80
src/pipeline/pass_semantic.c 3
src/pipeline/pass_tests.c 3
src/pipeline/pass_usages.c 4
src/pipeline/path_alias.c 1
src/pipeline/pipeline.c 129
src/pipeline/pipeline_delta.c 19
src/pipeline/pipeline_incremental.c 130
src/pipeline/registry.c 17
src/pipeline/worker_pool.c 2
src/store/store.c 354
src/ui/config.c 12
src/ui/http_server.c 31
src/ui/httpd.c 21
src/ui/layout3d.c 61
src/watcher/watcher.c 33