Repository navigation
fix(check-gitignore): keep curated shared memory tracked - #24
Merged
Merged
Conversation
The .kit/ REQUIRED pattern ignored kit's local state wholesale. But the curated, committed-by-design shared tier lives at .kit/shared/memory.jsonl, and git won't descend into a wholesale-excluded directory — so no later negation could re-include it. Running `kit check` -> patch/heal would silently stop tracking shared memory (and hide it from gitleaks/PR review). Switch to the descendable `.kit/*` contents-ignore plus an explicit `!.kit/shared/` re-include (verified: wholesale `.kit/` makes the negation a no-op; `.kit/*` keeps it working). Existing `.kit`/`.kit/` lines are still recognized to avoid churn. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
|
✅ Docker image built successfully
|
…ired pattern The check-gitignore change in this PR added a second required entry (!.kit/shared/, to keep curated shared memory tracked), but the 'every signal on' status fixture still listed only the old '.kit/'. The gitignore signal then reported the negation as missing → ok=false → the all-green assertion failed. Fixture now mirrors the new required patterns (.kit/* + !.kit/shared/).
|
✅ Docker image built successfully
|
Merged
sandstream
added a commit
that referenced
this pull request
Jun 22, 2026
Cut 1.13.0 from the 11 PRs merged since v1.12.0. Backfilled the CHANGELOG entries that landed without one (full-disk-encryption check #26, secrets validate + env diff #28, .gitignore shared-memory fix #24, ~30k-line dead-code flush #27/#30) and dated the section. Minor bump: all additive or dead-code removal, nothing breaking.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
kit's memory has two tiers:
~/.kit/memory.db(global, secret-dense,0600, never committed).kit/shared/memory.jsonl, committed by design ("travels with the repo", diffable, PR-reviewable, gitleaks-scannable; deny-by-default + fail-closed secret-scan on write)But
check-gitignore'sREQUIRED_PATTERNSignored kit's local state with the wholesale.kit/form. git won't descend into a wholesale-excluded directory, so no later!.kit/shared/negation can re-include the curated tier. Result: runningkit check→patch/healwould silently stop tracking shared memory — you'd lose the curated tier, and gitleaks/PR review would no longer see it.Verified empirically:
.kit/elevation.json.kit/shared/memory.jsonl.kit/+!.kit/shared/.kit/*+!.kit/shared/Fix
Switch the local-state ignore to the descendable
.kit/*form plus an explicit!.kit/shared/re-include. Existing.kit/.kit/lines are still recognized as aliases to avoid churn on repos that already have them.src/check-gitignore.ts—.kit/→.kit/*+ new!.kit/shared/entry (with rationale comment).src/check-gitignore.test.ts— asserts patch emits.kit/*(never wholesale.kit/), emits!.kit/shared/, and that the negation comes after.kit/*.All 12 check-gitignore tests pass.
Known residual (out of scope)
A repo that already has a wholesale
.kit/line above the kit block stays broken — appending can't fix it, the line must be rewritten (patch only appends, never rewrites user lines). Candidate follow-up: haveverify()flag a pre-existing wholesale.kit/and recommend upgrading to.kit/*.🤖 Generated with Claude Code
https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
Generated by Claude Code