-
Notifications
You must be signed in to change notification settings - Fork 15
feat: source pipeline integrity and operator tooling (v1.34.0) #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c0239b4
chore(brainstorm): source-pipeline-integrity
solaitken 7b19e33
fix(cli): treat early-closed stdout pipe as clean exit
solaitken ad09103
feat(hygiene): honor nested gitignore files in repo scan
solaitken e3fc4bc
feat(ingest): add --src-subpath and --exclude source scoping
solaitken c84b52f
feat(ingest): honor extractable flag during page discovery
solaitken ba0c6ef
feat(ingest): deterministic code-structure pre-extraction pass
solaitken 567a7cd
feat(ingest): reconcile dispatched vs ingested sources per plan
solaitken f1be8c1
feat(temporal): promote inline source citations to dated provenance e…
solaitken 0a83677
feat(search): configurable FTS tokenizer language and diacritic rules
solaitken 6b2ff62
feat(search): graph-degree cardinality predicates in filter DSL
solaitken e16e25a
feat(brain): guarded repair mode for doctor diagnostics
solaitken b775dc3
feat(brain): unified operator status snapshot with next-command hints
solaitken 5c298e7
docs: source pipeline integrity wave docs and version 1.34.0
solaitken 893e7e5
fix: address CodeRabbit review feedback
solaitken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
38 changes: 38 additions & 0 deletions
38
docs/brainstorm/source-pipeline-integrity/cli-output/claude.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| ### Variant 1: Two shared kernels, cluster-local units | ||
|
|
||
| - **Approach**: Extract exactly two new shared abstractions, each riding in with the first unit that needs it: a gitignore-style path-scope engine (`src/core/fs/ignore.ts`: nested ignore-file composition, nearer-`!`-wins, `.git/info/exclude` layering) introduced by Unit 1 and consumed by Unit 2's `--src-subpath`/`--exclude`; and a diagnostics-signal model (issue class + detector + optional fixer + next-command hint) introduced by Unit 9 and consumed by Unit 10's snapshot. Everything else lands as local changes to its existing module, organized into four clusters: scope/gate (1→2→3), ingest integrity (5, 4), provenance/query (6, 7, 8), operator surface (11, 9→10). The dependency spine is short - only 1→2 and 9→10 are hard edges; ship order 11, 1, 2, 3, 5, 4, 6, 7, 8, 9, 10 keeps every prefix coherent. | ||
| - **Trade-offs**: | ||
| - Pro: shared logic gets exactly one home (ignore matching, issue/hint model) without any infrastructure-only commit - each abstraction ships inside a feature commit with its tests. | ||
| - Pro: maximal prefix-shippability; a stalled wave still leaves `main` releasable after any unit. | ||
| - Pro: byte-identical opt-out is easy - the ignore engine replaces the static skip-dir list only where Unit 1 wires it; nothing else changes uninvoked. | ||
| - Con: the ingest path (Units 2, 3, 5, 4) stays four separate touch points in `ingest.ts`/`batch-plan.ts` rather than one explicit pipeline; a future wave may still want that consolidation. | ||
| - Con: the diagnostics model's shape is decided by Unit 9's needs and may need a small extension when Unit 10 arrives. | ||
| - **Complexity**: medium | ||
| - **Risk**: low | ||
|
|
||
| ### Variant 2: Source-pipeline spine | ||
|
|
||
| - **Approach**: Treat Units 1-5 as stages of one explicit discovery pipeline abstraction in `src/core/brain/ingest/`: scope (ignore engine + subpath/exclude) → gate (`extractable` check) → pre-extract (deterministic code-structure pass) → dispatch → reconcile, each stage a typed hook on a shared `SourcePipeline` context. Operator tooling (9, 10) similarly reads a shared health-signal registry, and hygiene scan (Unit 1) becomes another consumer of the same scope stage. Units 6, 7, 8, 11 remain peripheral standalone changes. | ||
| - **Trade-offs**: | ||
| - Pro: strongest conceptual match to the wave theme - one choke point for "what enters the vault and how," which future ingest features slot into. | ||
| - Pro: reconciliation (Unit 4) and gating (Unit 3) become trivially testable as pipeline stages rather than call-site patches. | ||
| - Con: the pipeline scaffold is effectively an infrastructure commit, which the repo's conventions discourage, and it forces refactoring `ingest.ts`/`batch-plan.ts` before any user-visible unit ships - a stalled wave leaves a half-migrated pipeline. | ||
| - Con: highest risk to the byte-identical opt-out constraint, since existing ingest flow is rerouted through new machinery even when no new flag is set. | ||
| - Con: hygiene scan (Unit 1) importing from `brain/ingest` inverts sensible layering; the ignore engine would need to live below both anyway, eroding the "one spine" elegance. | ||
| - **Complexity**: large | ||
| - **Risk**: high | ||
|
|
||
| ### Variant 3: Eleven islands, convention-only sharing | ||
|
|
||
| - **Approach**: Every unit lands independently in its own existing module with no new shared homes: Unit 1 implements ignore parsing inside `hygiene/`, Unit 2 imports that parser directly (a hygiene→ingest reach-across), Unit 10 calls the existing verb functions (`brain_health`, `brain_doctor`, etc.) and formats their outputs itself, and Unit 9 pairs fixers with doctor checks ad hoc inside `doctor.ts`. Ordering is nearly free - only Unit 2's import of Unit 1's parser is a hard edge. | ||
| - **Trade-offs**: | ||
| - Pro: cheapest to execute and the easiest to parallelize across agents; every commit is small, atomic, and independently revertable. | ||
| - Pro: near-perfect prefix-shippability with zero scaffolding to leave half-finished. | ||
| - Con: the ignore engine living under `hygiene/` while `ingest/` imports it violates the one-directional-layering direction, or else gets duplicated - either way conflicting with "shared logic gets exactly one home." | ||
| - Con: Unit 10 re-deriving and re-formatting signals from six verbs duplicates presentation logic and drifts as those verbs evolve; hints get hardcoded per call site instead of traveling with the issue. | ||
| - Con: defers exactly the consolidation debt the post-v1.30.1 refactor just paid down. | ||
| - **Complexity**: small | ||
| - **Risk**: medium | ||
|
|
||
| ### Recommended: Variant 1 | ||
| **Rationale**: Variant 1 delivers the two abstractions this wave genuinely reuses (ignore composition, diagnostics signals with hints) in their correct one-home locations, while avoiding Variant 2's infrastructure-first commit and its threat to the byte-identical opt-out and atomic-feature-commit conventions. Unlike Variant 3, it keeps layering one-directional - the ignore engine sits below both hygiene and ingest, and hints travel with issue definitions instead of being duplicated in the snapshot. Its short dependency spine (1→2, 9→10) preserves the constraint that a partially completed wave still ships as a coherent prefix of v1.34.0. |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🔴 Critical | ⚡ Quick win
Revert this hand-edited version bump and use the sync script.
As per coding guidelines, the version in
package.jsonis the single source of truth and mirrored files like.codex-plugin/plugin.jsonmust never be hand-edited. Please revert this change, bump the version inpackage.json, and runbun run scripts/sync-version.tsto propagate the change to all mirrored manifest files.🤖 Prompt for AI Agents
Source: Coding guidelines