FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(settings): Let a repository say what to leave out of its drawings by nfebe · Pull Request #125 · sourceant/sourceant · GitHub

feat(settings): Let a repository say what to leave out of its drawings - #125

Merged
nfebe merged 4 commits into
mainfrom
local/stack
Aug 27, 2026
Merged

feat(settings): Let a repository say what to leave out of its drawings#125
nfebe merged 4 commits into
mainfrom
local/stack

Conversation

nfebe commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Adds a setting naming the path segments a repository leaves out of what its index reports, defaulting to .github and .codebase-memory. Drawings of a repository were carrying its workflow files and the indexer's own artefact directory alongside its code.

Matching is by whole segment, so .github does not also take .github-notes. The rule sits beside the existing test-path rule, because every index has to answer it the same way or two of them draw two different repositories.

This is the first setting whose value is a list, and so the first to use the JSON type.

Two defaults move with it. A run read a repository in ten parts on twenty thousand characters each, which covered a fraction of a large codebase and gave each part about a third of the evidence a model of this size is usually given. It now reads twenty-five parts on sixty thousand characters. How many proposals and evidence items a stage considers stays at twenty, which is where retrieval practice puts it. Every repository that has not set its own values gets the larger run, so the cost of a run rises with this.

Also settles a third word. The setting for how many pieces a repository is read in described them as clusters, while its own label and every screen that draws them said parts. The reader now sees one word, and community stays where the data uses it.

nfebe added 3 commits August 27, 2026 15:40
The index reports everything it holds, so a drawing of a repository carries
its workflow files and the indexer's own artefacts next to its own code. A
repository or organisation can now name path segments to leave out, and
starts from the two that turn up in every repository.

Matching is by whole segment, so excluding one directory does not also take
a differently named neighbour that begins the same way.
The setting for how many pieces a repository is read in described them as
clusters while its own label, and every screen that draws them, called them
parts. One word now reaches the reader, and the graph term stays where the
data uses it.
…detail

A run read a repository in ten parts on twenty thousand characters each,
which covered a fraction of a large codebase and gave each part about a
third of the evidence a model of this size is usually given. It now reads
twenty-five parts on sixty thousand characters.

Coverage is the half that matters on a large repository: more evidence per
part reads the same fraction more closely, while more parts reach code no
run was looking at before. Both ceilings already allowed this, so any
repository that wants the older, cheaper shape can still set it.

How many proposals and evidence items a stage considers is unchanged at
twenty, which is where retrieval practice puts it.

sourceant-local Bot commented Aug 27, 2026
edited
Loading

Copy link
Copy Markdown

Code Review Summary

This pull request introduces a new setting to exclude specific path segments from repository drawings and updates default run parameters. The reviewed diff primarily involves a minor stylistic change to string literal quoting in a description. While the functional intent is clear, a small consistency improvement in string formatting is suggested.

💡 Minor Suggestions

  • Ensure consistent string literal quoting within concatenated description strings in src/core/settings/definitions.py.

sourceant-local Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Review complete. No specific code suggestions were generated. See the overview comment for a summary.

sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Review complete. See the overview comment for a summary.

excluded_paths: frozenset[str] = field(default_factory=frozenset)
node_limit: int = MAX_GRAPH_NODES

def __post_init__(self) -> None:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Since excluded_paths is typed as a frozenset but is often populated from JSON-based settings (which return lists) or default tuples, it should be explicitly converted in __post_init__. This ensures type safety and maintains the hashability of the CodeGraphQuery instance, which is critical if it is used in caches or as a dictionary key.

Suggested change
def __post_init__(self) -> None:
def __post_init__(self) -> None:
if not isinstance(self.excluded_paths, frozenset):
object.__setattr__(self, "excluded_paths", frozenset(self.excluded_paths))
if not 1 <= self.node_limit <= MAX_GRAPH_NODES:
raise ValueError(f"node_limit must be between 1 and {MAX_GRAPH_NODES}")

The linter rewrites a string that escapes double quotes into one delimited
by single quotes, so the declaration went in unformatted.

sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Review complete. No specific code suggestions were generated. See the overview comment for a summary.

nfebe merged commit 8f5ee41 into main Aug 27, 2026
1 check passed
nfebe deleted the local/stack branch August 27, 2026 15:24
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL