You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
address pr 155 review: lock traversals and member_only contracts
Clarify role-keyed typical_traversals vs SCHEMA appendix tuples, split
member_only across PR-A/PR-C, update PROPOSES-ORDER phase 2, and align
prompts with pr_analysis and compose test coverage.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: docs/PROPOSES-ORDER.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ When two or more proposes touch overlapping subsystems, the order they lock and
13
13
14
14
1.**SCHEMA-V2** — `propose/SCHEMA-V2-PROPOSE.md` (propose merged via [#151](https://github.com/HumanBean17/java-codebase-rag/pull/151); treat as locked for sequencing)
2.**HINTS-V3** — `propose/HINTS-V3-PROPOSE.md` (merged [#154](https://github.com/HumanBean17/java-codebase-rag/pull/154); set `Status: locked` before PR-D)
SCHEMA-V2 Decision 29: `PLAN-SCHEMA-V2.md` + `CURSOR-PROMPTS-SCHEMA-V2.md` are merge gates for **PR-A**.
44
+
SCHEMA-V2 Decision 29: `PLAN-SCHEMA-V2.md` + `CURSOR-PROMPTS-SCHEMA-V2.md` are merge gates for **PR-A** (satisfied when [#155](https://github.com/HumanBean17/java-codebase-rag/pull/155) is on `master`).
45
45
46
-
By analogy: `PLAN-HINTS-V3.md` + `CURSOR-PROMPTS-HINTS-V3.md` are merge gates for **PR-D**.
46
+
By analogy: `PLAN-HINTS-V3.md` + `CURSOR-PROMPTS-HINTS-V3.md` are merge gates for **PR-D** (same PR).
47
47
48
-
Plans and prompts may be drafted in parallel with each other; each pair must land before its code PR.
48
+
Plans and prompts may be drafted in parallel with each other; each pair must land before its code PR.**Code PRs (Phase 3) are not started** until Phase 2 is on `master`.
Copy file name to clipboardExpand all lines: plans/CURSOR-PROMPTS-SCHEMA-V2.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Read PR-A **File-by-file changes** and **Tests for PR-A** before coding. Plan wi
48
48
49
49
## Scope
50
50
51
-
1. **`java_ontology.py`** — `EdgeAttr`, `EdgeSpec`, `EDGE_SCHEMA` for **10 edges** with **pre-flip** `HTTP_CALLS`/`ASYNC_CALLS` (`Symbol→Route`). Include `brownfield_resolver_sourced`, role-keyed `typical_traversals`, `member_only` per HINTS-V3 §3.4. Add `BROWNFIELD_RESOLVER_STRATEGY_SET` (union of `FUZZY_STRATEGY_SET` + resolver strategies used on edges today).
51
+
1. **`java_ontology.py`** — `EdgeAttr`, `EdgeSpec`, `EDGE_SCHEMA` for **10 edges** with **pre-flip** `HTTP_CALLS`/`ASYNC_CALLS` (`Symbol→Route`). Include `brownfield_resolver_sourced`; **`typical_traversals: dict[str, str]`** per HINTS-V3 §3.5 (SCHEMA propose Appendix A tuples are illustrative only). **`member_only`:** set `True` on `DECLARES_CLIENT`, `EXPOSES`, `OVERRIDES`, `CALLS` only — **not** `DECLARES_PRODUCER` (PR-C). Add `BROWNFIELD_RESOLVER_STRATEGY_SET` (union of `FUZZY_STRATEGY_SET` + resolver strategies used on edges today); **enumerate every member in the PR body**.
52
52
2. **`scripts/generate_edge_navigation.py`** + committed **`docs/EDGE-NAVIGATION.md`** with `--check` mode.
22.`test_hints_neighbors_v2_empty_post_flip_method_http_calls` — integration (optional if graph fixture available)
133
+
22.`test_hints_neighbors_v2_empty_post_flip_method_http_calls` — integration round-trip on post-flip graph (**required** once SCHEMA PR-C is on `master`; fail loud if session fixture lacks Client→Route shape)
134
134
135
135
**Regression:**`test_hints_neighbors_fuzzy_strategy_*` and v1 neighbors tests still pass; update `test_hints_neighbors_empty_with_edge_types_emits_kind_check` → expect new template family (rename to reflect v3 behavior).
Copy file name to clipboardExpand all lines: plans/PLAN-SCHEMA-V2.md
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,8 +45,8 @@ Depends on:
45
45
| Topic | Decision |
46
46
| --- | --- |
47
47
|`EDGE_SCHEMA` size in v2 |**11** entries after PR-C (`DECLARES_PRODUCER` added); PR-A ships **10** (no Producer table yet). |
48
-
|`typical_traversals`|Role-keyed `dict[str, str]` (`type_subject`, `member_subject`, `alien_subject`, …) finalized in PR-A; hints v3 consumes in PR-D. |
49
-
|`member_only` on `EdgeSpec`|Prefer PR-A; if omitted, PR-D adds (hint-only field; not in DDL CI). |
48
+
|`typical_traversals`|**PR-A contract:** role-keyed `dict[str, str]`per HINTS-V3 §3.5 (`type_subject`, `member_subject`, `alien_subject`, …). SCHEMA-V2 propose Appendix A `tuple[str, …]` examples are **illustrative only** — implementation and hints v3 use the dict shape. |
49
+
|`member_only` on `EdgeSpec`|Hint-only (not in DDL CI). **PR-A:**`True` on `DECLARES_CLIENT`, `EXPOSES`, `OVERRIDES`, `CALLS` only (10-edge schema). **PR-C:** add `DECLARES_PRODUCER` to `EDGE_SCHEMA` and set `member_only=True` when that edge lands. If PR-A omits the field entirely, PR-D may add it. |
|`BROWNFIELD_RESOLVER_STRATEGY_SET`|`FUZZY_STRATEGY_SET` ∪ non-fuzzy resolver strategies used on edges today (`codebase_route`, `codebase_client`, `codebase_producer`, `layer_*`, pass5/6 HTTP/async strategy literals — lock members in PR-A from `grep` of `strategy=` / ontology sets). |
52
52
|`HttpCallRow` / `AsyncCallRow`| PR-B: `client_id` replaces `symbol_id` on HTTP rows. PR-C: `producer_id` replaces `symbol_id` on async rows. |
@@ -70,8 +70,8 @@ Depends on:
70
70
-`ASYNC_CALLS`: `Symbol → Route` (pre-flip)
71
71
- No `DECLARES_PRODUCER` entry yet (PR-C).
72
72
- Add `brownfield_resolver_sourced: bool` on `EdgeSpec`.
73
-
- Add `member_only: bool = False` on `EdgeSpec` (default False); set True on `DECLARES_CLIENT`, `EXPOSES`, `OVERRIDES`, `CALLS`per HINTS-V3 §3.4 (PR-D depends on this).
74
-
- Add `typical_traversals: dict[str, str]` per edge (role keys; post-flip traversals for HTTP/ASYNC may describe **target** shape — update strings again in PR-B/C when endpoints flip).
73
+
- Add `member_only: bool = False` on `EdgeSpec` (default False). **PR-A only:**set `True` on `DECLARES_CLIENT`, `EXPOSES`, `OVERRIDES`, `CALLS`(not `DECLARES_PRODUCER` — that edge does not exist until PR-C).
74
+
- Add `typical_traversals: dict[str, str]` per edge (role keys per HINTS-V3 §3.5 — **not** the tuple shape in SCHEMA propose Appendix A). Post-flip traversals for HTTP/ASYNC may describe target shape; update strings again in PR-B/C when endpoints flip.
-`trace_request_flow` inbound: two-hop via Client; output rows include `caller_node_id`, `caller_node_kind`, `declaring_symbol_id`, `declaring_symbol_fqn`.
187
-
- Impact-analysis expansion (~line 1335): three-hop through Client; surface caller node id on impacted route rows.
187
+
- Impact-analysis expansion in `KuzuGraph` cross-service flow stage (Cypher using `HTTP_CALLS|ASYNC_CALLS` on changed symbols): three-hop through Client; surface caller node id on impacted route rows. Locate via `grep HTTP_CALLS|ASYNC_CALLS` in `kuzu_queries.py` — do not rely on line numbers.
188
188
- Remove all `Symbol-[HTTP_CALLS]->Route` patterns.
189
189
190
190
### 4. `pr_analysis.py`
@@ -257,6 +257,7 @@ with every hit accounted for (fixed or justified).
257
257
258
258
- Add `Producer` to `NodeKind`.
259
259
- Add `EDGE_SCHEMA["DECLARES_PRODUCER"]`, update `ASYNC_CALLS` to `Producer → Route`.
260
+
- Set `member_only=True` on `DECLARES_PRODUCER` (edge lands in this PR).
260
261
-`typical_traversals` for async edges/post-flip producer traversals.
261
262
262
263
### 2. `build_ast_graph.py`
@@ -275,27 +276,31 @@ with every hit accounted for (fixed or justified).
275
276
-`find_route_callers` / `trace_request_flow` / impact analysis: include `DECLARES_PRODUCER` + `ASYNC_CALLS` two-hop branch; `caller_node_kind="producer"` with `topic`/`broker` from node.
0 commit comments