Skip to content

test(extraction): cover the fork's fm_agent work-directory exclusion - #8

Merged
Dshuishui merged 1 commit into
mainfrom
test/fm-agent-workdir-exclusion
Aug 23, 2026
Merged

test(extraction): cover the fork's fm_agent work-directory exclusion#8
Dshuishui merged 1 commit into
mainfrom
test/fm-agent-workdir-exclusion

Conversation

@Dshuishui

Copy link
Copy Markdown
Collaborator

The fork's own patch — fm_agent in DEFAULT_IGNORE_DIRS — has no test. It is one
line in a name set, and that set sits in a file upstream touches often, which makes
it exactly the kind of thing an upstream sync can silently drop or widen. Losing it
fails nothing: the build passes, the suite is green, the release ships, and the
index quietly grows a second copy of every function FM-Agent extracted.

This adds regression cover for it, and records the file in FORK.md's patch table —
the list a sync is checked against.

What it pins

  • The exclusion applies at the project root and at any nested depth, for both
    languages the artifacts come in. Depth matters: FM-Agent's work directory sits at
    the root of the directory it was pointed at, which is not necessarily the root
    CodeGraph indexes.
  • It is a whole-name match, not a prefix or substring one — fm_agent_data/,
    my_fm_agent/ and a file named fm_agent.c all stay indexed. This is what keeps
    the blast radius small.
  • A .gitignore negation (!fm_agent/) takes the directory back, nested included.
    That escape hatch is what makes the any-depth match acceptable, so it belongs in a
    test rather than only in prose.
  • None of it depends on git: the exclusion holds with no repository at all, and with
    the artifacts committed. The second case is not hypothetical — FM-Agent's
    incremental mode checks a commit that can contain them out into a temporary
    worktree and indexes that.

Verification

New tests 4/4; full suite 2905 passed, 0 failed.

Mutation-checked: commenting out the one line in DEFAULT_IGNORE_DIRS fails 3 of the
4 (the fourth asserts a directory is indexed, which holds without the patch too —
as expected).

The fork's own patch — `fm_agent` in `DEFAULT_IGNORE_DIRS` — had no test. It is
one line in a name set, and that set is a part of the file upstream touches
often, which makes it exactly the kind of thing an upstream sync can silently
drop or widen. Losing it fails nothing: the build passes, the suite is green,
the release ships, and the index quietly grows a second copy of every function
FM-Agent extracted.

Pins the behaviour down, and records the file in FORK.md's patch table — the
list a sync is checked against.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Dshuishui
Dshuishui merged commit 16721d3 into main Aug 23, 2026
1 check passed
@Dshuishui
Dshuishui deleted the test/fm-agent-workdir-exclusion branch August 23, 2026 03:15
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