Skip to content

feat(tools): read .qqignore alongside .gitignore and .ignore - #172

Merged
lg2m merged 2 commits into
mainfrom
devin/1790293834-k2-workspace-index
Sep 25, 2026
Merged

lg2m merged 2 commits into
mainfrom
devin/1790293834-k2-workspace-index

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Narrowed in review from a Merkle workspace index plus a three-part ADR. Review notes are in the ledger and decisions-needed.md; the index follows as a stacked PR.

What

.qqignore joins .gitignore/.ignore in the per-directory matcher stack search and tree share (tools/walk.rs::directory_matcher). A project can hide git-tracked paths (fixtures, vendored trees, generated docs) from every listing tool with one file in gitignore syntax. Tool schemas are unchanged; search/tree output honors the new file.

Only these three files are read. tools.md § Read-Side Walk records why tool-private (.rgignore, .cursorignore, …), other-VCS, and global git excludes are not: they would make the tree depend on which editors a developer has installed, and each is another probe per directory on the search hot path.

Docs

  • The bundled ADR-0042 draft is dropped (0042 is taken on main by the trust-prompt ADR; next free stays 0044) along with the kern-primitives plan and ledger. A Proposed ADR for unimplemented work is not how this repo records decisions.
  • K1 (journaled edits) is folded into docs/plans/run-snapshots.md § Atomic Multi-File Edits with the design corrected: one journal record per batch under the QQ data directory, recovered under the apply lock, instead of a per-transaction blob store inside the workspace. § Change Detection names the index. Sequencing updated.
  • K3 (digest-only prompt manifest) recorded as not pursued in decisions-needed.md row 9, with the reason.
  • Receipt in docs/plans/progress/tool-layer.md.

Measured

search_walk A/B: tree_depth2 (200 dirs) 4.82 → 5.03 ms — the extra probe; content_absent_10k_full_scan 20.3 → 18.1 ms, references_10k_full_scan 20.1 → 20.2 ms, names_10k 1.98 → 2.00 ms — noise.

Verification

cargo fmt --check, cargo clippy -p qq-core --all-targets --all-features -D warnings, cargo test -p qq-core green; the tools::tests search/tree case covers a .qqignore rule hiding a file from both.

No Linear issue exists for this work.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Devin Review found 4 potential issues.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment thread crates/qq-core/src/tools/index.rs Resolved
Comment thread crates/qq-core/src/tools/index.rs Resolved
Comment thread crates/qq-core/src/tools/index.rs Resolved
Comment thread crates/qq-core/src/tools/index.rs Resolved
Comment thread crates/qq-core/src/tools/index.rs Resolved
integrate-your-mind and others added 2 commits September 25, 2026 13:54
Adds .qqignore to the per-directory matcher stack search and tree share, so
a project can hide paths git tracks (fixtures, vendored trees, generated
docs) from every listing tool with one file in gitignore syntax. The tool
schemas are unchanged; search and tree output honors the new file.

Only .gitignore, .ignore, and .qqignore are read, and tools.md records why
tool-private and other-VCS ignore files are not.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Replaces the bundled ADR-0042 draft (number already taken on main) and the
kern-primitives plan with the parts QQ needs, filed where they belong:

- run-snapshots gains § Atomic Multi-File Edits: a one-record journal per
  edit batch under the QQ data directory, recovered under the apply lock,
  instead of a per-transaction blob store inside the workspace; and
  § Change Detection naming the incremental Merkle index as the dirty scan.
- decisions-needed row 9 records the digest-only prompt manifest as not
  pursued, with the reason.
- tool-layer ledger receipt for .qqignore with the search_walk A/B.
@lg2m
lg2m force-pushed the devin/1790293834-k2-workspace-index branch from dcb5453 to c030c77 Compare September 25, 2026 21:15
@lg2m lg2m changed the title feat(runtime): Merkle workspace index and .qqignore (K2) feat(tools): read .qqignore alongside .gitignore and .ignore Sep 25, 2026
@lg2m
lg2m added this pull request to stack #192 September 25, 2026 21:20
@lg2m
lg2m merged commit bd43660 into main Sep 25, 2026
@lg2m
lg2m deleted the devin/1790293834-k2-workspace-index branch September 25, 2026 21:29
lg2m added a commit that referenced this pull request Sep 25, 2026
…ange detection (#191)

Adds qq_core::WorkspaceIndex (workspace/index.rs) over the search/tree
walker: build hashes every admitted file and directory; refresh against a
previous index reuses a file's hash when size and mtime are unchanged and
the mtime is strictly older than the previous walk, so a checkpoint on a
quiet tree is a walk with no reads; diff yields sorted added/modified/
deleted paths. A budget-stopped build is IndexOutcome::Partial, which has
no root hash and cannot be diffed. Hashes are qq_protocol::ContentHash;
directory hashes cover child names so a moved subtree keeps its hash.

Reworked from the contribution in #172: chunking dropped (no consumer),
hex-String hashes replaced, partial root hash removed, incremental refresh
added. EntryKind::File gains modified from the metadata call the walker
already makes; search_walk is unchanged within noise.

Bench workspace_index, 10k files / 17.6 MB, original -> reworked:
build 52.0 -> 26.1 ms; diff 73 -> 35 us; refresh_quiet 6.8 ms with every
hash reused; refresh_one_edit 7.3 ms.

Co-authored-by: romy <[email protected]>
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.

2 participants