Skip to content

feat(schema): add EDGE_SCHEMA to java_ontology, generate docs/EDGE-NAVIGATION.md, bump ontology to v14#157

Merged
HumanBean17 merged 3 commits into
masterfrom
feat/schema-v2-edge-schema
May 16, 2026
Merged

feat(schema): add EDGE_SCHEMA to java_ontology, generate docs/EDGE-NAVIGATION.md, bump ontology to v14#157
HumanBean17 merged 3 commits into
masterfrom
feat/schema-v2-edge-schema

Conversation

@HumanBean17
Copy link
Copy Markdown
Owner

Summary

Implements PR-SCHEMA-V2-A (plans/PLAN-SCHEMA-V2.md § PR-A; locked shapes in propose/SCHEMA-V2-PROPOSE.md).

  • Adds EdgeAttr / EdgeSpec / EDGE_SCHEMA (10 edges, pre-flip HTTP_CALLS / ASYNC_CALLS as Symbol → Route) plus BROWNFIELD_RESOLVER_STRATEGY_SET in java_ontology.py.
  • Adds scripts/generate_edge_navigation.py and committed docs/EDGE-NAVIGATION.md with CI --check.
  • Bumps ONTOLOGY_VERSION 13 → 14; documents re-index in README + AGENT-GUIDE (PR-B/C consequences one sentence each).
  • DDL↔schema consistency tests and v13 graph refusal gate test.

Re-index required (v14). No HTTP/ASYNC endpoint flips in this PR.

BROWNFIELD_RESOLVER_STRATEGY_SET members (33)

annotation, chained_receiver, codebase_client, codebase_producer, codebase_route, constant_ref, constructor, feign_method, implicit_super, import_map, jms_template, kafka_send, kafka_template, layer_a_meta, layer_b_ann, layer_b_fqn, layer_c_source, method_reference, overload_ambiguous, phantom, rabbit_template, rest_template, same_module, spel, static_import, static_import_wildcard, stream_bridge, stream_bridge_send, suffix, this_super, unique_type_name, unresolved, web_client

(Union of FUZZY_STRATEGY_SET, brownfield layer literals, codebase stubs, call-graph receiver tiers, and HTTP/async dispatch strategy literals.)

Test plan

.venv/bin/ruff check java_ontology.py build_ast_graph.py scripts/generate_edge_navigation.py tests/test_schema_consistency.py tests/test_edge_navigation_doc.py
.venv/bin/python -m pytest tests/test_schema_consistency.py tests/test_edge_navigation_doc.py tests/test_kuzu_queries.py -v -k "ontology_version or stale"
.venv/bin/python scripts/generate_edge_navigation.py --check
PATH="$(pwd)/.venv/bin:$PATH" .venv/bin/ruff check .
PATH="$(pwd)/.venv/bin:$PATH" .venv/bin/python -m pytest tests -v

Made with Cursor

HumanBean17 and others added 2 commits May 16, 2026 18:01
Introduce canonical edge navigation schema, generated docs with CI check,
DDL consistency tests, and BROWNFIELD_RESOLVER_STRATEGY_SET without flipping
HTTP/ASYNC endpoints yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
GitHub Actions installs into the runner Python, not .venv/bin/python.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown
Owner Author

@HumanBean17 HumanBean17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (SCHEMA-V2 PR-A)

Solid, plan-faithful infrastructure PR: canonical EDGE_SCHEMA, generated docs + CI --check, endpoint-level DDL tests, and the v13→v14 ontology gate. Scope looks clean (no endpoint flips, no hints/builder leakage). Assuming CI is green, this is close to merge with a few items below.

Should fix before merge

1. EDGE-NAVIGATION.md describes post-flip traversals while edges are still pre-flip

For HTTP_CALLS / ASYNC_CALLS, typical_traversals steer agents through DECLARES_CLIENT / DECLARES_PRODUCER then out on the call edge from Client/Producer. Current DDL is still Symbol → Route. Today, neighbors(method_id, 'out', ['HTTP_CALLS']) works; the documented chain does not (until PR-B/C).

The plan allows forward-looking traversal text, but this doc is agent-facing at v14 and linked from README/AGENT-GUIDE — empty neighbors will look like a bug when the doc pointed the wrong way.

Suggestion: add pre-flip traversal keys (e.g. member_subject_current) and render both until PR-B/C flip endpoints, or make member_subject accurate for current endpoints and keep post-flip guidance in alien_subject / a dedicated note field.

2. README version drift

Re-index section is bumped to 14, but other README spots still say 13 (graph overview, AGENT-GUIDE blurb). Please grep ontology/graph references and align, or state once at the top of the graph section that current = 14 and treat v13 as historical only.

3. docs/AGENT-GUIDE.md header vs body

Intro says v14; ### Ontology glossary (version 13) was not updated. Worth bumping that section (and a quick skim for v13-only claims) in this PR since AGENT-GUIDE is in scope.

Non-blockers (follow-up OK)

  • BROWNFIELD_RESOLVER_STRATEGY_SET is exported but not enforced — no test that emitted strategy= literals ⊆ set; set can rot without a small grep-backed test (plan decision 28).
  • DDL↔schema tests are endpoint-onlyEDGE_SCHEMA.attrs can drift from _SCHEMA_* column lists; fine for PR-A per plan, but worth a comment in the test file or a follow-up for column parity.
  • v14 re-index with no graph semantic change in PR-A — intentional per plan; consider one sentence in README that PR-A alone does not flip HTTP/ASYNC endpoints (re-index once after B+C or when you need the v14 gate).
  • Stale v13 elsewhere (AGENTS.md, cursor rules, skills) — out of PR-A file list; tiny docs-sync follow-up would help.
  • Overlapping refusal tests — explicit v13 test and ONTOLOGY_VERSION - 1 test now both hit 13; harmless duplication.

Verdict

Approve with nits if we accept forward-looking traversals in the committed doc; request changes on traversals + README/AGENT-GUIDE version consistency if agents will read EDGE-NAVIGATION.md before PR-B/C land.

Add member_subject_current/type_subject_current for HTTP/ASYNC while keeping
post-flip member_subject for hints PR-D; align README/AGENT-GUIDE/AGENTS to v14;
enforce emitter strategy literals ⊆ BROWNFIELD_RESOLVER_STRATEGY_SET.

Co-authored-by: Cursor <cursoragent@cursor.com>
@HumanBean17 HumanBean17 merged commit 2533ed0 into master May 16, 2026
1 check passed
@HumanBean17 HumanBean17 deleted the feat/schema-v2-edge-schema branch May 23, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant