Skip to content

feat(artifacts): may-dispatch over a static string table — J_DISPATCHES_TO with prov: ["table"] - #262

Merged
rahlk merged 1 commit into
mainfrom
feat/issue-261-table-dispatch
Sep 11, 2026
Merged

rahlk merged 1 commit into
mainfrom
feat/issue-261-table-dispatch

Conversation

@rahlk

@rahlk rahlk commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Closes #261. Spec § 4.5, amended on codellm-devkit/.github#80 (76a8c76).

What

  • Table tier (StringTables): a dispatch target that is a call T.m(…) whose every return is an array access rooted at a static String[] / String[][] field of T with a literal array initializer closes on every literal in the initializer — one J_DISPATCHES_TO per matching artifact, prov: ["table"]. Level-independent: the callee is found by simple type name + method name inside the tree, the body sliced from body_span; same-named types or same-arity overloads make it give up.
  • Per-caller closure in the call-graph tier (DataflowTiers.interprocAll): a parameter binds to the union of its callers' literals and tables; prov is table when any table contributed. Literal callers that disagree still refuse, so dataflow edges keep meaning exactly one target — only table edges are many-per-site.
  • prov on view_dispatches / J_DISPATCHES_TO is now literal | table | dataflow; table is listed as attempted only for a call-shaped target. No catalog or schema.neo4j.json change; README and SCHEMA_DECISIONS.md D33.

daytrader8, built jar vs released 3.3.0

3.3.0 this branch
view_dispatches 3 (literal) 37 — 3 literal + 34 table
JSPs with an incoming edge 3 of 23 19 of 23
TradeConfig.webUI entries on disk reached 0 of 17 17 of 17
unresolved 20 18 (3 no-such-artifact routes, 15 non-literal)
Cypher rows = JSON edges 3 = 3 37 = 37

-a 1 ⊆ -a 4 holds and the three 3.3.0 literal edges are unchanged. Unreached: PingJsp.jsp, PingJspEL.jsp, sample.jsp (URL-addressable pages, no dispatch to them) and error.jsp (web.xml error-page — roadmap Group E).

Tests

ViewTableTierTest: closes on every entry at -a 1 with the servlet URL contributing nothing; a table naming no file is no-such-artifact with prov: ["literal", "table"]; a computed return and a field without a literal initializer refuse; a parameter bound to a table and a literal unions at -a 4 and stays non-literal at -a 3. Existing dispatch, config-use and dataflow-tier tests unchanged and green. Full suite: 600 tests, only the Docker-only integration test unrun.

Finding, filed separately

TradeServletAction.requestDispatch(ctx, req, resp, page) — the dispatch site on DayTrader's real action path — still refuses at -a 4: the Jakarta finder marks any method with an HttpServletRequest parameter as an entrypoint, and the call-graph tier rightly refuses to bind an entrypoint's parameter from call sites. The finder's heuristic, not this tier, is what needs looking at.

…261)

StringTables closes a dispatch target that is a call into a static
String[]/String[][] table with a literal initializer on every entry of
the table, one J_DISPATCHES_TO per matching artifact with prov table.
DataflowTiers.interprocAll lets the call-graph tier bind a parameter to
the union of its callers' literals and tables; literal callers that
disagree still refuse, so dataflow edges keep meaning exactly one
target. On daytrader8 the graph goes from 3 to 37 dispatch edges and
every page in TradeConfig.webUI that exists on disk has an incoming
edge.
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.

feat(artifacts): may-dispatch over a static string table — J_DISPATCHES_TO with prov: ["table"] (DayTrader's TradeConfig.getPage)

1 participant