-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Feature/jcode integration #2578
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
Open
akvarel
wants to merge
10
commits into
Graphify-Labs:v8
Choose a base branch
from
akvarel:feature/jcode-integration
base: v8
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c346508
attributes
akvarel 5d74b91
test: specify native Jcode integration
akvarel a633ec6
feat: add native Jcode integration
akvarel 17968ff
AI-assisted: Jcode sync uv.lock to project version
akvarel 79fe28b
AI-assisted: Jcode test: specify validated knowledge ingestion
akvarel cee64f3
AI-assisted: Jcode test: cover knowledge reference resolution and ret…
akvarel 5dcee5a
AI-assisted: Jcode feat: add validated lat.md knowledge ingestion
akvarel a50d92e
AI-assisted: Jcode docs: document validated knowledge workflow
akvarel 77a7f17
fix: harden validated knowledge integration
akvarel d1ec2d3
feat: validate knowledge during graph updates
akvarel 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # Validated knowledge ingestion TDD evidence | ||
|
|
||
| ## Source | ||
|
|
||
| The user approved implementation of the recommended Graphify and Jcode validated | ||
| knowledge plan. This document covers the first Graphify milestone: native | ||
| `lat.md` ingestion, integrity checking, implementation linkage, and retrieval. | ||
|
|
||
| ## User journeys | ||
|
|
||
| 1. As an agent, I can query curated design constraints together with source-code | ||
| symbols so that I do not miss project invariants before editing code. | ||
| 2. As a maintainer, I can validate wiki links, source links, and required | ||
| implementation mentions so that project knowledge does not silently drift. | ||
| 3. As a project adopting lat.md, I can use Graphify's normal update workflow | ||
| without running a second retrieval service. | ||
|
|
||
| ## Requirement-to-check evidence | ||
|
|
||
| | # | Guarantee | Test or command | Type | Result | | ||
| |---|---|---|---|---| | ||
| | 1 | Headings become stable knowledge sections with first-paragraph summaries | `test_lattice_markdown_emits_stable_sections_summaries_and_wiki_edges` | Unit | PASS | | ||
| | 2 | Inline and fenced examples are ignored while source links become `documents` edges | `test_lattice_ignores_example_links_and_emits_source_documentation_edges` | Integration | PASS | | ||
| | 3 | `@lat` comments connect a knowledge section to its implementation file | `test_full_extract_links_at_lat_comment_to_knowledge_section` | Integration | PASS | | ||
| | 4 | Cross-file shorthand wiki links resolve to full stable section IDs | `test_full_extract_resolves_cross_file_short_wiki_reference` | Integration | PASS | | ||
| | 5 | Broken, ambiguous, and missing implementation references are diagnosed | `test_validate_lattice_reports_broken_ambiguous_and_unimplemented_required_sections` | Unit | PASS | | ||
| | 6 | Invalid lattices return structured JSON and exit code 1 | `test_check_knowledge_cli_returns_json_and_nonzero_for_invalid_lattice` | CLI acceptance | PASS | | ||
| | 7 | Query scoring searches summaries and returns the summary in bounded output | `test_query_retrieves_lattice_summary_after_normal_extraction` | Public retrieval | PASS | | ||
| | 8 | A real valid lattice is accepted through the public CLI | `uv run python -m graphify check-knowledge /home/sergey/.jcode/scratch/graphify-lattice-valid --json` | CLI acceptance | PASS, 2 sections, 0 errors | | ||
| | 9 | The implementation is compatible with the official lat.md repository | `validate_lattice(Path('/home/sergey/.jcode/scratch/lat.md-official'))` | Real integration | PASS, 24 files, 192 sections, 0 errors | | ||
| | 10 | Dotted lattice filenames remain knowledge references rather than source paths | `test_dotted_lattice_file_reference_is_not_misclassified_as_source` | Integration | PASS | | ||
| | 11 | Incremental lattice updates rediscover mentions in unchanged source files | `test_lattice_change_rescans_unchanged_source_mentions` | Incremental integration | PASS | | ||
| | 12 | Source links cannot escape the project root | `test_source_reference_cannot_escape_project_root` | Security | PASS | | ||
| | 13 | Code-mention validation honors Graphify ignore rules | `test_validation_respects_graphifyignore_when_scanning_code_mentions` | Integration | PASS | | ||
| | 14 | Adjacent extraction, CLI, query, and security behavior remains intact | focused regression command below | Regression | PASS, 460 tests | | ||
| | 15 | Removed or ambiguous knowledge targets in source comments are diagnosed | `test_validation_reports_stale_and_ambiguous_code_mentions` | Integrity | PASS | | ||
| | 16 | `graphify update` returns exit code 1 after rebuilding an invalid lattice | `test_update_automatically_fails_after_rebuild_when_lattice_is_invalid` plus public scratch workflow | CLI acceptance | PASS, both wiki and code diagnostics emitted | | ||
| | 17 | Projects without `lat.md/` keep their existing update behavior | `test_update_skips_knowledge_validation_for_projects_without_lattice` | Compatibility | PASS | | ||
| | 18 | Valid knowledge passes automatically through the public update workflow | `python -m graphify update .../graphify-knowledge-update-valid-94 --no-cluster` | CLI acceptance | PASS, 2 sections across 1 file | | ||
|
|
||
| ## RED evidence | ||
|
|
||
| 1. `uv run pytest -q tests/test_lattice_ingest.py` failed during collection with | ||
| `ModuleNotFoundError: graphify.lattice_ingest` before production code existed. | ||
| 2. After the first minimal implementation, the strengthened tests failed because | ||
| cross-file shorthand links were pruned and summary-only queries returned | ||
| `No matching nodes found.` | ||
| 3. The source-link compatibility test failed because no `documents` edge was | ||
| emitted before Markdown-aware parsing was implemented. | ||
| 4. Independent review added four regressions which initially failed: incremental | ||
| `@lat` rediscovery, dotted lattice filenames, source-root containment, and | ||
| ignore-aware validation scanning. | ||
| 5. The workflow milestone began with two expected failures: stale `@lat` comments | ||
| were silently ignored, and `graphify update` returned success for an invalid | ||
| knowledge lattice. | ||
|
|
||
| Checkpoint commits: | ||
|
|
||
| - `79fe28b` specifies the initial missing behavior. | ||
| - `cee64f3` specifies cross-file resolution and public retrieval behavior. | ||
|
|
||
| ## GREEN evidence | ||
|
|
||
| - `uv run pytest -q tests/test_lattice_ingest.py`: 11 passed. | ||
| - `uv run pytest -q tests/test_lattice_ingest.py tests/test_manifest_ingest.py tests/test_languages.py tests/test_cli_export.py tests/test_query_cli.py tests/test_security.py`: 460 passed. | ||
| - `env -u DEEPSEEK_API_KEY -u DEEPSEEK_BASE_URL uv run pytest -q --ignore=tests/test_falkordb_integration.py`: 4,157 passed, 1 skipped. The excluded integration requires a FalkorDB server with the `GRAPH.QUERY` module; the available localhost service was plain Redis. | ||
| - Workflow milestone focused suite: 14 passed. | ||
| - Workflow milestone adjacent suite including update/watch behavior: 577 passed. | ||
| - Workflow milestone deterministic full suite: 4,160 passed, 1 skipped. | ||
| - `uv run ruff check graphify/lattice_ingest.py graphify/extract.py graphify/serve.py graphify/cli.py graphify/__main__.py tests/test_lattice_ingest.py`: passed. | ||
| - GREEN implementation checkpoint: `5dcee5a`. | ||
|
|
||
| ## Coverage | ||
|
|
||
| `uv run pytest -q tests/test_lattice_ingest.py --cov=graphify.lattice_ingest --cov-report=term-missing --cov-fail-under=80` | ||
|
|
||
| The initial seven-test milestone reached 89% statement coverage. The final | ||
| eleven-test suite adds independent-review coverage for incremental, security, | ||
| ignore, and dotted-filename edge cases. | ||
|
|
||
| ## Known boundaries | ||
|
|
||
| - Graphify validates that referenced source files exist. Symbol-level source-link | ||
| validation is deferred to the next milestone, where links will resolve against | ||
| Graphify's language-aware symbol index. | ||
| - This milestone does not add a separate lat.md semantic index or service. | ||
| Curated summaries participate directly in Graphify's existing query scorer. | ||
| - Jcode changes are intentionally deferred until the Graphify public graph and | ||
| CLI contract is committed and stable. |
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
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.
dispatch_command()fans out to 120 callees (efferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.