Repository navigation
feat(deep-enrich): align graph documents with wiki method - #1569
Conversation
Testing record: The description documents a representative real-CLI run and artifact assertions, satisfying the review requirement. The disclosed AI-launcher limitation does not warrant a missing-e2e finding. I did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@huong8373tt-beep Thanks. I built cc3aed79 and ran codebase --deep-enrich on a v2 evidence manifest. Recall routing for the G6 rename is correct, and build, tsc, lint and the changed tests pass. Against #1565, five items are not met yet. I reproduced each one with the built CLI:
- [P1 blocking] Five generated files come out as one line.
src/deep-enrich.tslines 467, 497, 531, 555 and 580 usejoin('\\n'), which writes a literal backslash-n. That breaks G4, G7, G8, G9 andgraph-coverage.md. The 1,959-bytegraph-coverage.mdin the body's record is this broken file. No test reads these files, which is why CI is green. - [P1 blocking] The multi-hop index misses paths. With
Api→Service,Service→StoreandApi→Store, it prints "No indirect dependency path was extracted", althoughApi→Service→Storeexists. A destination already reached directly is skipped. - [P1 blocking] Reverse reachability stops at one hop. In the same graph, Store's row lists
Servicebut notApi. - [P1 blocking] K3 says "Contradictions: 0 detected" without comparing anything. It only checks that files exist (
src/deep-enrich.ts:893). Until a real check exists, it should say the check was not run. - [P1 blocking] G2 relations have no confidence label. #1565 asks for one on every relation.
Also in scope:
- [P2 non-blocking, should be fixed here] The old G6 file stays behind. After a re-run on the same extract,
graph-g6-multihop.mdis still there. It is removed only when the manifest is newer, and recall's context list still matchesdocs/*.md, so recall can still read the old file.
The first four match the CI review. I agree with it, and rate them blocking because this PR closes #1565.
@jeff-r2026 Your call once these are fixed.
|
Addressed the review findings in
Verification passed: The added regression uses |
Earlier findings: All four are resolved: real newlines, indirect paths to directly reachable nodes, transitive reverse reachability, and honest deferred consistency reporting. Testing record: The description documents a representative real-CLI run and artifact assertions, satisfying the requirement. The disclosed AI-launcher limitation is not a missing-e2e finding. Reviewed only the requested diff; did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@huong8373tt-beep Thanks, all five points and the old G6 file are fixed at 10eed9e8. I checked each with the built CLI:
- The generated files have real line breaks.
Api → Service → Storeis listed.- Store's reverse row includes
Api. - K3 says the contradiction comparison is deferred.
- G2 relations carry confidence.
- A rerun removes
graph-g6-multihop.md.
One new thing blocks, and it matches the CI review:
-
[P1 blocking] Reverse reachability enumerates every upstream path. The reverse loop in
buildG6Content(src/deep-enrich.ts, around lines 867–890) queues one entry per path, with no dedup or cap. In a layered graph where each node calls both nodes of the next layer, the paths into the last node double with each layer. With the built CLI:layers (nodes, edges) graph-g6-triples.mdpeak RSS 8 (17, 30) 186 KB 117 MB 12 (25, 46) 4.9 MB 155 MB 16 (33, 62) 112 MB 1.07 GB 18 (37, 70) not written: JavaScript heap out of memory— Keeping one entry per upstream node, and capping the explicit paths per target with a note when the row is cut, keeps the result linear. Your test expects the 2-hop
Api → (CALLS) → Service → (WRITES) → Storein Store's row, so the cap needs to keep it. A 16-layer fixture asserting bounded output would guard this.
Optional:
- [P3 nit] G2 also labels the producer's intro and count lines as relations, for example
[EXTRACTED] 2 dependency path(s) traced from entry points (max depth 4). - [P3 nit]
expect(content).not.toContain('\\\\n')looks for two backslashes, but the bug wrote one.not.toMatch(/\\n/)would catch it. - The body's real-CLI record still describes the old one-line
graph-coverage.md(1,959 bytes). It is now 1,943 bytes over 16 lines.
Lint & Test and two E2E shards were still running when I checked. None had failed.
@jeff-r2026 Your call once the reverse-reachability bound is in.
|
Addressed the bounded reverse-reachability review in
Verification: |
|
No new findings in the requested diff. Earlier findings: All five are resolved: real newlines, multi-hop paths to directly reachable nodes, transitive reverse reachability, honest deferred consistency reporting, and bounded reverse-path enumeration. Testing record: The PR description documents a representative real-CLI run and artifact assertions, satisfying the requirement. The disclosed AI-launcher limitation does not warrant a missing-e2e finding. Reviewed only the requested diff; did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@huong8373tt-beep Thanks, the reverse-reachability bound works at 0daa12f4. With the built CLI, peak memory stays around 120 MB on the layered graph at 8, 12, 16, 18 and 30 layers, and on a 300-node random DAG. The 30-layer graph-g6-triples.md is 344 KB. Each row's predecessor set matches an independent ancestor computation, and Store's row keeps Api → (CALLS) → Service → (WRITES) → Store. The earlier fixes all still hold. The body's record described the old 1,959-byte graph-coverage.md, so I added our run at this head under "Real-CLI verification at 0daa12f".
Non-blocking:
- [P2 non-blocking] The 32-path cap bounds the path cells, but the "Reachable predecessor nodes" column still lists every ancestor in every row. G6 therefore grows with the transitive closure: 129 KB on the 300-node DAG, against 1.5 KB on main. Nothing fails at these sizes. A count, or a cap with a note, would bound it if wanted.
- [P3 nit] In the sort comparator (
src/deep-enrich.ts, around line 874),aDepthandbDepthcount incoming edges, not depth. - [P3 nit]
skill-data/wiki/references/agents/graph-rag-agent.md:190-191still shows the old two-column reverse header. - [P3 nit] Still open from before: G2 labels the producer's intro and count lines, and the newline assertion looks for two backslashes.
Two macOS Lint & Test jobs and one E2E shard were still running when I checked. None had failed.
@jeff-r2026 Nothing blocking from my side once CI is green.
|
Confirmed current head |
Each reverse-reachability row listed every ancestor and up to 32 paths that grew with graph depth, so graph-g6-triples.md grew with the transitive closure (344 KB on a 30-layer DAG). Rows now carry the predecessor count, the 32 nearest predecessors in breadth-first order, and routes for the 8 nearest, with a note when either is cut. Routes are shortest; a direct predecessor that also reaches the target through another direct predecessor shows that route, so Api → Service → Store stays in Store's row. This replaces the incoming-edge sort that existed only to steer the depth-first walk.
The `# Dependency Paths` title opened a chain block, so the producer's intro and path-count lines were tagged [EXTRACTED] like relations. Only `## entry` headings open a chain now. The graph-doc newline check looked for two backslashes; it now asserts that no literal backslash-n reaches the written files.
Earlier findings: All five are resolved: real newlines, direct-plus-indirect paths, transitive reverse reachability, honest deferred consistency reporting, and bounded reverse-path enumeration. Testing record: The description documents representative real-CLI runs at Reviewed only the requested diff; did not run, build, or install PR code. |
Put the [EXTRACTED] label after the producer's list marker, so each step renders as its own list item instead of one paragraph.
Add the header and delimiter rows the wiki methodology uses, so each Quick Reference block renders as a table instead of a paragraph.
Each AI call that finds no tool probes PATH for every launcher with which, bash -lc and zsh -lc. With no tool installed, deep-enrich made that probe for every component and spent most of its run time there. Skip the remaining component docs after the first batch reports no tool; they are still listed as missing.
The template's Quick Reference rows had no header or delimiter row, so the graph docs an agent writes from it render as paragraphs, unlike the ones deep-enrich writes.
|
No new findings in the requested diff. Earlier findings: All seven are resolved: real newlines, direct-plus-indirect paths, transitive reverse reachability, deferred consistency reporting, bounded reverse-path enumeration, preserved G2 list markers, and valid Quick Reference tables. Testing record: The description documents representative built-CLI runs at Reviewed only the requested diff; did not run, build, or install PR code. |
|
No new findings in the requested diff. Earlier Findings Testing Record Reviewed only the specified diff; did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Approving at 48e0f8e6. I merged main into the branch and finished the open items: G6 reverse rows now show the exact predecessor count, the 32 nearest predecessors and routes for the 8 nearest (layered-30's file goes from 344 KB to 47 KB), G2 steps stay list items, the Quick Reference blocks and the agent template are real tables, and with no AI tool on PATH the component phase stops after the first batch instead of probing PATH for every component. CI is green; the one failure on the first attempt was a workflow-handoff timeout, green on rerun.
@huong8373tt-beep Thanks for all the rounds on this.
Align the deep-enrich graph documents with the wiki method (Tencent#1565): real line breaks in the generated files, a multi-hop index and a reverse reachability index in G6 whose rows show the exact predecessor count, the 32 nearest predecessors and routes for the 8 nearest, confidence labels on G2 call-chain steps kept as list items, Quick Reference blocks rendered as tables, a K3 check that says when the contradiction comparison is deferred, and removal of the stale G6 file on re-run. With no AI tool on PATH, the component phase stops after the first batch instead of probing PATH for every component.
Closes #1565.
What changed
EXTRACTEDconfidence labels to deterministic G2 call-chain relations.graph-g6-triples.md, and removes stalegraph-g6-multihop.mdon regeneration.Validation
npm run typecheck— passed.npm run lint— passed with 0 warnings / 0 errors.npm run build— passed.git diff --check— passed.Real CLI verification
After building from the current head (
0daa12f4), the built CLI was run against isolated, hand-written evidence fixtures with an empty HOME and no AI launcher onPATH.graph-coverage.mdis 16 lines / 1,943 bytes.Api → (CALLS) → Service → (WRITES) → Storeand lists bothServiceandApiin Store's reverse-reachability row.Contradiction comparison: deferredrather than claiming a comparison was performed.EXTRACTEDconfidence labels.graph-g6-multihop.md.Disclosure and authorization
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.
The disposable worktree and test fixtures are local-only; no credentials or external AI service are required for the deterministic verification above.
Follow-up commits and real-CLI verification at 8590678 (added by a reviewer)
Merged
main, then: G6 reverse rows show the exact predecessor count, the 32 nearest predecessors and routes for the 8 nearest, with a note when either list is cut; the misnamed incoming-edge sort is gone; thegraph-rag-agent.mdheader matches; G2 labels only call-chain steps and keeps them as list items (- [EXTRACTED] ...); the Quick Reference blocks are real tables; and once no AI tool is on PATH, the component phase stops instead of probing PATH again for every component (random-2000: 17.0 s to 0.26 s, same docs). The newline test checks for a literal backslash-n.