Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sunerpy/codegraph-rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.56.1
Choose a base ref
...
head repository: sunerpy/codegraph-rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.56.2
Choose a head ref
  • 4 commits
  • 122 files changed
  • 2 contributors

Commits on Dec 1, 2026

  1. fix(index): read project configuration and index state only from regu…

    …lar files (#360)
    
    CodeGraph now reads the project inputs it consults (root and member
    package.json, pnpm-workspace.yaml, go.mod, .gitignore,
    .codegraph/codegraph.json, tsconfig chains, Godot scenes and uid
    sidecars) and the files under the index directory (daemon.pid,
    writer.json, the state slots, the database header) only from regular
    files, without blocking, and within a size limit: 4 MiB for project
    inputs and configuration, 64 KiB for index state. A FIFO, a device or a
    socket at one of these paths is read as absent; the project's own
    .codegraph/config.toml reports an error instead.
    
    daemon.pid is read through one classifier that does not follow links: a
    link, dangling or not, or any entry the daemon could not have written is
    a stale record, and codegraph unlock removes a dangling link too. A
    socket path recorded in daemon.pid is used only when it is one of the
    project's computed rendezvous candidates. Cleanup removes only a socket
    that refuses a connection, a daemon that cannot take the writer lock no
    longer removes any socket, binding never replaces a socket that still
    accepts, and a running daemon republishes its own record when the
    record is replaced.
    
    The source reader keeps its limits and decoding and now opens each file
    once, non-blocking, and checks the opened handle.
    
    No extraction-version move: inputs that are now refused could not
    produce a completed index before, and all 32 golden corpora check
    identical.
    
    Also in this change: self_update 1.3.3 -> 1.3.4 for RUSTSEC-2026-0620
    (only that dependency chain moves in Cargo.lock), and a quoted daemon
    message in docs/architecture.md stays on one line for the docs site.
    
    Performance, GitHub runner A/B against 2f76986 with 5 alternating
    rounds: typescript-large init 0.996x, explore 1.009x, one-file sync
    1.004x; express-medium init 1.006x, explore 1.007x, sync 1.001x. A first
    express-medium run read 1.357x on sync with a 0.04 s spread on both
    sides; its rerun and a local 40-round A/B (0.999x) show no change.
    sunerpy authored Dec 1, 2026
    Configuration menu
    Copy the full SHA
    97fa800 View commit details
    Browse the repository at this point in the history
  2. fix(index): never write through a link inside the index directory (#362)

    Files CodeGraph writes by name inside the index directory (.codegraph/)
    are no longer written through whatever already holds that name. A new
    codegraph-core module, managed_file, creates such a file fresh (an entry
    already at the name, such as a link or a FIFO, is replaced rather than
    followed), appends only to a regular file, and accepts only a real
    directory where a directory is expected.
    
    - The full index's edge and reference spill files are created fresh and
      read back through the same handles instead of being reopened by path.
    - daemon.log is appended to only when it is a regular file; anything
      else there sends the daemon's output to the null sink with a warning.
      The temporary records renamed over daemon.pid (.tmp, .bound,
      .reassert) are created fresh.
    - A debug log goes into .codegraph/diagnostics/ only when that is a real
      directory, as a new file; otherwise it stays beside the index
      directory with a warning.
    - Viewer trails: a project path that does not exist yet is accepted only
      when its nearest existing ancestor resolves inside the project, so the
      trails directory is never created outside it. Saved trails are listed
      and read only as regular files, and a trail's temp file is created
      fresh before the rename.
    
    No extraction-version move; all 32 golden corpora check identical.
    
    Performance, GitHub runner A/B against 2f76986 with 5 alternating
    rounds: typescript-large init 1.001x, explore 0.995x, one-file sync
    1.001x; express-medium init 0.998x, explore 0.997x, sync 0.982x; peak
    RSS within 1.03x everywhere.
    sunerpy authored Dec 1, 2026
    Configuration menu
    Copy the full SHA
    82c74a2 View commit details
    Browse the repository at this point in the history
  3. fix(index): keep indexed paths and served source inside the project r…

    …oot (#363)
    
    The index now holds a name or path only in a form it can store exactly
    on every host: a project-relative path with / separators, no . or ..
    segment, no backslash and valid Unicode. The scan skips any other name
    whole (without following, descending into or counting it), and init,
    index and sync print one stderr line naming up to five skipped entries;
    stdout and every --json output are unchanged.
    
    Every read of a path taken from the index (resolution contexts,
    framework readers, the watcher and sync lanes, control inputs,
    dead-reference probes, served source) first proves it lexically inside
    the project root; a row that leaves the root, as a swapped-in database
    can hold, reads as unreadable and is never stat'ed, opened or listed.
    
    Before the MCP views and the CLI read source for an answer, the stored
    path is checked lexically and then by its real path against the
    canonical project root. A file whose real path is outside the root,
    such as a symlinked source file, stays indexed, but its source, symbol
    map, outline, signature and docstring are not served; the answer says
    why.
    
    The scan no longer follows links into /proc, /sys or /dev (unless the
    project itself lives there), and every reader refuses a file on a
    kernel pseudo filesystem once opened, before a byte is read. Source
    reads are clamped to a 16 MiB ceiling; a configured
    indexing.max_file_size above it is clamped when parsed, with a warning.
    Godot scenes and .gd.uid sidecars are read under the project's
    max_file_size.
    
    The extraction version moves from 23 to 24: an index built by an older
    release may hold rows outside the stored form or content read through
    such links, and incremental sync keeps them, so every older index reads
    as outdated and is rebuilt once. A v0.56.1 database fixture proves the
    rebuild through CLI sync, the catch-up sync and a cold MCP session. All
    32 golden corpora check identical.
    
    Performance, GitHub runner A/B against 2f76986 with 5 alternating
    rounds: typescript-large init 0.998x, explore 0.994x, one-file sync
    1.027x; express-medium init 0.937x, explore 1.012x, sync 0.996x; peak
    RSS within 1.01x everywhere.
    sunerpy authored Dec 1, 2026
    Configuration menu
    Copy the full SHA
    e3417d7 View commit details
    Browse the repository at this point in the history
  4. chore: release 0.56.2 (#361)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Dec 1, 2026
    Configuration menu
    Copy the full SHA
    24fcff8 View commit details
    Browse the repository at this point in the history
Loading