Repository navigation
feat(config): ignore_worktrees rework for DeusData#1430 - #1
Conversation
6bb8ad6 to
0d2f840
Compare
nohjbotIn response to this PR's description.
Review failed. I could not obtain all the changes needed for a complete review. What would satisfy approvalNot approved: a valid review has not completed. No new code defect was established by this incomplete attempt. Have the workflow operator restore complete access to the PR diff and commit history. If it exceeds supported API limits, split the PR into reviewable changes. Approval needs a complete review of the current head with no concrete code bugs remaining, followed by a successful check and confirmed GitHub approval. Tests and additional proof are not an approval requirement. This request is not queued for an automatic retry. Once the cause is addressed, post a new |
|
@nohjbot review |
nohjbot
Review failed. I could not obtain all the changes needed for a complete review. What would satisfy approvalNot approved: a valid review has not completed. No new code defect was established by this incomplete attempt. Have the workflow operator restore complete access to the PR diff and commit history. If it exceeds supported API limits, split the PR into reviewable changes. Approval needs a complete review of the current head with no concrete code bugs remaining, followed by a successful check and confirmed GitHub approval. Tests and additional proof are not an approval requirement. This request is not queued for an automatic retry. Once the cause is addressed, post a new |
Agents that use `git worktree add` to run parallel branches end up with one
indexed project per worktree. Each is a near-duplicate of the main checkout,
so the cache fills with redundant graphs and project pickers get noisy.
Add an opt-in `ignore_worktrees` config key. When enabled, a linked worktree
is left alone:
- auto-index on connect skips it (logged as autoindex.skip)
- the daemon's background auto-index skips it
- explicit index_repository refuses with an actionable message naming both
ways forward (index_worktree=true, or turn the key off)
- the hook-augment "not indexed" guidance stops telling the agent to run
index_repository in a directory where it would only be refused
Detection is git plumbing, no subprocess: <path>/.git must be a regular file
holding a "gitdir:" pointer AND that gitdir must contain a `commondir` file.
The commondir check is what separates a linked worktree from a submodule,
whose .git is also a gitlink file but whose gitdir has no commondir. The main
checkout of a repo that has worktrees is never affected.
Defaults to false, so behaviour is unchanged unless the key is set.
Signed-off-by: Nohj <[email protected]>
Upstream's Unicode path fix dropped stat() from this file because it follows symlinks and rejects non-ASCII paths on Windows. Keep ignore_worktrees detection on cbm_path_info_utf8 so the rebase does not restore that probe. Signed-off-by: Nohj <[email protected]>
0d2f840 to
d63d0e1
Compare
|
@kody review --force |
|
@nohjbot review |
nohjbot
ReviewCode review passed at Reasoned review decisionsR1 - correctness and execution flow ( I traced the new R2 - independent regression and risk ( The default-off setting, explicit-index refusal and override, and both auto-index gates follow the intended paths. I found one inconsistency in lifecycle guidance: the hook checks the supplied working directory for a R3 - challenge and final decision ( I found no concrete code defect in this PR. Candidate adjudication
Context limits: diff, bounded past discussion, changed-file source, and heuristic related context. 3 stage-requested source window(s), 0 unavailable/omitted, 2 truncated. R3 received 17 source entries; 23 omitted entries are recorded in the execution. At most one round of six read-only source requests per stage at pinned head/base. This is not exhaustive repository/caller coverage. No code or tests were run. Tests, logs and proof packages are not approval requirements. Approval statusNo code changes are requested by this review. GitHub approval is submitted separately after the review check succeeds and the PR snapshot is reverified. If approval is missing, the workflow operator should check the check/approval publishing steps and restore any failed API access, then request Automatic review of new commits is off. Request another review with |
There was a problem hiding this comment.
No open findings in commit d63d0e16d18cf46836f0d019a03726bb6a577d16.
Full nohjbot review. This approval covers that reviewed commit only.
A session queued while capacity was full could still be indexed after the setting was turned on. Retry admission now applies the same linked-worktree gate as the initial path. Signed-off-by: Nohj <[email protected]>
|
@kody review --force |
|
@nohjbot review |
nohjbot
ReviewCode review passed at Reasoned review decisionsR1 - correctness and execution flow ( I traced the one changed hunk in On skip, the new path clears The filesystem probe runs while One non-blocking observation: the retry runs on the job thread and reads The earlier kody findings in unchanged files ( R2 - independent regression and risk ( The retry path now rechecks the same linked-worktree setting used at initial admission. When it is enabled for a queued linked worktree, the code clears the pending flag and continues before constructing index arguments or subscribing a job. I found no concrete bug introduced by this change. No tests were run. R3 - challenge and final decision ( There are no reviewer candidates and no prior open findings, and I found no concrete defect in the one changed hunk. The new gate in On skip, the branch clears The filesystem probe runs under Candidate adjudicationNeither independent review proposed a new concrete bug. R3 completed the final code-based judgment and prior-finding reconciliation. Context limits: diff, bounded past discussion, changed-file source, and heuristic related context. 0 stage-requested source window(s), 0 unavailable/omitted, 0 truncated. R3 received 4 source entries; 10 omitted entries are recorded in the execution. At most one round of six read-only source requests per stage at pinned head/base. This is not exhaustive repository/caller coverage. No code or tests were run. Tests, logs and proof packages are not approval requirements. Approval statusNo code changes are requested by this review. GitHub approval is submitted separately after the review check succeeds and the PR snapshot is reverified. If approval is missing, the workflow operator should check the check/approval publishing steps and restore any failed API access, then request Automatic review of new commits is off. Request another review with |
There was a problem hiding this comment.
No open findings in commit 3bb85c8c7c3c005fc59bed0a8ee5c467d903a761.
Full nohjbot review. This approval covers that reviewed commit only.
nohjbot
ReviewChanges needed at Reasoned review decisionsR1 - correctness and execution flow ( I traced the one behavioral change. Traced cases:
Non-blocking observation: the gitdir strings are compared textually. With git's R2 - independent regression and risk ( The new guard compares linked-worktree identities before retaining a lifecycle hook’s indexed-project match, so a nested child worktree no longer inherits its indexed parent’s graph. I found one remaining compatibility case: the identity comparison uses unnormalized gitdir strings, which can reject an index belonging to the same worktree when the cwd uses a symlink and its gitlink contains a relative pointer. No tests were run. R3 - challenge and final decision ( F1 is resolved. The lifecycle guard now keeps a resolved project only when R2-C1 is confirmed as a narrow bug introduced by this commit. The new identity check compares raw gitdir strings. For a relative Candidate adjudication
Confirmed code bugsF2 - P2 - Relative gitdir pointers make a symlinked cwd lose its own worktree index Failing path: A linked worktree has a relative
Previous findings
Context limits: diff, bounded past discussion, changed-file source, and heuristic related context. 0 stage-requested source window(s), 0 unavailable/omitted, 0 truncated. R3 received 7 source entries; 22 omitted entries are recorded in the execution. At most one round of six read-only source requests per stage at pinned head/base. This is not exhaustive repository/caller coverage. No code or tests were run. Tests, logs and proof packages are not approval requirements. What would satisfy approvalNot approved: 1 unresolved finding remains. Each describes a code-supported bug. Code inspection of the current head can resolve it; no separate proof package is required.
Push the code fix, then comment Automatic review of new commits is off. Request another review with |
A 64-level walk missed a deep session path, and a relative gitdir joined onto a symlink spelling no longer matched the real project root. Walk to the filesystem root and compare canonical gitdirs. Drop the unused project resolver that failed the macOS -Werror build. Signed-off-by: Nohj <[email protected]>
|
@kody review --force |
|
@nohjbot review |
nohjbot
ReviewCode review passed at Reasoned review decisionsR1 - correctness and execution flow ( This commit makes three changes. It removes the unused
I found no new defect. Two non-blocking notes:
R2 - independent regression and risk ( The ancestor walk now stops at a Git anchor or the filesystem root rather than at 64 components, so the depth limit no longer bypasses the worktree check. The identity comparison now canonicalizes both gitdirs before comparing them, addressing the symlinked-cwd case in F2. Removing the unused resolver does not change the visible call path. I found no new code-supported bug in this increment; no tests were run. R3 - challenge and final decision ( Neither independent review raised a candidate, and I found no new defect caused by this increment. The commit makes three changes:
The raw-string fallback is effectively unreachable for a detected linked worktree. F2 is resolved: a relative gitdir joined onto a symlinked cwd root and onto the canonical project root now resolves to the same real path. The one remaining cost, extra stat probes on ancestors up to the filesystem root when no git anchor exists, is not a defect. Candidate adjudicationNeither independent review proposed a new concrete bug. R3 completed the final code-based judgment and prior-finding reconciliation. Previous findings
Context limits: diff, bounded past discussion, changed-file source, and heuristic related context. 2 stage-requested source window(s), 0 unavailable/omitted, 1 truncated. R3 received 6 source entries; 16 omitted entries are recorded in the execution. At most one round of six read-only source requests per stage at pinned head/base. This is not exhaustive repository/caller coverage. No code or tests were run. Tests, logs and proof packages are not approval requirements. Approval statusNo code changes are requested by this review. GitHub approval is submitted separately after the review check succeeds and the PR snapshot is reverified. If approval is missing, the workflow operator should check the check/approval publishing steps and restore any failed API access, then request Automatic review of new commits is off. Request another review with |
There was a problem hiding this comment.
No open findings in commit 72f1a52dc6bb898166a2998b335c0682110a5c31.
Full nohjbot review. This approval covers that reviewed commit only.
A symlink into a linked worktree has no .git on its lexical path, so the hook told the agent to run index_repository. That call canonicalizes first and then refuses. Resolve the cwd before project lookup and the ignore_worktrees checks. Signed-off-by: Nohj <[email protected]>
|
@kody review --force |
|
@nohjbot review |
nohjbot
ReviewCode review passed at Reasoned review decisionsR1 - correctness and execution flow ( This increment canonicalizes the lifecycle hook's cwd with R2 - independent regression and risk ( The lifecycle hook now canonicalizes the cwd before both project resolution and the ignore_worktrees checks. On POSIX, this makes a symlink into an unindexed linked worktree reach the worktree’s Git anchor and receive the ignored-worktree guidance; an indexed worktree still goes through the same-project comparison. I found no new code-supported bug in this increment. No tests were run. R3 - challenge and final decision ( This increment has no blocking defect; neither independent review raised a candidate. Candidate adjudicationNeither independent review proposed a new concrete bug. R3 completed the final code-based judgment and prior-finding reconciliation. Context limits: diff, bounded past discussion, changed-file source, and heuristic related context. 0 stage-requested source window(s), 0 unavailable/omitted, 0 truncated. R3 received 5 source entries; 16 omitted entries are recorded in the execution. At most one round of six read-only source requests per stage at pinned head/base. This is not exhaustive repository/caller coverage. No code or tests were run. Tests, logs and proof packages are not approval requirements. Approval statusNo code changes are requested by this review. GitHub approval is submitted separately after the review check succeeds and the PR snapshot is reverified. If approval is missing, the workflow operator should check the check/approval publishing steps and restore any failed API access, then request Automatic review of new commits is off. Request another review with |
There was a problem hiding this comment.
No open findings in commit 394faaacfbec823e3d138407bb21ad46869f9022.
Full nohjbot review. This approval covers that reviewed commit only.
The ignore_linked initializer exceeded the formatter's assignment break. Lint treats that as an error, so the line now matches .clang-format. Signed-off-by: Nohj <[email protected]>
|
@kody review --force |
|
@nohjbot review |
nohjbot
ReviewCode review passed at Reasoned review decisionsR1 - correctness and execution flow ( This increment only reflows the
That is the same as at 394faaa. The prior findings F1 and F2 are already resolved and are not reopened. No tests were run. R2 - independent regression and risk ( The only change reflows the ignore_linked assignment. It preserves the same short-circuit evaluation and leaves the subsequent same-worktree check, project cleanup, and guidance selection unchanged. I found no new code-supported defect in this increment; there are no prior open or uncertain findings to reassess. R3 - challenge and final decision ( Code review passed at 3bab061. This commit only reformats the Candidate adjudicationNeither independent review proposed a new concrete bug. R3 completed the final code-based judgment and prior-finding reconciliation. Context limits: diff, bounded past discussion, changed-file source, and heuristic related context. 0 stage-requested source window(s), 0 unavailable/omitted, 0 truncated. R3 received 4 source entries; 11 omitted entries are recorded in the execution. At most one round of six read-only source requests per stage at pinned head/base. This is not exhaustive repository/caller coverage. No code or tests were run. Tests, logs and proof packages are not approval requirements. Approval statusNo code changes are requested by this review. GitHub approval is submitted separately after the review check succeeds and the PR snapshot is reverified. If approval is missing, the workflow operator should check the check/approval publishing steps and restore any failed API access, then request Automatic review of new commits is off. Request another review with |
There was a problem hiding this comment.
No open findings in commit 3bab06134bdf1401e568884e1e624c464522635e.
Full nohjbot review. This approval covers that reviewed commit only.
|
@kody review --force |
The memory-core ratchet rejects another raw free() in the hook. Keep the parent name until the existing free(project) and skip it when the match is a different worktree. Signed-off-by: Nohj <[email protected]>
|
@kody review --force |
|
@nohjbot review |
nohjbot
ReviewCode review passed at Reasoned review decisionsR1 - correctness and execution flow ( This increment removes a second
The unindexed message and the R2 - independent regression and risk ( The change retains a mismatched parent project name until the existing cleanup, while R3 - challenge and final decision ( Code review passed at b21c8cc. This commit replaces the early Candidate adjudicationNeither independent review proposed a new concrete bug. R3 completed the final code-based judgment and prior-finding reconciliation. Context limits: diff, bounded past discussion, changed-file source, and heuristic related context. 0 stage-requested source window(s), 0 unavailable/omitted, 0 truncated. R3 received 4 source entries; 11 omitted entries are recorded in the execution. At most one round of six read-only source requests per stage at pinned head/base. This is not exhaustive repository/caller coverage. No code or tests were run. Tests, logs and proof packages are not approval requirements. Approval statusNo code changes are requested by this review. GitHub approval is submitted separately after the review check succeeds and the PR snapshot is reverified. If approval is missing, the workflow operator should check the check/approval publishing steps and restore any failed API access, then request Automatic review of new commits is off. Request another review with |
There was a problem hiding this comment.
No open findings in commit b21c8ccb6ec37b53d026984278bd795db5f3abc1.
Full nohjbot review. This approval covers that reviewed commit only.
|
@kody review --force |
1 similar comment
|
@kody review --force |
Lands
ignore_worktreeson this fork'smain.Rebased onto current
upstream/mainso this pull request is only the feature. When the key is enabled, a linked git worktree is skipped by auto-index and refused by an explicitindex_repository(passindex_worktree=true, or turn the key off). The default stays off, so existing checkouts are unchanged.Worktree detection uses
cbm_path_info_utf8rather thanstat(), matching the Unicode repository-path fix already on main.The upstream contribution is still DeusData#1430 and is not changed by this pull request.
Signed-off-by: Nohj [email protected]
Summary
Adds an optional
ignore_worktreessetting so short-lived linked Git worktrees do not each get their own stored project index. It is off by default, so existing indexing behavior stays the same.When enabled, automatic indexing skips linked worktrees, including jobs waiting to retry. A manual
index_repositoryrequest is refused unlessindex_worktree=trueis passed. Session guidance explains that an unindexed worktree was skipped on purpose instead of suggesting an indexing request that would be refused. Main checkouts, ordinary clones, and submodules are unaffected.Files touched and purpose